[FFmpeg-user] Fast seeking formats for storing live video

Steve Cookson it at sca-uk.com
Wed Oct 17 18:49:11 CEST 2012


Hi Guys,

I am producing a video file from a real-time camera using GStreamer and I
want to take clips and snaps with FFmpeg from it as I am saving.  This seems
fine except that there is a large difference in performance between using a
live file and pre-processing it with FFmpeg.

I am using a motion jpeg encoder in an AVI file with avimux which grows as
the file is recorded.  Then I use:

ffmpeg -ss 100 -i video.avi -y -s xga -vf crop=ih:ih -f image2 -pix_fmt
rgb24 -vframes 1 -an test_snap.png

This takes about 30% of the size of the video to take a snap.  Ie taking a
snap at the end of the video takes about three minutes.

On the other hand if I convert it with ffmpeg first, (eg something like
ffmpeg -ss 0 -t 1000 -i video.avi video2.avi)

Then it takes about 1 second.  I guess it's to do with keyframes and gop and
stuff.

Really, I'd just like it to work without pre-processing with ffmpeg.  

1) Is there an encoder that works with a live file and gives sub-second
performance immediately,

2) Is there some other way

Regards

Steve

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 145 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20121017/63be5209/attachment.gif>


More information about the ffmpeg-user mailing list