There is a problem when v4l2src + compositor

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

There is a problem when v4l2src + compositor

inaho330
Hi

I make a program which pipeline like this:

gst-launch-1.0 v4l2src  ! video/x-raw,format=YV12,width=1280,height=720 !
timeoverlay  ! queue  ! videomixer ! vaapih264enc rate-control=vbr
bitrate=1000 ! video/x-h264 ! h264parse config-interval=1  ! mpegtsmux !
udpsink host=172.16.6.109 port=23333

It work fine. But If I use compositor instead of videomixer like this:

gst-launch-1.0 v4l2src  ! video/x-raw,format=YV12,width=1280,height=720 !
timeoverlay  ! queue  ! compositor ! vaapih264enc rate-control=vbr
bitrate=1000 ! video/x-h264 ! h264parse config-interval=1  ! mpegtsmux !
udpsink host=172.16.6.109 port=23333

The compositor just only output the first frame it get .

But if i use videotestsrc or appsrc , it work fine.

Does anyone know where the problem is?
Is there any way to debug it?

THanks!



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: There is a problem when v4l2src + compositor

Nicolas Dufresne-5
Le mardi 13 avril 2021 à 22:14 -0500, inaho330 a écrit :

> Hi
>
> I make a program which pipeline like this:
>
> gst-launch-1.0 v4l2src  ! video/x-raw,format=YV12,width=1280,height=720 !
> timeoverlay  ! queue  ! videomixer ! vaapih264enc rate-control=vbr
> bitrate=1000 ! video/x-h264 ! h264parse config-interval=1  ! mpegtsmux !
> udpsink host=172.16.6.109 port=23333
>
> It work fine. But If I use compositor instead of videomixer like this:
>
> gst-launch-1.0 v4l2src  ! video/x-raw,format=YV12,width=1280,height=720 !
> timeoverlay  ! queue  ! compositor ! vaapih264enc rate-control=vbr
> bitrate=1000 ! video/x-h264 ! h264parse config-interval=1  ! mpegtsmux !
> udpsink host=172.16.6.109 port=23333
>
> The compositor just only output the first frame it get .

Works here on 1.18.2, but the start is bursty, which I can fix adding start-
time-selection=first to the compositor. That's because v4l2src is live and the
very first timestamp isn't going to be zero. My camera is pretty fast to start,
but I've seen UVC camera taking up to 10s to start.

>
> But if i use videotestsrc or appsrc , it work fine.
>
> Does anyone know where the problem is?
> Is there any way to debug it?
>
> THanks!
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: There is a problem when v4l2src + compositor

inaho330
Thanks for your replies.

I try to set start-time-selection to first. It can output the video now with 10fps, which is 30fps.

And i found that this problem only occurs in the input video with HD. When it change to FHD or other resolution, 
It can output as the input fps normally.

I am confused now, why does FHD work?🙃

I will try it on 1.18.2. 



Nicolas Dufresne <[hidden email]> 于2021年4月15日周四 上午4:28写道:
Le mardi 13 avril 2021 à 22:14 -0500, inaho330 a écrit :
> Hi
>
> I make a program which pipeline like this:
>
> gst-launch-1.0 v4l2src  ! video/x-raw,format=YV12,width=1280,height=720 !
> timeoverlay  ! queue  ! videomixer ! vaapih264enc rate-control=vbr
> bitrate=1000 ! video/x-h264 ! h264parse config-interval=1  ! mpegtsmux !
> udpsink host=172.16.6.109 port=23333
>
> It work fine. But If I use compositor instead of videomixer like this:
>
> gst-launch-1.0 v4l2src  ! video/x-raw,format=YV12,width=1280,height=720 !
> timeoverlay  ! queue  ! compositor ! vaapih264enc rate-control=vbr
> bitrate=1000 ! video/x-h264 ! h264parse config-interval=1  ! mpegtsmux !
> udpsink host=172.16.6.109 port=23333
>
> The compositor just only output the first frame it get .

Works here on 1.18.2, but the start is bursty, which I can fix adding start-
time-selection=first to the compositor. That's because v4l2src is live and the
very first timestamp isn't going to be zero. My camera is pretty fast to start,
but I've seen UVC camera taking up to 10s to start.

>
> But if i use videotestsrc or appsrc , it work fine.
>
> Does anyone know where the problem is?
> Is there any way to debug it?
>
> THanks!
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: There is a problem when v4l2src + compositor

Nicolas Dufresne-5
Le jeudi 15 avril 2021 à 10:20 +0900, uil uil a écrit :

> Thanks for your replies.
>
> I try to set start-time-selection to first. It can output the video now with
> 10fps, which is 30fps.
>
> And i found that this problem only occurs in the input video with HD. When it
> change to FHD or other resolution, 
> It can output as the input fps normally.
>
> I am confused now, why does FHD work?🙃

That's rather strange, the opposite would make more sense isn't it! A quick
guess, you have libv4l2 enabled build, and when you pick FHD, you actually endup
getting JPEG from the camera, which reduce bandwdith and increase the rate.

Also, not that YV12 is suspicious, the camera that produces that are very rare.
Most camera will only produce YUY2 or JPEG. Perhaps you can share a little more
about your cam capability with

 $> v4l2-ctl -d <device-number> -D --list-formats-ext

>
> I will try it on 1.18.2. 
>
>
>
> Nicolas Dufresne <[hidden email]> 于2021年4月15日周四 上午4:28写道:
> > Le mardi 13 avril 2021 à 22:14 -0500, inaho330 a écrit :
> > > Hi
> > >
> > > I make a program which pipeline like this:
> > >
> > > gst-launch-1.0 v4l2src  ! video/x-raw,format=YV12,width=1280,height=720 !
> > > timeoverlay  ! queue  ! videomixer ! vaapih264enc rate-control=vbr
> > > bitrate=1000 ! video/x-h264 ! h264parse config-interval=1  ! mpegtsmux !
> > > udpsink host=172.16.6.109 port=23333
> > >
> > > It work fine. But If I use compositor instead of videomixer like this:
> > >
> > > gst-launch-1.0 v4l2src  ! video/x-raw,format=YV12,width=1280,height=720 !
> > > timeoverlay  ! queue  ! compositor ! vaapih264enc rate-control=vbr
> > > bitrate=1000 ! video/x-h264 ! h264parse config-interval=1  ! mpegtsmux !
> > > udpsink host=172.16.6.109 port=23333
> > >
> > > The compositor just only output the first frame it get .
> >
> > Works here on 1.18.2, but the start is bursty, which I can fix adding start-
> > time-selection=first to the compositor. That's because v4l2src is live and
> > the
> > very first timestamp isn't going to be zero. My camera is pretty fast to
> > start,
> > but I've seen UVC camera taking up to 10s to start.
> >
> > >
> > > But if i use videotestsrc or appsrc , it work fine.
> > >
> > > Does anyone know where the problem is?
> > > Is there any way to debug it?
> > >
> > > THanks!
> > >
> > >
> > >
> > > --
> > > Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > [hidden email]
> > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel