Add warning to documentation that merging DASH video requires newer avconv #1381

Closed
opened 2026-02-20 23:27:24 -05:00 by deekerman · 15 comments
Owner

Originally created by @maxb on GitHub (Nov 22, 2013).

Hi,

I just downloaded my first DASH Video+Audio, and had some difficulty figuring out how to stitch them together. avconv seemed to not be able to properly read the DASH video in copy mode.

Eventually, I tried upgrading my installation of libav from 0.8.9 (available in the current Ubuntu release) to 9.10 (I got it from the Ubuntu development version), and this fixed the issue.

It would be nice if youtube-dl's documentation contained a warning that avconv 0.8.x has problems handling DASH video, and suggested upgrading to avconv 9.x.

The specific video I was downloading was http://www.youtube.com/watch?v=hpNp8WdQOoo format 137, though I also tested a number of the lower quality DASH video formats with the same results.

Originally created by @maxb on GitHub (Nov 22, 2013). Hi, I just downloaded my first DASH Video+Audio, and had some difficulty figuring out how to stitch them together. avconv seemed to not be able to properly read the DASH video in copy mode. Eventually, I tried upgrading my installation of libav from 0.8.9 (available in the current Ubuntu release) to 9.10 (I got it from the Ubuntu development version), and this fixed the issue. It would be nice if youtube-dl's documentation contained a warning that avconv 0.8.x has problems handling DASH video, and suggested upgrading to avconv 9.x. The specific video I was downloading was http://www.youtube.com/watch?v=hpNp8WdQOoo format 137, though I also tested a number of the lower quality DASH video formats with the same results.
deekerman 2026-02-20 23:27:24 -05:00
  • closed this issue
  • added the
    request
    label
Author
Owner

@rbrito commented on GitHub (Nov 26, 2013):

@maxb, can you please let me know what you tried? The 0.8 version of libav should be good enough for muxing audio and video. See my post here:

http://cynic.cc/blog/posts/2013-10-23-assorted_news/

The relevant excerpt is also what I included in Debian's packaging of youtube-dl:

https://github.com/rbrito/pkg-youtube-dl/blob/master/debian/NEWS

@rbrito commented on GitHub (Nov 26, 2013): @maxb, can you please let me know what you tried? The 0.8 version of libav should be good enough for muxing audio and video. See my post here: http://cynic.cc/blog/posts/2013-10-23-assorted_news/ The relevant excerpt is also what I included in Debian's packaging of youtube-dl: https://github.com/rbrito/pkg-youtube-dl/blob/master/debian/NEWS
Author
Owner

@wyatt8740 commented on GitHub (Nov 26, 2013):

... or ffmpeg, which most of the world still uses.
(I compiled it myself to avoid the weird syntax of libav in ubuntu.)

In ffmpeg 2.1/2.0/1.2.1/1.2:
ffmpeg -i DASH_VIDEO.mp4 -i DASH_AUDIO.mp4 -vcodec copy -acodec copy DASH_AVMUX.mp4

@wyatt8740 commented on GitHub (Nov 26, 2013): ... or ffmpeg, which most of the world still uses. (I compiled it myself to avoid the weird syntax of libav in ubuntu.) In ffmpeg 2.1/2.0/1.2.1/1.2: ffmpeg -i DASH_VIDEO.mp4 -i DASH_AUDIO.mp4 -vcodec copy -acodec copy DASH_AVMUX.mp4
Author
Owner

@MDCore commented on GitHub (Nov 30, 2013):

@rbrito I'm on Ubuntu 13.10. If I do:
avconv -i video.mp4 -i audio.m4a -codec copy output.mp4
I get a muxed output with only audio. the results say the video portion is 0kb

any ideas?

More info:
Using avconv version 0.8.9-6:0.8.9-0ubuntu0.13.10.1

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Press ctrl-c to stop encoding
frame=    0 fps=  0 q=-1.0 Lsize=   29090kB time=1856.71 bitrate= 128.3kbits/s    
video:0kB audio:28465kB global headers:0kB muxing overhead 2.197169%

any ideas?

@MDCore commented on GitHub (Nov 30, 2013): @rbrito I'm on Ubuntu 13.10. If I do: `avconv -i video.mp4 -i audio.m4a -codec copy output.mp4` I get a muxed output with only audio. the results say the video portion is 0kb any ideas? More info: Using `avconv version 0.8.9-6:0.8.9-0ubuntu0.13.10.1` ``` Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #1:0 -> #0:1 (copy) Press ctrl-c to stop encoding frame= 0 fps= 0 q=-1.0 Lsize= 29090kB time=1856.71 bitrate= 128.3kbits/s video:0kB audio:28465kB global headers:0kB muxing overhead 2.197169% ``` any ideas?
Author
Owner

@maxb commented on GitHub (Dec 2, 2013):

@rbrito Sorry I've taken so long to respond here, I had a fairly crazy week at work. MDCore's description is in agreement with what I saw.

Here are the exact commands I ran:

youtube-dl -f 139 -o 139.m4a hpNp8WdQOoo
youtube-dl -f 134 -o 134.mp4 hpNp8WdQOoo
avconv -i 139.m4a -i 134.mp4 -c copy out.mp4

(I've chosen lower quality format codes in the above example to be kinder on the time and bandwidth of people just wanting to verify the bug.)

The out.mp4 produced by libav-tools 0.8.9-0ubuntu0.13.10.1 is far too small to contain any video data, and avprobe reports that it contains only an audio stream.

Switching to 9.10-1ubuntu1 with no other changes instead produces a successful combined file.

@maxb commented on GitHub (Dec 2, 2013): @rbrito Sorry I've taken so long to respond here, I had a fairly crazy week at work. MDCore's description is in agreement with what I saw. Here are the exact commands I ran: ``` youtube-dl -f 139 -o 139.m4a hpNp8WdQOoo youtube-dl -f 134 -o 134.mp4 hpNp8WdQOoo avconv -i 139.m4a -i 134.mp4 -c copy out.mp4 ``` (I've chosen lower quality format codes in the above example to be kinder on the time and bandwidth of people just wanting to verify the bug.) The out.mp4 produced by libav-tools 0.8.9-0ubuntu0.13.10.1 is far too small to contain any video data, and avprobe reports that it contains only an audio stream. Switching to 9.10-1ubuntu1 with no other changes instead produces a successful combined file.
Author
Owner

@MDCore commented on GitHub (Dec 2, 2013):

@maxb I've searched high and low but I can't find out how to switch to 9.10-1ubuntu1 in Saucy. Do I need to compile from source?

@MDCore commented on GitHub (Dec 2, 2013): @maxb I've searched high and low but I can't find out how to switch to 9.10-1ubuntu1 in Saucy. Do I need to compile from source?
Author
Owner

@maxb commented on GitHub (Dec 2, 2013):

@MDCore I did it the "advanced APT shenanigans" or possibly just "evil" way - I reconfigured APT to include Trusty Tahr sources, and applied the relevant black magic in /etc/apt/preferences to ensure I only got what I wanted from Trusty.

For the record, the process goes like this:

  1. Add "deb SOME-MIRROR-URL trusty main universe" to /etc/apt/sources.list

  2. Add exactly the below to /etc/apt/preferences (it probably doesn't exist - create it):

Package: *
Pin: release n=trusty
Pin-Priority: 400
  1. apt-get update

  2. apt-get install -t trusty libav-tools

Bear in mind that if you go through with the above, it's firmly into the area of unsupported black magic, and it is CRITICAL you undo the changes to /etc/apt/sources.list and /etc/apt/preferences before attempting to upgrade fully to Trusty in the future, or bad stuff will happen to the upgrade.

@maxb commented on GitHub (Dec 2, 2013): @MDCore I did it the "advanced APT shenanigans" or possibly just "evil" way - I reconfigured APT to include Trusty Tahr sources, and applied the relevant black magic in /etc/apt/preferences to ensure I _only_ got what I wanted from Trusty. For the record, the process goes like this: 1) Add "deb SOME-MIRROR-URL trusty main universe" to /etc/apt/sources.list 2) Add _exactly_ the below to /etc/apt/preferences (it probably doesn't exist - create it): ``` Package: * Pin: release n=trusty Pin-Priority: 400 ``` 3) apt-get update 4) apt-get install -t trusty libav-tools Bear in mind that if you go through with the above, it's firmly into the area of unsupported black magic, and it is CRITICAL you undo the changes to /etc/apt/sources.list and /etc/apt/preferences before attempting to upgrade fully to Trusty in the future, or bad stuff will happen to the upgrade.
Author
Owner

@MDCore commented on GitHub (Dec 2, 2013):

Thanks for documenting the process @maxb, even though I don't think I'm going to risk it! Hopefully someone will make a PPA.

@MDCore commented on GitHub (Dec 2, 2013): Thanks for documenting the process @maxb, even though I don't think I'm going to risk it! Hopefully someone will make a PPA.
Author
Owner

@maxb commented on GitHub (Dec 3, 2013):

@MDCore Well, since you asked :-) - deb http://ppa.launchpad.net/maxb/trusty-libav-for-saucy/ubuntu saucy main

It's the exact same packages you'd end up with from the previous method (i.e. the ones currently in the Trusty repository), but making use of Launchpad's ability to copy selected packages into a new PPA to avoid the complexity of needing to configure filters on the client side to affect what packages you get.

@maxb commented on GitHub (Dec 3, 2013): @MDCore Well, since you asked :-) - deb http://ppa.launchpad.net/maxb/trusty-libav-for-saucy/ubuntu saucy main It's the exact same packages you'd end up with from the previous method (i.e. the ones currently in the Trusty repository), but making use of Launchpad's ability to copy selected packages into a new PPA to avoid the complexity of needing to configure filters on the client side to affect what packages you get.
Author
Owner

@MDCore commented on GitHub (Dec 3, 2013):

@maxb Wow! I added the ppa, updated libav and ran the same test as before. It worked perfectly!

How can I thank you?

@MDCore commented on GitHub (Dec 3, 2013): @maxb Wow! I added the ppa, updated libav and ran the same test as before. It worked perfectly! How can I thank you?
Author
Owner

@Vdragon commented on GitHub (Mar 1, 2014):

I got the same result as @MDCore and @maxb in Ubuntu 13.10, please make it verify ffmpeg/libav 's version to make sure it will convert correctly 👍

sample: http://www.youtube.com/watch?v=bDeG_YFl-b0

@Vdragon commented on GitHub (Mar 1, 2014): I got the same result as @MDCore and @maxb in Ubuntu 13.10, please make it verify ffmpeg/libav 's version to make sure it will convert correctly :+1: sample: http://www.youtube.com/watch?v=bDeG_YFl-b0
Author
Owner

@mrvanes commented on GitHub (Mar 19, 2014):

@maxb You saved my day! Thx for the repo and fix!

@mrvanes commented on GitHub (Mar 19, 2014): @maxb You saved my day! Thx for the repo and fix!
Author
Owner

@healthyfood commented on GitHub (Apr 27, 2014):

'stiching' m4a/mp4 dash videos works fine. stitching webm video and audio together fails with a "ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument". Not much love for webm.

@healthyfood commented on GitHub (Apr 27, 2014): 'stiching' m4a/mp4 dash videos works fine. stitching webm video and audio together fails with a "ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument". Not much love for webm.
Author
Owner

@s-gv commented on GitHub (Dec 23, 2014):

I had the same problem of no video output when muxing 1080p DASH video and audio got from youtube using avconv on Ubuntu 12.04. This worked for me:

MP4Box -add video_only.mp4 -add audio_only.m4a -new combined.mp4

@s-gv commented on GitHub (Dec 23, 2014): I had the same problem of no video output when muxing 1080p DASH video and audio got from youtube using avconv on Ubuntu 12.04. This worked for me: MP4Box -add video_only.mp4 -add audio_only.m4a -new combined.mp4
Author
Owner

@phihag commented on GitHub (Jan 23, 2015):

youtube-dl will now warn automatically if it finds an overly old ffmpeg or avconv version. Thanks for the report!

@phihag commented on GitHub (Jan 23, 2015): youtube-dl will now warn automatically if it finds an overly old ffmpeg or avconv version. Thanks for the report!
Author
Owner

@wyatt8740 commented on GitHub (Jan 29, 2015):

It's good that this is fixed. But I'd like to say again that if you have this problem with a recent avconv build, you should really give ffmpeg a try. Sometimes things work in ffmpeg that don't in avconv.

@wyatt8740 commented on GitHub (Jan 29, 2015): It's good that this is fixed. But I'd like to say again that if you have this problem with a recent avconv build, you should really give ffmpeg a try. Sometimes things work in ffmpeg that don't in avconv.
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#1381
No description provided.