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 692067 - audiorate drops almost all data
audiorate drops almost all data
Status: RESOLVED DUPLICATE of bug 690465
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.0.4
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-19 12:09 UTC by Ian Davidson
Modified: 2013-01-22 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ian Davidson 2013-01-19 12:09:24 UTC
The pipeline
gst-launch-1.0 -e alsasrc ! audioconvert ! 'audio/x-raw,rate=44100,channels=1' ! queue ! wavenc ! filesink location=file.wav
will create a WAV file which would seem to be all the audio data available.

But the pipeline
gst-launch-1.0 -e alsasrc ! audioconvert ! 'audio/x-raw,rate=44100,channels=1' ! queue ! audiorate ! queue ! wavenc ! filesink location=file.wav
will output a WAV file which contains just a short burst of sound.

A trace (using audiorate:6) gives the following
0:00:00.030428619  3612       0xe11000 DEBUG              audiorate gstaudiorate.c:208:gst_audio_rate_reset:<audiorate0> handle reset 
Pipeline is live and does not need PREROLL ... 
Setting pipeline to PLAYING ... 
New clock: GstAudioSrcClock 
0:00:00.063398923  3612       0xe14b20 DEBUG              audiorate gstaudiorate.c:305:gst_audio_rate_sink_event:<audiorate0> handle NEWSEGMENT 
0:00:00.063442617  3612       0xe14b20 DEBUG              audiorate gstaudiorate.c:323:gst_audio_rate_sink_event:<audiorate0> updated segment: time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999 
0:00:00.063532673  3612       0xe14b20 DEBUG              audiorate gstaudiorate.c:450:gst_audio_rate_chain:<audiorate0> resync to offset 0 
0:00:00.063554857  3612       0xe14b20 LOG                audiorate gstaudiorate.c:491:gst_audio_rate_chain:<audiorate0> in_time:0:00:00.000000000, in_duration:0:00:00.010000000, in_size:882, in_offset:0, in_offset_end:441, ->next_offset:0, ->next_ts:0:00:00.000000000 
0:00:00.063579137  3612       0xe14b20 LOG                audiorate gstaudiorate.c:500:gst_audio_rate_chain:<audiorate0> within tolerance 0:00:00.040000000 
0:00:00.063593118  3612       0xe14b20 DEBUG              audiorate gstaudiorate.c:626:gst_audio_rate_chain:<audiorate0> marking DISCONT on output buffer 
0:00:00.073567986  3612       0xe14b20 LOG                audiorate gstaudiorate.c:491:gst_audio_rate_chain:<audiorate0> in_time:0:00:00.000000000, in_duration:0:00:00.010000000, in_size:882, in_offset:0, in_offset_end:441, ->next_offset:441, ->next_ts:0:00:00.010000000 
0:00:00.073602878  3612       0xe14b20 LOG                audiorate gstaudiorate.c:500:gst_audio_rate_chain:<audiorate0> within tolerance 0:00:00.040000000 
0:00:00.084130940  3612       0xe14b20 LOG                audiorate gstaudiorate.c:491:gst_audio_rate_chain:<audiorate0> in_time:0:00:00.000000000, in_duration:0:00:00.010000000, in_size:882, in_offset:0, in_offset_end:441, ->next_offset:882, ->next_ts:0:00:00.020000000 
0:00:00.084158653  3612       0xe14b20 LOG                audiorate gstaudiorate.c:500:gst_audio_rate_chain:<audiorate0> within tolerance 0:00:00.040000000 
0:00:00.093695096  3612       0xe14b20 LOG                audiorate gstaudiorate.c:491:gst_audio_rate_chain:<audiorate0> in_time:0:00:00.000000000, in_duration:0:00:00.010000000, in_size:882, in_offset:0, in_offset_end:441, ->next_offset:1323, ->next_ts:0:00:00.030000000 
0:00:00.093720074  3612       0xe14b20 LOG                audiorate gstaudiorate.c:500:gst_audio_rate_chain:<audiorate0> within tolerance 0:00:00.040000000 
0:00:00.103832960  3612       0xe14b20 LOG                audiorate gstaudiorate.c:491:gst_audio_rate_chain:<audiorate0> in_time:0:00:00.000000000, in_duration:0:00:00.010000000, in_size:882, in_offset:0, in_offset_end:441, ->next_offset:1764, ->next_ts:0:00:00.040000000 
0:00:00.103858314  3612       0xe14b20 LOG                audiorate gstaudiorate.c:500:gst_audio_rate_chain:<audiorate0> within tolerance 0:00:00.040000000 
0:00:00.118706809  3612       0xe14b20 LOG                audiorate gstaudiorate.c:491:gst_audio_rate_chain:<audiorate0> in_time:0:00:00.000000000, in_duration:0:00:00.010000000, in_size:882, in_offset:0, in_offset_end:441, ->next_offset:2205, ->next_ts:0:00:00.050000000 
0:00:00.118733953  3612       0xe14b20 DEBUG              audiorate gstaudiorate.c:573:gst_audio_rate_chain:<audiorate0> dropping 441 samples 
0:00:00.118787221  3612       0xe14b20 LOG                audiorate gstaudiorate.c:491:gst_audio_rate_chain:<audiorate0> in_time:0:00:00.000000000, in_duration:0:00:00.010000000, in_size:882, in_offset:0, in_offset_end:441, ->next_offset:2205, ->next_ts:0:00:00.050000000 
0:00:00.118812500  3612       0xe14b20 DEBUG              audiorate gstaudiorate.c:573:gst_audio_rate_chain:<audiorate0> dropping 441 samples 

And it continues for the remainder, reporting that it is dropping 441 samples (which the previous line would suggest was all the input)
Comment 1 Tim-Philipp Müller 2013-01-20 18:23:44 UTC
Looks like a duplicate of bug #690465, could you re-test with 1.0.5 ?
Comment 2 Ian Davidson 2013-01-22 16:58:48 UTC
Retested with 1.0.5.

Problem gone away.

It would appear to be that alsasrc used timestamp of 0 on each buffer - so audiorate was working perfectly to spec.
Comment 3 Tim-Philipp Müller 2013-01-22 17:07:11 UTC

*** This bug has been marked as a duplicate of bug 690465 ***