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

Merge issues due to outdated avconv #5661

Closed
dstftw opened this issue May 9, 2015 · 5 comments
Closed

Merge issues due to outdated avconv #5661

dstftw opened this issue May 9, 2015 · 5 comments

Comments

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 9, 2015

After switching to -f bestvideo+bestaudio/best as default format selection strategy we receive some bugreports caused by outdated avconv (e.g. #5659 #5595) (and probably ffmpeg). It would probably be reasonable to tweak format selection logic a bit, e.g. enable -f bestvideo+beastaudio/best only if merger version is new enough (capable of actual merging) and fallback to -f best otherwise.

I did some investigations with original Windows builds and here are the results.

Test video: http://www.youtube.com/watch?v=ScMOyURq9os

Test formats:

format code extension type codec
278 webm video only vp9
249 webm audio only opus
160 mp4 video only h264
140 m4a audio only aac

Results:

video audio merge output avconv 9.18 avconv 10.6 avconv 11.3
160 140 mp4 ✔️ ✔️ ✔️
278 249 webm ✔️
278 249 mkv ✔️ ✔️
160 249 mkv ✔️ ✔️ ✔️
278 140 mkv ✔️ ✔️

With libav 0.8.17 it's even worse.

So, we can for example:

  • fallback to -f best if avconv is older than 10 and if avconv is 10 - force merge output format to mkv if bestvideo+bestaudio turns out to be webm+webm.
  • fallback to -f best if avconv is older than 11.
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 9, 2015

It's a good idea.

if avconv is 10 - force merge output format to mkv if bestvideo+bestaudio turns out to be webm+webm

I would prefer to avoid this option, it would make the code more complicated. I consider libav not being able to merge them into webm their bug and we shouldn't handle it specially; the user should either update libav or manually choose the output format.
Since 10 supports the other combinations, I think it's better to use bestvideo+bestaudio/best.

On 10.6 everything works the same except webm output, could it be caused by the configuration/libraries used?

@dstftw
Copy link
Collaborator Author

@dstftw dstftw commented May 9, 2015

Forgot to mention, tests were (yet) performed on Windows only with original builds from here that ship all the necessary libs. So I doubt some misconfiguration/libs can affect the results.

@Wikinaut
Copy link

@Wikinaut Wikinaut commented May 10, 2015

I encountered the same problem after updating youtube-dl . It looks to me as if the option f - best is no longer the default - this should be checked (and corrected in that case).

Former youtube-dl appeared to download the best available mp4 (audio+video) by default, but now it downloads audio and video separately and then tries to merge the two using avconv (but avconv is not working on my machine, which is a different problem).

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 10, 2015

Forgot to mention, tests were (yet) performed on Windows only with original builds from here that ship all the necessary libs. So I doubt some misconfiguration/libs can affect the results.

Ok. Maybe it's caused because they added the native Opus decoder in version 11 and the VP9 in 10.
Since version 10 works with other formats I would use -f bestvideo+bestaudio/best and don't automatically merge to mkv if it's webm+webm.

@Wikinaut youtube-dl now uses -f bestvideo+bestaudio/best if ffmpeg/avconv is installed, because it gives better quality. If you want to keep the old behaviour read the last two paragraphs in the FORMAT SELECTION section.

@Wikinaut
Copy link

@Wikinaut Wikinaut commented May 10, 2015

@jaimeMF thank you for swift reply and for the pointer to the detailed explanation in the FORMAT SELECTION readme, which I did not read when having this problem. The youtube-dl issue is solved for me, thanks. Also, the information about a way to set -f best as the default in the configuration file, is a useful tip.

(The problem (on my computer) which brought up that problem is a problem with avconv and some libraries which are by some way not compatible with my current ffmpeg version. I have to fix this, too. No answer needed.)

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.

3 participants
You can’t perform that action at this time.