[FFmpeg-user] Save webcam stream in mpg, not avi format

Roger Pack rogerdpack2 at gmail.com
Fri Aug 28 17:59:46 CEST 2015

On 8/28/15, Felix Baier <felixbaier-at-yahoo.de at ffmpeg.org> wrote:
> Hi Eugen —
> I have done some more testing of the code and run the camera for a night. I
> should get 8-9 videos of each one hour length per night. However, I get 4
> videos of one hour length, but at twice the speed. The frame rate apparently
> is unaffected by this (still 25fps), at least as far as it is displayed in
> the properties of the videos.
> I changed “-vcodec mpeg4 -qscale 2” to “-vcodec mpeg4 -q:v 2” after I got a
> notification that the first version was ambiguous. The complete code I used:
> ffmpeg -r 25 -f dshow -s 640x480 -i video="Microsoft LifeCam HD-5000”
> -vcodec mpeg4 -q:v 2 -f segment -segment_time 3600 -reset_timestamps 1
> -segment_start_number 1 -segment_format avi -r 25
> c:\Users\Desktop\out%%03d.avi
> Any idea what might be going on?

I believe your problem here is the use of "-r" for the input, which
basically means "override what its actual framerate is, and pretend
that its 25 fps"
(any ideas out there for how we could make this more clear? Is this a
general aspect more than just dshow?)

More information about the ffmpeg-user mailing list