LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   V4L video capture: ffmpeg syntax question (https://www.linuxquestions.org/questions/linux-server-73/v4l-video-capture-ffmpeg-syntax-question-871947/)

borepstein 03-30-2011 11:42 AM

V4L video capture: ffmpeg syntax question
 
Hello listmates,

I am trying to "webalize" a video feed that goes into a video capture card on this one Linux box. So, at any rate, I have figured out how to do the actual capture. The following ffmpeg command does the job:

ffmpeg -f video4linux2 -i /dev/video0 /var/www/tmp/test.mpg

The problem is this command if allowed to run indefinitely will simply fill up my disk with by then irrelevant video recording. All I want is to be able to watch that video feed via HTTP, not to have the whole footage recorded. Hence my question - is there any good way to truncate the duration of footage being recorded? Like, record the video feed but only keep the last 30 seconds of it in the output file?

Thanks in advance for any and all help.

Boris.

smoker 03-31-2011 12:09 AM

Use ffserver.

A description using a webcam feed is here.


All times are GMT -5. The time now is 11:14 PM.