IMX708 video recording error

Hi all,

I attempted to record a video from the IMX708 sensor (Raspberry Pi v3 camera) using Jetson Nano (not the orin Nano). I have successfully captured images from the sensor using the drivers from RidgeRun.

However, I am encountering an error when trying to record a video, and I’m unable to find a solution. The error message is as follows:
_ValidateEncodeParams: Invalid encode width

I tried a very basic example pipeline form RidgeRun, so I don’t think the pipeline itself is the issue. I’m seeking advice on how to resolve this problem. Any assistance would be greatly appreciated.

pipeline:

SENSOR_ID=0 # 0 for CAM0 port
FRAMERATE=14 # Framerate can go from 2 to 14 for 4608x2592 mode
gst-launch-1.0 -e nvarguscamerasrc sensor-id=$SENSOR_ID ! "video/x-raw(memory:NVMM),width=4608,height=2592,framerate=$FRAMERATE/1" ! nvv4l2h264enc ! h264parse ! mp4mux ! filesink location=rpi_v3_imx708_cam$SENSOR_ID.mp4

Error:

Setting pipeline to PAUSED ...
Opening in BLOCKING MODE 
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4608 x 2592 FR = 14.000001 fps Duration = 71428568 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 500000, max 65487000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 4608 H = 2592 
   seconds to Run    = 0 
   Frame Rate = 14.000001 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
H264: Profile = 66, Level = 0 
_ValidateEncodeParams: Invalid encode width 
tvmrVideoEncoderBitsAvailable_MSENC: ucode ERROR = 16 
NvVideoEncTransferOutputBufferToBlock: DoWork failed line# 674 
NvVideoEnc: NvVideoEncTransferOutputBufferToBlock TransferBufferToBlock failed Line=685

Hi,

Can you try adding format to the camera caps and changing the encode

SENSOR_ID=0 
FRAMERATE=14
gst-launch-1.0 -e nvarguscamerasrc sensor_id=$SENSOR_ID ! 'video/x-raw(memory:NVMM),width=4608,height=2592,framerate=$FRAMERATE/1, format=NV12' ! nvvidconv ! "video/x-raw,width=1920,height=1080" ! x264enc ! qtmux ! filesink location=RidgeRun_out.mp4

if this doesn’t work, please try

gst-launch-1.0 nvarguscamerasrc sensor_id=$SENSOR_ID -e ! 'video/x-raw(memory:NVMM),width=4608,height=2592,framerate=$FRAMERATE/1, format=NV12' ! fakesink
2 Likes

Hi ManuelLeiva.

The first pipeline perfectly worked!
But now I encountered another issue I cannot record the video while displaying the video stream.

I will open another topic.
Thank you for your help.

Great!

Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com

Thank you so much.

If it’s okay, please also take a look at the following topic.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.