After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 368681 - avimux + vbr lame always out of sync
avimux + vbr lame always out of sync
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.17
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2006-11-01 03:14 UTC by Tristan Brindle
Modified: 2009-10-16 15:33 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Tristan Brindle 2006-11-01 03:14:59 UTC
The pipeline

gst-launch-0.10 dvdreadsrc ! dvddemux name=demux  demux. ! queue ! mpeg2dec ! ffmpegcolorspace ! ffenc_mpeg4 ! avimux name=mux ! filesink location=... demux. ! queue ! a52dec ! audioconvert ! lame vbr=abr ! mux.

will seemingly always produce output files with the audio and video out of sync (when played back with any of totem-gst, MPlayer, Xine or VLC). Replacing ffenc_mpeg4 with xvidenc or any other video encoder that can output into AVI doesn't seem to make a difference.

Replacing avimux with matroskamux produces a properly syncronised output file. Leaving out the "vbr" property (so that lame defaults to constant bitrate) produces an sync'd file. Interestingly however, replacing lame with vorbisenc, which always gives VBR output, also produces an in-sync file.

As such, I'm not sure whether this is a bug in avimux or in lame.

If  you need any more info please let me know.
Comment 1 Jan Schmidt 2007-05-24 14:36:46 UTC
This is probably avimux's fault, but could also be lame, which has had some fixes lately. Feel free to re-assign to -ugly if it's lame's fault.
Comment 2 Gabriel Bouvigne 2007-11-07 10:56:07 UTC
This is an interaction between Lame (libmp3lame, not just the Gstreamer plugin) and muxing VBR audio within AVI. The same problem also happens with many other AVI muxers.


*AVI is not really friendly with VBR audio

*libmp3lame outputs raw data, but doesn't carry framing info to the caller.
Comment 3 Mark Nauwelaerts 2009-10-16 15:33:54 UTC
Following commit should fix MP3 VBR muxing in AVI, *provided* the input is properly parsed (as so indicated by caps), e.g. as in mp3parse ! avimux.

commit 8f2beb5e51a179b34f50863101ac3e4d17ed1483
Author: Mark Nauwelaerts <>
Date:   Fri Oct 16 17:28:09 2009 +0200

    avimux: support (some) VBR audio muxing

    AVI format can handle VBR audio provided audio chunks are of fixed duration
    (cfr fixed duration video frames).  Apply this approach to (always) parsed
    raw AAC and (if parsed) to MPEG-1/2 audio.

    See #368681.