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

LinuxMPlayerPlugin.java: video out parameter? #483

Open
mhassman opened this issue Mar 3, 2023 · 1 comment
Open

LinuxMPlayerPlugin.java: video out parameter? #483

mhassman opened this issue Mar 3, 2023 · 1 comment

Comments

@mhassman
Copy link

mhassman commented Mar 3, 2023

Hi, I'm having difficulty getting video to play via sagetv linux client on ubuntu 22.04 (audio works with manual addition of libpng12-0).

Can someone please sanity check me on this?...

Sage's mplayer v1.4 always fails with "Error opening/initializing the selected video_out (-vo) device". Note: the file plays fine (video & audio) when run from directly. i.e.: ./mplayer stv://192.168.x.x//mnt/sagetv/recorded-file.ts.

Reviewing sagetv/java/sage/LinuxMPlayerPlugin.Java (lines 440-450:

if (!uiMgr.getBoolean("mplayer/xvmc", false))
{
cmdOpt2 = "-colorkey 0x"+Integer.toHexString(getDesktopColorKey())+
" -vo xv:windowevents=0:ck=set -cache-seek-min 0" + framedropStr;
}
else
{ // Using xvmc
cmdOpt2 = "-colorkey 0x"+Integer.toHexString(getDesktopColorKey())+
" -vo xvmc:windowevents=0:ck=set -vc ffmpeg12mc, -cache-seek-min 0" + framedropStr;
}
}
), shows there are only two output device options passed from sage into mplayer: "-vo xvmc" or "-vo xv" (controlled by SageTVPlacehifter.properties: mplayer/xvmc=true/false).

What I don't understand... neither of these output devices exist within sage's mplayer version.
./mplayer -vo help yields the following output device options:
MPlayer dev-SVN-rUNKNOWN-4.8 (C) 2000-2007 MPlayer Team
stv SageTV Miniclient
x11 X11 ( XImage/Shm )
xover General X11 driver for overlay capable video output drivers
xvidix X11 (VIDIX)
cvidix console VIDIX
null Null video output
mpegpes Mpeg-PES to DVB card
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
jpeg JPEG file
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame

"xv" & "xvmc" are both missing.
So, how could this have ever worked?

In contrast, native mplayer does include "xv" and "xvmc" output options:
MPlayer 1.4 (Debian), built with gcc-11 (C) 2000-2019 MPlayer Team
Available video output drivers:
vdpau VDPAU with X11
xv X11/Xv
gl_nosw OpenGL no software rendering
x11 X11 ( XImage/Shm )
xover General X11 driver for overlay capable video output drivers
sdl SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
gl OpenGL
gl_tiled X11 (OpenGL) - multiple textures version
dga DGA ( Direct Graphic Access V2.0 )
fbdev Framebuffer Device
fbdev2 Framebuffer Device
matrixview MatrixView (OpenGL)
aa AAlib
caca libcaca
v4l2 V4L2 MPEG Video Decoder Output
xvidix X11 (VIDIX)
cvidix console VIDIX
null Null video output
xvmc XVideo Motion Compensation
mpegpes MPEG-PES to DVB card
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
jpeg JPEG file
gif89a animated GIF output
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame
mng MNG file

Is the fix as simple as a new config flag: mplayer/video_output=auto/xyz.. and strip or adjust the hard-coded "-vo" parameter? Feels as though I'm missing something obvious.
Thoughts?

@Narflex
Copy link
Member

Narflex commented Mar 3, 2023

Well I know for sure it used to work. :) But I can see the same issue in the local mplayer build I have on my server (but I never use that for playback). From the output you list there, my first guess would be that they renamed the 'xv' overlay output to be 'xover', so try changing that in the Java code and see if that fixes the problem.

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

No branches or pull requests

2 participants