[Bug 655276] simple_seek is not accurate at sample level for audio

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jul 27 04:40:56 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=655276
  GStreamer | don't know | 0.10.34

--- Comment #4 from Kibeom Kim <kkb110 at gmail.com> 2011-07-27 11:40:50 UTC ---
(In reply to comment #3)
> What did you get in the NEWSEGMENT event?  Or better, what do you get if you
> put an audiorate element after each decoder?

putting audiorate element, changed line 97 to

    pipeline = gst.parse_launch('filesrc location=' + filename + ' ! decodebin2
 ! audiorate ! audioconvert dithering=0 ! appsink name=sink
caps=audio/x-raw-int,rate=44100,channels=2,depth=16,width=16,signed=true,endianness=1234')

output:


[kkb110 at myhost tmp]$ python2 test.py 
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
wav
requested    buffer_timestamp_to_sample    actual
    44100                       44100.0     44100
    49100                 49099.9999644     49100
    54100                 54099.9999729     54100
    59100                 59099.9999814     59100
    64100                 64099.9999899     64100
    69100                 69099.9999984     69100
    74100                 74099.9999628     74100
    79100                 79099.9999713     79100
    84100                 84099.9999798     84100

flac
requested    buffer_timestamp_to_sample    actual
    44100                       44100.0     44101
    49100                 49098.9999969     49100
    54100                 54098.9999613     54100
    59100                 59098.9999698     59100
    64100                 64098.9999783     64100
    69100                 69098.9999868     69100
    74100                 74098.9999953     74100
    79100                 79098.9999597     79100
    84100                 84098.9999682     84100

ogg
requested    buffer_timestamp_to_sample    actual
    44100                       44100.0     44100
    49100                 49099.9999644     49100
    54100                 54099.9999729     54099
    59100                 59099.9999814     59100
    64100                 64099.9999899     64100
    69100                 69099.9999984     69100
    74100                 74099.9999628     74099
    79100                 79099.9999713     79100
    84100                 84099.9999798     84099

mp3
requested    buffer_timestamp_to_sample    actual
    44100                       44100.0     44101
    49100                 49099.9999644     49100
    54100                 54098.9999613        -1
    59100                 59098.9999698        -1
    64100                 64099.9999899     64100
    69100                 69098.9999868        -1
    74100                 74099.9999628     74101
    79100                 79099.9999713     79101
    84100                 84099.9999798     84101


In my code, I compare the returned buffer to the buffer built by build_answer
function which read from the first to the end without seeking, and that's
'actual' column above.

Thanks for letting me know audiorate element, now it's much better.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list