Radxa Rock and ffmpeg encoder from mjpeg to H264

Hello,

I’m building a project that record video from a USB capture. The USB capture devices only reaches 20FPS in MJPEG format. So I need to start as input format mjpeg. The actual code is this:
sudo nice -n -10 ffmpeg -f v4l2 -input_format mjpeg -framerate 20 -video_size 1280x720 -i /dev/video0 -codec:v h264 -b:v 2048k -t 00:00:30 /home/record1.mp4

I couldn’t reach satisfatory results with a RaspberyPi3B+. I only get software encoding to do MJPEG -> H264 and .mp4 extension, this results in a 9.5fps performance and 101% usage of CPU.

I would like to try the Rock 3 3A. I saw it has better GPU and H264 encoder at 60fps for 1080p.
It’s possible to encode 1080p mjpeg video to a H264 mp4 ?

I need to record video from “/dev/video0” that giver 20fps mpeg stream, and encode to h264 mp4 with 2M bitrate.

It’s possible?
Wich Rock Series should I buy ?
Rock 3A with 4GB it’s ok ?

The video capture board I have is this: https://pt.aliexpress.com/item/1005004918533559.html?gatewayAdapt=glo2bra