[MPlayer-users] Starting mplayer from inittab breaks slave mode
Krzysztof Duchnowski
amidk75 at gmail.com
Thu Mar 29 15:48:21 CEST 2012
On 29.03.2012 13:46, Roguedr wrote:
>> This looked very promising. However I saw the same behavior, started
>> from the interactive login it works but does not work if started from
>> inittab. I'm starting to wonder if there is a bug with the specific
>> build.
I've put this into rc.local (i don't want to mess with inittab at my
home box):
> sudo -u myuser mkfifo /tmp/mplayer.fifo #my /tmp is virtual one so it's
> clean after reboot
> sudo -u myuser tmux new -d -s 'mplayer-test' -n 'MPlayer test'
> '/usr/local/bin/mplayer -vo fbdev2 -idle -slave -input
> file=/tmp/mplayer.fifo; exec
> bash'
and it worked:
:~$ echo "loadfile dreambox.3gp" >>/tmp/mplayer.fifo
> MPlayer SVN-r34833-4.6 (C) 2000-2012 MPlayer Team
>
> Playing dreambox.3gp.
> libavformat version 54.3.100 (internal)
> libavformat file format detected.
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0xcabce0]multiple edit list entries, a/v desync might occur, patch welcome
> [lavf] stream 0: audio (aac), -aid 0, -alang eng
> [lavf] stream 1: video (h263), -vid 0
> VIDEO: [s263] 352x288 24bpp 29.970 fps 358.4 kbps (43.8 kbyte/s)
> Clip info:
> major_brand: 3gp4
> minor_version: 0
> compatible_brands: isom3gp4
> creation_time: 1946-03-29 08:22:27
> Load subtitles in /
> Opening video filter: [screenshot]
> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> libavcodec version 54.12.100 (internal)
> Unsupported PixelFormat 61
> Unsupported PixelFormat 53
> Unsupported PixelFormat 81
> Selected video codec: [ffh263] vfm: ffmpeg (FFmpeg H.263+)
> ==========================================================================
> ==========================================================================
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 16000 Hz, 1 ch, s16le, 21.3 kbit/8.33% (ratio: 2666->32000)
> Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
> ==========================================================================
> [AO_ALSA] alsa-lib: conf.c:1220:(parse_def) show is not a compound
> [AO_ALSA] alsa-lib: conf.c:1686:(snd_config_load1) _toplevel_:24:26:Unexpected char
> [AO_ALSA] alsa-lib: conf.c:3406:(config_file_open) /usr/share/alsa/pulse-alsa.conf may be old or corrupted: consider to remove or fix it
> AO: [alsa] 16000Hz 2ch floatle (4 bytes per sample)
> Starting playback...
> Could not find matching colorspace - retrying with -vf scale...
> Opening video filter: [scale]
> Movie-Aspect is 1.22:1 - prescaling to correct movie aspect.
> [swscaler @ 0xde0fc0]using unscaled yuv420p -> bgra special converter
> VO: [fbdev2] 352x288 => 352x288 BGRA
> A: 20.9 V: 20.9 A-V: -0.000 ct: 0.008 0/ 0 2% 9% 0.3% 7 0
Then I've done it with root:
> mkfifo /tmp/mplayer.fifo
> chmod 0777 /tmp/mplayer.fifo
> tmux new -d -s 'mplayer-test' -n 'MPlayer test' '/usr/local/bin/mplayer -vo fbdev2 -idle -slave -input file=/tmp/mplayer.fifo; exec bash'
and... :
:~$ echo "loadfile dreambox.3gp" >>/tmp/mplayer.fifo
> Creating config file: //.mplayer/config
> MPlayer SVN-r34833-4.6 (C) 2000-2012 MPlayer Team
>
> Playing dreambox.3gp.
> libavformat version 54.3.100 (internal)
> libavformat file format detected.
> [mov,mp4,m4a,3gp,3g2,mj2 @ 0xcabce0]multiple edit list entries, a/v desync might occur, patch welcome
> [lavf] stream 0: audio (aac), -aid 0, -alang eng
> [lavf] stream 1: video (h263), -vid 0
> VIDEO: [s263] 352x288 24bpp 29.970 fps 358.4 kbps (43.8 kbyte/s)
> Clip info:
> major_brand: 3gp4
> minor_version: 0
> compatible_brands: isom3gp4
> creation_time: 1946-03-29 08:22:27
> Load subtitles in /
> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> libavcodec version 54.12.100 (internal)
> Unsupported PixelFormat 61
> Unsupported PixelFormat 53
> Unsupported PixelFormat 81
> Selected video codec: [ffh263] vfm: ffmpeg (FFmpeg H.263+)
> ==========================================================================
> ==========================================================================
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 16000 Hz, 1 ch, s16le, 21.3 kbit/8.33% (ratio: 2666->32000)
> Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
> ==========================================================================
> AO: [oss] 16000Hz 1ch s16le (2 bytes per sample)
> Starting playback...
> Could not find matching colorspace - retrying with -vf scale...
> Opening video filter: [scale]
> Movie-Aspect is 1.22:1 - prescaling to correct movie aspect.
> [swscaler @ 0xde0fc0]using unscaled yuv420p -> bgra special converter
> VO: [fbdev2] 352x288 => 352x288 BGRA
> A: 21.0 V: 20.9 A-V: 0.064 ct: 0.012 0/ 0 1% 7% 0.1% 0 0
Surprise, surprise, surprise... "Creating config file:
//.mplayer/config" message at the top.
And indeed, it created /.mplayer/config file in a "/" directory - that's
why your configuration with slave command and fifo file path isn't
loaded from /etc, because mplayer search for it in /.mplayer/config file.
I've added that to /.mplayer/config:
vo=fbdev2
ao=alsa
idle=yes
slave=yes
input=file=/tmp/mplayer.fifo
and this to rc.local:
> mkfifo /tmp/mplayer.fifo
> tmux new -d -s 'mplayer-test' -n 'MPlayer test' '/usr/local/bin/mplayer; exec bash'
and everything worked from root account, tought I've needed to echo to
fifo from root terminal and can't detach tmux session from terminal
--
Krzysztof 'DK75' Duchnowski
GetFirefox - http://www.getfirefox.net/
Konfiguracja UTF-8 dla czytników - http://evil.pl/pip/utf/
More information about the MPlayer-users
mailing list