Discussion:
[MPlayer-users] Mplayer freezes after another app closes
Nikolay Pertsev
2018-01-04 21:42:43 UTC
Permalink
Hello,

I am running mplayer-1.3.0 remotely on a Gentoo Linux machine:
mplayer -display :0.0 -slave -msglevel all=4 -input file=/tmp/mplayer_cmd /home/user/video.mkv

Where /tmp/mplayer_cmd is a named pipe created beforehand.

Config file ~/.mplayer/config:
vo=vdpau
vc=ffh264vdpau
fs=1

There is no display manager.

I need to pause playback and display a PNG image on the screen with Feh program.

Mplayer is paused like this:
echo -n -e 'pausing get_file_name\x0A' > /tmp/mplayer_cmd

Then, feh is called (and the picture appears on the screen)

DISPLAY=:0.0 feh /home/user/image.png

The problem comes when I need to stop feh and continue playback:

CTRL+C is pressed to stop feh. Feh process disappears, however, the image is still on the screen.

An attempt to resume playback fails - mplayer simply does not react, not responds on any command:
echo -n -e 'get_file_name\x0A' > /tmp/mplayer_cmd

At the same time CPU usage of mplayer process goes to 100%.

What seems to make mplayer alive again is any keystroke (even pressing ALT button works). At which point mplayer resumes playback and responds to ALL commands that were sent to it while it was frozen.

I am trying to solve this so that mplayer can simply keep playing after feh is killed.

Does anybody have any idea what is going on?
Reimar Döffinger
2018-02-24 15:39:16 UTC
Permalink
Post by Nikolay Pertsev
mplayer -display :0.0 -slave -msglevel all=4 -input file=/tmp/mplayer_cmd /home/user/video.mkv
[...]
Post by Nikolay Pertsev
At the same time CPU usage of mplayer process goes to 100%.
What seems to make mplayer alive again is any keystroke (even pressing ALT button works). At which point mplayer resumes playback and responds to ALL commands that were sent to it while it was frozen.
I am trying to solve this so that mplayer can simply keep playing after feh is killed.
Does anybody have any idea what is going on?
Not entirely, but the symptoms sound like your are doing
something bad to MPlayer's stdin, you should use
-noconsolecontrols option in that case.

Loading...