[Ffmpeg-devel] FLV files: use of audio timestamps
Wed Feb 1 00:28:26 CET 2006
"Siddharth Mathur" <smathur at nellymoser.com> writes:
> Hello all,
> In an FLV (Flash) file, each audio/video packet has a timestamp associated
> with it. This timestamp value is in milliseconds and can be extracted from
> the packet header. For example, the flv_read_packet() function in flvdec.c
> reads this value as follows:
> pts = get_be24(&s->pb);
> In certain (fairly common) scenarios, the timestamp of the first audio
> packet is offset by (say) 0.5 sec from the timestamp of the first video
> packet. FFMPEG currently seems to throw away this information when
> converting from the FLV format, and as a result audio and video timescales
> may be skewed. For example, I decoded an FLV ( audio offset of ~0.4sec) to
> an AVI file with PCM audio and RAW video, and lip-sync problems can be seen.
> Any pointers on how I should troubleshoot and fix this problem in the ffmpeg
AVI is a bad choice of format since it lacks any notion of
timestamps. What happens if you convert the file to MPEG instead?
Can you post a sample somewhere?
mru at inprovide.com
More information about the ffmpeg-devel