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 548913 - vorbisenc being picky about rounding errors in timestamps
vorbisenc being picky about rounding errors in timestamps
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-21 19:52 UTC by Johannes Schauer
Modified: 2008-08-22 09:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johannes Schauer 2008-08-21 19:52:28 UTC
here you go slomo :)

josch: if you want file a bug and assign it to me... it's 
       vorbisenc that is too picky about rounding errors in timestamps, 
       i'll fix that tomorrow but a bug as reminder is always good ;)
Comment 1 Johannes Schauer 2008-08-21 19:55:45 UTC
steps to reproduce:

wget http://www.matroska.org/samples/mewmew/downloads/mewmew-vorbis-ssa.mkv
this pipeline http://phpfi.com/345897 will produce audio errors
Comment 2 Sebastian Dröge (slomo) 2008-08-22 07:23:58 UTC
Ok the timestamps of the vorbis audio in this particular matroska file are far too inaccurate. The duration you can calculate from them for every vorbis frame is about 16.5ms while in reality every vorbis frame has a duration of about 21.3ms.

The audiosink fixes this somehow but vorbisenc just drops every second buffer because it arrives with a timestamp before the previous timestamp+duration.

Also the Matroska guys said that this file was created by a broken tool long ago ;)

The best thing that can be done about this without breaking other things is:

2008-08-22  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

        * ext/vorbis/vorbisenc.c: (gst_vorbis_enc_chain):
        If a buffer arrives with a timestamp before the timestamp+duration
        of the previous buffer clip it instead of dropping it completely.
        Slight improvement for the unfixable bug #548913.
Comment 3 Wim Taymans 2008-08-22 09:11:18 UTC
I'm beginning to think that we should try to generate sensible timestamps in the decoders (demuxers for raw audio) instead of having all the patchup logic in the audiosink, where it's only useful for playback but not transcoding.

I don't really want to implement this in every decoder but it's something to remember for our decoder base class.

Also we need some idea about what kind of rounding errors we want to allow and correct for, it's currently a bit arbitrary in the audiosinks (0.5 seconds of drift is allowed).