Hi Andrey,<br><br>I followed your example and it works for me.<br>I added <span style="color: rgb(255, 0, 0);">gst_element_set_state(pipe,GST_STATE_NULL);</span> before changing framerate, and also added <span style="color: rgb(255, 0, 0);">gst_element_set_state(pipe,GST_STATE_PLAYING);</span> after changing framerate. This changed the framerate.<br>
<br>But another problem came by: The video window closed and re-opened at the moment of framerate changing.<br>I want to make the window stay there and ONLY the videoframe change.<br><br>Is there some way to make the video window never close while changing framerate?<br>
Thanks!<br><br>Tom<br><br><br><br><div class="gmail_quote">On Sun, Jul 10, 2011 at 4:21 AM, Andrey Nechypurenko <span dir="ltr"><<a href="mailto:andreynech@googlemail.com">andreynech@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Tom,<br>
<div class="im"><br>
> existed...<a href="http://gitorious.org/veter/veter/blobs/master/src/vehicle/VideoSenderThread.cpp#line264" target="_blank">http://gitorious.org/veter/veter/blobs/master/src/vehicle/VideoSenderThread.cpp#line264</a><br>
> Could you please give me another example about adjusting the caps filter?<br>
<br>
</div>Last couple of months I was working on the project rather active and<br>
re-organize the source tree quite a bit.<br>
Please try the following link:<br>
<a href="https://www.gitorious.org/veter/vehicle/blobs/master/src/VideoSenderThread.cpp#line253" target="_blank">https://www.gitorious.org/veter/vehicle/blobs/master/src/VideoSenderThread.cpp#line253</a><br>
<br>
Regards,<br>
Andrey.<br>
----------------------------------------<br>
Blog: <a href="http://veter-project.blogspot.com" target="_blank">http://veter-project.blogspot.com</a><br>
<div><div></div><div class="h5"><br>
<br>
> Thank you very much!<br>
><br>
> Tom<br>
><br>
> On Thu, Mar 10, 2011 at 2:58 AM, Andrey Nechypurenko<br>
> <<a href="mailto:andreynech@googlemail.com">andreynech@googlemail.com</a>> wrote:<br>
>><br>
>> Hi Tom,<br>
>><br>
>> > I use<br>
>> > gst-launch filesrc "location=video/1.MPG" ! decodebin ! videorate !<br>
>> > video/x-raw-yuv, width=640,height=480,framerate=25/1 ! ffmpegcolorspace<br>
>> > !<br>
>> > jpegenc ! multipartmux ! tcpserversink host=192.168.2.1 port=$portNumber<br>
>> > to stream a video and can change the video frame rate in this way.<br>
>> > But in this way the frame rate is fixed (i.e., framerate=25/1 here).<br>
>> ><br>
>> > I want to change the framerate in REALTIME when video is PLAYING ---<br>
>> > during the streaming of this video, I can change the framerate anytime I<br>
>> > want.<br>
>><br>
>> Then you need to modify the pipeline from your application. In<br>
>> particular, you need to adjust the caps filter. Here you can find an<br>
>> example how to do it:<br>
>><br>
>> <a href="http://gitorious.org/veter/veter/blobs/master/src/vehicle/VideoSenderThread.cpp#line264" target="_blank">http://gitorious.org/veter/veter/blobs/master/src/vehicle/VideoSenderThread.cpp#line264</a><br>
>> It changes width and height property of the named (qos-caps) caps<br>
>> filter by pausing the videoscale element in front of it, updating<br>
>> width and height properties and then un-pausing the videoscale. So in<br>
>> your case you can update the framerate property. However, as Kapil<br>
>> pointed out to work properly, the downstream elements should be able<br>
>> to re-negotiate the new format.<br>
>><br>
>> HTH,<br>
>> Andrey.<br>
>> _______________________________________________<br>
>> gstreamer-devel mailing list<br>
>> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
>> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
><br>
><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
><br>
><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br>