Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
youtube-dl does not respect --audio-format if -o is used. #6724
Comments
|
Forcing 'mp3' file extension confuses youtube-dl. The mp3 file is in fact m4a. Try:
|
|
Thanks. Can you explain that? Regards, |
|
With |
- make paths configurable --> settings
|
This stack overflow helped me. |
Somewhere in the last few weeks, something changed while using the -o option.
When extracting audio, if -o is used, the audio stream is copied (mp4) even when mp3 format is what was asked for.
This does not happen if -o is ommited.
$ youtube-dl --verbose --extract-audio --audio-format mp3 -o output.mp3 https://www.youtube.com/watch?v=NUbUen66Z0k
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--extract-audio', u'--audio-format', u'mp3', u'-o', u'output.mp3', u'https://www.youtube.com/watch?v=NUbUen66Z0k']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.08.28
[debug] Python version 2.7.9 - Linux-3.19.0-25-lowlatency-x86_64-with-Ubuntu-15.04-vivid
[debug] exe versions: avconv 11.2-6, avprobe 11.2-6, ffmpeg 2.7.2-1, ffprobe 2.7.2-1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] NUbUen66Z0k: Downloading webpage
[youtube] NUbUen66Z0k: Downloading video info webpage
[youtube] NUbUen66Z0k: Extracting video information
[youtube] NUbUen66Z0k: Downloading DASH manifest
[youtube] NUbUen66Z0k: Downloading DASH manifest
[debug] Invoking downloader on 'https://r3---sn-bg07dnl7.googlevideo.com/videoplayback?id=3546d47a7eba6749&itag=140&source=youtube&requiressl=yes&nh=IgpwcjAxLmdydTA2Kg0xNzcuODQuMTYwLjgx&mm=35&mv=s&ms=pm&pl=24&mn=sn-bg07dnl7&ratebypass=yes&mime=audio/mp4&gir=yes&clen=17733417&lmt=1440979396118884&dur=1116.531&fexp=9406124,9408086,9408511,9408710,9409069,9413208,9415365,9415436,9415485,9416023,9416103,9416126,9416686,9417707,9417828,9418153,9418391,9418448,9419550,9420021&signature=495A189E4ACEB04F0E8F379404B9E6C021B8A4F6.0FC58A47DF97875748AC60A3459CBB1A2CB4FD53&mt=1441058097&sver=3&key=dg_yt0&upn=NFbNDS8nK78&ip=200.150.103.150&ipbits=0&expire=1441086830&sparams=ip,ipbits,expire,id,itag,source,requiressl,nh,mm,mv,ms,pl,mn,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: output.mp3
[download] 100% of 16.91MiB in 00:49
[ffmpeg] Correcting container in "output.mp3"
[debug] ffmpeg command line: avconv -y -i output.mp3 -c copy -f mp4 output.temp.mp3
[debug] avconv command line: avprobe -show_streams output.mp3
[ffmpeg] Post-process file output.mp3 exists, skipping
$ file -i output.mp3
output.mp3: video/mp4; charset=binary
------------ WITHOUT -o ---------------------
$ youtube-dl --verbose --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=NUbUen66Z0k
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--extract-audio', u'--audio-format', u'mp3', u'https://www.youtube.com/watch?v=NUbUen66Z0k']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.08.28
[debug] Python version 2.7.9 - Linux-3.19.0-25-lowlatency-x86_64-with-Ubuntu-15.04-vivid
[debug] exe versions: avconv 11.2-6, avprobe 11.2-6, ffmpeg 2.7.2-1, ffprobe 2.7.2-1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] NUbUen66Z0k: Downloading webpage
[youtube] NUbUen66Z0k: Downloading video info webpage
[youtube] NUbUen66Z0k: Extracting video information
[youtube] NUbUen66Z0k: Downloading DASH manifest
[youtube] NUbUen66Z0k: Downloading DASH manifest
[debug] Invoking downloader on 'https://r1---sn-jv2xauxaxjvh-jfce.googlevideo.com/videoplayback?id=3546d47a7eba6749&itag=140&source=youtube&requiressl=yes&mm=31&ms=au&mn=sn-jv2xauxaxjvh-jfce&mv=m&pl=24&ratebypass=yes&mime=audio/mp4&gir=yes&clen=17733417&lmt=1440979396118884&dur=1116.531&fexp=9408710,9408988,9409069,9412514,9412913,9415365,9415436,9415485,9415521,9415992,9416023,9416105,9416126,9416330,9416729,9417014,9417707,9418153,9418199,9418448,9419338,9420019&sver=3&key=dg_yt0&signature=66080A8EFEE9E5AA5D570D006248A8D0969116D7.98C1E7DDC799DE71E78EB093A8CAADF7737FD101&mt=1441065224&upn=khG4z5YRi-A&ip=200.150.103.150&ipbits=0&expire=1441086903&sparams=ip,ipbits,expire,id,itag,source,requiressl,mm,ms,mn,mv,pl,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.m4a
[download] 100% of 16.91MiB in 01:29
[ffmpeg] Correcting container in "Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.m4a"
[debug] ffmpeg command line: avconv -y -i 'Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.m4a' -c copy -f mp4 'Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.temp.m4a'
[debug] avconv command line: avprobe -show_streams 'Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.m4a'
[avconv] Destination: Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.mp3
[debug] ffmpeg command line: avconv -y -i 'Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.m4a' -vn -acodec libmp3lame -q:a 5 'Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.mp3'
Deleting original file Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.m4a (pass -k to keep)
$ file -i *NUbUen66Z0k.mp3
Leocádio José Correia - 26 de agosto de 2015-NUbUen66Z0k.mp3: audio/mpeg; charset=binary