<div dir="ltr"><div><span style="font-family:monospace,monospace">Hello!<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">My goal is to play a GES pipeline at a faster or slower rate without affecting the perceived audio pitch.<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">If I use `gst_element_seek` on the GESPipeline, I can play the pipeline at a different speed, as desired:<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">  gst_element_seek(GST_ELEMENT(gesPipeline),<br>                   2,<br>                   GST_FORMAT_TIME,<br>                   GST_SEEK_FLAG_FLUSH,<br>                   GST_SEEK_TYPE_NONE,<br>                   GST_CLOCK_TIME_NONE,<br>                   GST_SEEK_TYPE_NONE,<br>                   GST_CLOCK_TIME_NONE);</span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">properly plays the pipeline at 2x speed (with "chipmunk" audio).<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">I then tried to add a `pitch` or `scaletempo` effect to preserve the perceived pitch:</span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">  GESEffect *pitch = ges_effect_new("pitch pitch=0.5");<br>  ges_timeline_element_set_duration(GES_TIMELINE_ELEMENT(pitch),<br>                                    runningTime * GST_SECOND);<br>  ges_track_add_element(GES_TRACK(audioTrack),<br>                        GES_TRACK_ELEMENT(pitch));</span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">But now when I play the pipeline, I get the following errors:</span></div><br><div><span style="font-family:monospace,monospace">  ERROR        audioaggregator gstaudioaggregator.c:1015:gboolean gst_audio_aggregator_sink_event(GstAggregator *, GstAggregatorPad *, GstEvent *):<smart-adder-adder:sink_0> Got segment event with wrong rate 1.000000, expected 2.000000</span></div><span style="font-family:monospace,monospace"></span><div><span style="font-family:monospace,monospace"><br>  CRITICAL **: 12:40:23.458: gst_audio_buffer_clip: assertion 'segment->format == GST_FORMAT_TIME || segment->format == GST_FORMAT_DEFAULT' failed<br><br>  GStreamer-CRITICAL **: 12:40:23.458: gst_segment_to_running_time: assertion 'segment->format == format' failed<br><br>  GStreamer-CRITICAL **: 12:40:23.458: gst_segment_to_running_time: assertion 'segment->format == format' failed<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">The same thing happens if I add a `scaletempo` effect in place of the `pitch` effect. The same thing happens if I try to add these effects to GESClips rather than the GESAudioTrack, e.g.:</span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">  GESEffect *pitch = ges_effect_new("pitch pitch=0.5");</span></div><div><span style="font-family:monospace,monospace">  ges_timeline_element_set_duration(GES_TIMELINE_ELEMENT(<span style="font-family:monospace,monospace">pitch)</span>, clipDuration);<br></span></div><div><span style="font-family:monospace,monospace">  ges_container_add(GES_CONTAINER(clip), GES_TIMELINE_ELEMENT(pitch));<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">I realize that I could control the playback rate/pitch by using only the `pitch` effect and re-writing all the clips in the pipeline every time I want to change the playback rate; but I'd prefer it to be a simple parameter that I can set on the pipeline as a whole (using the seek rate property).<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">Any help would be greatly appreciated! </span></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">Steve Rubin<br></span></div></div>