SDL display is limiting FPS on slower SOC systems
A simple v4l2 full-featured video grabber
Brought to you by:
assisp
Thank you for developing guvcview!
I've found that ARM dev boards may demonstrate significantly lower frame rates for the same USB cams, compared to desktop machines. Apparently, the reason is that the SDL display update is connected to the same thread, where the video capture is performed. You might want to consider moving SDL_DisplayYUVOverlay(poverlay, &drect); to a separate thread. This change effectively allows to capture and process video almost at the top FPS, unconstrained by the X windows subsystem performance.
Kind regards,
Video frames are displayed immediately after being retrieved from the camera, the encoder/muxer runs on a different thread but only encodes the frames retrieved from the camera. So frames are retrieved at the same rate they are displayed.
If you can't display them fast enough, the best solution is just to disable the video preview: (--render=none). This way they will be retrieved at the speed they are encoded.
If you choose the raw video codec frames will be stored directly to the video file with the webcam selected output format (rgb, yuv, MJG, H264, ...).
I've tested this in a ARM board with a logitech webcam outputting H264 frames and I was able to get a HD video with 30 fps, without any issues.
Regards,