flv audio/video out of sync.

Category:bug report
Project wiki:Tools of the trade

For some videos, we need to download some flash videos (.flv) from the net to use within our production.

The problem is that a video that plays fine on the web, is out of sync when played on our system (without re-encoding!).

Example: this short political ad plays fine on the net:

But I download the flash video file:
the video is noticeably faster than the audio (even if you don't understand the language).

I use mplayer to play it from within the console. The file has not been re-encoded. Only downloaded.



I tried that flv, with xine, mplayer and vlc (on ubuntu hardy).
On mplayer, I have same symptoms: video runs a lot faster than audio. On xine, the sync is good but video stops and jumps every few seconds, that'w unwatchable. On VLC, which uses a different set of codecs, the video plays correctly and the sync is preserved. I guess there is a problem with codecs used in ubuntu for flv movies...



Thanks for testing. I have this problem only with some flash videos. Most seem to be ok.

Kdenlive does not seem to support .flv, so such videos would have to be encoded with ffmpeg first, but that does not fix the synchronization problem.


since it is a codec problem, which codecs do ffmpeg and mencode use? Do they use the same ones?


Project:Overshoot TV (General issues)» Tools


I tried to look for the answer to #3... but things are still confused for me.

First of all, flash video (.flv files) is not a codec, but it support such codecs as H.264, VP6, and Sorenson H.263:

So why do some .flv videos have a audio/sync problem, and others not? Maybe precisely because they use different codecs.

As Mose told me today, we can use tcprobe -i (in the package transcode) to find information about the video.
The problem is that I can't use it on .flv videos:

tcprobe -i FrankCTHsieh2008-161.flv
[tcprobe] unknown file type
[tcprobe] filetype/codec not yet supported by 'transcode'



I put what I learned while investigating this issue in a new wiki page:


from my Frank Hsieh folder:

file name FourCC a/v in sync?
2008vivatw-522.flv VP6F no
FrankCTHsieh2008-120120949.flv. FLV1 yes
FrankCTHsieh2008-129.flv VP6F yes
FrankCTHsieh2008-161.flv VP6F no
FrankCTHsieh2008-198.flv VP6F no
FrankCTHsieh2008-20080113576.flv VP6F so

I'll put more examples later, if needed.
It sems that FLV1 work, but many/most VP6F do not.


As of September 2006, an open-source implementation of the decoder is part of the libavcodec project, though producing or dealing with VP6 video streams inside libavcodec/libavformat seems to be discouraged and/or refused due to clashes between the ffmpeg's developers and On2 technologies by a claim of Intellectual Property and Trade Secrets Infringement made by the corporation itself.



I can't find which decoder VLC uses.


mplayer -correct-pts file.flv will play correctly an out of sync file.

http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-February/049434... :
the command:
ffmpeg -i input.flv -async 1000 output.flv
seems to slow down the video to a normal speed... but I have no sound with it!
Also, it seems that any conversion increases the blockiness of the rendered video.