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

ffmpeg/avconv error "could not write header output" #6737

Closed
lightonflux opened this issue Sep 2, 2015 · 4 comments
Closed

ffmpeg/avconv error "could not write header output" #6737

lightonflux opened this issue Sep 2, 2015 · 4 comments

Comments

@lightonflux
Copy link

@lightonflux lightonflux commented Sep 2, 2015

  $ youtube-dl --version       
  2015.08.28
  $  youtube-dl https://soundcloud.com/eafumblind/sets/absolutedrift
  […]
  [download] 100% of 19.38MiB
  [ffmpeg] Adding metadata to 'Nyte - Neon Lights-159711594.mp3'
  ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
@lightonflux
Copy link
Author

@lightonflux lightonflux commented Sep 2, 2015

Thanks for your fast response.

 $ youtube-dl https://soundcloud.com/eafumblind/sets/absolutedrift --verbose 
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--add-metadata', u'-ct', u'-f', u'bestvideo[height<=?1080]+bestaudio/best', u'https://soundcloud.com/eafumblind/sets/absolutedrift', u'--verbose']
[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-4.0.0-2-amd64-x86_64-with-debian-8.1
[debug] exe versions: avconv 11.4-6, avprobe 11.4-6
[debug] Proxy map: {}
[soundcloud:set] eafumblind/sets/absolutedrift: Resolving id
[soundcloud:set] eafumblind/sets/absolutedrift: Downloading JSON metadata
[download] Downloading playlist: Absolute Drift Soundtrack
[soundcloud:set] playlist Absolute Drift Soundtrack: Collected 45 video ids (downloading 45 of them)
[download] Downloading video 1 of 45
[soundcloud] nyteofficial/neon-lights: Resolving id
[soundcloud] nyteofficial/neon-lights: Downloading info JSON
[soundcloud] 159711594: Downloading track url
[soundcloud] 159711594: Checking download video format URL
[soundcloud] 159711594: Checking http_mp3_128_url video format URL
[debug] Invoking downloader on u'https://api.soundcloud.com/tracks/159711594/download?client_id=b45b1aa10f1ac2941910a7f0d10f8e28'
[download] Nyte - Neon Lights-159711594.mp3 has already been downloaded
[download] 100% of 19.38MiB
[ffmpeg] Adding metadata to 'Nyte - Neon Lights-159711594.mp3'
[debug] ffmpeg command line: avconv -y -i 'Nyte - Neon Lights-159711594.mp3' -c copy -metadata 'comment=Neon Lights by Nyte. Available now on:
Beatport - smarturl.it/BTSEPBeatport
iTunes - http://smarturl.it/BTSEPiTunes

More info:

www.facebook.com/nyteofficial
www.youtube.com/nyteofficial
www.twitter.com/nyteofficial
www.nyteofficial.com' -metadata 'description=Neon Lights by Nyte. Available now on:
Beatport - smarturl.it/BTSEPBeatport
iTunes - http://smarturl.it/BTSEPiTunes

More info:

www.facebook.com/nyteofficial
www.youtube.com/nyteofficial
www.twitter.com/nyteofficial
www.nyteofficial.com' -metadata 'artist=Nyte (Official)' -metadata 'title=Nyte - Neon Lights' -metadata date=20140721 -metadata purl=http://soundcloud.com/nyteofficial/neon-lights 'Nyte - Neon Lights-159711594.temp.mp3'
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1699, in post_process
    files_to_delete, info = pp.run(info)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/postprocessor/ffmpeg.py", line 391, in run
    self.run_ffmpeg(filename, temp_filename, options)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/postprocessor/ffmpeg.py", line 155, in run_ffmpeg
    self.run_ffmpeg_multiple_files([path], out_path, opts)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/postprocessor/ffmpeg.py", line 151, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Sep 5, 2015

This looks like an avconv bug. I've reported it to Libav at https://bugzilla.libav.org/show_bug.cgi?id=885. Use ffmpeg instead solves the problem. You may need --prefer-ffmpeg and --ffmpeg-location. See Post-processing Options for more information about these options.

@lightonflux
Copy link
Author

@lightonflux lightonflux commented Sep 5, 2015

Thank you very much for your testing. I installed ffmpeg and it works. As this isn't a youtube-dl bug…

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.