How to change framerate in REALTIME when video is PLAYING?

Tom fb8fb8 at gmail.com
Tue Jul 12 19:47:15 PDT 2011


Another question:
How can I use TCP to stream this video (or webcam) to another Linux PC?
I wrote the following line in the cpp file:
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);
But this doesn't work.
anyone can give me an example of streaming through TCP?
Thanks!

Tom

On Mon, Jul 11, 2011 at 1:14 AM, Mailing List SVR
<lists at svrinformatica.it>wrote:

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


More information about the gstreamer-devel mailing list