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

Felix Baier felixbaier at yahoo.de
Wed Sep 2 01:00:51 CEST 2015


> On Aug 28, 2015, at 12:10 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> 
> Felix Baier <felixbaier-at-yahoo.de <at> ffmpeg.org> writes:
> 
>> I changed “-vcodec mpeg4 -qscale 2” to “-vcodec mpeg4 -q:v 2” 
>> after I got a notification that the first version was 
>> ambiguous.
> 
> For a video-only file?
Yes, it’s video only.

> 
>> ffmpeg -r 25 -f dshow -s 640x480 -i video="Microsoft LifeCam HD-5000” 
> 
> Use -framerate 25 as explained by Roger.
Ok, thanks!

> 
>> -vcodec mpeg4 -q:v 2 -f segment -segment_time 3600 
>> -reset_timestamps 1 
> 
>> -segment_start_number 1 -segment_format avi
> 
> Are these necessary?
Yes, I want to save in junks of 1 hour, so that at least part of the video material is saved if the camera has a problem. In particular, the real time buffer of the camera is sometimes used up and frames are lost, which I assume might be worse if I record in one file.

> 
>> -r 25
> 
> Please remove this.
> 
>> c:\Users\Desktop\out%%03d.avi
> 
> Please do not top-post here, Carl Eugen

Carl Eugen and Roger--Thanks for your answers. Very helpful! This is a working version of the code, just for future reference:

ffmpeg -f dshow -framerate 20 -s 640x360 -i video="Microsoft LifeCam HD-5000" -vcodec mpeg4 -q:v 2 -f segment -segment_time 3570 -reset_timestamps 1 -segment_start_number 1 -segment_format avi c:\Users\_%%03d.avi

> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list