Hi,
I've got a similar pipeline as mentioned in https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-sk-tda4vm/latest/exports/docs/data_flows.html#rtsp-source for H.264 encoded video processing.
Surprisingly (for me) avdec_h264 leads to lower CPU load than v4l2h264dec.
Pipelines:
avdec_h264 (CPU load 20%):
gst-launch-1.0 rtspsrc location=rtsp://<address>:<port>/test latency=0 buffer-mode=auto protocol=udp ! rtph264depay ! video/x-h264,stream-format=avc ! h264parse ! avdec_h264 ! tiovxcolorconvert ! video/x-raw,format=NV12 ! tiovxmultiscaler ! queue ! video/x-raw,width=640,height=640 ! tiovxcolorconvert ! video/x-raw,format=RGB ! fpsdisplaysink video-sink='kmssink driver-name=tidss' sync=true text-overlay=0 --verbose
v4l2h264dec (CPU load 30%):
gst-launch-1.0 rtspsrc location=rtsp://<address>:<port>/test latency=0 buffer-mode=auto protocol=udp ! rtph264depay ! video/x-h264,stream-format=avc ! h264parse ! v4l2h264dec ! video/x-raw,format=NV12 ! tiovxmultiscaler ! queue ! video/x-raw,width=640,height=640 ! tiovxcolorconvert ! video/x-raw,format=RGB ! fpsdisplaysink video-sink='kmssink driver-name=tidss' sync=true text-overlay=0 --verbose
Is this expected behaviour or am I using v4l2h264dec in the wrong way?
I guess it has to do with the elements coming after v4l2h264dec in the pipeline and how v4l2h264dec transfers data to them because when i remove everything else from the pipeline i get a CPU load of 5%:
gst-launch-1.0 rtspsrc location=rtsp://<address>:<port>/test latency=0 buffer-mode=auto protocol=udp ! rtph264depay ! video/x-h264,stream-format=avc ! h264parse ! v4l2h264dec ! fpsdisplaysink video-sink='kmssink driver-name=tidss' sync=true text-overlay=0 --verbose
Launch command of RTSP server:
./test-launch --gst-debug=3 '( v4l2src device=/dev/video0 ! image/jpeg,width=1280,height=720 ! jpegdec ! videoconvert ! videorate ! video/x-raw,framerate=30/1 ! x264enc speed-preset=ultrafast threads=8 ! rtph264pay name=pay0 pt=96 )'
Many thanks in advance!
Best regards,
Philipp