[Libav-user] recording with uncompressed audio speeds up video

Alex Cohn alexcohn at netvision.net.il
Wed Jan 23 12:37:06 CET 2013


On Fri, Jan 18, 2013 at 2:55 PM, Mike Versteeg <mike at mikeversteeg.com> wrote:
> I  have been using a recorder (based on muxer example) satisfactorily
> for quite some time for various formats. Now I need to use
> uncompressed audio to go with MJPEG video and I notice video speeds up
> considerable (like 10 times as fast) in the recorded file. Audio is
> OK, and if I use a compressed audio format (like mp3) video is fine as
> always. Does anyone have an idea why video speeds up the moment I use
> uncompresseed audio (CODEC_ID_PCM_S16LE)?
>
> Mike Versteeg
> mikeversteeg.com

I was waiting for a more educated guess, but if it is not coming, here is my 2¢:

When you switch to PCM (raw) audio, there is no container left to keep
track of timestamps, therefore playback happens at the full speed of
your CPU. The problem is that MJPEG itself is time agnostic.

BR,
Alex


More information about the Libav-user mailing list