Sound device still blocked after killing vlc process
Posted: 03 Feb 2010 02:34
Hi All,
I repeatedly (endless loop) capture 6hrs of video and audio input with vlc:
These commands are part of a bash script 'record.sh' which is called once by fcron after the computer starts. fcrontab -l:
Once started, everything works fine. Video and audio signals are encoded and recorded. When the first 6hrs passes by the vlc process is killed and the next vlc recording process is stared.
But here is the problem. The second and all following vlc recordings triggered by endless loop do not contain audio.
I have the impression that the sound device is still occupied. Probably I do not properly kill the recording process and I guess that invoking the script 'record.sh' via fcrontab contributes to the problem as well.
Is there someone who has an idea if the problem has something to do with vlc'?
Thank you,
Ralf
I repeatedly (endless loop) capture 6hrs of video and audio input with vlc:
Code: Select all
while [ 0 -eq 0 ]; do
cvlc --run-time=21600 v4l2:///dev/video0 input-slave=alsa://hw:0,0 :v4l2-standard=0
:sout='#transcode{vcodec=mp4v,vb=800,scale=1,acodec=mpga,ab=128,sfilter=marq}:std{access=file,mux=mp4,dst=/tmp/out.mp4}'
--sub-filter marq --marq-marquee "%D %H:%M:%S" --marq-position 6 &
sleep 21605 # wait 5 sec in addition
pid=$(ps ax | grep vlc | awk '{ print $1 }')
kill $pid
wait $pid
done
Code: Select all
SHELL=/bin/bash
@volatile,first(1) 300m ~/record.sh > /dev/null 2>&1
But here is the problem. The second and all following vlc recordings triggered by endless loop do not contain audio.
I have the impression that the sound device is still occupied. Probably I do not properly kill the recording process and I guess that invoking the script 'record.sh' via fcrontab contributes to the problem as well.
Is there someone who has an idea if the problem has something to do with vlc'?
Thank you,
Ralf