question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request feature of merging video and audio separately served at YouTube

See original GitHub issue

Screenshot at 2014-04-18 00:40:05.png

From the screenshot we can know YouTube now serves video and audio separately.

I think it will be great if youtube-dl can automatically merge them.

I give three ways. Either of them can be implemented into youtube-dl:

ffmpeg -i video.webm -i audio.m4a -c copy output.mkv

mkvmerge -o output.mkv video.webm audio.m4a

MP4Box -add video.mp4 -add audio.m4a output.new.mp4 && mv output.new.mp4 output.mp4

Thank you.

BTW: The worst/best decision is not accurate now, since the ‘dash’ version is not always the worst and the ‘non-dash’ version serves only up to 720p.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AGSPhoenixcommented, Apr 18, 2014

We already have support for this, though it’s undocumented until we work out a few problems. Just specify two format codes with a + between them. For example, -f 137+140, which will get you a 1080p MP4 file. You can also combine this with specifying multiple formats by preference; for example -f 137+140/136+140/22 would try to get 1080p DASH, then 720p DASH, and finally normal 720p.

This feature isn’t enabled by default, because it requires either ffmpeg or avconv to be available and in the $PATH to mux the video, and we need to be able to automatically detect their availability, and change what format is considered the ‘best’ if they are available. It’s certainly something that could be done, but no one has taken the time to do so.

0reactions
PacoHcommented, Dec 12, 2014

OK, it works perfectly if you don’t mix formats. I successfully downloaded both wbem-video+webm-audio and mp4-video+m4a-audio formats and they were properly muxed into webm and mp4 containers respectively. Both were 4k video quality but the webm is ~1.5x the size of the mp4 and ~1.5x the bitrate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Request feature of merging video and audio separately ...
From the screenshot we can know YouTube now serves video and audio separately. I think it will be great if youtube-dl can automatically...
Read more >
How to merge video and audio with youtube-dl - LinuxPip
This article will show you how to manually merge separate video and audio files into one single file. To follow this tutorial, you...
Read more >
Merge Your YouTube Videos Online - VEED.IO - VEED
Merge your YouTube video clips into one video file. ... Use our simple video editor to edit your YouTube videos combine, cut, crop,...
Read more >
How To Combine Videos [For Free] - Wave.video Blog
In the Uploads tab, add the videos and images you want to merge. You can select the files one by one or choose...
Read more >
Display & Video 360 announcements - Google Help
Users will be able to create and upload a single video to YouTube by combining existing audio and optional companion image assets. Only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found