[MPlayer-users] re:mplayer fails when invoked from at command

Bertie Coopersmith bertie at coopersmith.demon.co.uk
Sun Nov 19 03:06:17 CET 2006


It seems that I need a better explanation of my problem than I gave a few days ago
If I am to get at least one person - expert preferred - to respond! I'll have
another go...

The following is the mail message sent when mplayer was run via an at command.
The at command was part of a shell script run by root so this output was mailed to the
root user. The run failed just as the buffer cache had begun to be initialized:-  
=====================================================================
MPlayer 1.0pre8-3.3.6 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium III Katmai/Pentium III Xeon Tanner (Family: 6, Model: 7, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.

Terminal type `unknown' is not defined.

Playing rtsp://rmv8.bbc.net.uk/radio4/arts/book_week_fri.ra.
STREAM_RTSP, URL: rtsp://rmv8.bbc.net.uk/radio4/arts/book_week_fri.ra
Cache size set to 640 KBytes
No bind found for key 'C'.                         
No bind found for key 'S'.                         
No bind found for key 'l'.
No bind found for key 'l'.                         
No bind found for key 'c'.                                                                                         
No bind found for key ','.                         
No bind found for key 'K'.                         
No bind found for key ','.                         
No bind found for key 'l'.                         
No bind found for key ','.                         
No bind found for key ':'.                         

======================================================================

The following is the standard output from mplayer for the same RealAudio stream as
above but this time the script was run interactively and, as such, the run was successful:-
======================================================================
MPlayer 1.0pre8-3.3.6 (C) 2000-2006 MPlayer Team
CPU: Intel Pentium III Katmai/Pentium III Xeon Tanner (Family: 6, Model: 7, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.


Playing rtsp://rmv8.bbc.net.uk/radio4/arts/book_week_fri.ra.
STREAM_RTSP, URL: rtsp://rmv8.bbc.net.uk/radio4/arts/book_week_fri.ra
Cache size set to 640 KBytes
REAL file format detected.
Stream description: audio/x-pn-multirate-realaudio logical stream
Stream mimetype: audio/x-pn-realaudio
Clip info:
 name: Book Of The Week - Friday
 author: BBC Radio 4
 copyright: (C) British Broadcasting Corporation 2006

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 44.1 kbit/3.12% (ratio: 5512->176400)
Selected audio codec: [ffcook] afm: ffmpeg (FFmpeg COOK audio decoder)
[AO PCM] File: audiodump.wav (WAVE)
PCM: Samplerate: 44100Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
Stream EOF detected

ncoding 8000 Hz audio using narrowband mode (mono)
 
=========================================================================
The following extract of the invoking script determines whether mplayer is run interactively
or via the 'at' command:-  
=========================================================================
Enter time to start the run (HHMM  or 0 to run now interactively): "
read STARTAT
export URL DURN BASE STARTAT
if
[ $STARTAT = 0 ]
then
ripreal
else
at -f  /usr/local/bin/ripreal $STARTAT
fi
==========================================================================
the 'ripreal' script is shown below:- 
========================================================================== 

cd /c/recordings
# kill any process (probably mplayer) which may be holding the rtc device open:-
fuser -k /dev/rtc
rm -f audiodump.wav
if
[  "$STARTAT" = "0" ]
then
VERBOSITY="-v -msglevel all=4"
else
VERBOSITY="-v -msglevel all=4"
fi
timeout -$DURN mplayer $VERBOSITY  "$URL" -ao pcm -vc null -vo null -ao pcm:fast

# Convert to Sample rate 8000 samples/sec, 8Kz, unsigned 8-bit samples, Mono:-
 sox audiodump.wav -t wav -r 8000 -u -b -c 1 ofile.wav
speexenc ofile.wav $BASE.spx
rm -f ofile.wav
[  "$STARTAT" = "0" ] && stty sane

===========================================================================
Note that if the top branch of the 'if' is altered to
VERBOSITY="-msglevel all=-1" 
then output from the 'at' run ends after the line 

Terminal type `unknown' is not defined.

This line never appears in the standard output of a foreground run.

Whatever the VERBOSITY,  it appears that the 'at' run bombs at the point when the
buffer cache is first filled or thereabouts.

The final line of ripreal seems to be needed in order to leave my rxvt window in
a sane state.

My system: Slackware 10.2 with fvwm2.


Bertie Coopersmith 


 



More information about the MPlayer-users mailing list