LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-02-2010, 12:54 AM   #1
ralfbutler
Member
 
Registered: Jul 2009
Posts: 38

Rep: Reputation: 18
Sound device still blocked? How to properly kill that process?


Hi All,

I repeatedly (endless loop) capture 6hrs of video and audio input with vlc:
Code:
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
These commands are part of a bash script 'record.sh' which is called once by fcron after the computer starts. fcrontab -l:
Code:
SHELL=/bin/bash

@volatile,first(1) 300m ~/record.sh > /dev/null 2>&1
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 what could lead to that 'silence'?

Thank you,
Ralf
 
Old 02-04-2010, 07:06 PM   #2
ralfbutler
Member
 
Registered: Jul 2009
Posts: 38

Original Poster
Rep: Reputation: 18
I still found no solution. Could anyone help me with that?

Thanks,
Ralf
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash `kill`: process 'B' silently dies; but process 'A' = `kill` spews back debris! GrapefruiTgirl Programming 9 06-23-2009 09:42 AM
How to get the PID of the process giving kill signal to a process? hariprd Programming 2 11-27-2008 03:10 AM
Shell Script : Kill a running process when another process starts ashmew2 Linux - General 3 08-20-2008 03:47 AM
Sound device misconfigured: Not properly detected Cain_vX Debian 2 12-21-2006 12:31 AM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration