flv audio/video out of sync.

Project:Tools
Component:Documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Project wiki:Tools of the trade
Description

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:

http://vlog.xuite.net/vlog/guest/basic.php?media_id=cmgyTkRwLTkyODY3Ny5m...
But I download the flash video file:
http://5.mms.vlog.xuite.net/media/home5/50/07/11459030/50026/rh2NDp-9286...
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.

Comments

#1

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...

hth,
mose

#2

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.

#3

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

#4

Project:Overshoot TV (General issues)» Tools

#5

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:
http://en.wikipedia.org/wiki/Flash_Video

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'

#6

#7

I put what I learned while investigating this issue in a new wiki page:
http://overshoot.tv/node/72

#8

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.

#9

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.

http://en.wikipedia.org/wiki/VP6

#10

I can't find which decoder VLC uses.
See
http://wiki.videolan.org/Flash_Video

#11

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.