Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mplayer2 - pgs subtitles NOT POSSIBLE - use mpv [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Thu Jan 08, 2015 10:06 pm    Post subject: mplayer2 - pgs subtitles NOT POSSIBLE - use mpv [SOLVED] Reply with quote

Is it possible to play pgs type subtitles in mplayer2? I don't have the original mplayer installed and to be honest, I'd just as soon as not install it. i.e. I like to keep things as simple as I can.

I didn't used to care that I couldn't playback pgs subtitles but one of the anime release groups I follow now preferentially uses pgs subtitles (if available) and it looks like several other release groups may do the same.

I did try adding:
Code:
-demxuer lavf
to the advanced options for smplayer2 to pass to mplayer2 but that only caused mplayer2 to crash.

I added USE="bluray" and re-emerged mplayer2 but that did not enable pgs playback.

Is there anything I can do to enable mplayer2 to display pgs subtitles?
_________________
People whom think M$ is mediocre, don't know the half of it.


Last edited by dufeu on Sat Jan 10, 2015 10:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Thu Jan 08, 2015 10:52 pm    Post subject: Reply with quote

What use flags do you have set for mplayer2? From some searching online, it seems PGS subtitles support is through the libmatroska, so I assume you may need to have matroska use flag installed.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Fri Jan 09, 2015 4:36 am    Post subject: Reply with quote

ct85711 wrote:
What use flags do you have set for mplayer2?

Code:
# eix media-video/mplayer2
[I] media-video/mplayer2
     Available versions:  2.0_p20130126{tbz2} 2.0_p20130126{tbz2}[1] 2.0_p20130428-r1{tbz2} 2.0_p20130428-r1{tbz2}[1] (~)2.0_p20131009{tbz2} (~)2.0_p20131009{tbz2}[1] **9999 **9999[1] {3dnow 3dnowext +X +a52 +alsa altivec aqua bluray bs2b cddb +cdio cpudetection debug directfb doc +dts +dv dvb +dvd +dvdnav +enca +faad fbcon ftp gif +iconv ipv6 jack joystick jpeg ladspa lcms +libass libcaca lirc mad md5sum +mmx mmxext mng +mp3 +network nut +opengl oss png pnm portaudio +postproc pulseaudio pvr (+)quvi radio +rar +rtc samba sdl selinux +shm +speex sse sse2 ssse3 symlink tga +theora +threads +unicode v4l vcd vdpau +vorbis xanim xinerama +xscreensaver +xv xvid yuv4mpeg KERNEL="linux"}
     Installed versions:  2.0_p20131009{tbz2}[1](02:58:59 PM 01/08/2015)(3dnow 3dnowext X alsa bluray cdio directfb dvd dvdnav enca ftp gif iconv ipv6 jpeg lcms libass libcaca mmx mmxext mng mp3 network opengl png postproc pulseaudio quvi samba shm sse sse2 tga threads unicode vcd xinerama xscreensaver xv -altivec -aqua -bs2b -cddb -cpudetection -debug -doc -dvb -jack -joystick -ladspa -lirc -md5sum -oss -pnm -portaudio -pvr -radio -selinux -ssse3 -symlink -v4l -vdpau -yuv4mpeg)
     Homepage:            http://www.mplayer2.org/
     Description:         Media Player for Linux

For what it's worth, VLC does display the subtitles but cannot keep up rendering the video stream.
Code:
[I] media-video/vlc
     Available versions:  2.1.2(0/5-7) (~)2.1.4(0/5-7){tbz2} (~)2.1.5(0/5-7){tbz2} **2.1.9999(0/5-7) **2.2.9999(0/5-7) **9999(0/5-7) {+X a52 aalib alsa altivec atmo +audioqueue avahi +avcodec +avformat bidi bluray cdda cddb chromaprint dbus dc1394 debug dirac directfb directx dts dvb +dvbpsi dvd dxva2 egl +encode faad fdk +ffmpeg flac fluidsynth fontconfig +gcrypt gme gnome gnutls growl httpd ieee1394 ios-vout jack jpeg kate kde libass libcaca libnotify libsamplerate libtar libtiger linsys lirc live lua +macosx +macosx-audio (+)macosx-dialog-provider (+)macosx-eyetv (+)macosx-qtkit (+)macosx-quartztext +macosx-vout matroska media-library mmx modplug mp3 mpeg mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus png +postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba schroedinger sdl sdl-image sftp shout sid skins speex sse svg +swscale taglib test theora tremor truetype twolame udev upnp v4l vaapi vcdx vdpau vlm vnc vorbis vpx wma-fixed x264 x265 +xcb xml xv zvbi ELIBC="glibc"}
     Installed versions:  2.1.5{tbz2}(12:37:10 PM 12/10/2014)(X a52 aalib alsa avahi avcodec avformat cdda dbus directfb dts dvbpsi dvd encode ffmpeg flac fontconfig gcrypt gnutls kde libass libcaca libnotify libsamplerate live matroska mmx mp3 mpeg musepack ncurses ogg opengl png postproc pulseaudio qt4 run-as-root samba schroedinger sdl sftp speex sse svg swscale taglib theora truetype udev vorbis x264 xcb xml xv -altivec -atmo -audioqueue -bidi -bluray -cddb -chromaprint -dc1394 -debug -dirac -directx -dvb -dxva2 -egl -faad -fdk -fluidsynth -gme -gnome -growl -httpd -ieee1394 -ios-vout -jack -kate -libtar -libtiger -linsys -lirc -lua -macosx -macosx-audio -macosx-dialog-provider -macosx-eyetv -macosx-qtkit -macosx-quartztext -macosx-vout -media-library -modplug -mtp -neon -omxil -opencv -optimisememory -opus -projectm -rdp -rtsp -sdl-image -shout -sid -skins -test -tremor -twolame -upnp -v4l -vaapi -vcdx -vdpau -vlm -vnc -wma-fixed -zvbi ELIBC="glibc")
     Homepage:            http://www.videolan.org/vlc/
     Description:         VLC media player - Video player and streamer

mplayer2 doesn't appear to support the USE="matroska" use flag.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Fri Jan 09, 2015 9:46 pm    Post subject: Reply with quote

Sadly, I am not sure on fixing it. From what I've been hearing, mplayer2 isn't self is considered dead (supposedly no dev work for over 2 years). The bad part is, regular mplayer isn't much better than mplayer2; so it's not much of an option. From surfing around on the web, very few video players in general even support matroska; mplayer, gstreamer, vlc, and xine.

Other than that, pgs format (Blueray subtitles) appears to have poor support (libmatroska was the only library that even mentioned to have any support).
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Jan 10, 2015 9:06 am    Post subject: Reply with quote

ct85711 wrote:
Sadly, I am not sure on fixing it. From what I've been hearing, mplayer2 isn't self is considered dead (supposedly no dev work for over 2 years). The bad part is, regular mplayer isn't much better than mplayer2; so it's not much of an option. From surfing around on the web, very few video players in general even support matroska; mplayer, gstreamer, vlc, and xine.

ct85711 ... media-video/mpv is a fork of mplayer2/mplayer ... and supports matroska/psg subtitles. I've not had any need to do so, but I know its capable.

best ... khay
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Sat Jan 10, 2015 5:32 pm    Post subject: Reply with quote

khayyam wrote:
... media-video/mpv is a fork of mplayer2/mplayer ... and supports matroska/psg subtitles. I've not had any need to do so, but I know its capable.

best ... khay

Thanks for the tip!

I'll play with that and report back my results.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Sat Jan 10, 2015 10:43 pm    Post subject: Reply with quote

Caveats:
  1. For all practical purposes, it's true that both mplayer and mplayer2 are no longer being actively developed.
  2. While media-video/mpv was forked from media-video/mplayer2, it is not a drop in replacement for mplayer2. Among other reasons, all of the 'slave mode' code which enables mplayer2 to be run as a backend for third party GUI interfaces has been ripped out and replaced with jason support. At the current time, a cursory perusal of the MPV site does not have any third party GUI interfaces listed. For now, this means using either interactive keyboard commands or the built in minimalist GUI. {edit - Jan 11 2015 - was told there was a "hackey" way to use mpv as a backend for smplayer. Your on your own researching this further}
    Mouse point and click commands include the ability to go full screen and back, cycle through audio tracks, cycle through subtitles, play, stop, position and a few more. I found these to be adequate.
  3. I don't know if the ebuild for media-video/mpv currently has a maintainer and I haven't yet checked. All steps listed here are at your own risk. {edit Jan 11 2015 - clarification provided - mpv ebuilds are actively maintained}
  4. I haven't looked at the dependencies in the ebuild. In my case, I had no dependency conflicts.
  5. Disclaimer: I am not a programmer and I'm not able to provide support. You have been wraned!

The mpv player works and properly supports bluray pgs type subtitles. Also, because mpv doesn't try to be a drop-in replacement for mplayer(2), there is no conflict in having mpv and mplayer2 installed simultaneously.

The latest stable version from upstream is 0.7.2. There are two problems here. The first is that all supported upstream versions are masked. The second is that the latest ebuild available at the time of this writing is 0.7.1. {edit Jan 11 2015 - masked due to issues with libav. If you don't have libav installed then safe to unmask}

MVP Installation steps:
  1. Execute the following to set up a local mpv package directory:
    Code:
    mkdir -p /usr/local/portage/media-video/mpv/files
    cp /usr/portage/media-video/mpv/mpv-0.7.1.ebuild cp /usr/local/portage/media-video/mpv/mpv-0.7.2.ebuild
    ebuild /usr/local/portage/media-video/mpv/mpv-0.7.2.ebuild manifest

  2. Now unmask the currently masked mvp ebuilds:
    Code:
    echo '<=media-video/mpv-0.9' >> /etc/portage/package.unmask
    We don't need to worry about unmasking the **9999 ebuild because it currently doesn't work.

  3. Upstream currently recommends building mpv with lua support (for use with the built in minimalist GIU) but the ebuild does not set that by default.

  4. Set USE="lua":
    Code:
    echo 'media-video/mpv lua' >> /etc/portage/package.use

  5. Now install media-video/mpv:
    Code:
    emerge -D =media-video/mpv-0.7.2

Misc. Notes:
  1. I can't recall offhand if the package 'layman' needs to be installed before you can use a local portage tree. If you run into a problem with either the ebuild or emerge commands, then you may need to install 'layman'. If so, there is documentation in Gentoo docs which will tell you how to do this.

  2. You'll be able to tell if you've done the commands in step 1 properly if the ebuild command returns a message similar to:
    Code:
    ebuild mpv/mpv-0.7.2.ebuild manifest
    >>> Downloading 'http://distfiles.gentoo.org/distfiles/mpv-0.7.2.tar.gz'
    --2015-01-10 15:57:12--  http://distfiles.gentoo.org/distfiles/mpv-0.7.2.tar.gz
    Resolving distfiles.gentoo.org... 137.226.34.42, 156.56.247.195, 64.50.233.100, ...
    Connecting to distfiles.gentoo.org|137.226.34.42|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2658772 (2.5M) [application/octet-stream]
    Saving to: ‘/usr/portage/distfiles/mpv-0.7.2.tar.gz’

    /usr/portage/distfiles/mpv-0.7.2.tar.g 100%[=============================================================================>]   2.54M  1.17MB/s   in 2.2s   

    2015-01-10 15:57:15 (1.17 MB/s) - ‘/usr/portage/distfiles/mpv-0.7.2.tar.gz’ saved [2658772/2658772]

    >>> Creating Manifest for /usr/local/portage/media-video/mpv
    There is a trick here. Usually, ebuild/emerge gets the name of the source package (including point release version) from the name of the ebuild. Many times, simply copying the previous version's ebuild is sufficient to create a proper ebuild for the desired version. This is only sometimes true for simpler packages. In this case, it worked fine.

  3. If you want to try installing the mpv git repository's current version, then execute the following 'echo' commands instead of the above 'echo' unmask command :
    Code:
    echo 'media-video/mpv' >> /etc/portage/package.unmask
    echo 'media-video/mpv **' >> /etc/portage/package.keywords

  4. If you use mask/unmask/keyword directories, modify the 'echo' commands appopriately - e.g.
    Code:
    echo 'media-video/mpv' >> /etc/portage/package.unmask/package.unmask
    echo 'media-video/mpv **' >> /etc/portage/package.keywords/package.keywords

  5. I have ffmpeg-2.4.4 installed. I haven't any clue how well earlier versions of ffmpeg will work with mpv-0.7.2


edit Jan 11 2015 to correct typo in an echo command

Also - be sure to read the following post's (by khay) clarifying comments!

_________________
People whom think M$ is mediocre, don't know the half of it.


Last edited by dufeu on Sun Jan 11, 2015 8:41 pm; edited 7 times in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sun Jan 11, 2015 10:15 am    Post subject: Reply with quote

dufeu wrote:
I don't know if the ebuild for media-video/mpv currently has a maintainer and I haven't yet checked.

defeu ... its proxy-maintained currently, fixes/updates are quite frequent.

dufeu wrote:
The latest stable version from upstream is 0.7.2. There are two problems here. The first is that all supported upstream versions are masked. The second is that the latest ebuild available at the time of this writing is 0.7.1.

These are masked due to virtual/ffmpeg ... or rather media-video/libav ... if you are using media-video/ffmpeg then its quite safe to unmask them.

dufeu wrote:
We don't need to worry about unmasking the **9999 ebuild because it currently doesn't work.

It does ...
Code:
% qlop -l | tail -n 1
Sun Jan 11 10:48:46 2015 >>> media-video/mpv-9999

Perhaps you run into the issue with the portaudio useflag?

dufeu wrote:
Upstream currently recommends building mpv with lua support (for use with the built in minimalist GIU) but the ebuild does not set that by default.

I've never had any issues building, or using, it without lua ...

dufeu wrote:
I can't recall offhand if the package 'layman' needs to be installed before you can use a local portage tree. If you run into a problem with either the ebuild or emerge commands, then you may need to install 'layman'. If so, there is documentation in Gentoo docs which will tell you how to do this.

No, layman isn't needed, you only need to supply an entry in repos.conf.

dufeu wrote:
If you want to try installing the mpv git repository's current version, then execute the following [...]
Code:
echo 'media-video/mpv 9999 **' >> /etc/portage/package.keywords

That seems to be a typo ... 'media-video/mpv **'

dufeu wrote:
I have ffmpeg-2.4.4 installed. I haven't any clue how well earlier versions of ffmpeg will work with mpv-0.7.2

I've been using the live ebuilds for both ffmpeg and mpv as, due to libav, many of the updated packages have been masked.

edit: Also of note, with the openssl and network useflags set on media-video/ffmpeg and a recent version of net-misc/youtube-dl installed you can do the following:

Code:
% echo 'ytdl=yes' >> ~/.mpv/config
% mpv https://www.youtube.com/watch?v=SJaMtBKnN-I

It also works for other sites supported by youtube-dl.

You can also get subtitles (if available) eg:

Code:
% mpv --sid=1 https://www.youtube.com/watch?v=Vtm__gZqbnY

best ... khay
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Sun Jan 11, 2015 4:57 pm    Post subject: Reply with quote

khay,

First, a big thank you for your clarifying comments! They are much appreciated!!

khayyam wrote:
defeu ... its proxy-maintained currently, fixes/updates are quite frequent.
Good to know!

khayyam wrote:
These are masked due to virtual/ffmpeg ... or rather media-video/libav ... if you are using media-video/ffmpeg then its quite safe to unmask them.
Also good to know.

khayyam wrote:
dufeu wrote:
We don't need to worry about unmasking the **9999 ebuild because it currently doesn't work.

It does ...
Code:
% qlop -l | tail -n 1
Sun Jan 11 10:48:46 2015 >>> media-video/mpv-9999

Perhaps you run into the issue with the portaudio useflag?
You are correct. And I see in bugzilla that this was fixed on Jan 1. I haven't done a world update since Dec 15 nor have I had time to set aside to do so. My bad! I'll definitely revisit this after I do a world update. Probably later this coming week.

khayyam wrote:
dufeu wrote:
I can't recall offhand if the package 'layman' needs to be installed before you can use a local portage tree. If you run into a problem with either the ebuild or emerge commands, then you may need to install 'layman'. If so, there is documentation in Gentoo docs which will tell you how to do this.

No, layman isn't needed, you only need to supply an entry in repos.conf.
I had hazy memories in the distant past of doing something but I couldn't remember exactly what. Thanks for refreshing my memory. Now-a-days, when I build a new system, I always install layman as a matter of course ..

khayyam wrote:
dufeu wrote:
If you want to try installing the mpv git repository's current version, then execute the following [...]
Code:
echo 'media-video/mpv 9999 **' >> /etc/portage/package.keywords

That seems to be a typo ... 'media-video/mpv **'
Once again - based on (very) ancient history. At the time, I probably misunderstood what I was reading. Will edit in prior post. BTW - the extra '9999' is apparently just ignored.

I really liked the youtube tips. Nifty!

And now, a further addendum:

After playing with mpv for the last couple days, I feel comfortable un-merging media-video/mplayer2 and media-video/smplayer2 and making media-video/mpv my exclusive multimedia player.

If you use kde, the mpv install will automatically associate mpv with most multimedia files. This means you can right click on a multimedia file in dolphin or konqueror and mpv will be one of your choices listed under 'open with'. You may want to go into file association maintenance and move mpv to be the first item in the associated programs for select multimedia file types. This way you'll be able to point and shoot to automatically start playing a file in mpv. Other window/file managers will have similar (if supported) configuration capabilities.

The last thing you may want to look at is the initial configuration which is applied when mpv is started. The mpv configuration file and syntax documentation gives a full explanation of configuration file location and syntax.

For this type of application, I prefer to have a per user configuration and fore go any global configuration setup.

Login as the user you want to set mpv configuration for and then execute the following:
Code:
mkdir -p ~/.config/mpv
touch ~/.config/mpv/mpv.conf
This will create an empty mpv configuration file for the desired user.

By default, mpv opens a playback window derived from the resolution of the media file you want to play back. I much prefer all my videos to initially open in a single set size. I use a pair of 1980x1020 monitors. I therefore want the initial playback window to be 1280x720. Furthermore, I want the playback window to open in the left hand screen. Lastly, I mostly watch Japanese anime. I prefer to listen to the original (japanese) soundtrack and read the (english) subtitles. My configuration file looks like this:
Code:
# Always open by autofitting into 1280 x 720 window
autofit=1280x720

# Always open on screen 0 (configured as left screen for me)
screen=0

# Intial audio and subtitle languages
alang=jap,jpn,jp
slang=eng,en

Be sure to read the mpv options documentation. Not all options will work with all video drivers/window managers. The documentation points out possible problems and alternatives. The official documentation is your friend.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum