[FFmpeg-devel] WMV to FLV video/audio desynchronisation

Olivier Doucet olivier.mailing
Fri Aug 31 12:31:14 CEST 2007


Hi,

I'm actually trying to encode wmv videos to flv format. The sound is delayed
by about 2 or 3 seconds (sound in advance of three seconds on start, and no
sound at the end).

ffmpeg -i myfile.avi -y -r 15 -s 320x240 -ar 22050 -acodec libmp3lame -ab
32000 -ac 1 -bt 64000 -vcodec flv -b 400000 myoutput.flv

FFmpeg version SVN-r10260, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-libmp3lame --enable-libxvid --enable-shared
--enable-gpl --enable-libamr-nb --enable-libfaad --enable-libfaac
--enable-libx264 --enable-libfaac
  libavutil version: 49.5.0
  libavcodec version: 51.42.0
  libavformat version: 51.12.2
  built on Aug 30 2007 14:14:25, gcc: 4.1.1 20070105 (Red Hat 4.1.1-51)

Seems stream 1 codec frame rate differs from container frame rate:
1000.00(1000/1) ->
25.00 (25/1)
Input #0, asf, from 'myfile.avi':
  Duration: N/A, bitrate: 221 kb/s
  Stream #0.0: Audio: wmav2, 32000 Hz, stereo, 32 kb/s
  Stream #0.1: Video: wmv1, yuv420p, 320x240, 189 kb/s, 25.00 fps(r)
Output #0, flv, to 'myoutput.flv':
  Stream #0.0: Video: flv, yuv420p, 320x240, q=2-31, 400 kb/s, 15.00 fps(c)
  Stream #0.1: Audio: libmp3lame, 22050 Hz, mono, 32 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1

[...]
video:1728kB audio:133kB global headers:0kB muxing overhead 4.699934%

What can I do to avoid this ? Is this a "bug" ? an error in the input wmv ?


I tried with differents wmvs, problem is the same, and delays seems to be
equal.

The original wmv can be found here :
http://dl.free.fr/c7sZP9qSa/F954806Ed01.wmv (986KB)


Any feedback welcome :)


Olivier




More information about the ffmpeg-devel mailing list