<div>
<div class="post-text">
<p>Good day to all. I have a virtual machine running centOS 5.5 that I use as a streaming server.</p>
<p>Now... if I open 4 terminals and do this:</p>
<p>terminal 1:</p>
<pre><code> # mkfifo pipe1.avi
# mkfifo pipe2.avi
# ffserver &
# ffmpeg -probesize 164000 -i pipe1.avi -async 1 -r 25 <a href="http://localhost:8090/feed1.ffm">http://localhost:8090/feed1.ffm</a>
</code></pre>
<p>terminal 2:</p>
<pre><code> # ffmpeg -i pipe2.avi -async 1 -r 25 -vcodec flv -f flv somename.flv
</code></pre>
<p>terminal 3:</p>
<pre><code> # mplayer -dumpstream rtp://someIp:somePort -dumpfile pipe1.avi
</code></pre>
<p>terminal 4:</p>
<pre><code> # mplayer -dumpstream rtp://someIp:somePort -dumpfile pipe2.avi
</code></pre>
<p>Everything is working great. No problems nowhere.</p>
<p>Now I'm trying to make a script and run it from a cron. This is the script:</p>
<pre><code>ffserver &
ffmpeg -probesize 164000 -i pipe1.avi -async 1 -r 25 <a href="http://localhost:8090/feed1.ffm">http://localhost:8090/feed1.ffm</a> &
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
</code></pre>
<p>The crontab line is:</p>
<pre><code>10 * * * * script.sh > /dev/null 1>&2
</code></pre>
<p>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).</p>
<p>Can any1 help me with this? Thank you.</p>
</div></div>