gstVideoEncode not working

Hi Folks,

We have two leopard IMX274 cameras on our Tx2 system. I have following command working on it -

gst-launch-1.0 -e nvcamerasrc fpsRange="30.0 120.0" ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)120/1' ! omxh265enc ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! matroskamux ! filesink location=test.mkv -e

I get the right test.mkv which plays fine with -

gst-launch-1.0 playbin uri=file:~/test.mkv

However then I try gstVideoEncode from tegra_multimedia_api/argus/samples/gstVideoEncode, my output does not seem correct.

cd ~/tegra_multimedia_api/argus/ 
mkdir build; cd build; cmake ..
make
cd ~/tegra_multimedia_api/argus/build/samples/gstVideoEncode
argus_gstvideoencode -d 0 -p 0

An output file by name of argus_gstvideoencode_out.mp4 gets generated. The run looks normal without any pathoglogical prints. However when I try to play the output file using -

gst-launch-1.0 playbin uri=file:/home/nvidia/tegra_multimedia_api/argus/build/samples/gstVideoEncode/argus_gstvideoencode_out.mp4 , the output does not seem right. It consists of orange color screen, whereas the preview was showing right content on screen.

I have not made any modifications, to the gstVideoEncode code. Does anyone have gstVideoEncode working with Sony IMX274 cameras ?

Thanks,

Hi,
What is the resolution of imx274? Can you try to configure to 1920x1080? By default the resolution is set as the sensor resolution

// Create video encoder stream.
    iStreamSettings->setResolution(iSensorMode->getResolution());

Take onboard camera(ov5693) as an example, the sensor resolution is 2592x1944

TVMR: cbBeginSequence: 1693: Display Resolution : (2592x1944)
TVMR: cbBeginSequence: 1694: Display Aspect Ratio : (2592x1944)

Hi DaneLLL

Thanks for helping out. Yes resolutions does seem to make difference. with 1080p I get correct encoded output .

The default resolution that encoder was trying to encode at was (3864 x 2174). Can you please explain dependence of encoder functionality on resolution ? Does encoder hardware has limitation of resolution / frame rate or pixel throughput ? I would guess that it is not so.

Thanks

Hi DaneLLL

Thanks for helping out. Yes resolutions does seem to make difference. with 1080p I get correct encoded output .

The default resolution that encoder was trying to encode at was (3864 x 2174). Can you please explain dependence of encoder functionality on resolution ? Does encoder hardware has limitation of resolution / frame rate or pixel throughput ? I would guess that it is not so.

Thanks

Hi, the width has to be 32-pixel alignment. We suggest follow standard resolution 3840x2160, 1920x1080,1280x720,…