Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-30-2011, 12:42 PM   #1
LQ Newbie
Registered: Jun 2010
Location: Boston, MA, USA
Distribution: OpenSUSE, Ubuntu, Centos
Posts: 10

Rep: Reputation: 2
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.

Old 03-31-2011, 01:09 AM   #2
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Use ffserver.

A description using a webcam feed is here.


ffmpeg, v4l

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Question about RTD VFG7350,Compressed video capture,Mplayer,Cat video dxj Linux - Hardware 1 01-10-2010 06:32 AM
Question about RTD VFG7350,Compressed video capture,Mplayer,Cat video dxj Linux - Software 0 01-10-2010 02:49 AM
v4l / v4l2 setup for ffmpeg rubadub Linux - Hardware 2 12-06-2008 04:37 AM
v4l device -- fast capture hbar Programming 2 01-10-2008 11:15 PM
Video Capture with v4l _cjx_ Linux - General 3 08-04-2005 05:25 PM

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

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