Hi @nxf65025,
I am successfully able to get low CPU load with the below gstreamer pipeline,
gst-launch-1.0 -v v4l2src device=/dev/video3 io-mode=dmabuf-import ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)30/1' ! queue ! v4l2h264enc output-io-mode=dmabuf ! filesink location=test.h264
Obersevation(gst):-
- 30FPS and have CPU load it is 5-7% (from top utlitiy)
- In dmesg logs I can see logs of windsor driver (encoder)
As now I have moved to application part where I have got mxc_v4l2_vpu_enc.out application and using it as per below,
./mxc_v4l2_vpu_enc.out camera --key 0 --device /dev/video3 --size 1280 720 --u 4 --fmt nv12 --framerate 30 --framenum 90000 encoder --key 1 --source 0 --size 1280 720 --framerate 30 --bitrate 4194304 --lowlatency 0 ofile --key 2 --source 1 --name camera.h264
Obervations(with app):-
- 30FPS and have CPU load it is 100% (from top utlitiy)
- In logs I can see logs of windsor driver (encoder)
So now the queries are,
1. Why there is a difference in CPU% utlization in the case of GST Vs. Application ?
2. How can I improvise mxc_v4l2_vpu test app to lower down CPU usage
I have seen in the source that it uses V4L2_MEMORY_USERPTR so changing this to V4L2_MEMORY_DMABUF (as in the case of GST) will help ?
Can you advice ?
Any help would be greatly appreciable.
--
Thanks,
Rutvij