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 432533 - [mad, mp3parse] regression: CVS version doesn't parse duration and bitrates of VBR from xing headers properly
[mad, mp3parse] regression: CVS version doesn't parse duration and bitrates o...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal major
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 428021
Blocks:
 
 
Reported: 2007-04-23 09:35 UTC by Alex Lancaster
Modified: 2007-06-08 08:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Alex Lancaster 2007-04-23 09:35:06 UTC
+++ This bug was initially created as a clone of Bug #428021 +++

Please describe the problem:

There is a regression between gstreamer-plugins-ugly-0.10.5 and gstreamer-plugins-ugly CVS, because gstreamer-plugins-ugly gets the duration correct but CVS doesn't, as show by the following gst-launch outputs:

Here is the gstreamer 0.10.11 output (note the bitrate of 142803 bps and the
duration):

gst-launch -t playbin uri=file:///tmp/foobar.mp3

Pipeline is PREROLLING ...
FOUND TAG      : found by element "id3demux0".
           title: Awake
          artist: Faultline
     track count: 9
    track number: 1
           album: Closer Colder
           genre: Unknown
         encoder: Rhythmbox 5641861
            date: 1999-01-01
        track ID: 7a405e7e-d0a9-4299-a786-1f2aee03faaa
       artist ID: f42ce12a-5007-48b0-8730-f2348784fac6
        album ID: 13d036da-0f87-4cf5-a12e-5928122f2582
 album artist ID: f42ce12a-5007-48b0-8730-f2348784fac6
     ID3v2 frame: buffer of 20 bytes, type: application/x-gst-id3v2-tsop-frame,
version=(int)4
FOUND TAG      : found by element "mad0".
        duration: 331000000000
         bitrate: 142803
FOUND TAG      : found by element "mad0".
           layer: 3
            mode: joint
        emphasis: none
     audio codec: MPEG-1 layer 3

here is the output for gstreamer CVS (as of 2007-04-23), which shows a bitrate
of 32000 bps


Pipeline is PREROLLING ...
FOUND TAG      : found by element "id3demux0".
           title: Awake
          artist: Faultline
     track count: 9
    track number: 1
           album: Closer Colder
           genre: Unknown
         encoder: Rhythmbox 5641861
            date: 1999-01-01
        track ID: 7a405e7e-d0a9-4299-a786-1f2aee03faaa
       artist ID: f42ce12a-5007-48b0-8730-f2348784fac6
        album ID: 13d036da-0f87-4cf5-a12e-5928122f2582
 album artist ID: f42ce12a-5007-48b0-8730-f2348784fac6
 artist sortname: Faultline
FOUND TAG      : found by element "mpegaudioparse0".
         bitrate: 32000
FOUND TAG      : found by element "mad0".
           layer: 3
            mode: joint
        emphasis: none
         bitrate: 32000


Comment #8 from Alex Lancaster (points: 20)
2007-04-23 08:47 UTC [reply]

The problem appears to be with the mpegaudioparse0 element in
gstreamer-plugins-ugly in CVS, if I move this element aside:

[gstreamer-0.10]$ mv -i libgstmpegaudioparse.* /tmp/

and try again with gstreamer (CVS), I get the correct duration/bitrate:

Pipeline is PREROLLING ...
FOUND TAG      : found by element "id3demux0".
           title: Awake
          artist: Faultline
     track count: 9
    track number: 1
           album: Closer Colder
           genre: Unknown
         encoder: Rhythmbox 5641861
            date: 1999-01-01
        track ID: 7a405e7e-d0a9-4299-a786-1f2aee03faaa
       artist ID: f42ce12a-5007-48b0-8730-f2348784fac6
        album ID: 13d036da-0f87-4cf5-a12e-5928122f2582
 album artist ID: f42ce12a-5007-48b0-8730-f2348784fac6
 artist sortname: Faultline
FOUND TAG      : found by element "mad0".
        duration: 331000000000
         bitrate: 142803
FOUND TAG      : found by element "mad0".
           layer: 3
            mode: joint
        emphasis: none
     audio codec: MPEG-1 layer 3

The problem appears to be with the mpegaudioparse0 element in
gstreamer-plugins-ugly in CVS, if I move this element aside:

[gstreamer-0.10]$ mv -i libgstmpegaudioparse.* /tmp/

and try again with gstreamer (CVS), I get the correct duration/bitrate:

Pipeline is PREROLLING ...
FOUND TAG      : found by element "id3demux0".
           title: Awake
          artist: Faultline
     track count: 9
    track number: 1
           album: Closer Colder
           genre: Unknown
         encoder: Rhythmbox 5641861
            date: 1999-01-01
        track ID: 7a405e7e-d0a9-4299-a786-1f2aee03faaa
       artist ID: f42ce12a-5007-48b0-8730-f2348784fac6
        album ID: 13d036da-0f87-4cf5-a12e-5928122f2582
 album artist ID: f42ce12a-5007-48b0-8730-f2348784fac6
 artist sortname: Faultline
FOUND TAG      : found by element "mad0".
        duration: 331000000000
         bitrate: 142803
FOUND TAG      : found by element "mad0".
           layer: 3
            mode: joint
        emphasis: none
     audio codec: MPEG-1 layer 3
Comment 1 Jan Schmidt 2007-06-08 08:39:43 UTC
This was fixed in CVS a few weeks ago:

2007-05-18  Jan Schmidt  <thaytan@mad.scientist.com>

        * gst/mpegaudioparse/gstmpegaudioparse.c:
        (mp3_type_frame_length_from_header), (gst_mp3parse_reset),
        (gst_mp3parse_emit_frame), (gst_mp3parse_handle_first_frame),
        (gst_mp3parse_chain), (mp3parse_total_bytes),
        (mp3parse_total_time):
        * gst/mpegaudioparse/gstmpegaudioparse.h:
        Implement parsing of Xing headers from the first frame of the stream,
        and use it to report duration correctly where possible.