[MPlayer-users] MPlayer – changing ‘ao=’ codec order in mplayer.conf does not appear to work for per user config?

Jim Cross jimgcross at gmail.com
Mon Sep 15 17:51:32 CEST 2014


Has anybody else seen or having similar problems or had similar problem but
sorted it out?


On Mon, Sep 15, 2014 at 12:52 PM, Jim Cross <jimgcross at gmail.com> wrote:

> Thanks for the details Tom and I agree on all points, which is why I think
> it is a bug rather than anything else. I wonder if the perm's issue is
> because of the home dir 'bug'.
>
> I have a simple test script(s) as follows to show MPlayer can not find
> home dir but I have another python script I use which includes using fifo -
> see an earlier reply (the fifo has correct owner and perm'd for all to rw
> and x.):
>
> Using a browser (javascript) with following link to run MPlayer:
> <a href="/cgi-bin/test.py">
>
> Python script test.py:
> #!/usr/bin/env python
> import subprocess
> import select
>
> from os.path import expanduser
> home = expanduser("~")
>
>
> playing_mplayer=subprocess.Popen(['mplayer', '-playlist',
> '/var/www/clockAudio/clockPlaylist.txt' ], stdout=subprocess.PIPE,
> stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
>
> mpText=""
> counting = 0
> while counting < 300:
>       counting = counting + 1
>       if 'Starting playback...' in mpText : break
>       while any(select.select([playing_mplayer.stdout.fileno()], [], [],
> 0.01)):
>             mplayerResponse = playing_mplayer.stdout.readline()
>             mpText = mpText+mplayerResponse+'<br>'
>             break
>
> with open('/var/www/error_log','a',0) as g:
>      g.write('home dir is:
> '+home+'<br>\ntest.py:<br>\n'+str(mpText)+'<br>\n')
> g.close()
>
> Results are - running from command line logged in as pi and a remote
> browser connecting to lighttpd web server:
> home dir is: /home/pi
> test.py:
> MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team
>
> Playing /var/www/clockAudio/UKFemail/09.mp3.
> libavformat version 53.21.1 (external)
> Mismatching header version 53.19.0
> Audio only file format detected.
> Load subtitles in /var/www/clockAudio/UKFemail/
> ==========================================================================
> Requested audio codec family [mpg123] (afm=mpg123) not available.
> Enable it at compilation.
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> libavcodec version 53.35.0 (external)
> Mismatching header version 53.32.2
> AUDIO: 44100 Hz, 1 ch, floatle, 131.9 kbit/9.34% (ratio: 16482->176400)
> Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
> ==========================================================================
> AO: [alsa] 44100Hz 1ch floatle (4 bytes per sample)
> Video: no video
> Starting playback...
>
>
> **********************************************************
> ***********
> ***********
> **********************************************************
>
>
> home dir is: /var/www
> test.py:
> Cannot find HOME directory.
> MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team
> Terminal type `unknown' is not defined.
>
> Playing /var/www/clockAudio/UKFemail/09.mp3.
> libavformat version 53.21.1 (external)
> Mismatching header version 53.19.0
> Audio only file format detected.
> Load subtitles in /var/www/clockAudio/UKFemail/
> ==========================================================================
> Requested audio codec family [mpg123] (afm=mpg123) not available.
> Enable it at compilation.
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> libavcodec version 53.35.0 (external)
> Mismatching header version 53.32.2
> AUDIO: 44100 Hz, 1 ch, floatle, 131.9 kbit/9.34% (ratio: 16482->176400)
> Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
> ==========================================================================
> AO: [alsa] 44100Hz 1ch floatle (4 bytes per sample)
> Video: no video
> Starting playback...
>
>
>
> On Mon, Sep 15, 2014 at 10:14 AM, Tom Evans <tevans.uk at googlemail.com>
> wrote:
>
>> On Mon, Sep 15, 2014 at 8:59 AM, Jim Cross <jimgcross at gmail.com> wrote:
>> > It is still not clear if this is expected behavior, a bug or I'm not
>> > configuring correctly?:
>> > Trying to run MPlayer from a browser using javascript via lighttpd web
>> > server and a python script.
>>
>> This makes no sense to me. I have a similar home-brew
>> "mplayer+python+fifo" media player, it works like this - X starts,
>> .xinitrc starts mplayer in idle, slave mode, mplayer reads commands
>> from a fifo, the fifo is writable by user www, user www opens the fifo
>> and writes to it when it wants to.
>>
>> > The 'home' directory is '/var/www' but MPlayer
>> > notifies 'Cannot find HOME directory.' - Does the home dir MPlayer looks
>> > for have to be located in the '/home/' directory structure?
>>
>> mplayer looks at $HOME. Perhaps lighttpd is cleaning your environement
>> so that $HOME is not set. It's still unclear to me why you are trying
>> to make lighty invoke mplayer..
>>
>> > As Mplayer is not able to locate home for lighttpd user www-data and the
>> > 'local' config file is not found, I tried using the
>> > 'include=/var/www/mplayer.conf' line in /etc/www/mplayer.conf but still
>> > need to run MPlayer with sudo to successfully read the fifo in slave
>> mode.
>> >
>>
>> This implies permissions. Work out where it is not correct and make it
>> correct. The user running mplayer should own the fifo, the user
>> writing to the fifo must be able to access it, there aren't that many
>> combinations to test..
>>
>> Cheers
>>
>> Tom
>> _______________________________________________
>> MPlayer-users mailing list
>> MPlayer-users at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
>>
>
>


More information about the MPlayer-users mailing list