Page 1 of 1

Script for Timed Video Capture

Posted: 06 Oct 2007 22:41
by wildrobo
Hello,
I am a windows developer new to the world of linux...using ubuntu...I have a task at hand that I need help with. I think it should be a pretty simple thing. I am using VLC to capture video from my analog camcorder. I can do it manually, but if I forget to stop, then I have like 3 hours of blank at the end of each file. I would like a script that would launch VLC, capture from the imput card, and then stop after a specified amount of time. I created a crude script that would start vlc, sleep, then close vlc. Unfortuantally, once vlc started it never got to the sleep. I imagine you may have to create a new thread or something, but then how do you send the "stop" message to it. Ideally, things like the time to capture and filename to capture to would be variables. Any help would be greatly appreciated.


This is whay I have so far.

vlc --pvr-device="/dev/video0" --pvr-radio-device="/dev/radio0" --pvr-norm=0 --pvr-frequency=-1 --pvr-bitrate=-1 --pvr-caching=300 --pvr-width=-1 --pvr-height=-1 --pvr-framerate=-1 --pvr-keyint=-1 --pvr-bframes=-1 --pvr-bitrate-peak=-1 --pvr-bitrate-mode=0 --pvr-audio-bitmask=-1 --pvr-audio-volume=-1 --pvr-channel=2 --sout file/mpg:/media/disk/MyFiles/vlcCapture.mpg --sout-display

sleep 35m

vlc stop


But all this does is launch VLC. Ifhave to hit the play button it will start the capture, but I just want to lauch the script and have it stop 35 mins after I launch it.

Thanks in advance.wildrobo
New Cone


Posts: 1
Joined: Wed Sep 19, 2007 9:50 pm
Private message