Hi,
The USB Camera format is below:
Use V4L2 to record 4K@30fps .mp4 file :
v4l2-ctl --device /dev/video4 --set-fmt-video=width=3840,height=2160,pixelformat=MJPG --stream-mmap --stream-to=./output4K.mp4 --stream-count=300
Use Gstreamer to play .mp4 file :
gst-launch-1.0 filesrc location=/home/root/output4K.mp4 ! jpegdec ! autovideosink
The video only have 8.6 fps:
On my ubuntu PC:
The video play smoothly, but only take 5 sec to finish.
The video time should be 300 frame / 30fps = 10 sec.
Regards,
Derek Lin
Hello,
It is weird, but the i.mx8 is able to decode mp4 videos but you have to see the usb, is transfer the data ok? which usb are you using 2.0 or 3.0?
Regards
Hi @Bio_TICFSL ,
The camera interface is USB 2.0 .
If I use Gstreamer to stream and display camera preview, the fps will be lower than 5 and appear computer too slow. Then the CPU usage is over than 100%. Here is my command:
gst-launch-1.0 v4l2src device=/dev/video4 ! image/jpeg,width=3840,height=2160,framerate=30/1 ! jpegdec ! autovideosink
If camera resolution is modified to 640x360, the fps will be correct.
Regards,
Derek Lin