Another question:<br>How can I use TCP to stream this video (or webcam) to another Linux PC?<br>I wrote the following line in the cpp file:<br><span style="color: rgb(0, 153, 0);">pipe = gst_parse_launch("v4l2src ! videorate ! capsfilter name=vfps caps=\"video/x-raw-yuv,framerate=2/1\" ! multipartmux ! tcpserversink host=192.168.2.1 port=5100",&err);</span><br>
But this doesn't work.<br>anyone can give me an example of streaming through TCP?<br>Thanks!<br><br>Tom<br><br><div class="gmail_quote">On Mon, Jul 11, 2011 at 1:14 AM, Mailing List SVR <span dir="ltr"><<a href="mailto:lists@svrinformatica.it">lists@svrinformatica.it</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;">
<div text="#000000" bgcolor="#FFFFFF">
Il 10/07/2011 23:12, Tom ha scritto:
<div class="im"><blockquote type="cite">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>
</blockquote>
<br></div>
you need to set to NULL and then to PLAY only the videorate element
not the whole pipeline,<br>
<br>
Nicola<div><div></div><div class="h5"><br>
<br>
<blockquote type="cite">
<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" target="_blank">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><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><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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br>