Unable to record 1080p@60fps video

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to record 1080p@60fps video

1,456 Views
namanthaker
Contributor IV

Hello,

I am integrating a 3rd party camera sensor from ON-Semiconductor with i.MX8M Mini (imx-yocto-L5.4.24_2.1.0). I want to capture 1080p@60fps stream from the camera using gstreamer but I do not get 60fps.

Below is the gstreamer command used to capture the stream:
gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=1800 ! 'video/x-raw, width=1920, height=1080, framerate=(fraction)60/1, format=(string)UYVY' ! vpuenc_h264 ! h264parse ! mp4mux ! filesink location=1920x1080.mp4

I am getting only 40fps average in the recorded file.

I have configured the camera for 60fps and confirmed the same on the camera EVM. I am using 2-lane connection between the i.MX8MM and camera and configured the MIPI clock at 1.1Gbps. With this configuration I am able to capture 60fps on the EVM.

Although, I am able to capture 720p@60fps though with below command:
gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=1800 ! 'video/x-raw, width=1280, height=720, framerate=(fraction)60/1, format=(string)UYVY' ! vpuenc_h264 ! h264parse ! mp4mux ! filesink location=1280x720.mp4

Please help to solve the problem.

Thanks in advance,
Naman

0 Kudos
Reply
3 Replies

1,451 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello namanthaker,

one can try decode example
gst-launch-1.0 filesrc location=file.mp4 ! video/quicktime ! qtdemux ! queue ! vpudec ! queue ! waylandsink sync=false

camera transcode:
gst-launch-1.0 v4l2src ! video/x-raw,format=NV12,width=1920,height=1080 ! queue max-size-time=0 ! vpuenc_h264 ! h264parse ! vpudec ! queue max-size-time=0 ! waylandsink enable-tile=true sync=false

or could you try with Demo Image from

https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-6ser...

is below pipeline working for you (MIPI CSI camera accessory; part number: MINISASTOCSI & MIPI DSI to HDMI Converter)

1080p @60 fps camera capture:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080 ! waylandsink

 

Regards

 

0 Kudos
Reply

1,427 Views
namanthaker
Contributor IV

Hi,

I tried the camera transcode command I am getting good framerate though I do not know how much. So to check the fps I used "fpsdisplaysink text-overlay=true" instead of waylandsink, but with that I got only 10-11 fps. I think fpsdisplaysink is reducing the fps somehow.

Is there a way to confirm the fps while displaying the camera stream on HDMI screen?

I did not try the demo image, as it would not have the support for the 3rd party camera I am using.

I tried the suggested pipeline for 1080p@60fps camera capture with my camera but it did not work. I do not have a MINISASTOCSI module so I could not test with it.

Also, when I used below pipeline to capture a h264 video, I got 60FPS.
gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=1800 ! 'video/x-raw, width=1920, height=1080, framerate=(fraction)60/1, format=(string)UYVY' ! vpuenc_h264 ! h264parse ! filesink location=1920x1080.h264

I have removed the mp4mux used in the original command. Is there a way to record mp4 video without using mp4mux?

Thanks,
Naman

0 Kudos
Reply

1,413 Views
namanthaker
Contributor IV

Hi @Bio_TICFSL ,

Any update on above queries?

Regards,

Naman

0 Kudos
Reply