Could not write header for output file #0 #16691

Closed
opened 2026-02-21 09:08:42 -05:00 by deekerman · 3 comments
Owner

Originally created by @1seekr on GitHub (May 7, 2019).

Checklist

  • I'm reporting a broken site support issue
  • [x ] I've verified that I'm running youtube-dl version 2019.04.30
  • [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 bug reports including closed ones
  • [ x] I've read bugs section in FAQ

Verbose log

PASTE VERBOSE LOG HERE

sr:2 /mnt/fs5t/video/uToob/190507 yd -v https://www.bbc.com/news/av/world-europe-40469343/music-loving-dog-upstages-orchestra-in-turkey

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.bbc.com/news/av/world-europe-40469343/music-loving-dog-upstages-orchestra-in-turkey']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.04.30
[debug] Python version 2.7.12 (CPython) - Linux-4.10.0-38-generic-x86_64-with-LinuxMint-18.3-sylvia
[debug] exe versions: ffmpeg 2.8.15, ffprobe 2.8.15
[debug] Proxy map: {}
[bbc] music-loving-dog-upstages-orchestra-in-turkey: Downloading webpage
[bbc] p057h4pv: Downloading media selection XML
[bbc] p057h4pv: Downloading m3u8 information
[bbc] p057h4pv: Downloading m3u8 information
[bbc] p057h4pv: Downloading MPD manifest
[bbc] p057h4pv: Downloading m3u8 information
[bbc] p057h4pv: Downloading m3u8 information
[bbc] p057h4pv: Downloading MPD manifest
[bbc] p057h4pv: Downloading m3u8 information
[bbc] p057h4pv: Downloading m3u8 information
[bbc] p057h4pv: Downloading MPD manifest
[bbc] p057h4pv: Downloading m3u8 information
[bbc] p057h4pv: Downloading m3u8 information
[bbc] p057h4pv: Downloading MPD manifest
[download] Downloading playlist: Music-loving dog upstages orchestra
[bbc] playlist Music-loving dog upstages orchestra: Collected 1 video ids (downl
oading 1 of them)
[download] Downloading video 1 of 1
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://vod-dash-ww-live.bbcfmt.hs.llnwd.net/usp/auth/vod/piff_abr_full_sd/45c1bc-p057h4pv/vf_p057h4pv_141f68de-f62b-4b98-b3e3-c9182fa4b5d7.ism.hlsv2.ism/iptv_hd_abr_v1_dash_master.mpd?s=1557201022&e=1557244222&h=6ea81b08bcfb55ffe2fe6ab446433754'
[dashsegments] Total fragments: 15
[download] Destination: Music-loving dog upstages orchestra-p057h4pv.fstream-nonuk-iptv_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=1570000.mp4
[download] 100% of 10.09MiB in 00:07
[debug] Invoking downloader on u'https://vod-dash-ww-live.bbcfmt.hs.llnwd.net/usp/auth/vod/piff_abr_full_sd/45c1bc-p057h4pv/vf_p057h4pv_141f68de-f62b-4b98-b3e3-c9182fa4b5d7.ism.hlsv2.ism/iptv_hd_abr_v1_dash_master.mpd?s=1557201022&e=1557244222&h=6ea81b08bcfb55ffe2fe6ab446433754'
[dashsegments] Total fragments: 15
[download] Destination: Music-loving dog upstages orchestra-p057h4pv.fstream-nonuk-iptv_streaming_concrete_combined_sd_mf_limelight_world_dash_https-audio_eng_1=128000.m4a
[download] 100% of 828.40KiB in 00:02
[ffmpeg] Merging formats into "Music-loving dog upstages orchestra-p057h4pv.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Music-loving dog upstages orchestra-p057h4pv.fstream-nonuk-iptv_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=1570000.mp4' -i 'file:Music-loving dog upstages orchestra-p057h4pv.fstream-nonuk-iptv_streaming_concrete_combined_sd_mf_limelight_world_dash_https-audio_eng_1=128000.m4a' -c copy -map '0✌️0' -map '1🅰️0' 'file:Music-loving dog upstages orchestra-p057h4pv.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 2054, 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

WRITE DESCRIPTION HERE
I'm attempting to download a video from the BBC site. Seeing that a previous report of this problem resulted in advice to update ffmpeg, I took a look at the version I have installed. The Synaptic package manager indicates that the version I have is the most recent one available. The command itself says:

ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609

Originally created by @1seekr on GitHub (May 7, 2019). <!-- ###################################################################### WARNING! IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE ###################################################################### --> ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.04.30. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser. - Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape. - Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates. - Read bugs section in FAQ: http://yt-dl.org/reporting - Finally, put x into all relevant boxes (like this [x]) --> - [ ] I'm reporting a broken site support issue - [x ] I've verified that I'm running youtube-dl version **2019.04.30** - [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 bug reports including closed ones - [ x] I've read bugs section in FAQ ## Verbose log <!-- Provide the complete verbose output of youtube-dl that clearly demonstrates the problem. Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <your command line>`), copy the WHOLE output and insert it below. It should look similar to this: [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2019.04.30 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} <more lines> --> ``` PASTE VERBOSE LOG HERE ``` sr:2 /mnt/fs5t/video/uToob/190507 yd -v https://www.bbc.com/news/av/world-europe-40469343/music-loving-dog-upstages-orchestra-in-turkey [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-v', u'https://www.bbc.com/news/av/world-europe-40469343/music-loving-dog-upstages-orchestra-in-turkey'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2019.04.30 [debug] Python version 2.7.12 (CPython) - Linux-4.10.0-38-generic-x86_64-with-LinuxMint-18.3-sylvia [debug] exe versions: ffmpeg 2.8.15, ffprobe 2.8.15 [debug] Proxy map: {} [bbc] music-loving-dog-upstages-orchestra-in-turkey: Downloading webpage [bbc] p057h4pv: Downloading media selection XML [bbc] p057h4pv: Downloading m3u8 information [bbc] p057h4pv: Downloading m3u8 information [bbc] p057h4pv: Downloading MPD manifest [bbc] p057h4pv: Downloading m3u8 information [bbc] p057h4pv: Downloading m3u8 information [bbc] p057h4pv: Downloading MPD manifest [bbc] p057h4pv: Downloading m3u8 information [bbc] p057h4pv: Downloading m3u8 information [bbc] p057h4pv: Downloading MPD manifest [bbc] p057h4pv: Downloading m3u8 information [bbc] p057h4pv: Downloading m3u8 information [bbc] p057h4pv: Downloading MPD manifest [download] Downloading playlist: Music-loving dog upstages orchestra [bbc] playlist Music-loving dog upstages orchestra: Collected 1 video ids (downl oading 1 of them) [download] Downloading video 1 of 1 [debug] Default format spec: bestvideo+bestaudio/best [debug] Invoking downloader on u'https://vod-dash-ww-live.bbcfmt.hs.llnwd.net/usp/auth/vod/piff_abr_full_sd/45c1bc-p057h4pv/vf_p057h4pv_141f68de-f62b-4b98-b3e3-c9182fa4b5d7.ism.hlsv2.ism/iptv_hd_abr_v1_dash_master.mpd?s=1557201022&e=1557244222&h=6ea81b08bcfb55ffe2fe6ab446433754' [dashsegments] Total fragments: 15 [download] Destination: Music-loving dog upstages orchestra-p057h4pv.fstream-nonuk-iptv_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=1570000.mp4 [download] 100% of 10.09MiB in 00:07 [debug] Invoking downloader on u'https://vod-dash-ww-live.bbcfmt.hs.llnwd.net/usp/auth/vod/piff_abr_full_sd/45c1bc-p057h4pv/vf_p057h4pv_141f68de-f62b-4b98-b3e3-c9182fa4b5d7.ism.hlsv2.ism/iptv_hd_abr_v1_dash_master.mpd?s=1557201022&e=1557244222&h=6ea81b08bcfb55ffe2fe6ab446433754' [dashsegments] Total fragments: 15 [download] Destination: Music-loving dog upstages orchestra-p057h4pv.fstream-nonuk-iptv_streaming_concrete_combined_sd_mf_limelight_world_dash_https-audio_eng_1=128000.m4a [download] 100% of 828.40KiB in 00:02 [ffmpeg] Merging formats into "Music-loving dog upstages orchestra-p057h4pv.mp4" [debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Music-loving dog upstages orchestra-p057h4pv.fstream-nonuk-iptv_streaming_concrete_combined_sd_mf_limelight_world_dash_https-video=1570000.mp4' -i 'file:Music-loving dog upstages orchestra-p057h4pv.fstream-nonuk-iptv_streaming_concrete_combined_sd_mf_limelight_world_dash_https-audio_eng_1=128000.m4a' -c copy -map '0:v:0' -map '1:a:0' 'file:Music-loving dog upstages orchestra-p057h4pv.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 2054, 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 <!-- Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible. If work on your issue requires account credentials please provide them or explain how one can obtain them. --> WRITE DESCRIPTION HERE I'm attempting to download a video from the BBC site. Seeing that a previous report of this problem resulted in advice to update ffmpeg, I took a look at the version I have installed. The Synaptic package manager indicates that the version I have is the most recent one available. The command itself says: ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
Author
Owner

@dstftw commented on GitHub (May 7, 2019):

Outdated ffmpeg.

@dstftw commented on GitHub (May 7, 2019): Outdated ffmpeg.
Author
Owner

@1seekr commented on GitHub (May 7, 2019):

Well, the version of ffmpeg I'm using is apparently the latest one in the Ubuntu repository (I'm using Linux Mint, which is based upon Ubuntu).

@1seekr commented on GitHub (May 7, 2019): Well, the version of ffmpeg I'm using is apparently the latest one in the Ubuntu repository (I'm using Linux Mint, which is based upon Ubuntu).
Author
Owner

@1seekr commented on GitHub (May 7, 2019):

CC-kun has kindly pointed me at https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/how-to-install-ffmpeg-on-ubuntu-18-04-ubuntu-16-04-linux-mint-19.html

I will try using that recipe.

@1seekr commented on GitHub (May 7, 2019): CC-kun has kindly pointed me at https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/how-to-install-ffmpeg-on-ubuntu-18-04-ubuntu-16-04-linux-mint-19.html I will try using that recipe.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#16691
No description provided.