preview video while ffmpeg is recording

Daniel Armstrong daniel-r35aSzp7v8jQT0dZR+AlfA at
Mon Nov 30 05:58:58 UTC 2009

On Sun, Nov 29, 2009 at 11:43 PM, David Christopher Chipman
<dchipman-rYHPKw+MWrk at> wrote:
> Daniel Armstrong wrote:
>> I am trying my hand at learning shell scripting beyond 1-2 liners...
>> and I am trying to create a script that uses ffmpeg to record video
>> from a webcam and vlc to display a preview of the video while
>> recording.
> Hi Daniel,
> Did you try running ffmpeg in the background, then starting the video
> player? If not, stick an ampersand (&")  on the end of the ffmpeg command
> line.

Hi David... Yes I did - ffmpeg doesn't like being sent to the
background. It fails to record video and requires a 'kill -9' to shut
off the webcam. Besides I want to see the recording output info in the
console and be able to enter 'q' to quit the program. Thanks for the
suggestion, though.

Can multiple programs access the data from /dev/video0 at the same
time? I don't know... I am trying to find that out now.

What would be ideal would be something like... script opens a preview
window in cvlc/mplayer/other and streams the video from /dev/video0
then launches ffmpeg to start recording the video and saving to file

I have the recording video part working okay in my script... just hung
up on the preview part. It would be good to see what the camera sees
while recording.

Daniel Armstrong
The Toronto Linux Users Group.      Meetings:
TLUG requests: Linux topics, No HTML, wrap text below 80 columns

More information about the Legacy mailing list