My program consists of 4 parts.
- usb camera: put RGBA images into queueA.
- convert to YUV420: get queueA data convert and send to NvVideoEncoder. 7ms/1picture
- NvVideoEncoder: convert to h264 and send to queueB.
- save: get queueB and save to file.
The problem is in part2.
I am using 4 cameras, each has 20 fps. So there are 4 threads and 4 queueA. I find queueA larger and larger, it means part2 can not deal with 80 pictures each second.
Is it too slow? The size of my picture is 2448 * 2048.