gstreamer-1.0 camera preview flickering

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

gstreamer-1.0 camera preview flickering

riteshSTPL
i am using nvidia Jetson-TX1 board with gstreamer-1.0 v1.2.4.

Below is pipeline

//Camera preview

gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw, width=1920, height=1080, format=UYVY, framerate=60/1' \
! nvvidconv ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=60/1' \
! nvoverlaysink sync=false


// camera preview+textoverlay

gst-launch-1.0 v4l2src device=/dev/video0 \
! textoverlay text="Recording..." halignment=0 valignment=1 \
! 'video/x-raw, width=1920, height=1080, format=UYVY, framerate=60/1' \
! nvvidconv ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=60/1' \
! nvoverlaysink sync=false


I am getting Flickering on camera preview with or without textoverlay. But in preview without textoverlay its not too noticeable. But when i on add textoverlay, flicking highlighted due to textoverlay.

This flickering happens with also with videotestsrc

gst-launch-1.0 videotestsrc \
! textoverlay text="Recording..." halignment=0 valignment=1 \
! 'video/x-raw, width=1920, height=1080, format=UYVY, framerate=60/1' \
! nvvidconv ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=60/1' \
! nvoverlaysink sync=false


I have also tried to replace nvvidconv with videoconvert and nvoverlaysink with autovideosink but still flickers.

but when i remove UYVY format from above pipeline no flickers

gst-launch-1.0 videotestsrc \
! textoverlay text="Recording..." halignment=0 valignment=1 \
! videoconvert ! 'video/x-raw, width=1920, height=1080, format=I420, framerate=60/1' \
! nvoverlaysink sync=false

 
for my camera v4l2 i have to use UYVY to I420 conversion in order to view video so any other workaround?
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 camera preview flickering

Nicolas Dufresne-4
Le mardi 17 mai 2016 à 01:34 -0700, riteshSTPL a écrit :

> I have also tried to replace nvvidconv with videoconvert and
> nvoverlaysink
> with autovideosink but still flickers.
>
> but when i remove UYVY format from above pipeline *no flickers*
> gst-launch-1.0 videotestsrc \
> ! textoverlay text="Recording..." halignment=0 valignment=1 \
> ! videoconvert ! 'video/x-raw, width=1920, height=1080, format=I420,
> framerate=60/1' \
> ! nvoverlaysink sync=false
>
>  
> for my camera v4l2 i have to use UYVY to I420 conversion in order to
> view
> video so any other workaround?

This problem is most likely in nvoverlaysink. Please report to NVidia,
as they are the one maintaining this element. You may also try and set
sync=true, as they may have code that bind this to waiting for the
vblank before returning back the buffer into the buffer pools.

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

Re: gstreamer-1.0 camera preview flickering

riteshSTPL
But don't you think its problem in UYVY to I420 conversion?

Because if i remove UYVY to I420 conversion from pipeline i got no flickers.
gst-launch-1.0 videotestsrc \
! textoverlay text="Recording..." halignment=0 valignment=1 \
! videoconvert ! 'video/x-raw, width=1920, height=1080, format=I420, framerate=60/1' \
! nvoverlaysink sync=false


And for my v4l2 video source pipeline if i put completely white object infront of camera then also no flickering. So i think for changing video UYVY to I420 conversion add some delay or something else.
 
I can get same flickering with autovideosink instead of nvoverlaysink. and with sync=true also.

So any other efficient way to convert UYVY to I420?
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer-1.0 camera preview flickering

Nicolas Dufresne-4
Le mardi 17 mai 2016 à 23:54 -0700, riteshSTPL a écrit :

> But don't you think its problem in UYVY to I420 conversion?
>
> Because if i remove UYVY to I420 conversion from pipeline i got no
> flickers.
> *gst-launch-1.0 videotestsrc \
> ! textoverlay text="Recording..." halignment=0 valignment=1 \
> ! videoconvert ! 'video/x-raw, width=1920, height=1080, format=I420,
> framerate=60/1' \
> ! nvoverlaysink sync=false*
>
> And for my v4l2 video source pipeline if i put completely white
> object
> infront of camera then also no flickering. So i think for changing
> video
> UYVY to I420 conversion add some delay or something else. 
>  
> I can get same flickering with autovideosink instead of
> nvoverlaysink. and
> with sync=true also.

autovideosink on NVidia platforms picks nvoverlaysink because it's the
highest rank display sink. So the test is no different. 

>
> So any other efficient way to convert UYVY to I420?

It's not relevant to us if nvvidconv is converting, or if it's
happening in nvoverlaysink. Both elements are third party created and
distributed by NVidia (not us). You need to ask NVidia for support.

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