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

Drop mplayer #64

Open
mgoral opened this issue Mar 24, 2016 · 4 comments
Open

Drop mplayer #64

mgoral opened this issue Mar 24, 2016 · 4 comments

Comments

@mgoral
Copy link
Owner

mgoral commented Mar 24, 2016

For getting FPS we can use e.g. ffmpeg (of ffprobe). For a simple movie playback Qt should do just fine.

@mgoral
Copy link
Owner Author

mgoral commented Mar 25, 2016

  1. After a third try I still don't know how to fetch video metadata with Qt. It seems that it's only
    available if video has been in fact played (e.g. with QMediaPlayer). Otherwise its
    isMetaDataAvailable() method simply returns False. It also seems that installing
    libqt5multimedia-plugins is required to provide a gstreamer-based backend on Linux.
  2. Using ffmpeg for fetching FPS is also disputable. First, executing it is actually slower
    than starting MPlayer (on my machine it's 100 ms). It wouldn't be that bad because ffmpeg is
    probably more widespreaded than any movie player, but there is also another issue: it reports
    incorrect, rounded-up FPS, i.e. it rounds 23.976 frames per second to 23.98. It's uncacceptable
    because it would lead to desynchronizing subtitles.

Thinking about this issue is ongoing...

@mgoral
Copy link
Owner Author

mgoral commented Mar 31, 2016

Regarding reading metadata: use libmediainfo maybe? There doesn't seem to be any Python wrapper for it, so I guess I'll have to show some love for ctypes.

(it also reads subtitle informations so it might be worth checking ;))

@mgoral mgoral added this to the 3.0 milestone Nov 13, 2016
@mgoral
Copy link
Owner Author

mgoral commented Nov 17, 2016

pymediainfo wrapper: https://pymediainfo.readthedocs.io/en/latest/

Although I found on Debian python-mediainfodll and python3-mediainfodll packages too. Haven't tried them yet though.

EDIT:

pymediainfo 2.1.5 is great, we should use it. :D
And for GUI, QMediaPlayer is probably a good replacement.

@mgoral
Copy link
Owner Author

mgoral commented Nov 17, 2016

Because pymediainfo is easily available on pip and is not present on many systems, this is blocked until Subconvert switches to tox: #71, which should ease up dependency management a little (well, yeah, maybe not for pyqt ;)). It's also required that libmediainfo (C++ library) is present on the system, so that's somethink to think about too.

On the other hand, pymediainfo is just one file, 133 LOC (and MIT license), so for the time being we could just copy it to Subconvert's repository. I hate that, but I'm sick enough of crazy mplayer requirement to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant