How to convert YUV to JPG using jpeg encoder(hardware)

I tried to convert the UYUV output from yuv camera using the 09_camera_jpeg_capture sample from tegra_multimedia_api.

  1. For ov5693. I got the output00*.jpg. it works fine.

The dts and kernel are flashed by JetPack-L4T-2.3.1-linux-x64.run from R24.2.1. Noting changed.

ubuntu@tegra-ubuntu:~/tegra_multimedia_api/samples/09_camera_jpeg_capture$ ./camera_jpeg_capture
NvPclHwGetModuleData: Misc Driver v4l2_focuser_stub already exists. Avoiding duplicate drivers
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 1: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 1: Failed to load pixeltype
Sensor_LoadModeModeType: mode 2: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 2: Failed to load pixeltype
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
CONSUMER: Waiting until producer is connected...
CONSUMER: Waiting until producer is connected...
PRODUCER: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
CONSUMER: Producer has connected; continuing.
Sensor_GetV4LPixelType: pixel type 0x101 invalid
CONSUMER: Done.
CONSUMER: Done.
PRODUCER: Done -- exiting.
  1. For ov5693. I got the output00*.jpg. it works fine.

The dts and kernel are compiled from R24.2.1. Noting changed.

ubuntu@tegra-ubuntu:~/tegra_multimedia_api/samples/09_camera_jpeg_capture$ ./camera_jpeg_capture
NvPclHwGetModuleData: Misc Driver v4l2_focuser_stub already exists. Avoiding duplicate drivers
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 1: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 1: Failed to load pixeltype
Sensor_LoadModeModeType: mode 2: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 2: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 1: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 1: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
CONSUMER: Waiting until producer is connected...
CONSUMER: Waiting until producer is connected...
PRODUCER: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
CONSUMER: Producer has connected; continuing.
Sensor_GetV4LPixelType: pixel type 0x101 invalid
CONSUMER: Done.
CONSUMER: Done.
PRODUCER: Done -- exiting.
(NvOdmDevice) Error NotInitialized: V4L2Device not powered on (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlVal(), line 378)
(NvOdmDevice) Error NotInitialized: V4L2Device not powered on (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlVal(), line 378)
(NvOdmDevice) Error NotInitialized: V4L2Device not powered on (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setControlVal(), line 378)
  1. For OV5640. I can preview using the VLC player and capture using v4l2-ctl. It’s ok.

But I cannot get the jpg file using 09_camera_jpeg_capture sample.
logs:

NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
CONSUMER: Waiting until producer is connected...
CONSUMER: Waiting until producer is connected...
PRODUCER: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
CONSUMER: Producer has connected; continuing.
(NvOdmDevice) Error NotInitialized: V4L2Device not powered on (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1127)
(NvOdmDevice) Error NotInitialized: V4L2Device not powered on (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1127)
Sensor_GetV4LPixelType: pixel type 0x12 invalid
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc
launchCC abort cc 104

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
(Argus) Error Timeout: Failed to submit first capture request (propagating from src/api/CaptureSessionImpl.cpp, function submitCaptureRequests(), line 301)
(Argus) Error Timeout:  (propagating from src/api/CaptureSessionImpl.cpp, function threadFunction(), line 741)
  1. questions:

a. There are pixel type invalid issue in all three case. Why?

b. For case 2. Why there are power on issue ?

c. For case 3. Does UYVY can be supported by JpegEncoder through V4l2?

Below referred from “Multimedia API Reference November 16, 2016 | 24.2.1 Release”

int NvJPEGEncoder::encodeFromFd	(	int 	fd,
J_COLOR_SPACE 	color_space,
unsigned char ** 	out_buf,
unsigned long & 	out_buf_size 
)		
Encodes a JPEG image from a file descriptor (FD) of hardware buffer memory.

The application may allocate the memory for storing the JPEG image. If the allocation is less than what is required, libjpeg allocates more memory. The out_buf pointer and out_buf_size are updated accordingly.

Supports YUV420 and NV12 formats.

d. Are there any debug tools or method to get more details?

@ShaneCCC and all

Looking forward your comments.

Hi Allen,
Could you try if you can see preview in running following cmmands?

gst-launch-1.0 nvcamerasrc num-buffers=300 ! nvoverlaysink

gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=300 ! ‘video/x-raw,width=640,height=480’ ! nvvidconv ! nvoverlaysink

Please also share your device tree for reference.

Hi, DaneLLL

Thanks for your response.

As I’m using YUV sensor, all the componets got from R24.2.1, so I excute the second cmd.

Log from terminal:

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 ! 'video/x-raw,width=1920,height=1080' ! nvvidconv ! nvoverlaysink
ubuntu@tegra-ubuntu:/media/ubuntu/91df5a31-05fd-4885-b29b-d7e625107ac51$ gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 ! 'video/x-raw,width=1920,height=1080' ! nvvidconv ! nvoverlaysink
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and Mjstreaminglibv4lconvert: warning more framesizes then I can handle!
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:07.530581455
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Log for kernel, with no error report:

[  628.420281]  pixelformat : YUV UYUV 1X16 4:2:2 tegra_core_get_format_by_fourcc, drivers/media/platform/tegra/camera/core.c, 381
[  628.431743]  pixelformat :YUV UYUV 1X16 4:2:2 code:0x0000200f __tegra_channel_set_format, drivers/media/platform/tegra/camera/channel.c, 1397
[  628.444423] ov5640 30-003c: camera_common_try_fmt: size 1920 x 1080
[  628.450689] ov5640 30-003c: camera_common_try_fmt: w: 1920, h:1080, maxframerate: 30, s_data->mode: 0, code: 0x0000200f
[  628.461549] ov5640 30-003c: camera_common_s_fmt(0x0000200f) size 1920 x 1080, colorfmt:1498831189
[  628.490673]  vb2_streamon, drivers/media/v4l2-core/videobuf2-core.c, 1708
[  628.497457]  ===============   bypass  : 0 ===============================================
[  628.497457]
[  628.507281]  port_num: 0 drivers/media/platform/tegra/csi/csi.c, tegra_csi_start_streaming, 253
[  628.515978] vi vi: csi2_write:port 0 offset 0x00000218 val:0x00000000
[  628.522422] vi vi: csi2_read:port 0 offset 0x000000d0
[  628.527464] vi vi: csi2_write:port 0 offset 0x000000d0 val:0x00000001
[  628.534139] (NULL device *): camera_common_dpd_disable: csi 0
[  628.539878] ov5640 30-003c: ov5640_s_stream++
[  628.606981] ov5640 30-003c: ov5640_write_table: ret = 0
[  628.612253] ov5640 30-003c: ov5640_set_gain: gain 0100 val: 0010
[  628.620299] ov5640 30-003c: ov5640_write_table: ret = 0
[  628.625530] ov5640 30-003c: ov5640_s_stream--
[  628.710987] nvmap_alloc_handle: PID 2787: gst-launch-1.0: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory.Plase pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant.
[  628.774892]  port_num: 0 drivers/media/platform/tegra/csi/csi.c, tegra_csi_stop_streaming, 282
[  628.783621] (NULL device *): camera_common_dpd_enable: csi 0
[  628.789326] ov5640 30-003c: ov5640_s_stream++
[  628.796624] ov5640 30-003c: ov5640_write_table: ret = 0
[  628.804903] (NULL device *): camera_common_dpd_enable: csi 0
[  628.810687] ov5640 30-003c: ov5640_power_off: power off
[  628.818571] ov5640 30-003c: camera_common_mclk_disable: disable MCLK

With v4l2 I can get image correct.

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080 --set-ctrl bypass_mode=0  --stream-mmap --stream-count=1 --stream-to=f0.raw

My dts file:

--- a/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi
+++ b/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi
@@ -16,6 +16,10 @@
+#include "tegra210-platforms/tegra210-jetson-cv-camera-ov5640-a00.dtsi"
                        e3326_cam0: ov5693_c@36 {
                                status = "disabled";
                        };
+                       /* Just replace ov5693 with ov4689 for test */
+                       e3327_cam0: ov4689_c@36 {
+                               status = "disabled";
+                       };
                        e3323_cam0: ov23850_a@10 {
                                status = "disabled";
                        };
@@ -141,11 +149,68 @@
                                        };
                                };
                        };
+
                        tca6408_21: tca6408@21 {
                                default {
                                        gpio-output-low = <0 1 2 3 4 5 6 7>;
                                };
                        };
+
+                       cam_tca9545a_70: tca9545a@70 {
+                               status = "okay";
+                               i2c@0 {
+                                       ov5640_cam0: ov5640_a@3c {
+                                               status = "okay";
+                                       };
+                               /*
+                                       e3328_cam0: ov4689_a@36 {
+                                               status = "okay";
+                                       };
+                                       ov2710_cam0: ov2710_a@36 {
+                                               status = "disabled";
+                                       };
+                                       */
+                               };
+                               i2c@1 {
+                                       ov5640_cam1: ov5640_b@3c {
+                                               status = "okay";
+                                       };
+                                                                /*
+                                       e3328_cam1: ov4689_b@36 {
+                                               status = "okay";
+                                       };
+                                       ov2710_cam1: ov2710_b@36 {
+                                               status = "disabled";
+                                       };
+                                       */
+                               };
+                               i2c@2 {
+                                       ov5640_cam2: ov5640_c@3c {
+                                               status = "okay";
+                                       };
+                                                                /*
+                                       e3328_cam2: ov4689_c@36 {
+                                               status = "okay";
+                                       };
+                                       ov2710_cam2: ov2710_c@36 {
+                                               status = "disabled";
+                                       };
+                                       */
+                               };
+                               i2c@3 {
+                                       ov5640_cam3: ov5640_d@3c {
+                                               status = "okay";
+                                       };
+                                                                /*
+                                       e3328_cam3: ov4689_d@36 {
+                                               status = "okay";
+                                       };
+                                       ov2710_cam3: ov2710_d@36 {
+                                               status = "disabled";
+                                       };
+                                       */
+                               };
+                       };
                };
        };
        i2c@7000c000 {
@@ -161,9 +226,9 @@
                compatible = "nvidia, tegra-camera-platform";
                modules {
                        cam_module0: module0 {
-                               status = "disabled";
+                               status = "okay";
                                cam_module0_drivernode0: drivernode0 {
-                                       status = "disabled";
+                                       status = "okay";
                                };
                                cam_module0_drivernode1: drivernode1 {
                                        status = "disabled";
@@ -172,9 +237,9 @@
                                };
                        };
                        cam_module1: module1 {
-                               status = "disabled";
+                               status = "okay";
                                cam_module1_drivernode0: drivernode0 {
-                                       status = "disabled";
+                                       status = "okay";
                                };
                                cam_module1_drivernode1: drivernode1 {
                                        status = "disabled";
@@ -183,9 +248,9 @@
                                };
                        };
                        cam_module2: module2 {
-                               status = "disabled";
+                               status = "okay";
                                cam_module2_drivernode0: drivernode0 {
-                                       status = "disabled";
+                                       status = "okay";
                                };
                                cam_module2_drivernode1: drivernode1 {
                                        status = "disabled";
@@ -194,9 +259,9 @@
                                };
                        };
                        cam_module3: module3 {
-                               status = "disabled";
+                               status = "okay";
                                cam_module3_drivernode0: drivernode0 {
-                                       status = "disabled";
+                                       status = "okay";
                                };
                                cam_module3_drivernode1: drivernode1 {
                                        status = "disabled";
(END)
/* camera control gpio definitions */
/ {
    gpio@6000d000 {
        camera_control {
            gpio-output-high = <
                >;
            gpio-output-low = <
                CAM0_RST
                CAM1_RST
                CAM0_PWDN
                CAM1_PWDN
                >;
        };
    };

    aliases {
        gpio288 = &tca6408_21;  /* 288 = 272 + TCA9539_GPIO_NUM */
    };

    host1x {
        i2c@546c0000 {
            tca9545a@70 {
                compatible = "ti,tca9545a";
                reg = <0x70>;
                #address-cells = <1>;
                #size-cells = <0>;
                vcc-supply = <&en_vdd_cam>;
                skip_mux_detect;
                force_bus_start = <T210_CAMERA_I2C_MUX_BUS(0)>;
                i2c@0 {
                    reg = <0>;
                    i2c-mux,deselect-on-exit;
                    #address-cells = <1>;
                    #size-cells = <0>;
                };
                i2c@1 {
                    reg = <1>;
                    i2c-mux,deselect-on-exit;
                    #address-cells = <1>;
                    #size-cells = <0>;
                };
                i2c@2 {
                    reg = <2>;
                    i2c-mux,deselect-on-exit;
                    #address-cells = <1>;
                    #size-cells = <0>;
                };
                i2c@3 {
                    reg = <3>;
                    i2c-mux,deselect-on-exit;
                    #address-cells = <1>;
                    #size-cells = <0>;
                };
            };
        };
    };
};

/{
    host1x {
        i2c@546c0000 {
            tca9545a@70 {
                i2c@0 {
                    ov5640_a@3c {
                        clocks = <&tegra_car TEGRA210_CLK_ID_CLK_OUT_3>;
                        clock-names = "mclk";
                        clock-frequency = <24000000>;
                        mclk = "cam_mclk1";
                        reset-gpios = <&gpio CAM0_RST GPIO_ACTIVE_HIGH>;
                        pwdn-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_LOW>;
                        vana-supply = <&en_vdd_cam_hv_2v8>;
                        vcm-supply = <&en_vdd_cam_1v2_alt>;
                        vif-supply = <&en_vdd_cam>;
                    };
                };
                i2c@1 {
                    ov5640_b@3c {
                        clocks = <&tegra_car TEGRA210_CLK_ID_CLK_OUT_3>;
                        clock-names = "mclk";
                        clock-frequency = <24000000>;
                        mclk = "cam_mclk1";
                        reset-gpios = <&gpio CAM1_RST GPIO_ACTIVE_HIGH>;
                        pwdn-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_LOW>;
                        vana-supply = <&en_vdd_cam_hv_2v8>;
                        vcm-supply = <&en_vdd_cam_1v2_alt>;
                        vif-supply = <&en_vdd_cam>;
                    };
                };
                i2c@2 {
                    ov5640_c@3c {
                        clocks = <&tegra_car TEGRA210_CLK_ID_CLK_OUT_3>;
                        clock-names = "mclk";
                        clock-frequency = <24000000>;
                        mclk = "cam_mclk1";
                        reset-gpios = <&gpio CAM0_RST GPIO_ACTIVE_HIGH>;
                        pwdn-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_LOW>;
                        vana-supply = <&en_vdd_cam_hv_2v8>;
                        vcm-supply = <&en_vdd_cam_1v2_alt>;
                        vif-supply = <&en_vdd_cam>;
                    };
                };
                i2c@3 {
                    ov5640_d@3c {
                        clocks = <&tegra_car TEGRA210_CLK_ID_CLK_OUT_3>;
                        clock-names = "mclk";
                        clock-frequency = <24000000>;
                        mclk = "cam_mclk1";
                        reset-gpios = <&gpio CAM1_RST GPIO_ACTIVE_HIGH>;
                        pwdn-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_LOW>;
                        vcm-supply = <&en_vdd_cam_1v2_alt>;
                        vana-supply = <&en_vdd_cam_hv_2v8>;
                        vif-supply = <&en_vdd_cam>;
                    };
                };
            };
        };
    };
};
#include <dt-bindings/media/camera.h>
#include <dt-bindings/platform/t210/t210.h>

#define CAM0_RST_L  TEGRA_GPIO(S, 4)
#define CAM0_PWDN   TEGRA_GPIO(S, 7)
#define CAM1_RST_L  TEGRA_GPIO(S, 5)
#define CAM1_PWDN   TEGRA_GPIO(T, 0)


/* camera control gpio definitions */
/ {
    host1x {
        vi {
            num-channels = <4>;
            ports {
                #address-cells = <1>;
                #size-cells = <0>;
                port@0 {
                    reg = <0>;
                    ov5640_vi_in0: endpoint {
                        csi-port = <0>;
                        bus-width = <2>;
                        remote-endpoint = <&ov5640_out0>;
                    };
                };
                port@1 {
                    reg = <1>;
                    ov5640_vi_in1: endpoint {
                        csi-port = <1>;
                        bus-width = <2>;
                        remote-endpoint = <&ov5640_out1>;
                    };
                };
                port@2 {
                    reg = <2>;
                    ov5640_vi_in2: endpoint {
                        csi-port = <2>;
                        bus-width = <2>;
                        remote-endpoint = <&ov5640_out2>;
                    };
                };
                port@3 {
                    reg = <3>;
                    ov5640_vi_in3: endpoint {
                        csi-port = <3>;
                        bus-width = <2>;
                        remote-endpoint = <&ov5640_out3>;
                    };
                };
            };
        };

        i2c@546c0000 {
            status = "okay";
            #address-cells = <1>;
            #size-cells = <0>;

            tca9545a@70 {
                i2c@0 {
                    ov5640_a@3c {
                        compatible = "nvidia,ov5640";
                        reg = <0x3c>;

                        physical_w = "5.440";
                        physical_h = "3.072";

                        sensor_model ="ov5640";
                        avdd-reg = "vana";
                        vcm-reg = "vcm";
                        iovdd-reg = "vif";

                        /* Defines number of frames to be dropped by driver internally after applying */
                        /* sensor crop settings. Some sensors send corrupt frames after applying */
                        /* crop co-ordinates */
                        post_crop_frame_drop = "0";
                        mode0 { // ov5640_MODE_1920X1080_15
                            mclk_khz = "24000";
                            num_lanes = "2";
                            tegra_sinterface = "serial_a";
                            discontinuous_clk = "no";
                            dpcm_enable = "false";
                            cil_settletime = "0";

                            active_w = "1920";
                            active_h = "1080";
                            pixel_t = "yuyv";
                            readout_orientation = "0";
                            line_length = "1120"; /* 15fps 2240 */
                            inherent_gain = "1";
                            mclk_multiplier = "5.25";
                            pix_clk_hz = "126000000";

                            min_gain_val = "1.0";
                            max_gain_val = "16";
                            min_hdr_ratio = "1";
                            max_hdr_ratio = "64";
                            min_framerate = "1.816577";
                            max_framerate = "30";
                            min_exp_time = "34";
                            max_exp_time = "550385";
                            embedded_metadata_height = "0";
                        };
                        ports {
                            #address-cells = <1>;
                            #size-cells = <0>;

                            port@0 {
                                reg = <0>;
                                ov5640_out0: endpoint {
                                    csi-port = <0>;
                                    bus-width = <2>;
                                    remote-endpoint = <&ov5640_vi_in0>;
                                };
                            };
                        };
                    };
                };
                i2c@1 {
                    ov5640_b@3c {
                        compatible = "nvidia,ov5640";
                        reg = <0x3c>;

                        physical_w = "5.440";
                        physical_h = "3.072";

                        sensor_model ="ov5640";
                        avdd-reg = "vana";
                        vcm-reg = "vcm";
                        iovdd-reg = "vif";

                        /* Defines number of frames to be dropped by driver internally after applying */
                        /* sensor crop settings. Some sensors send corrupt frames after applying */
                        /* crop co-ordinates */
                        post_crop_frame_drop = "0";

                        mode0 { // ov5640_MODE_1920X1080_15
                            mclk_khz = "24000";
                            num_lanes = "2";
                            tegra_sinterface = "serial_b";
                            discontinuous_clk = "no";
                            dpcm_enable = "false";
                            cil_settletime = "0";

                            active_w = "1920";
                            active_h = "1080";
                            pixel_t = "yuyv";
                            readout_orientation = "0";
                            line_length = "1120";
                            inherent_gain = "1";
                            mclk_multiplier = "5.25";
                            pix_clk_hz = "126000000";

                            min_gain_val = "1.0";
                            max_gain_val = "16";
                            min_hdr_ratio = "1";
                            max_hdr_ratio = "64";
                            min_framerate = "1.816577";
                            max_framerate = "30";
                            min_exp_time = "34";
                            max_exp_time = "550385";
                            embedded_metadata_height = "0";
                        };
                        ports {
                            #address-cells = <1>;
                            #size-cells = <0>;

                            port@0 {
                                reg = <0>;
                                ov5640_out1: endpoint {
                                    csi-port = <1>;
                                    bus-width = <2>;
                                    remote-endpoint = <&ov5640_vi_in1>;
                                };
                            };
                        };
                    };
                };
......


/* camera control gpio definitions */
/ {

    tegra-camera-platform {
        compatible = "nvidia, tegra-camera-platform";

        /**
         * The general guideline for naming badge_info contains 3 parts, and is as follows,
         * The first part is the camera_board_id for the module; if the module is in a FFD
         * platform, then use the platform name for this part.
         * The second part contains the position of the module, ex. “rear” or “front”.
         * The third part contains the last 6 characters of a part number which is found
         * in the module's specsheet from the vender.
         */
        modules {
            module0 {
                badge = "ov5640_bottomleft_A815P2";
                position = "bottomleft";
                orientation = "1";
                drivernode0 {
                    pcl_id = "v4l2_sensor";
                    devname = "ov5640 30-003c";
                    proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9545a@70/i2c@0/ov5640_a@3c";
                };
            };
            module1 {
                badge = "ov5640_centerleft_A815P2";
                position = "centerleft";
                orientation = "1";
                drivernode0 {
                    pcl_id = "v4l2_sensor";
                    devname = "ov5640 31-003c";
                    proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9545a@70/i2c@1/ov5640_b@3c";
                };
            };
            module2 {
                badge = "ov5640_centerleft_A815P2";
                position = "centerright";
                orientation = "1";
                drivernode0 {
                    pcl_id = "v4l2_sensor";
                    devname = "ov5640 32-003c";
                    proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9545a@70/i2c@2/ov5640_c@3c";
                };
            };
            module3 {
                badge = "ov5640_centerleft_A815P2";
                position = "topleft";
                orientation = "1";
                drivernode0 {
                    pcl_id = "v4l2_sensor";
                    devname = "ov5640 33-003c";
                    proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9545a@70/i2c@3/ov5640_d@3c";
                };
            };
        };
    };
};

I noticed that: both MEDIA_BUS_FMT_UYVY8_1X16 and MEDIA_BUS_FMT_VYUY8_2X8 for UYUV format can works fine. Which I should choose?

Hi, DaneLLL

I set the GST_DEBUG=4 and get more information. The key problem should be the format UYVY. It’s not supportted by omx.

ubuntu@tegra-ubuntu:/media/ubuntu/91df5a31-05fd-4885-b29b-d7e625107ac51$ gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 ! 'video/x-raw,width=1920,height=1080' ! nvvidconv ! nvoverlaysink
0:00:00.000422031  3297       0x426800 INFO                GST_INIT gst.c:511:init_pre: Initializing GStreamer Core Library version 1.8.2
0:00:00.001045469  3297       0x426800 INFO                GST_INIT gst.c:512:init_pre: Using library installed in /usr/lib/aarch64-linux-gnu
0:00:00.001227188  3297       0x426800 INFO                GST_INIT gst.c:523:init_pre: Linux tegra-ubuntu 3.10.96-tegra #150 SMP PREEMPT Tue Jan 3 18:27:42 CST 2017 aarch64
0:00:00.003272708  3297       0x426800 INFO                GST_INIT gstmessage.c:119:_priv_gst_message_initialize: init messages
0:00:00.007496094  3297       0x426800 INFO                GST_INIT gstcontext.c:83:_priv_gst_context_initialize: init contexts
0:00:00.009454219  3297       0x426800 INFO      GST_PLUGIN_LOADING gstplugin.c:316:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.010489167  3297       0x426800 INFO      GST_PLUGIN_LOADING gstplugin.c:224:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.010643177  3297       0x426800 INFO      GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.010861198  3297       0x426800 INFO            GST_REGISTRY gstregistry.c:1723:ensure_current_registry: reading registry cache: /home/ubuntu/.cache/gstreamer-1.0/registry.aarch64.bin
0:00:00.057514427  3297       0x426800 INFO            GST_REGISTRY gstregistrybinary.c:619:priv_gst_registry_binary_read_cache: loaded /home/ubuntu/.cache/gstreamer-1.0/registry.aarch64.bin in 0.046452 seconds
0:00:00.057655729  3297       0x426800 INFO            GST_REGISTRY gstregistry.c:1579:scan_and_update_registry: Validating plugins from registry cache: /home/ubuntu/.cache/gstreamer-1.0/registry.aarch64.bin
0:00:00.059190365  3297       0x426800 INFO            GST_REGISTRY gstregistry.c:1681:scan_and_update_registry: Registry cache has not changed
0:00:00.059228125  3297       0x426800 INFO            GST_REGISTRY gstregistry.c:1758:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.059255521  3297       0x426800 INFO                GST_INIT gst.c:724:init_post: GLib runtime version: 2.48.1
0:00:00.059284323  3297       0x426800 INFO                GST_INIT gst.c:726:init_post: GLib headers version: 2.48.1
0:00:00.059310729  3297       0x426800 INFO                GST_INIT gst.c:727:init_post: initialized GStreamer successfully
0:00:00.059386094  3297       0x426800 INFO            GST_PIPELINE gstparse.c:323:gst_parse_launch_full: parsing pipeline description 'v4l2src device=/dev/video0 num-buffers=300 ! video/x-raw,width=1920,height=1080 ! nvvidconv ! nvoverlaysink '
0:00:00.062911302  3297       0x426800 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so" loaded
0:00:00.062972240  3297       0x426800 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "v4l2src"
0:00:00.064758073  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseSrc@0x59e2f0> adding pad 'src'
0:00:00.067308698  3297       0x426800 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvidconv.so" loaded
0:00:00.067363229  3297       0x426800 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "nvvidconv"
0:00:00.067665156  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x5a66d0> adding pad 'sink'
0:00:00.067722292  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x5a66d0> adding pad 'src'
0:00:00.074781823  3297       0x426800 WARN                     omx gstomx.c:2839:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/ubuntu/.config:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
0:00:00.074837552  3297       0x426800 INFO                     omx gstomx.c:2844:plugin_init: Using default configuration
0:00:00.075978437  3297       0x426800 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstomx.so" loaded
0:00:00.076018021  3297       0x426800 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "nvoverlaysink"
0:00:00.076313073  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseSink@0x5ba5b0> adding pad 'sink'
0:00:00.076382656  3297       0x426800 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "pipeline"
0:00:00.076652292  3297       0x426800 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstV4l2Src named v4l2src0 to some pad of Gstnvvconv named nvvconv0 (0/0) with caps "video/x-raw, width=(int)1920, height=(int)1080"
0:00:00.077633021  3297       0x426800 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstcoreelements.so" loaded
0:00:00.077674062  3297       0x426800 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "capsfilter"
0:00:00.077854115  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x5c23d0> adding pad 'sink'
0:00:00.077946562  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x5c23d0> adding pad 'src'
0:00:00.077993437  3297       0x426800 INFO              GST_STATES gstbin.c:1915:gst_bin_get_state_func:<pipeline0> getting state
0:00:00.078046719  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to NULL
0:00:00.078088750  3297       0x426800 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.078132552  3297       0x426800 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element v4l2src0:(any) to element capsfilter0:sink
0:00:00.078173229  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter0:sink
0:00:00.078202760  3297       0x426800 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: v4l2src0 and capsfilter0 in same bin, no need for ghost pads
0:00:00.078257344  3297       0x426800 INFO                GST_PADS gstpad.c:2313:gst_pad_link_prepare: trying to link v4l2src0:src and capsfilter0:sink
0:00:00.078319219  3297       0x426800 INFO                GST_PADS gstpad.c:4087:gst_pad_peer_query:<capsfilter0:src> pad has no peer
0:00:00.078363594  3297       0x426800 INFO                GST_PADS gstpad.c:2519:gst_pad_link_full: linked v4l2src0:src and capsfilter0:sink, successful
0:00:00.078396250  3297       0x426800 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.078424740  3297       0x426800 INFO               GST_EVENT gstpad.c:5623:gst_pad_send_event_unchecked:<v4l2src0:src> Received event on flushing pad. Discarding
0:00:00.078461771  3297       0x426800 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element capsfilter0:src to element nvvconv0:(any)
0:00:00.078530729  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter0:src
0:00:00.078563854  3297       0x426800 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link capsfilter0:src and nvvconv0:sink
0:00:00.078631250  3297       0x426800 INFO                GST_PADS gstpad.c:4087:gst_pad_peer_query:<nvvconv0:src> pad has no peer
0:00:00.078813490  3297       0x426800 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: capsfilter0 and nvvconv0 in same bin, no need for ghost pads
0:00:00.078855521  3297       0x426800 INFO                GST_PADS gstpad.c:2313:gst_pad_link_prepare: trying to link capsfilter0:src and nvvconv0:sink
0:00:00.078917031  3297       0x426800 INFO                GST_PADS gstpad.c:4087:gst_pad_peer_query:<nvvconv0:src> pad has no peer
0:00:00.079039635  3297       0x426800 INFO                GST_PADS gstpad.c:2519:gst_pad_link_full: linked capsfilter0:src and nvvconv0:sink, successful
0:00:00.079071667  3297       0x426800 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.079097500  3297       0x426800 INFO               GST_EVENT gstpad.c:5623:gst_pad_send_event_unchecked:<capsfilter0:src> Received event on flushing pad. Discarding
0:00:00.079131823  3297       0x426800 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of Gstnvvconv named nvvconv0 to some pad of GstNvOverlaySink-nvoverlaysink named nvoverlaysink-nvoverlaysink0 (0/0) with caps "(NULL)"
0:00:00.079175000  3297       0x426800 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element nvvconv0:(any) to element nvoverlaysink-nvoverlaysink0:(any)
0:00:00.079207031  3297       0x426800 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link nvvconv0:src and nvoverlaysink-nvoverlaysink0:sink
0:00:00.079429948  3297       0x426800 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: nvvconv0 and nvoverlaysink-nvoverlaysink0 in same bin, no need for ghost pads
0:00:00.079507760  3297       0x426800 INFO                GST_PADS gstpad.c:2313:gst_pad_link_prepare: trying to link nvvconv0:src and nvoverlaysink-nvoverlaysink0:sink
0:00:00.079672917  3297       0x426800 INFO                GST_PADS gstpad.c:2519:gst_pad_link_full: linked nvvconv0:src and nvoverlaysink-nvoverlaysink0:sink, successful
0:00:00.079705000  3297       0x426800 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.079730365  3297       0x426800 INFO               GST_EVENT gstpad.c:5623:gst_pad_send_event_unchecked:<nvvconv0:src> Received event on flushing pad. Discarding
Setting pipeline to PAUSED ...
0:00:00.079840052  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvoverlaysink-nvoverlaysink0> current NULL pending VOID_PENDING, desired next READY
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and Mjstreaming0:00:00.092353802  3297      0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvoverlaysink-nvoverlaysink0> completed state change to READY
0:00:00.092402500  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvoverlaysink-nvoverlaysink0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.092470208  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvoverlaysink-nvoverlaysink0' changed state to 2(READY) successfully
0:00:00.092518333  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvconv0> current NULL pending VOID_PENDING, desired next READY
0:00:00.092560260  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvvconv0> completed state change to READY
0:00:00.092588958  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvvconv0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.092624427  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvvconv0' changed state to 2(READY) successfully
0:00:00.092661094  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current NULL pending VOID_PENDING, desired next READY
0:00:00.092693385  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to READY
0:00:00.092693385  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to READY
0:00:00.092720052  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.092753437  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 2(READY) successfully
0:00:00.092786719  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<v4l2src0> current NULL pending VOID_PENDING, desired next READY
libv4lconvert: warning more framesizes then I can handle!
0:00:00.155535521  3297       0x426800 INFO                    v4l2 v4l2_calls.c:587:gst_v4l2_open:<v4l2src0> Opened device 'vi-output-0, ov5640 30-003c' (/dev/video0) successfully
0:00:00.155634427  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to READY
0:00:00.155720990  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.155770573  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 2(READY) successfully
0:00:00.155816458  3297       0x426800 INFO              GST_STATES gstelement.c:2347:gst_element_continue_state:<pipeline0> committing state from NULL to READY, pending PAUSED, next PAUSED
0:00:00.155847448  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed NULL to READY (PAUSED pending)
0:00:00.155927760  3297       0x426800 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<pipeline0> continue state change READY to PAUSED, final PAUSED
0:00:00.155982135  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvoverlaysink-nvoverlaysink0> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.156040885  3297       0x426800 INFO              GST_STATES gstbin.c:2770:gst_bin_change_state_func:<pipeline0> child 'nvoverlaysink-nvoverlaysink0' is changing state asynchronously to PAUSED
0:00:00.156078333  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvconv0> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.156134792  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvvconv0> completed state change to PAUSED
0:00:00.156165417  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvvconv0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.156202083  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvvconv0' changed state to 3(PAUSED) successfully
0:00:00.156236771  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.156306406  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to PAUSED
0:00:00.156334479  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.156391198  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 3(PAUSED) successfully
0:00:00.156424531  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<v4l2src0> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.156518125  3297       0x426800 INFO                 basesrc gstbasesrc.c:1344:gst_base_src_do_seek:<v4l2src0> seeking: time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:00.156592969  3297       0x426800 INFO                    task gsttask.c:451:gst_task_set_lock: setting stream lock 0x5a00a0 on task 0x4d5050
0:00:00.156626406  3297       0x426800 INFO                GST_PADS gstpad.c:5969:gst_pad_start_task:<v4l2src0:src> created task 0x4d5050
0:00:00.156745260  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to PAUSED
0:00:00.156783073  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.156821250  3297       0x426800 INFO              GST_STATES gstbin.c:2807:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 3(PAUSED) successfully without preroll
0:00:00.156862500  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<pipeline0> completed state change to PAUSED
0:00:00.156901979  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.156874740  3297       0x5c1050 INFO        GST_ELEMENT_PADS gstelement.c:904:gst_element_get_static_pad: no such pad 'sink' in element "v4l2src0"
Pipeline is live and does not need PREROLL ...
0:00:00.157264635  3297       0x5c1050 INFO                    v4l2 gstv4l2object.c:1143:gst_v4l2_object_fill_format_list:<v4l2src0> got 5 format(s):
0:00:00.157305052  3297       0x5c1050 INFO                    v4l2 gstv4l2object.c:1149:gst_v4l2_object_fill_format_list:<v4l2src0>   UYVY
0:00:00.157339740  3297       0x5c1050 INFO                    v4l2 gstv4l2object.c:1149:gst_v4l2_object_fill_format_list:<v4l2src0>   YU12 (emulated)
0:00:00.157370521  3297       0x5c1050 INFO                    v4l2 gstv4l2object.c:1149:gst_v4l2_object_fill_format_list:<v4l2src0>   YV12 (emulated)
0:00:00.157400417  3297       0x5c1050 INFO                    v4l2 gstv4l2object.c:1149:gst_v4l2_object_fill_format_list:<v4l2src0>   BGR3 (emulated)
0:00:00.157428281  3297       0x5c1050 INFO                    v4l2 gstv4l2object.c:1149:gst_v4l2_object_fill_format_list:<v4l2src0>   RGB3 (emulated)
0:00:00.157472448  3297       0x5c1050 WARN                    v4l2 gstv4l2object.c:2618:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Unknown frame sizeenum type for pixelformat UYVY: 0
Setting pipeline to PLAYING ...
0:00:00.157849010  3297       0x426800 INFO               GST_EVENT gstevent.c:1253:gst_event_new_latency: creating latency event 0:00:00.000000000
0:00:00.157938385  3297       0x426800 INFO                     bin gstbin.c:2593:gst_bin_do_latency_func:<pipeline0> configured latency of 0:00:00.000000000
0:00:00.158071458  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvoverlaysink-nvoverlaysink0> current READY pending PAUSED, desired next PLAYING
0:00:00.158104844  3297       0x426800 INFO              GST_STATES gstbin.c:2770:gst_bin_change_state_func:<pipeline0> child 'nvoverlaysink-nvoverlaysink0' is changing state asynchronously to PLAYING
0:00:00.158137656  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvconv0> current PAUSED pending VOID_PENDING, desired next PLAYING
0:00:00.158170677  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvvconv0> completed state change to PLAYING
0:00:00.158197917  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvvconv0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
0:00:00.158232812  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvvconv0' changed state to 4(PLAYING) successfully
0:00:00.158267656  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current PAUSED pending VOID_PENDING, desired next PLAYING
0:00:00.158298750  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to PLAYING
0:00:00.158325052  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
0:00:00.158358594  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 4(PLAYING) successfully
0:00:00.158395573  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to PLAYING
0:00:00.158423073  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
0:00:00.158456302  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 4(PLAYING) successfully
New clock: GstSystemClock
0:00:01.167228281  3297       0x5c1050 WARN                    v4l2 gstv4l2object.c:2618:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Unknown frame sizeenum type for pixelformat YU12: 0
0:00:02.579168332  3297       0x5c1050 WARN                    v4l2 gstv4l2object.c:2618:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Unknown frame sizeenum type for pixelformat YV12: 0
0:00:03.990961769  3297       0x5c1050 WARN                    v4l2 gstv4l2object.c:2618:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Unknown frame sizeenum type for pixelformat BGR3: 0
0:00:05.402383904  3297       0x5c1050 WARN                    v4l2 gstv4l2object.c:2618:gst_v4l2_object_probe_caps_for_format:<v4l2src0> Unknown frame sizeenum type for pixelformat RGB3: 0
0:00:06.813142654  3297       0x5c1050 INFO                    v4l2 gstv4l2object.c:3811:gst_v4l2_object_get_caps:<v4l2src0> probed caps: video/x-raw, format=(string)UYVY, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1; video/x-raw, format=(string)I420, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1; video/x-raw, format=(string)YV12, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1; video/x-raw, format=(string)BGR, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB; video/x-raw, format=(string)RGB, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB
0:00:07.410417237  3297       0x5c1050 INFO                    v4l2 gstv4l2object.c:2777:gst_v4l2_object_setup_pool:<v4l2src0> accessing buffers via mode 2
0:00:07.410742028  3297       0x5c1050 INFO          v4l2bufferpool gstv4l2bufferpool.c:551:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> increasing minimum buffers to 2
0:00:07.410790987  3297       0x5c1050 INFO          v4l2bufferpool gstv4l2bufferpool.c:564:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
0:00:07.410854424  3297       0x5c1050 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-raw, format=(string)UYVY, framerate=(fraction)100/1, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1
0:00:07.410993591  3297       0x5c1050 INFO           basetransform gstbasetransform.c:1367:gst_base_transform_setcaps:<capsfilter0> reuse caps
0:00:07.411031612  3297       0x5c1050 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-raw, format=(string)UYVY, framerate=(fraction)100/1, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1
0:00:07.411438747  3297       0x5c1050 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-raw(memory:NVMM), framerate=(fraction)100/1, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, format=(string)UYVY
0:00:07.411530622  3297       0x5c1050 ERROR           omxvideosink gstomxvideosink.c:1188:gst_omx_video_sink_setcaps:<nvoverlaysink-nvoverlaysink0> Unsupported format UYVY
0:00:07.411588799  3297       0x5c1050 ERROR           omxvideosink gstomxvideosink.c:1188:gst_omx_video_sink_setcaps:<nvoverlaysink-nvoverlaysink0> Unsupported format UYVY
0:00:07.411621560  3297       0x5c1050 WARN                GST_PADS gstpad.c:4081:gst_pad_peer_query:<nvvconv0:src> could not send sticky events
0:00:07.411757706  3297       0x5c1050 INFO          v4l2bufferpool gstv4l2bufferpool.c:564:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
0:00:07.430629372  3297       0x5c1050 WARN          v4l2bufferpool gstv4l2bufferpool.c:748:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:07.646777028  3297       0x5c1050 INFO                 v4l2src gstv4l2src.c:843:gst_v4l2src_create:<v4l2src0> sync to 0:00:00.010000000 out ts 0:00:07.420895252
0:00:07.647624060  3297       0x5c1050 INFO               GST_EVENT gstevent.c:760:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:07.649151612  3297       0x5c1050 ERROR           omxvideosink gstomxvideosink.c:1188:gst_omx_video_sink_setcaps:<nvoverlaysink-nvoverlaysink0> Unsupported format UYVY
0:00:07.649850883  3297       0x5c1050 INFO                 basesrc gstbasesrc.c:2843:gst_base_src_loop:<v4l2src0> marking pending DISCONT
0:00:07.688441403  3297       0x5c1050 ERROR           omxvideosink gstomxvideosink.c:1188:gst_omx_video_sink_setcaps:<nvoverlaysink-nvoverlaysink0> Unsupported format UYVY
0:00:07.688565570  3297       0x5c1050 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
0:00:07.688624060  3297       0x5c1050 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason not-negotiated (-4)
0:00:07.688686924  3297       0x5c1050 INFO        GST_ERROR_SYSTEM gstelement.c:1879:gst_element_message_full:<v4l2src0> posting message: Internal data flow error.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:07.530536247
Setting pipeline to PAUSED ...
0:00:07.689085310  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvoverlaysink-nvoverlaysink0> current READY pending PAUSED, desired next PAUSED
0:00:07.689118903  3297       0x426800 INFO              GST_STATES gstbin.c:2770:gst_bin_change_state_func:<pipeline0> child 'nvoverlaysink-nvoverlaysink0' is changing state asynchronously to PAUSED
0:00:07.689150622  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvconv0> current PLAYING pending VOID_PENDING, desired next PAUSED
0:00:07.689181612  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvvconv0> completed state change to PAUSED
0:00:07.689203799  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvvconv0> notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending)
0:00:07.689243955  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvvconv0' changed state to 3(PAUSED) successfully
0:00:07.689276351  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current PLAYING pending VOID_PENDING, desired next PAUSED
0:00:07.689303278  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to PAUSED
0:00:07.689323695  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending)
0:00:07.689353018  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 3(PAUSED) successfully
0:00:07.689381195  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<v4l2src0> current PLAYING pending VOID_PENDING, desired next PAUSED
0:00:07.689417862  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to PAUSED
0:00:07.689439007  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending)
0:00:07.689468226  3297       0x426800 INFO              GST_STATES gstbin.c:2807:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 3(PAUSED) successfully without preroll
0:00:07.689498278  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<pipeline0> completed state change to PAUSED
Setting pipeline to READY ...
0:00:07.689563643  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvoverlaysink-nvoverlaysink0> current READY pending PAUSED, desired next READY
0:00:07.689643330  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvoverlaysink-nvoverlaysink0> completed state change to READY
0:00:07.689667028  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvoverlaysink-nvoverlaysink0> notifying about state-changed READY to READY (VOID_PENDING pending)
0:00:07.689697914  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvoverlaysink-nvoverlaysink0' changed state to 2(READY) successfully
0:00:07.689727185  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvconv0> current PAUSED pending VOID_PENDING, desired next READY
0:00:07.690350987  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvvconv0> completed state change to READY
0:00:07.690390414  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvvconv0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
0:00:07.690430466  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvvconv0' changed state to 2(READY) successfully
0:00:07.690466091  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current PAUSED pending VOID_PENDING, desired next READY
0:00:07.690522132  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to READY
0:00:07.690545466  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
0:00:07.690577862  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 2(READY) successfully
0:00:07.694248695  3297       0x5c1050 INFO        GST_ERROR_SYSTEM gstelement.c:1902:gst_element_message_full:<v4l2src0> posted error message: Internal data flow error.
0:00:07.694328695  3297       0x5c1050 INFO                    task gsttask.c:316:gst_task_func:<v4l2src0:src> Task going to paused
0:00:07.739247757  3297       0x5c1050 INFO                    task gsttask.c:318:gst_task_func:<v4l2src0:src> Task resume from paused
0:00:07.739475778  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to READY
0:00:07.739534893  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
0:00:07.739577601  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 2(READY) successfully
0:00:07.739619216  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<pipeline0> completed state change to READY
0:00:07.739646768  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
0:00:07.739703799  3297       0x426800 INFO              GST_STATES gstbin.c:1915:gst_bin_get_state_func:<pipeline0> getting state
Setting pipeline to NULL ...
0:00:07.739785726  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvoverlaysink-nvoverlaysink0> current READY pending VOID_PENDING, desired next NULL
0:00:07.739834476  3297       0x426800 INFO                     omx gstomx.c:758:gst_omx_component_free:<nvoverlaysink-nvoverlaysink0> Unloading component 0x4296e0 yuv420
0:00:07.739878018  3297       0x426800 INFO                     omx gstomx.c:1833:gst_omx_port_deallocate_buffers_unlocked:<nvoverlaysink-nvoverlaysink0> Deallocating buffers of yuv420 port 0
0:00:07.740100726  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvoverlaysink-nvoverlaysink0> completed state change to NULL
0:00:07.740139320  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvoverlaysink-nvoverlaysink0> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:07.740182289  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvoverlaysink-nvoverlaysink0' changed state to 1(NULL) successfully
0:00:07.740219476  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvconv0> current READY pending VOID_PENDING, desired next NULL
0:00:07.740259007  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvvconv0> completed state change to NULL
0:00:07.740286403  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvvconv0> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:07.740319528  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvvconv0' changed state to 1(NULL) successfully
0:00:07.740353070  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current READY pending VOID_PENDING, desired next NULL
0:00:07.740401039  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to NULL
0:00:07.740434789  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:07.740474476  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 1(NULL) successfully
0:00:07.740506195  3297       0x426800 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<v4l2src0> current READY pending VOID_PENDING, desired next NULL
0:00:07.760692341  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to NULL
0:00:07.760758435  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:07.760822601  3297       0x426800 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 1(NULL) successfully
0:00:07.760907810  3297       0x426800 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<pipeline0> completed state change to NULL
0:00:07.760939476  3297       0x426800 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed READY to NULL (VOID_PENDING pending)
Freeing pipeline ...
0:00:07.761010518  3297       0x426800 INFO        GST_ELEMENT_PADS gstpad.c:2069:gst_pad_unlink: unlinking v4l2src0:src(0x5a0030) and capsfilter0:sink(0x5a0930)
0:00:07.761057185  3297       0x426800 INFO        GST_ELEMENT_PADS gstpad.c:2123:gst_pad_unlink: unlinked v4l2src0:src and capsfilter0:sink
0:00:07.761098487  3297       0x426800 INFO        GST_ELEMENT_PADS gstpad.c:2069:gst_pad_unlink: unlinking capsfilter0:src(0x5a0b70) and nvvconv0:sink(0x5a0270)
0:00:07.761150362  3297       0x426800 INFO        GST_ELEMENT_PADS gstpad.c:2123:gst_pad_unlink: unlinked capsfilter0:src and nvvconv0:sink
0:00:07.761192341  3297       0x426800 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "capsfilter0"
0:00:07.761240049  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<capsfilter0> dispose
0:00:07.761269424  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<capsfilter0> removing pad 'sink'
0:00:07.761307914  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<capsfilter0> removing pad 'src'
0:00:07.761341612  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<capsfilter0> parent class dispose
0:00:07.761369112  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<capsfilter0> finalize
0:00:07.761394632  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<capsfilter0> finalize parent
0:00:07.761424060  3297       0x426800 INFO        GST_ELEMENT_PADS gstpad.c:2069:gst_pad_unlink: unlinking nvvconv0:src(0x5a04b0) and nvoverlaysink-nvoverlaysink0:sink(0x5a06f0)
0:00:07.761463278  3297       0x426800 INFO        GST_ELEMENT_PADS gstpad.c:2123:gst_pad_unlink: unlinked nvvconv0:src and nvoverlaysink-nvoverlaysink0:sink
0:00:07.761507445  3297       0x426800 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "nvoverlaysink-nvoverlaysink0"
0:00:07.761545414  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<nvoverlaysink-nvoverlaysink0> dispose
0:00:07.761576247  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<nvoverlaysink-nvoverlaysink0> removing pad 'sink'
0:00:07.761610049  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<nvoverlaysink-nvoverlaysink0> parent class dispose
0:00:07.761638278  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<nvoverlaysink-nvoverlaysink0> finalize
0:00:07.761671039  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<nvoverlaysink-nvoverlaysink0> finalize parent
0:00:07.761714789  3297       0x426800 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "nvvconv0"
0:00:07.761749164  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<nvvconv0> dispose
0:00:07.761775205  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<nvvconv0> removing pad 'sink'
0:00:07.761808799  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<nvvconv0> removing pad 'src'
0:00:07.761841976  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<nvvconv0> parent class dispose
0:00:07.761870622  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<nvvconv0> finalize
0:00:07.761896351  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<nvvconv0> finalize parent
0:00:07.761944632  3297       0x426800 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "v4l2src0"
0:00:07.761988174  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<v4l2src0> dispose
0:00:07.762019789  3297       0x426800 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<v4l2src0> removing pad 'src'
0:00:07.762051612  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<v4l2src0> parent class dispose
0:00:07.762080257  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<v4l2src0> finalize
0:00:07.762105362  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<v4l2src0> finalize parent
0:00:07.762131195  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<pipeline0> dispose
0:00:07.762179893  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<pipeline0> parent class dispose
0:00:07.762209268  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<pipeline0> finalize
0:00:07.762233591  3297       0x426800 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<pipeline0> finalize parent
0:00:07.762260935  3297       0x426800 INFO                GST_INIT gst.c:960:gst_deinit: deinitializing GStreamer
0:00:07.767234060  3297       0x426800 INFO                GST_INIT gst.c:1097:gst_deinit: deinitialized GStreameri

Hi Allen,
Please follow the steps to complete the JPEG encoding function.
1 Run the command
$ gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 ! ‘video/x-raw,width=1920,height=1080,format=(string)UYVY’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=(string)NV12’ ! nvoverlaysink
With output format being set, it should work fine.
2 Try the pre-release sample attached. You should see preview by running
$ ./camera_v4l2_cuda -d /dev/video0 -s 1920x1080 -f UYVY -n 30
3 Refer to 09_camera_jpeg_capture and pass (Fd) to jpeg encoder. The flow is V4L2 camera → NvBuffer(fd) → jpeg encoder
tegra_multimedia_api_sample_pre_release.tar.gz (15 KB)

Hi, AaneLLL

  1. It works.
  2. It works fine too. I replace libnvbuf_utils.so.1.0.0 with libnvbuf_utils.so from tegra_multimedia_api_sample_pre_release.tar. There is no libv4l2_nvvidconv.so from tegra_multimedia_api_sample_pre_release.tar. I think there is a name mistake with them i guess. Correct me if i was wrong.
lrwxrwxrwx   1 root root       23 Jan  4 03:32 libnvbuf_utils.so -> libnvbuf_utils.so.1.0.0*

3.Could you give more details about it?

More close to success. Thanks a lot.

The log for 09_camera_jpeg_capture

ubuntu@tegra-ubuntu:~/tegra_multimedia_api/samples/09_camera_jpeg_capture$ ./camera_jpeg_capture
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: No module data found
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
CONSUMER: Waiting until producer is connected...
CONSUMER: Waiting until producer is connected...
PRODUCER: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
CONSUMER: Producer has connected; continuing.
(NvOdmDevice) Error NotInitialized: V4L2Device not powered on (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1127)
(NvOdmDevice) Error NotInitialized: V4L2Device not powered on (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1127)
Sensor_GetV4LPixelType: pixel type 0x12 invalid
(NvOdmDevice) Error BadParameter: 0x30314752 pixelFormat not found under current active buffer type (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function setActivePixelFormat(), line 933)
Sensor_WriteMode: Sensor_EnableStreamingConfiguration FAILED
(NvOdmDevice) Error InvalidState: Invalid active Mode Size (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1130)
(NvOdmDevice) Error InvalidState: Invalid active Mode Size (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1130)
(NvOdmDevice) Error InvalidState: Invalid active Mode Size (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1130)
(NvOdmDevice) Error InvalidState: Invalid active Mode Size (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1130)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc
launchCC abort cc 104

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
(Argus) Error Timeout: Failed to submit first capture request (propagating from src/api/CaptureSessionImpl.cpp, function submitCaptureRequests(), line 301)
(Argus) Error Timeout:  (propagating from src/api/CaptureSessionImpl.cpp, function threadFunction(), line 741)
Error: waitCsiFrameStart timeout guid 0
Error: waitCsiFrameStart Something went wrong with waiting on frame start
Error: waitCsiFrameStart Something went wrong with waiting on frame start
(NvOdmDevice) Error InvalidState: Invalid active Mode Size (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1130)

Hi Allen,
In the pre-release sample, you can see the camera frame is sent to renderer via Fd:

// Render the frame into display
    if (v4l2_buf->m.planes[0].bytesused)
        ctx->renderer->render(buffer->planes[0].fd);

And you should replace it with the code in 09_camera_jpeg_capture

{
        unsigned long size = JPEG_BUFFER_SIZE;
        unsigned char *buffer = m_OutputBuffer;
        m_JpegEncoder->encodeFromFd(fd, JCS_YCbCr, &buffer, size);
        outputFile->write((char *)buffer, size);
        delete outputFile;
}

In other words, move the jpeg encoding codes from 09_camera_jpeg_capture to the pre-release sample.

Hi, DaneLLL

I got the jpeg file follow your direction.

Many thanks.