[Libav-user] Audio delay problem

Ferenc Mozes ferenc.mozes at integrasoft.ro
Tue Feb 19 13:06:32 CET 2013


Hi all!

I am relatively new to ffmpeg libraries and I ran into the following 
problem: as I am getting audio and video frames through two different 
streams, I am trying to write them into a container (mkv in my case) but 
I cannot identify when the audio stream has dropped some frames or when 
the frames are arriving correctly again. In the case of the video frames 
I had an information regarding the frame rate so I could easily repeat a 
key frame, in order to have a video that has a predefined length, in 
case of video frame loss. However, there is no information about "frame 
rate" in audio streams, as I understand.
My question would be: is there any kind of mechanism or API function to 
figure this out and put the audio in sync with the video? I am using 
ffmpeg 0.8.12 and functions from the libavformat.h and libavcodec.h 
header files.

Any solutions or ideas would be greatly appreciated!

Kind regards,
Ferenc Mozes


More information about the Libav-user mailing list