Display issues when using omxh264dec

Hello to all,

So, I want to receive a video stream encoded in RTP/H.264, decode it and write the raw data on a shared memory so that another application can use and display it.

To do the decoding, I use gstreamer, with the following pipeline:

gst-launch-1.0 udpsrc port=5004                    caps="application/x-rtp,media=video,encoding-name=H264,clock-rate=90000,payload=96"                    ! rtpjitterbuffer latency=0 ! rtph264depay ! h264parse ! omxh264dec use-dmabuf=false ! video/x-raw,format=I420 ! shmsink socket-path=/tmp/gst0 sync=false wait-for-connection=true  

I use the following pipeline to get the data from shared memory and display on screen :

 gst-launch-1.0 shmsrc socket-path=/tmp/gst0 ! "video/x-raw, format=I420, color-matrix=sdtv, chroma-site=mpeg2, width=(int)1920, height=(int)720, framerate=(fraction)30/1" ! queue ! videoconvert ! fbdevsink

I’m at an impasse and I don’t really understand what the problem is. When I use the omxh264dec decoder as it is, I have a color shifted image but the data stream arrives without any problem, but when I use it with the DMA deactivated the images are well decoded and well rested but the image stream does not pass and I receive only first frames.

Has anyone experienced this kind of problem ?

Parents
  • Hi:

    May I know the software platform you are using? (Linux or Android, and which version)

    Thanks

  • Hello toufik98,

    I have reproduced in the following environments. Hope this helps you.

     Environments:

     [HW]

      H3 v3 Starter Kit(S/N 25669) board – connect to HDMI Display

      Kingfisher M06 board

     [SW]

      Yocto v5.9.0(https://elinux.org/R-Car/Boards/Kingfisher/Yocto-Gen3/v5.9.0)

     [ Host PC: Ubuntu 20.04]

      FFMPEG : v4.2.7

      Test video : https://example-files.online-convert.com/video/h264/example.h264

      IP address: 10.0.0.1

     

    Test Case:

    1) Login to the H3SK console

    2) Set IP address

    root@h3ulcb:~# ifconfig eth0 10.0.0.40

    3) Start gstreamer to receive the RTP stream and write it to the local socket:

    root@h3ulcb:~# gst-launch-1.0 udpsrc port=5004 caps="application/x-rtp,media=video,encoding-name=H264,clock-rate=90000,payload=96" ! \

    rtpjitterbuffer latency=0 ! rtph264depay ! h264parse ! omxh264dec use-dmabuf=false ! video/x-raw,format=I420 ! \

    shmsink socket-path=/tmp/gst0 sync=false wait-for-connection=true &

    4) Start gstreamer to read and display video data:

    root@h3ulcb:~# gst-launch-1.0 shmsrc socket-path=/tmp/gst0 ! \

    "video/x-raw, format=I420,color-matrix=sdtv, chroma-site=mpeg2, width=(int)1920, height=(int)720, framerate=(fraction)30/1" ! \

    queue ! videoconvert ! waylandsink

    5) Start streaming from the Linux host:

    $ ffmpeg -re -i /xxx/example.h264 -an -c:v libx264 -s 1920x720 -f rtp -sdp_file video.sdp "rtp://10.0.0.40:5004“

     

    The video is displayed on H3ULCB shortly after the stream is started.

Reply
  • Hello toufik98,

    I have reproduced in the following environments. Hope this helps you.

     Environments:

     [HW]

      H3 v3 Starter Kit(S/N 25669) board – connect to HDMI Display

      Kingfisher M06 board

     [SW]

      Yocto v5.9.0(https://elinux.org/R-Car/Boards/Kingfisher/Yocto-Gen3/v5.9.0)

     [ Host PC: Ubuntu 20.04]

      FFMPEG : v4.2.7

      Test video : https://example-files.online-convert.com/video/h264/example.h264

      IP address: 10.0.0.1

     

    Test Case:

    1) Login to the H3SK console

    2) Set IP address

    root@h3ulcb:~# ifconfig eth0 10.0.0.40

    3) Start gstreamer to receive the RTP stream and write it to the local socket:

    root@h3ulcb:~# gst-launch-1.0 udpsrc port=5004 caps="application/x-rtp,media=video,encoding-name=H264,clock-rate=90000,payload=96" ! \

    rtpjitterbuffer latency=0 ! rtph264depay ! h264parse ! omxh264dec use-dmabuf=false ! video/x-raw,format=I420 ! \

    shmsink socket-path=/tmp/gst0 sync=false wait-for-connection=true &

    4) Start gstreamer to read and display video data:

    root@h3ulcb:~# gst-launch-1.0 shmsrc socket-path=/tmp/gst0 ! \

    "video/x-raw, format=I420,color-matrix=sdtv, chroma-site=mpeg2, width=(int)1920, height=(int)720, framerate=(fraction)30/1" ! \

    queue ! videoconvert ! waylandsink

    5) Start streaming from the Linux host:

    $ ffmpeg -re -i /xxx/example.h264 -an -c:v libx264 -s 1920x720 -f rtp -sdp_file video.sdp "rtp://10.0.0.40:5004“

     

    The video is displayed on H3ULCB shortly after the stream is started.

Children