This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Reg: Video Flickering while transmitting over udp

Other Parts Discussed in Thread: AM5728

Hi,

           I am using two sitara am5728 based systems and transmitting captured video from one setup to another setup and displaying the received video on the other setup.  The pipeline i am using are as follows.

/* Capture & Transmitting side */

gst-launch-1.0 -v v4l2src device="/dev/video2" ! 'video/x-raw,format=(string)YUY2,width=640,height=480,framerate=(fraction)25/1' ! videoconvert  ! ducatih264enc  !  h264parse  ! queue ! rtph264pay !  udpsink host=192.168.0.104 port=35000

/*Reciever & Display Side */

gst-launch-1.0 udpsrc port=35000 ! 'application/x-rtp,media=(string)video, clock-rate=(int)90000, payload=(int)96' ! rtph264depay !  h264parse ! ducatih264dec  ! videoconvert ! kmssink connector=26 sync=false

 1.I am facing problem of flickering while displaying video on HDMI using kmssink, Video is not stable and flickering continuously but if capturing a stable frame (not moving object) than its fine. Please tell me what  can i do to  fix this problem.

If i am transmitting video to PC and displaying there using VLC player than its playing fine. I am using following pipeline for sending video to play using VLC player  

gst-launch-1.0 -v v4l2src device="/dev/video2" ! 'video/x-raw,format=(string)YUY2,width=640,height=480,framerate=(fraction)25/1' ! videoconvert  ! ducatih264enc  !  h264parse  ! queue ! mpegtsmux !  udpsink host=192.168.0.104 port=35000

 

Thanks & regards

Abhisek

 

  • Hello,

    Do you observe the same problem when you are using the latest PSDK version 3.1?
    In it the gstreamer version is 1.6 instead of 1.2 .You could also try to replace videoconvert with vpe?

    BR
    Margarita

  • Hello,

    Abhishek Kumar47 said:

    If i am transmitting video to PC and displaying there using VLC player than its playing fine. I am using following pipeline for sending video to play using VLC player  

    gst-launch-1.0 -v v4l2src device="/dev/video2" ! 'video/x-raw,format=(string)YUY2,width=640,height=480,framerate=(fraction)25/1' ! videoconvert  ! ducatih264enc  !  h264parse  ! queue ! mpegtsmux !  udpsink host=192.168.0.104 port=35000

    I see that in this case you have mpegtsmux compared with the first use case.

    Did you try this

    gst-launch-1.0 -v v4l2src device="/dev/video2" ! 'video/x-raw,format=(string)YUY2,width=640,height=480,framerate=(fraction)25/1' ! videoconvert  ! ducatih264enc  !  h264parse  ! queue ! mpegtsmux !  udpsink host=192.168.0.104 port=35000

    pipeline for first use case  (board->board). In this case in "receiver" pipeline you should add mpegtsdemux element?

    BR
    Margarita

  • Hi Margarita,

                            1.  I did not try with latest SDK i am using 02_00_01_07.

    2. I was using videoconvert to get RGB format (earlier i was using fbdevsink for video sink which required RGB format since vpe gives only NV12, YUYV and YUY2).

    3. Yes i tried to use tsdemux element at receiving side but i was unable  to link it with h264parse element.

    After using intra-interval property of ducatih264enc i am able to get smooth video at receiving side (but with 2 seconds of delay ), I am using it like below mentioned

    ! ducatih264enc intra-interval=10000 !

    I am still unable to find why its working with 10000 value of intra-interval and why  i am getting that 2 seconds of delay.

    Thanks & Regards

    Abhishek

  • Hello,

    The intra-interval is the interval between the keyframes.

    Could you check if it is set to 1?

    Abhishek Kumar47 said:
    3. Yes i tried to use tsdemux element at receiving side but i was unable  to link it with h264parse element

    I tried to create ts video stream:

    gst-launch-1.0 -v videotestsrc num-buffers=500 ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! ducatih264enc  !  h264parse  ! queue ! mpegtsmux ! filesink location=tsmux.ts

    and play it with

    gst-launch-1.0 -v filesrc location=tsmux.ts ! tsdemux ! h264parse ! ducatih264dec ! kmssink

    I do not observe error with linking between tsdemux and h264parse.

    Could you recheck your  "receiving side".

    BR
    Margarita

  • Hello,

    One more point you could try to increase queue's properties buffer size.

    BR
    Margarita