[MPlayer-users] the server crashes when runing shell script that starts mplayer

Victor Petrescu victor.petrescu13 at gmail.com
Wed Apr 6 11:10:51 CEST 2011


Good day to all. I have a virtual machine running centOS 5.5 that I use as a
streaming server.

Now... if I open 4 terminals and do this:

terminal 1:

 # mkfifo pipe1.avi
 # mkfifo pipe2.avi
 # ffserver &
 # ffmpeg -probesize 164000 -i pipe1.avi -async 1 -r 25
http://localhost:8090/feed1.ffm

terminal 2:

 # ffmpeg -i pipe2.avi -async 1 -r 25 -vcodec flv -f flv somename.flv

terminal 3:

 # mplayer -dumpstream rtp://someIp:somePort -dumpfile pipe1.avi

terminal 4:

 # mplayer -dumpstream rtp://someIp:somePort -dumpfile pipe2.avi

Everything is working great. No problems nowhere.

Now I'm trying to make a script and run it from a cron. This is the script:

ffserver &
ffmpeg -probesize 164000 -i pipe1.avi -async 1 -r 25
http://localhost:8090/feed1.ffm &
ffmpeg -i pipe2.avi -async 1 -r 25 -vcodec flv -f flv somename.flv &
mplayer -dumpstream rtp://someIp:somePort -dumpfile pipe1.avi &
mplayer -dumpstream rtp://someIp:somePort -dumpfile pipe2.avi &
exit 0

The crontab line is:

10 * * * * script.sh > /dev/null 1>&2

The problem is that when the cron is runned the system crashes (actually I
not really crashes the stream (witch I see from another computer) is working
perfectly but I can't do anything on the machine. The screen becomes black
and I can't do anything except to restart it). I have a script that kills
the anterior processes. If I uses it the stream stops, but I still don't
regain access to the system (same black screeen whatever I do).

Can any1 help me with this? Thank you.


More information about the MPlayer-users mailing list