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

ERROR: Could not write header for output file #0 #9662

Closed
rugk opened this issue Jun 1, 2016 · 3 comments
Closed

ERROR: Could not write header for output file #0 #9662

rugk opened this issue Jun 1, 2016 · 3 comments

Comments

@rugk
Copy link

@rugk rugk commented Jun 1, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.06.02. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.06.02

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl https://www.youtube.com/watch?v=4BTTiWkdT8Q -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=4BTTiWkdT8Q', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.06.02
[debug] Python version 2.7.5+ - Linux-3.11-2-amd64-x86_64-with-LinuxMint-1-debian
[debug] exe versions: ffmpeg 2.1.1, ffprobe 2.1.1
[debug] Proxy map: {'no': 'localhost,127.0.0.0/8,::1'}
[youtube] 4BTTiWkdT8Q: Downloading webpage
[youtube] 4BTTiWkdT8Q: Downloading video info webpage
[youtube] 4BTTiWkdT8Q: Extracting video information
[youtube] 4BTTiWkdT8Q: Downloading MPD manifest
[debug] Invoking downloader on u'https://r1---sn-1gi7zn7z.googlevideo.com/videoplayback?id=e014d389691d4fc4&itag=248&source=youtube&requiressl=yes&mv=m&ms=au&pl=24&mm=31&mn=sn-1gi7zn7z&initcwndbps=13902500&nh=IgphcjAxLnpyaDA0KgkxMjcuMC4wLjE&ratebypass=yes&mime=video/webm&gir=yes&clen=461970219&lmt=1436981017080235&dur=2923.720&mt=1464816325&upn=FE0yQ2iG4Oo&sver=3&key=dg_yt0&signature=51F6A75B78A877A974EC67C8B8E4EE8A5712C82F.5561F101214E93EBA07EF6BE566EB2D0F8E5C051&fexp=9407157,9416126,9416778,9416891,9418777,9422596,9428398,9429743,9431012,9431677,9432362,9432772,9433096,9433114,9433380,9433946,9433999,9435361,9435527,9435697,9435876,9436618,9436957,9437066,9437323,9437553,9437711,9437742&ip=185.32.221.150&ipbits=0&expire=1464838234&sparams=ip,ipbits,expire,id,itag,source,requiressl,mv,ms,pl,mm,mn,initcwndbps,nh,ratebypass,mime,gir,clen,lmt,dur'
[download] Zero days - security leaks for sale (VPRO Backlight)-4BTTiWkdT8Q.f248.webm has already been downloaded
[download] 100% of 440.57MiB
[debug] Invoking downloader on u'https://r1---sn-1gi7zn7z.googlevideo.com/videoplayback?id=e014d389691d4fc4&itag=251&source=youtube&requiressl=yes&mv=m&ms=au&pl=24&mm=31&mn=sn-1gi7zn7z&initcwndbps=13902500&nh=IgphcjAxLnpyaDA0KgkxMjcuMC4wLjE&ratebypass=yes&mime=audio/webm&gir=yes&clen=45688386&lmt=1436974398524798&dur=2923.821&mt=1464816325&upn=FE0yQ2iG4Oo&sver=3&key=dg_yt0&signature=1D9647DBFF58C7A7E2E98C14978BA4B9D200D06C.67CE6CCCFD0C7C6C3311CA331D5CD7E0D945B531&fexp=9407157,9416126,9416778,9416891,9418777,9422596,9428398,9429743,9431012,9431677,9432362,9432772,9433096,9433114,9433380,9433946,9433999,9435361,9435527,9435697,9435876,9436618,9436957,9437066,9437323,9437553,9437711,9437742&ip=185.32.221.150&ipbits=0&expire=1464838234&sparams=ip,ipbits,expire,id,itag,source,requiressl,mv,ms,pl,mm,mn,initcwndbps,nh,ratebypass,mime,gir,clen,lmt,dur'
[download] Zero days - security leaks for sale (VPRO Backlight)-4BTTiWkdT8Q.f251.webm has already been downloaded
[download] 100% of 43.57MiB
[ffmpeg] Merging formats into "Zero days - security leaks for sale (VPRO Backlight)-4BTTiWkdT8Q.webm"
[debug] ffmpeg command line: ffmpeg -y -i 'file:Zero days - security leaks for sale (VPRO Backlight)-4BTTiWkdT8Q.f248.webm' -i 'file:Zero days - security leaks for sale (VPRO Backlight)-4BTTiWkdT8Q.f251.webm' -c copy -map 0:v:0 -map 1:a:0 'file:Zero days - security leaks for sale (VPRO Backlight)-4BTTiWkdT8Q.temp.webm'
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 1782, 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
...
<end of log>

Description of your issue, suggested solution and other information

Downloading this video failed with ERROR: Could not write header for output file #0.

System: Linux Mint Debian Edition

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 1, 2016

Update ffmpeg.

@dstftw dstftw closed this Jun 1, 2016
@rugk
Copy link
Author

@rugk rugk commented Jun 1, 2016

old in the repos I think...

But instead of such a bad error message youtube-dl might show an error message such as ffmpeg is too old, please upgrade it.
This would be much better...

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 2, 2016

@dstftw How about asking users to use the latest ffmpeg if FFmpegPostProcessorError is raised?

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
3 participants
You can’t perform that action at this time.