[FFmpeg-devel] potential problem in avi_read_packet

Don Moir donmoir at comcast.net
Fri Nov 1 02:39:11 CET 2013

I have two similar avi files. They both have AV_CODEC_ID_MJPEG video and PCM u8 audio.

One file has 15 frames of video per second and the other 30.

When I overlay these files in a particular order, the avi_read_packet bottle necks and becomes very slow like 200 ms or more to read 
a packet.

avi_sync is called in avi_read_packet and this seems to be taking most of the time.

Obviously playback is going to be bad in this case.

Each file runs perfectly fine when run stand alone. I do this kind of overlay all the time and have never seen this problem 

I am hoping someone might have some insight on this. Could be some some kind of disk thrashing as it appears avi_sync might be doing 

It's not a decode issue at all and just a read packet issue via av_read_frame. I can't really open open a ticket on it and just 
don't know enough about it at this point. To reproduce you must run the files at more or less the same time with the 15 fps file 
first and then the 30 fps file second.

Heres the files if anyone interested or has a clue. The MVI_5898.AVI (15 fps) needs to be run first and then when it is still 
running the Laura.AVI (30 fps) needs to be run second. When you run MVI_5898.AVI multiple times or Laura.AVI multiple times it works 



More information about the ffmpeg-devel mailing list