Hi,
It only accepts UYVY in nvv4l2camerasrc. For launching source with YUYV(YUY2) format, you would need to customize the plugin. It it open source in
https://developer.nvidia.com/embedded/linux-tegra
L4T Driver Package (BSP) Sources
Please download it and take a look. The implementation is based on jetson_multiemdia_api. For YUYV, please apply the patch:
diff --git a/gst-nvv4l2camera/gstnvv4l2camerasrc.cpp b/gst-nvv4l2camera/gstnvv4l2camerasrc.cpp
index 26ad70c..ad0a512 100644
--- a/gst-nvv4l2camera/gstnvv4l2camerasrc.cpp
+++ b/gst-nvv4l2camera/gstnvv4l2camerasrc.cpp
@@ -61,7 +61,7 @@
"video/x-raw(memory:NVMM), " \
"width = (int) [ 1, MAX ], " \
"height = (int) [ 1, MAX ], " \
- "format = (string) { UYVY }, " \
+ "format = (string) { YUY2 }, " \
"interlace-mode = (string) { progressive, interlaced }, " \
"framerate = (fraction) [ 0, MAX ];"
@@ -194,7 +194,7 @@ gst_nv_memory_allocator_alloc (GstAllocator * allocator,
input_params.height = self->height;
}
input_params.layout = NvBufferLayout_Pitch;
- input_params.colorFormat = NvBufferColorFormat_UYVY;
+ input_params.colorFormat = NvBufferColorFormat_YUYV;
input_params.payloadType = NvBufferPayload_SurfArray;
input_params.nvbuf_tag = NvBufferTag_CAMERA;
@@ -229,7 +229,7 @@ gst_nv_memory_allocator_alloc (GstAllocator * allocator,
params.layout = NVBUF_LAYOUT_PITCH;
params.memType = NVBUF_MEM_DEFAULT;
params.gpuId = 0;
- params.colorFormat = NVBUF_COLOR_FORMAT_UYVY;
+ params.colorFormat = NVBUF_COLOR_FORMAT_YUYV;
if (self->interlaced_flag)
{
--