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 414988 - Stream encoded by lame has gap after decoding
Stream encoded by lame has gap after decoding
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-05 17:44 UTC by Sebastien Merle
Modified: 2007-11-15 21:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Merle 2007-03-05 17:44:08 UTC
When encoding the audio of the alien.mpg video, the output has audio glitch.
Even if the audio stream pass by a audiorate element before encoding, the audio stream out of the decoder has gaps.

1. gst-launch filesrc=alien.mpg ! decodebin2 ! audioconvert ! audiorate ! fakesink -v

=> Some buffer have gap flag set

2. gst-launch filesrc=alien.mpg ! decodebin2 ! audioconvert ! audiorate ! lame ! mad ! audiorate ! fakesink -v

=> Some buffers still have the gap flag set
Comment 1 Tim-Philipp Müller 2007-05-07 17:05:47 UTC
I can't reproduce this (with CVS), neither with the fluendo mpeg demuxer nor with the mpeg demuxer from -ugly.

None of the buffers arriving at the sink have the discont flag set here.

Maybe you're using an audiorate element that's not up-to-date? Could you re-try with CVS of things please?

Comment 2 Sebastien Merle 2007-05-14 13:40:03 UTC
With CVS, if I play the file with the command:

> gst-launch filesrc=alien.mpg ! decodebin2 ! audioconvert ! audiorate ! lame
! mad ! alsasink

The output is perfect, but with either of the following commands the output sound have glitches:

> gst-launch filesrc=alien.mpg ! decodebin2 ! audioconvert ! lame
! mad ! alsasink

> gst-launch filesrc=alien.mpg ! decodebin2 ! audioconvert ! audiorate ! lame
! mad ! audiorate ! alsasink

The first command may be normal if the source have some timestamp discontinuities, but the second one should work. I don't think of any reasons why after a decoder an audiorate could add gaps.


Comment 3 Sebastien Merle 2007-05-14 13:59:45 UTC
Seems that the lame ! mad part creates discontinuites.

The folowing command show no discontinuities:
> GST_DEBUG=2 gst-launch -v filesrc location=alien.mpg ! decodebin2 ! audioconvert ! audiorate ! identity check-perfect=1 silent=1 ! lame ! mad ! alsasink

But if we check for discontinuites after the mad decoder with the command:
> GST_DEBUG=2 gst-launch -v filesrc location=alien.mpg ! decodebin2 ! audioconvert ! audiorate ! lame ! mad ! identity check-imperfect-timestamp=1 check-perfect=1 silent=1 ! alsasink

The log show:
...
0:00:00.999891000  3095 0x8197530 WARN              identity gstidentity.c:369:gst_identity_check_perfect:<identity0> Buffer not data-contiguous with previous one: prev offset_end -1, new offset 49065
0:00:01.001326000  3095 0x8197530 WARN              identity gstidentity.c:369:gst_identity_check_perfect:<identity0> Buffer not data-contiguous with previous one: prev offset_end -1, new offset 50217
0:00:01.002687000  3095 0x8197530 WARN              identity gstidentity.c:369:gst_identity_check_perfect:<identity0> Buffer not data-contiguous with previous one: prev offset_end -1, new offset 51369
0:00:01.004938000  3095 0x8197530 WARN              identity gstidentity.c:369:gst_identity_check_perfect:<identity0> Buffer not data-contiguous with previous one: prev offset_end -1, new offset 52521
0:00:01.077371000  3095 0x8197530 WARN              identity gstidentity.c:369:gst_identity_check_perfect:<identity0> Buffer not data-contiguous with previous one: prev offset_end -1, new offset 53673
0:00:01.078790000  3095 0x8197530 WARN              identity gstidentity.c:369:gst_identity_check_perfect:<identity0> Buffer not data-contiguous with previous one: prev offset_end -1, new offset 54825
...
Comment 4 Jan Schmidt 2007-05-18 12:11:25 UTC
I'm not sure that identity should be complaining when offset_end for the previous buffer was not provided (-1 = GST_BUFFER_OFFSET_NONE)
Comment 5 Sebastien Merle 2007-10-02 08:46:08 UTC
identity still complain, but with the current HEAD there is no audio glitches anymore.

I think this bug can be closed.