<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi,</p>
<p>just want to add that the "gst-play-1.0" tool which is
distributed with the library allows to change the playback rate
while playing using the +/- keys. Internally it uses a seek event
sent to the playbin element, as mentioned by Michael. For an
implementation example you can take a look at function
"play_do_seek" in <a moz-do-not-send="true" href="https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-base/tools/gst-play.c">gst-play.c</a>.</p>
<p>Regards, Tobias</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 05/10/2023 16:55, Michael Gruner via
gstreamer-devel wrote:<br>
</div>
<blockquote type="cite" cite="mid:BEBFC17E-BF87-4C5A-BC19-1E7EFF3C2216@ridgerun.com">
Hi Will
<div><br>
</div>
<div>Yes the videorate can do what you want. Set the “rate”
property to 2.0</div>
<div><br>
</div>
<div>Videorate serves two purposes:</div>
<div>1. control the framerate but maintain the playback speed
(most documented usage)</div>
<div>2. vary the playback speed (using the rate property)</div>
<div><br>
</div>
<div>If you want more flexibility than videorate can offer you
will need to send a seek event. This allows you to, not only to
increase/decrease the speed, but also to start from a certain
point, go backwards and many other trick modes.</div>
<div><br>
</div>
<div>
<div style="display: block;" class="">
<div style="display: block;" class="">
<div style="-webkit-user-select: all; -webkit-user-drag:
element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://gstreamer.freedesktop.org/documentation/additional/design/trickmodes.html?gi-language=c#client-side-backwards-trickmode"><a style="border-radius:10px;font-family:-apple-system,
Helvetica, Arial,
sans-serif;display:block;-webkit-user-select:none;width:300px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://gstreamer.freedesktop.org/documentation/additional/design/trickmodes.html?gi-language=c#client-side-backwards-trickmode" dir="ltr" role="button" draggable="false" width="300" moz-do-not-send="true">
<table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:#E9E9EB;font-family:-apple-system,
Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" width="300" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td vertical-align="center">
<table style="font-family:-apple-system,
Helvetica, Arial,
sans-serif;table-layout:fixed;background-color:rgba(233,
233, 235, 1);" class="lp-rich-link-captionBar" width="300" cellspacing="0" cellpadding="0" bgcolor="#E9E9EB">
<tbody>
<tr>
<td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem">
<div style="max-width:100%;margin:0px
16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack">
<div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading"><a rel="nofollow" href="https://gstreamer.freedesktop.org/documentation/additional/design/trickmodes.html?gi-language=c#client-side-backwards-trickmode" style="text-decoration: none" draggable="false" moz-do-not-send="true"><font style="color: rgba(0, 0, 0, 1);" color="#000000">Trickmodes</font></a></div>
<div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading"><a rel="nofollow" href="https://gstreamer.freedesktop.org/documentation/additional/design/trickmodes.html?gi-language=c#client-side-backwards-trickmode" style="text-decoration: none" draggable="false" moz-do-not-send="true"><font style="color: rgba(60, 60, 67,
0.6);" color="#A2A2A9">gstreamer.freedesktop.org</font></a></div>
</div>
</td>
<td style="padding:6px 12px 6px 0px;" class="lp-rich-link-captionBar-rightIconItem" width="36"><a rel="nofollow" href="https://gstreamer.freedesktop.org/documentation/additional/design/trickmodes.html?gi-language=c#client-side-backwards-trickmode" draggable="false" moz-do-not-send="true"><img style="pointer-events:none
!important;display:inline-block;width:36px;height:36px;border-radius:3px;" draggable="false" class="lp-rich-link-captionBar-rightIcon" alt="favicon-180.png" src="cid:part1.S2nityfO.NhZ10027@noa-archive.com" width="36" height="36"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</a></div>
</div>
<br>
</div>
</div>
<div><br>
</div>
<div>
<div dir="ltr">Michael</div>
<div dir="ltr"><br>
<blockquote type="cite">On 5 Oct 2023, at 07:57, Will
McElderry via gstreamer-devel
<a class="moz-txt-link-rfc2396E" href="mailto:gstreamer-devel@lists.freedesktop.org"><gstreamer-devel@lists.freedesktop.org></a> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr"><span>Hi All,</span><br>
<span></span><br>
<span></span><br>
<span>I'm wondering if there is a way to change the playback
display period rate of an input stream.</span><br>
<span></span><br>
<span></span><br>
<span>For example, I'd like to convert:</span><br>
<span></span><br>
<span> file1.mp4 with 1000 frames, plays back @10 fps =
100 seconds long</span><br>
<span></span><br>
<span>Into</span><br>
<span></span><br>
<span> file1_fast.mp4 with 1000 frames, plays back @20 fps
= 50 seconds long</span><br>
<span></span><br>
<span></span><br>
<span>I can do it with ffmpeg in various ways as detailed
here:</span><br>
<span></span><br>
<span><a class="moz-txt-link-freetext" href="https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video">https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video</a></span><br>
<span></span><br>
<span>Are there any simple pipelines elements that can do
that?</span><br>
<span></span><br>
<span></span><br>
<span>(NB: I believe the videorate plugin does not do what I
want. Please flag if you know otherwise!)</span><br>
<span></span><br>
<span></span><br>
<span>Thanks!</span><br>
<span></span><br>
<span></span><br>
<span>Will.</span><br>
<span></span><br>
<span></span></div>
</blockquote>
</div>
</blockquote>
</body>
</html>