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

Youtube vide breaks after download FFmpegPostProcessorError: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument #24525

Closed
Neo-7575 opened this issue Mar 29, 2020 · 1 comment
Labels

Comments

@Neo-7575
Copy link

@Neo-7575 Neo-7575 commented Mar 29, 2020

Checklist

  • [ x] I'm reporting a broken site support
  • [ x] I've verified that I'm running youtube-dl version 2020.03.24
  • [ x] I've checked that all provided URLs are alive and playable in a browser
  • [ x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [ x] I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl -v https://www.youtube.com/watch?v=F8Y797g_Jg4
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=F8Y797g_Jg4']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 2.7.12 (CPython) - Linux-4.4.0-142-generic-x86_64-with-LinuxMint-18.1-serena
[debug] exe versions: avconv 2.8.15, avprobe 2.8.15, ffmpeg 2.8.15, ffprobe 2.8.15
[debug] Proxy map: {}
[youtube] F8Y797g_Jg4: Downloading webpage
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://r2---sn-u2oxu-bqol.googlevideo.com/videoplayback?expire=1585500623&ei=b32AXqWNC5fx7gPwmaqICw&ip=83.21.26.227&id=o-APURSk0Mq2vGobUXqIwaeqcd7LYX1UQ9XWk9CKp_X6Pu&itag=398&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397%2C398&source=youtube&requiressl=yes&mh=e1&mm=31%2C29&mn=sn-u2oxu-bqol%2Csn-u2oxu-f5fe6&ms=au%2Crdu&mv=m&mvi=1&pl=24&initcwndbps=762500&vprv=1&mime=video%2Fmp4&gir=yes&clen=304138915&dur=4010.005&lmt=1580862799194825&mt=1585478913&fvip=2&keepalive=yes&fexp=23882513&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ADKhkGMwRAIgEOm5YR-CMdx3RwTFshDGkqUW0HyJAffKT0-u4dYae1UCIDElsP2nhjR-ULHgefeN4yiRW1slNPefiDVCSaK_3agX&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRQIgA3C4J2KPAaWZAjWWxagwZknMdGImD1343xeSC3NwXMwCIQDDGMl2VCJ9CVw9YmdtlVE1f-VvanALgy1KGp925cwMEw%3D%3D&ratebypass=yes'
[download] Destination: Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.f398.mp4
[download] 100% of 290.05MiB in 03:38
[debug] Invoking downloader on u'https://r2---sn-u2oxu-bqol.googlevideo.com/videoplayback?expire=1585500623&ei=b32AXqWNC5fx7gPwmaqICw&ip=83.21.26.227&id=o-APURSk0Mq2vGobUXqIwaeqcd7LYX1UQ9XWk9CKp_X6Pu&itag=140&source=youtube&requiressl=yes&mh=e1&mm=31%2C29&mn=sn-u2oxu-bqol%2Csn-u2oxu-f5fe6&ms=au%2Crdu&mv=m&mvi=1&pl=24&initcwndbps=762500&vprv=1&mime=audio%2Fmp4&gir=yes&clen=64899123&dur=4010.062&lmt=1555995968467430&mt=1585478913&fvip=2&keepalive=yes&fexp=23882513&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ADKhkGMwRAIgGrP01xUF9o2dU-4S0GEV2dnnBao1eDJZjsHIkahY0boCIEq9qx2l1F6mPmemEmT5UaTAOJxxwaf-SWBo_uvuxx7A&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ABSNjpQwRQIgA3C4J2KPAaWZAjWWxagwZknMdGImD1343xeSC3NwXMwCIQDDGMl2VCJ9CVw9YmdtlVE1f-VvanALgy1KGp925cwMEw%3D%3D&ratebypass=yes'
[download] Destination: Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.f140.m4a
[download] 100% of 61.89MiB in 00:45
[ffmpeg] Merging formats into "Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.f398.mp4' -i 'file:Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.f140.m4a' -c copy -map '0✌️0' -map '1🅰️0' 'file:Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.temp.mp4'
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 2065, in post_process
files_to_delete, info = pp.run(info)
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 512, 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 235, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

Description

instead of 1 video file I get 3 files

Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.f140.m4a

Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.f398.mp4

Tip Toland Workshop -- Sculpting a Clay Head - Free Tutorial-F8Y797g_Jg4.temp.mp4

The video files don't look playable while .m4a contains audio only.

Only this video looks like its problematic to download, no other YT video shows this problem.

Theory:
the -- in the video title can mess up something that uses bash and even " -- " will not escape it can this be the problem?

The video is playable in the browser.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 29, 2020

Outdated ffmpeg.

@dstftw dstftw closed this Mar 29, 2020
@dstftw dstftw added the invalid label Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.