1
I'm trying to download music from YouTube site using youtube-dl with the best quality possible. So I've tried to download as a WAV file with this command:
youtube-dl -ci -f 'bestvideo[ext=mp4]+bestaudio' -x --audio-format wav https://www.youtube.com/watch?v=tDOffPd81YI
which produced a big WAV file (with this video, 42.3 Mo 48kHz stereo 16bit 1536kbit/s)
But when I compared with an M4A file, downloaded with:
youtube-dl -ci -f 'bestvideo[ext=mp4]+bestaudio' -x --audio-format m4a https://www.youtube.com/watch?v=tDOffPd81YI
The M4A file is smaller and lower quality (with this video, 12.3 Mo 48kHz stereo 441kbit/s).
Why is the WAV file better quality? And what causes the difference of file size? It is more strange that I have asked the same quality for both (-f 'bestvideo[ext=mp4]+bestaudio')
I tried downloading with bestaudio quality and converting to a M4A file:
youtube-dl -ci -f "bestaudio" -x --audio-format m4a https://www.youtube.com/watch?v=tDOffPd81YI
On this file, I found that the first file had a bigger size and a bigger bitrate than the second, but it probably depends on the video you choose.
Does the flag bestaudio[ext=m4a] download the bestaudio stream in M4A format, or does it take the best audio and convert it to M4A?
I'm running on Manjaro Linux.
Thanks, I've converted some .mp3 files with audacity to .wav, and there were all bigger. So it's not youtube-dl, but the conversion (which is totally useless if you want small files). There was already a topic about this subject: http://stackoverflow.com/questions/15593806/why-is-a-wav-file-created-from-a-mp3-file-much-larger-in-size
– prosopopee – 2016-08-23T05:20:41.727