mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.76k stars 2.84k forks source link

Show more information when mpv aborts because of ffmpeg version mismatch #9528

Open rubyFeedback opened 2 years ago

rubyFeedback commented 2 years ago

Hey there mpv devs,

I do this:

mpv foobar.mp3

mpv then shows these two lines:

libavutil: 56.70.100 -> 56.22.100
Aborted

Exactly these two lines. The first one appears, I think, because I mix two ffmpeg versions right now. I am about to fix this.

The second line is mpv simply showing "Aborted" and ending.

My suggestions:

(1) Make the error message a bit more verbose. Normal users don't have any clue what is going on. I only know that error because I had problems with ffmpeg versions and mpv before.

(2) Ideally show some more information and announce that, for instance, WHICH PATHS did mpv search or use? This should not be too overly verbose either, mind you, but it could show something like:

"The different ffmpeg versions were found at /usr/lib/ and at /usr/lib/x86" or something like that. The idea is to quickly tell the user where the problem resides. I can figure out on my own eventually, but this would be more convenient for me, as I have to spend less time figuring this out.

(3) The "Aborted" message should be longer. Perhaps add a new sentence between aka "mpv can not work with different ffmpeg version". (Although I don't understand why mpv can not just pick one over the other IF it can find both and report the wrong one on the commandline as-is, as seen above. But this is a separate issue, for now my concern with this issue request is SOLELY to show more helpful information to the user.

Thanks for reading and perhaps considering this.

Note this is just a suggestion - there are other ways to fix the above of course. I just wanted to give a few pointers to see whether people may agree with any of these.

sfan5 commented 2 years ago

(1) Make the error message a bit more verbose. Normal users don't have any clue what is going on.

The explanatory message was removed in 62c1d7972449f8ed0f8d5db895367fab26ab56ff, could be added back. "Normal users" will never get in such a situation though.

(2) Ideally show some more information and announce that, for instance, WHICH PATHS did mpv search or use?

mpv does not use any search paths or "find" libraries. This is done by your dynamic linker. It's also not the case that multiple libraries are found and the wrong picked. mpv verifies that the headers it was built with matches the actual library that is present at runtime.

mxbi commented 9 months ago

The explanatory message was removed in https://github.com/mpv-player/mpv/commit/62c1d7972449f8ed0f8d5db895367fab26ab56ff, could be added back. "Normal users" will never get in such a situation though.

Apologies for the necro, but I get this issue as after installing with apt install mpv on fresh Ubuntu 22.04 in WSL2, which should probably be a supported/"normal user" use case:

libavutil: 56.70.100 -> 56.51.100
Aborted

Thanks to OP I know this is an ffmpeg version issue, so will investigate further, but I'm surprised the error message was removed.

kasper93 commented 9 months ago

Apologies for the necro, but I get this issue as after installing with apt install mpv on fresh Ubuntu 22.04 in WSL2

Did you make partial upgrade? Could you do apt-get dist-upgrade?

Works fine on clean system:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
FFmpeg library versions:
   libavutil       56.70.100
   libavcodec      58.134.100
   libavformat     58.76.100
   libswscale      5.9.100
   libavfilter     7.110.100
   libswresample   3.9.100
FFmpeg version: 4.4.2-0ubuntu0.22.04.1

"Normal users" will never get in such a situation though.

Unless they do when partial upgrading or otherwise. I don't think it is big deal, but this undescriptive log followed by abort is kinda funny.