Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
"--merge-output-format mp4" causes ffmpeg merge to fail #16819
Comments
|
webm+mp4 can't be merged into mp4 container. |
|
Right, but do you think it's a bug for yt-dl to automatically select incompatible formats if the user only wants mp4 outputs, then throw python errors? Perhaps add an error message for the user to know to manually use "-f"? No worries if not, I figured it out eventually, but wanted to report it. |
|
|
|
The whole point of using this tool is to take something complex and make it trivial. If two formats have been selected that are incompatible seems obvious for the app to throw exit 1 rather than let an obvious error will occur if the app continues down the chain of events. |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.06.25. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of 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 the
-vflag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Description of your issue, suggested solution and other information
Bug: Youtube-dl throws python errors when merging a youtube video using the "--merge-output-format mp4" flag. It results in the audio and video files saved separately and a temp file:
Possible cause: I think this is caused by the default "bestvideo+bestaudio" selecting an opus audio stream as the highest bitrate, and I think opus isn't compatible with mp4. Instead of showing an error or autoselecting the best quality compatible stream, youtube-dl throws python errors.
Workaround: Manually run all downloads using the "--merge-output-format mp4" flag also with specific -f flags to ensure mp4 incompatible streams aren't selected. For example,
youtube-dl https://www.youtube.com/watch?v=frhMomcKT9o -v --merge-output-format mp4 -f 137+140works butyoutube-dl https://www.youtube.com/watch?v=frhMomcKT9o -v --merge-output-format mp4does not.Possible fix: make "--merge-output-format mp4" cause youtube-dl to not select mp4 incompatible streams (e.g. vp8, vp9, opus, etc.) for determining bestvideo+bestaudio.
All running on Win10 x64 with latest youtube-dl and ffmpeg (20180619)