RTP H.264 from i.MX8M Mini and decode/display on Linux host

Showing results for 
Search instead for 
Did you mean: 

RTP H.264 from i.MX8M Mini and decode/display on Linux host

Contributor III

I'm streaming a live H.264 video stream from my i.MX8M Mini. I receive the stream OK on my host machine, but it is not being decoded properly. Only I frames are decoded and displayed properly (I think). Other frames are rendered in a greyish color and are blocky, although I can vaguely match the content.

Using the following command on the i.MX8M Mini:

v4l2src ! vpuenc_h264 gop-size=60 ! video/x-h264 ! h264parse ! rtph264pay config-interval=-1 ! udpsink host=xxx.20.1.121 port=5000

and this command on the host:

udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink

If I set the gop-size to 1 on the i.MX8M Mini, then the host correctly shows the video. Which is why I think only I frames are decoded properly.

Does vpuenc_h264 transmit the SPS/PPS information in-band? If so, I was expecting config-interval=-1 to cause the info to be sent with every IDR.

Am I missing something here? The same pipeline with x264enc generates a stream that I can decode fine...

Tags (3)
0 Kudos
1 Reply

NXP Employee
NXP Employee


I suggest you see the section 7.3.12 of the Linux User´s Guide. There you could find useful information about how to perform an RTPSP stream.

Best regards,


0 Kudos