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.
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument #9534
Comments
Cause you tell it to do so:
Correct command is |
|
Maybe it would help to read the report before answering and closing it. youtube-dl should generate an mp4 file with avc video and aac audio, as usual. it does not do that because it downloads opus and does not convert it. |
|
You did not tell it to convert ( |
|
The closest thing you can do in order to achieve
(you had to mention this in the OP post in the first place since it's not possible to decipher whether your intention was actually to download audio, convert it, download video and mux them or just download audio and convert it or whatever else, needless to say you did not even follow new issue template and provide all information we require for a report).
|
Hi,
youtube-dl does not properly convert audio. e.g. when doing
youtube-dl -v --audio-format aac --merge-output-format mp4 'https://www.youtube.com/results?search_query=vjf3WMzPvpY'✌️ 0 -map 1🅰️ 0 'file:Russischer Historiker über vier Einschränkungen der deutschen Souveränität durch 2+4-Vertrag-vjf3WMzPvpY.temp.mp4'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'--audio-format', u'aac', u'--merge-output-format', u'mp4', u'https://www.youtube.com/results?search_query=vjf3WMzPvpY']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.05.10
[debug] Python version 2.7.11+ - Linux-4.4.0-22-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 2.8.6-1ubuntu2, avprobe 2.8.6-1ubuntu2, ffmpeg 2.8.6-1ubuntu2, ffprobe 2.8.6-1ubuntu2, rtmpdump 2.4
[debug] Proxy map: {}
[youtube:search_url] vjf3WMzPvpY: Downloading webpage
[download] Downloading playlist: vjf3WMzPvpY
[youtube:search_url] playlist vjf3WMzPvpY: Downloading 1 videos
[download] Downloading video 1 of 1
[youtube] vjf3WMzPvpY: Downloading webpage
[youtube] vjf3WMzPvpY: Downloading video info webpage
[youtube] vjf3WMzPvpY: Extracting video information
[youtube] vjf3WMzPvpY: Downloading MPD manifest
[debug] Invoking downloader on u'https://r1---sn-cxg7ene7.googlevideo.com/videoplayback?id=be37f758cccfbe96&itag=137&source=youtube&requiressl=yes&pl=17&initcwndbps=1792500&mn=sn-cxg7ene7&mm=31&mv=m&ms=au&ratebypass=yes&mime=video/mp4&gir=yes&clen=101607074&lmt=1463391925128486&dur=487.353&upn=MT_fUCY56t4&sver=3&fexp=9410706,9413139,9416126,9416891,9419452,9421084,9422596,9428398,9429014,9431012,9432057,9433096,9433946,9434086,9435265,9435772,9436323,9436348,9436446,9436617,9436810,9436871&signature=57A60CA80A34245E7BFAFF31BEEF27F87AC9DBE8.8538FF753BD7BC4A2C1A5B97B9C982DAF2408780&key=dg_yt0&mt=1463594106&ip=91.64.206.115&ipbits=0&expire=1463616010&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,initcwndbps,mn,mm,mv,ms,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Russischer Historiker über vier Einschränkungen der deutschen Souveränität durch 2+4-Vertrag-vjf3WMzPvpY.f137.mp4
[download] 100% of 96.90MiB in 17:07
[debug] Invoking downloader on u'https://r1---sn-cxg7ene7.googlevideo.com/videoplayback?id=be37f758cccfbe96&itag=251&source=youtube&requiressl=yes&pl=17&initcwndbps=1792500&mn=sn-cxg7ene7&mm=31&mv=m&ms=au&ratebypass=yes&mime=audio/webm&gir=yes&clen=8694398&lmt=1463271709121292&dur=487.361&upn=MT_fUCY56t4&sver=3&fexp=9410706,9413139,9416126,9416891,9419452,9421084,9422596,9428398,9429014,9431012,9432057,9433096,9433946,9434086,9435265,9435772,9436323,9436348,9436446,9436617,9436810,9436871&signature=0E784D73A4A2E1917671D436DBBDB6D5270CEB6E.84FA260856408B1EC763AA78EC0E6FFF3892B964&key=dg_yt0&mt=1463594106&ip=91.64.206.115&ipbits=0&expire=1463616010&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,initcwndbps,mn,mm,mv,ms,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Russischer Historiker über vier Einschränkungen der deutschen Souveränität durch 2+4-Vertrag-vjf3WMzPvpY.f251.webm
[download] 100% of 8.29MiB in 01:28
[ffmpeg] Merging formats into "Russischer Historiker über vier Einschränkungen der deutschen Souveränität durch 2+4-Vertrag-vjf3WMzPvpY.mp4"
[debug] ffmpeg command line: avconv -y -i 'file:Russischer Historiker über vier Einschränkungen der deutschen Souveränität durch 2+4-Vertrag-vjf3WMzPvpY.f137.mp4' -i 'file:Russischer Historiker über vier Einschränkungen der deutschen Souveränität durch 2+4-Vertrag-vjf3WMzPvpY.f251.webm' -c copy -map 0
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1781, in post_process
files_to_delete, info = pp.run(info)
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 445, in run
self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 168, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError
it tries to put opus audio into mp4, which seems to cause an error message by avconv. Just try to run the avconv from command line.