Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download audio as .flac format #448

Open
jannme310103 opened this issue Jun 6, 2024 · 9 comments
Open

Download audio as .flac format #448

jannme310103 opened this issue Jun 6, 2024 · 9 comments

Comments

@jannme310103
Copy link

Hello there,

I'm wondering if it's possible to add a option in the format Drop Down Menu that allows you to download audio as a .flac file. Is this possible?

Greetings
Jann

@PikuZheng
Copy link
Contributor

yes...but can you confirm your ffmpeg support flac encode?

on my pc---->

localhost:~# docker run -it --rm metube:20240522v2 '/usr/local/bin/ffmpeg' '-codecs' | grep flac
 DEAI.S flac                 FLAC (Free Lossless Audio Codec)                      <--------------EA means support flac audio encode

@jannme310103
Copy link
Author

I don't exactly know, I'll check that if I'm back at home later

@jannme310103
Copy link
Author

So I checked it, I would say it's able to encode flac
I've checked it with this command

ffmpeg -i /home/jann/Sickmodel R Mish\ I One\ And\ only\ (Uptemp ol Edit).flac -f null -

and this is the output:

ffmpeg version 5.1.4-0+rpt3+deb12ul Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr --extra-version=0+rpt3+deb12ul --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --disabl e-mmal --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-li bbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --en able-libdavld --enable-libflite --enable-libfontconfig --enable-libfreetype --enab le-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt - -enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-l ibrubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspe ex --enable-libsrt --enable-libssh --enable-libsvtavl --enable-libtheora --enable-
libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libz --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --en mq able-opengl --enable-sand --enable-sdl2 --disable-sndio --enable-libjxl --enable-n eon --enable-v4l2-request --enable-libudev --enable-epoxy --libdir=/usr/lib/aarch6 4-linux-gnu --arch=arm64 --enable-pocketsphinx -- enable-librsvg --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint -ena ble-freior --enable-libx264 --enable-libplacebo --enable-libravle --enable-shared libavutil 57. 28.100 / 57 28.100 libavcodec 59. 37.100 /59 37.100 libavformat 59. 27.100 /59 27.100 libavdevice 59 7.100 59. 7.100 libavfilter 8 44.100 8 44.100 libswscale 6 7.100 7.100 libswresample 4 7.100 4. 7.100 56 6.100 56. 6.100 from /home/jann/Sickmode & Mish - One And Only (Uptempo Edit).fla
libpostproc Input #0, flac,
c':
Metadata: encoder
Lavf58.20.100
Duration:
00:00:45.81,
start:
0.000000,
bitrate:
1052 kb/s
Stream #0:0:
Audio:
flac,
44100 Hz,
stereo,
s16
Stream mapping: Stream #0:0 ->
#0:0
(flac (native) for help

pcm_s16le
(native))
Press [q] to stop, [?] Output #0, null, to 'pipe:': Metadata:
encoder
Lavf59.27.100
stream #0:0:
Audio:
pcm_sl6le,
44100 Hz, stereo,
s16,
1411 kb/s
Metadata: encoder
Lavc59.37.100
pcm_sl6le
size=N/A time=00:00:45.81 bitrate=N/A speed=1.58e+03x video:0kB audio:7892kB subtitle:okB other streams:OkB global headers:0kB muxing ov erhead: unknown

@PikuZheng
Copy link
Contributor

ffmpeg -codecs |grep flac plz

@jannme310103
Copy link
Author

Looking good

root@raspi:/# ffmpeg -codecs I grep flac ffmpeg version 5.1.4-0+rpt3+deb1l2ul Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr --extra-version=0+rpt3+deb12u1 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --disabl e-mmal --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-li bbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --en able-libdavld --enable-libflite --enable-libfontconfig --enable-libfreetype --enab le-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt - -enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-l ibrubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspe ex --enable-libsrt --enable-libssh --enable-libsvtavl --enable-libtheora --enable- libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libz mq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --en able-opengl --enable-sand --enable-sdl2 --disable-sndio --enable-libjxl --enable-n eon --enable-v4l2-request --enable-libudev --enable-epoxy --libdir=/usr/lib/aarch6 4-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --ena ble-freior --enable-libx264 --enable-libplacebo --enable-libravle --enable-shared libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44. . 100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 DEAI.S flac FLAC (Free Lossless Audio Codec)

Screenshot_20240607_032653_Termius.png

@PikuZheng
Copy link
Contributor

yes. with postprocesser, you can convert audio file to flac easyily. just set
YTDL_OPTIONS={"postprocessors":[{"key":"Exec","exec_cmd":"sh /downloads/execafterdownload.sh","when":"after_move"}]}

file execafterdownload.sh:
ffmpeg -i "$1" -c:a flac "$1.flac"

@jannme310103
Copy link
Author

I don't know how your description should work and what I have to do :(

Isn't there an easier way?
Maybe just like my question from the beginning, to bring an metube update?

This update then has the possibility to download the video respectively the video audio as a flac file directly?

If you want to explain me your idea to convert the audio file into a flac file, feel free :)
Or is it just me who finds as a first impression your solution is a little bit daunting and looks complicated.

@PikuZheng
Copy link
Contributor

Maybe just like my question from the beginning, to bring an metube update?

This update then has the possibility to download the video respectively the video audio as a flac file directly?

yes. but it needs a little time

@jannme310103
Copy link
Author

No problem, I'll be happy to wait :)

Can you inform me in some way as soon as the update is available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants