2247215_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2247215_en-US

2247215_en-US

IP Camera live video displaying is hanging after some time using VPU of I.MX8QM board

Hi,

I am interfacing IP Camera to I.MX8QM board and I am using RTSP protocol. IP camera is h.264 encoded, for decoding in I.MX8QM board, I am doing in both CPU & VPU. In CPU case lot of latency is adding but video is not getting hanged but in VPU case latency is not there but after some time Video getting hanged.

CPU(Software decoding): gst-launch-1.0 rtspsrc protocols=udp latency=0 drop-on-latency=true location=rtsp://bm904285:[email protected]:554/stream1 ! rtph264depay ! h264parse ! avdec_h264 ! queue max-size-buffers=1 leaky=downstream ! videoscale ! video/x-raw,width=640,height=360 ! videoconvert ! autovideosink sync=false

VPU Decoding: gst-launch-1.0 rtspsrc protocols=udp latency=200 drop-on-latency=true udp-reconnect=true timeout=5000000000 location=rtsp://bm904285:[email protected]:554/stream1 ! rtph264depay ! h264parse config-interval=1 disable-passthrough=true ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=0 ! v4l2h264dec capture-io-mode=4 output-io-mode=4 extra-controls="capture,buffer_count=12" ! queue max-size-buffers=8 leaky=downstream ! imxvideoconvert_g2d ! video/x-raw,width=1024,height=768 ! waylandsink sync=false qos=false

Please helpus to resolve this Issue.
 

Re: IP Camera live video displaying is hanging after some time using VPU of I.MX8QM board

Hello,

For Input resolution 640x360, both software & Hardware decode is working but for 2560x1440 resolution decoding not working properly.

What is the maximum capable H.264 decoder resolution.

In Summary it is mentioned as 4K@30 but in simplified block diagram mentioned as "Mult-format Decode - 1080P@60".


Please confirm.

Re: IP Camera live video displaying is hanging after some time using VPU of I.MX8QM board

Hello,

The video hanging issue with VPU decoding is likely related to buffer handling in your GStreamer pipeline. When using hardware acceleration, proper buffer management is critical for maintaining stable video playback.

Here are recommendations to resolve the hanging issue:

1. Modify your VPU decoding pipeline with these adjustments:

```
gst-launch-1.0 rtspsrc protocols=udp latency=0 drop-on-latency=true udp-reconnect=true timeout=5000000000 location=rtsp://USERNAME:PASSWORD@IP_ADDRESS:554/stream1 ! rtph264depay ! h264parse config-interval=1 ! queue ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! imxvideoconvert_g2d ! waylandsink sync=false
```

2. Key changes to implement:
- Use capture-io-mode=4 and output-io-mode=4 for dmabuf zero-copy operation
- Replace queue max-size parameters with a simpler queue element
- Use imxvideoconvert_g2d instead of plain videoconvert for hardware accelerated scaling
- Set sync=false on waylandsink to prevent frame dropping

3. If the issue persists, try reducing the resolution or framerate from the camera source to reduce processing demands.

4. Ensure your system has the latest BSP updates as some VPU-related issues have been addressed in newer releases.

The main difference between CPU and VPU decoding performance is that software decoding buffers more frames (causing higher latency but more stability), while hardware decoding processes frames more quickly but requires proper buffer management to prevent freezing.


Regards

Re: IP Camera live video displaying is hanging after some time using VPU of I.MX8QM board

For Input resolution 640x360, both software & Hardware decode is working but for 2560x1440 resolution decoding not working properly.

What is the maximum capable H.264 decoder resolution.

In Summary it is mentioned as 4K@30 but in simplified block diagram mentioned as "Mult-format Decode - 1080P@60".


Please confirm.

Re: IP Camera live video displaying is hanging after some time using VPU of I.MX8QM board

Hello,

Please provide maximum capable H.264 decoder resolution.

Thanks & Regards,
Mallikarjuna.

Tags (1)
No ratings
Version history
Last update:
‎12-01-2025 12:30 AM
Updated by: