Hi,

I got issues with encoding a DV AVI exported from Adobe Premiere Elements.

Audio and video don't sync - see the differing durations in the log output below.

mencoder works better (still is off a couple of frames, although not one second like ffmpeg), but is about 2x slower.

Any idea?

Code:
Encoding started on Fri Jun 16 14:44:41 CEST 2006
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
Mac OSX universal build for ffmpegX
  libavutil version: 49.0.0
  libavcodec version: 51.9.0
  libavformat version: 50.4.0
movtoy4m
Copyright 2002-2006 Johan Lindström
All rights reserved..
Input #0, yuv4mpegpipe, from 'pipe:':
  Duration: N/A, bitrate: N/A
  Stream #0.0, 25.00 fps(r): Video: rawvideo, yuv420p, 640x480
Output #0, avi, to '/Users/user/Desktop/test-divx.avi.e.avi':
  Stream #0.0, 25.00 fps(c): Video: mpeg4, yuv420p, 640x480, q=2-9, 884 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
bench: utime=389.535s
video:90292kB audio:0kB global headers:0kB muxing overhead 0.560602%
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
Mac OSX universal build for ffmpegX
  libavutil version: 49.0.0
  libavcodec version: 51.9.0
  libavformat version: 50.4.0
Input #0, avi, from '/Volumes/e/test.avi':
  Duration: 00:13:59.6, start: 0.000000, bitrate: 30347 kb/s
  Stream #0.0, 25.00 fps(r): Video: dvvideo, yuv420p, 720x576
  Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Output #0, mp2, to '/Users/user/Desktop/test-divx.mp3':
  Stream #0.0: Audio: mp3, 48000 Hz, stereo, 96 kb/s
Stream mapping:
  Stream #0.1 -> #0.0 [sync #0.0]
video:0kB audio:9852kB global headers:0kB muxing overhead 0.000000%
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
Mac OSX universal build for ffmpegX
  libavutil version: 49.0.0
  libavcodec version: 51.9.0
  libavformat version: 50.4.0
Input #0, avi, from '/Users/user/Desktop/test-divx.avi.e.avi':
  Duration: 00:13:59.6, start: 0.000000, bitrate: 885 kb/s
  Stream #0.0, 25.00 fps(r): Video: mpeg4, yuv420p, 640x480
Input #1, mp3, from '/Users/user/Desktop/test-divx.mp3':
  Duration: 00:14:00.7, start: 0.000000, bitrate: 96 kb/s
  Stream #1.0: Audio: mp3, 48000 Hz, stereo, 96 kb/s
Output #0, avi, to '/Users/user/Desktop/test-divx.avi':
  Stream #0.0, 25.00 fps(c): Video: mpeg4, yuv420p, 640x480, q=2-31
  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 96 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #1.0 -> #0.1
video:90292kB audio:9852kB global headers:0kB muxing overhead 1.329461%
Encoding completed on Fri Jun 16 15:40:25 CEST 2006

Here's the mencoder output on the same input file

Code:
Encoding started on Fri Jun 16 15:55:40 CEST 2006
MEncoder dev-CVS-051126-18:35-3.3 (C) 2000-2005 MPlayer Team
Mac OSX static build for ffmpegX
AltiVec found
CPU: PowerPC
success: format: 0  data: 0x0 - 0xbdd8de1c
AVI file format detected.
AVI: ODML: Building odml index (2 superindexchunks)
VIDEO:  [dvsd]  720x576  24bpp  25.000 fps  28800.0 kbps (3515.6 kbyte/s)
[V] filefmt:3  fourcc:0x64737664  size:720x576  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
xvid: using library version 1.2.-127 (build xvid-1.2.0-dev)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=640 h=480]
==========================================================================
Requested video codec family [qdv] (vfm=dshow) not available.
Enable it at compilation.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdv] vfm: ffmpeg (FFmpeg DV decoder)
==========================================================================
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/0ch/s8...
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16be...
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: FAST_BILINEAR scaler, from Planar YV12 to Planar YV12 using AltiVec
videocodec: XviD (640x480 fourcc=44495658 [DIVX])
xvid: par=0/0 (vga11), displayed=640x512, sampled=640x480
xvid: CBR Rate Control -- bitrate=884kbit/s
Writing AVI header...
ODML: vprp aspect is 16384:13107.
ODML: vprp aspect is 16384:13107.
Skipping frame!
Skipping frame!
Skipping frame!
Skipping frame!
Skipping frame!
Skipping frame!
Error while decoding frame!
Flushing video frames
Writing AVI index...
Fixing AVI header...
ODML: vprp aspect is 16384:13107.
Video stream:  849.333 kbit/s  (106166 B/s)  size: 89116262 bytes  839.400 secs  20992 frames
Audio stream:   96.000 kbit/s  (12000 B/s)  size: 10078848 bytes  839.904 secs
Encoding completed on Fri Jun 16 17:14:32 CEST 2006