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

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)