[FFmpeg-user] Web camera and microphone capture via dshow

Rhodri James rhodri at kynesim.co.uk
Mon Aug 1 15:21:17 CEST 2011


On Mon, 01 Aug 2011 07:35:05 +0100, Dmitry Gorbunov  
<atskiisotona at gmail.com> wrote:

> I'm trying to capture and encode video/audio from camera and microphone  
> using
> libavcodec, libavformat and libavdevice. It works, video and audio  
> captures,
> but after encoding it all is messed: everything is extremely speed up  
> (like
> you recorded it at 25 fps and then played at 100). I think I don't get
> something about all that pts/dts stuff and synchronization, but I  
> honestly
> don't know where to look. ffmpeg unfortunately is very poorly documented  
> in
> terms of programming (why? it's so mature, why someone won't write at  
> least
> how library works?). I took muxing example from ffmpeg git and modified  
> it
> to feed encoders with data from webcam and microphone using av_read_frame
> and av_decode_video/audio. Any ideas?

Check the clock speed of your web cam.  I've seen some that clock at
30kHz rather than 90KHz, which will mess up your PTS calculations.


-- 
Rhodri James
Kynesim Ltd


More information about the ffmpeg-user mailing list