Subtitleedit: Using MPV under linux

Created on 13 May 2017  ·  26Comments  ·  Source: SubtitleEdit/subtitleedit

In the downloads page, it says that SE should run with mono under Linux and that one should use mpv-lib for video playback. It is not clear how to do that at all though.
Video settings are all greyed out (see screenshot).
screenshot from 2017-05-13 11-19-09
Downloading MPV does not seem to do anything (it justs asks me about output, see screenshot).
screenshot from 2017-05-13 11-19-34
When I try to play a video, it complains it cannot start mplayer and then throws an error message at me (see screenshot).
screenshot from 2017-05-13 11-20-20
I am on Ubuntu 16.04 64bit with mono-complete installled. Are there any other requirements or can I somehow edit settings manually?

All 26 comments

Have you installed libmpv ?

I think so:

$locate libmpv
/usr/lib/x86_64-linux-gnu/libmpv.so.1
/usr/lib/x86_64-linux-gnu/libmpv.so.1.23.0
/usr/share/doc/libmpv1
/usr/share/doc/libmpv1/changelog.Debian.gz
/usr/share/doc/libmpv1/copyright
/var/lib/dpkg/info/libmpv1:amd64.list
/var/lib/dpkg/info/libmpv1:amd64.md5sums
/var/lib/dpkg/info/libmpv1:amd64.shlibs
/var/lib/dpkg/info/libmpv1:amd64.symbols
/var/lib/dpkg/info/libmpv1:amd64.triggers`

Or how else would I check? I installed mpv from tihs ppa: https://launchpad.net/~mc3man/+archive/ubuntu/mpv-tests

I'm also on Ubuntu 16.04, and I'm having the exact same issue.

There are no options available under Video engine, despite having MPV and VLC installed.

Furthermore, I tested SE in Windows 7 (64bit), and I found that VLC works, and MPV can be downloaded, but doesn't work regardless of the output selected.

I just tried with Ubuntu 17.04 and also no luck (used same ppa as felagund).

@var1ap: Any ideas?

Same for me on Fedora 26. Libmpv is installed, but I can't select it as the video player.

Same issue in Manjaro, Subtitle Edit 3.5.4-1.

Hi,

@felagund @whitemarvin @maddovr @Kzer-Za @niksedk

I fixed this by creating a symlink libmpv.so --> libmpv.so.1
Seems that the app is looking for libmpv.so only, and there is just libmpv.so.1 and libmpv.so.1.23.0 etc.
I hope it will work for others as well :)

Wonderful. On my Ubuntu system, it was

cd /usr/lib/x86_64-linux-gnu/ ; sudo ln -s libmpv.so.1 libmpv.so

But this is a workaround, Subtitle Edit should be smarter than that on its own.

It still doesn't work for me and tells me that The file is not a valid Matroska.

maddovr, does it do for all files, like for mp4 files and such? Sounds file-specific.

Tried with other files and it does manage to load videos, however it can't open subtitles from any matroska whatsoever (video does work if opened from the video tab).

I am not sure it is supposed to work like that at all. Just use mkvtoolnix to extract the subitles. I doubt this has anything to do with Linux.

I am having the same issue, but I don't seem to have libmpv installed. locate libmpv returns nothing. How can I install it? I suppose it should have come with mpv (which I installed from the same PPA as @felagund), and I can't find anywhere how to install it.

f-lungov: that is weird. Try reinstalling, and then try inspecting the package (deb's are just tar archives) if the file is there. Have you updated your database after installing MPV?

It is now working @felagund ! I tried locate libmpv again, and this time it provided similar results to yours. Maybe the file was finally downloaded with one of the updates I ran. Then I just needed to create the symlink as you described and everything works fine now. Thanks!

@niksedk Closed?

Anyone has an idea what could be causing this error? Happens every time I try to load a video.

Message: mpv
Source: 

Stack Trace: 
  at (wrapper managed-to-native) Nikse.SubtitleEdit.Logic.NativeMethods.mpv_create()
  at Nikse.SubtitleEdit.Logic.VideoPlayers.LibMpvMono.Initialize (System.Windows.Forms.Control ownerControl, System.String videoFileName, System.EventHandler onVideoLoaded, System.EventHandler onVideoEnded) [0x00000] in <a350741a374d4e31a818096ace4f9fe2>:0 
  at Nikse.SubtitleEdit.Logic.UiUtil.InitializeVideoPlayerAndContainer (System.String fileName, Nikse.SubtitleEdit.Core.VideoInfo videoInfo, Nikse.SubtitleEdit.Controls.VideoPlayerContainer videoPlayerContainer, System.EventHandler onVideoLoaded, System.EventHandler onVideoEnded) [0x00017] in <a350741a374d4e31a818096ace4f9fe2>:0 

Works for me

$ sudo apt install libmpv1
$ cd /usr/lib/x86_64-linux-gnu/
$ sudo ln -s libmpv.so.1 libmpv.so

To play video in subtitle edit, I needed to click some in bottom left corner, because play button was not visible. After that it was visible.

So libmpv.so still needs to be linked, I thought it was fixed?

Are you on the latest release and on what distribution are you? Where is your libmpv.so located?

"Are you on the latest release and on what distribution are you? Where is your libmpv.so located?"

Is that question for me? I haven't installed the operating system yet...

@Jolar Yes. Well, report your results after you installed the OS.

$ sudo apt install libmpv1
$ cd /usr/lib/x86_64-linux-gnu/
$ sudo ln -s libmpv.so.1 libmpv.so

I have just installed libmpv-dev which also downloads libmpv1 (version 0.29.1) and thought I would look at the following directory: /usr/lib/x86_64-linux-gnu/

It does not contain either of these 2 files: libmpv.so.1 or libmpv.so. Instead it contains 2 links with the aforementioned names both pointing to libmpv.so.1.101.0

So I can't see how that link did anything for you.

SE has used different lib names for loading libmpv earlier... from version 3.5.11 SE just uses libmpv.so.
(use the package libmpv-dev for Ubuntu)

After installing libmpv-dev (0.29.1) on Ubuntu I have these files:
image

SE uses libmpv.so when loading libmpv... and the above default works fine for me.
(if you don't have the libmpv.so symlink file you need to create it)

Yes I do, see my last comment on this closed issue: https://github.com/SubtitleEdit/subtitleedit/issues/2386
[https://avatars3.githubusercontent.com/u/3008853?s=400&v=4]https://github.com/SubtitleEdit/subtitleedit/issues/2386
Using MPV under linux · Issue #2386 · SubtitleEdit/subtitleedit · GitHubhttps://github.com/SubtitleEdit/subtitleedit/issues/2386
In the downloads page, it says that SE should run with mono under Linux and that one should use mpv-lib for video playback. It is not clear how to do that at all though. Video settings are all greyed out (see screenshot). Downloading MPV...
github.com


From: Nikolaj Olsson notifications@github.com
Sent: Saturday, 4 January 2020 4:23 PM
To: SubtitleEdit/subtitleedit subtitleedit@noreply.github.com
Cc: shag00 shag00@hotmail.co.uk; Comment comment@noreply.github.com
Subject: Re: [SubtitleEdit/subtitleedit] Using MPV under linux (#2386)

SE has used different lib names for loading libmpv earlier... from version 3.5.11 SE just uses libmpv.so.

After installing libmpv-dev (0.29.1) on Ubuntu I have these files:
[image]https://user-images.githubusercontent.com/1261331/71762682-a6858700-2ed2-11ea-971c-6217280ebce4.png

SE uses libmpv.so when loading libmpv... and the above default works fine for me.
(if you don't have the libmpv.so symlink file you need to create it)


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/SubtitleEdit/subtitleedit/issues/2386?email_source=notifications&email_token=AI6SPQBBAQRJGXPL6OMAXK3Q4BBRNA5CNFSM4DLIB4CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICTM7I#issuecomment-570766973, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AI6SPQGR2W6TKX6YTDCZKRDQ4BBRNANCNFSM4DLIB4CA.

So just to clarify the last three posts, you are saying SE is looking for libmpv.so. This file does not exist if libmpv-dev (and libmpv1 by default) is installed on Ubuntu, or anywhere else I imagine.

It appears we both agree that libmpv.so and libmpv.so.1 are in fact links to libmpv.so.1.101.0.

As I stated in my earlier post I have both libmpv.so and libmpv.so.1 linked to libmpv.so.1.101.0. So we are in agreement.

In any case with this issue having being closed and my issue being significantly different in that it does not return an error but instead causes a crash I have opened a new issue:
https://github.com/mono/mono/issues/18339

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OmrSi picture OmrSi  ·  6Comments

m0ck69 picture m0ck69  ·  5Comments

teodargent picture teodargent  ·  5Comments

NoRRt picture NoRRt  ·  6Comments

Ouroboros1995 picture Ouroboros1995  ·  5Comments