Adding a New sensor driver to the JP6 Orin NX

That tell the HW support but current driver doesn’t support it.

could you please give your inputs on this observation. I am actually looking for live h264 video capture and playback to display

Maybe check below link.
You may also search in this forum for reference.

https://docs.nvidia.com/jetson/archives/r35.1/DeveloperGuide/text/SD/Multimedia/AcceleratedGstreamer.html?#cuda-video-post-processing-with-gstreamer-1-0

can you please help on the 4k h264 encoding.

i am using this command to record 300 frame video with a 30fps input, so the pipeline shown below should stop stop in 10 seconds if need to have live encoding.

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 ! video/x-raw,width=3840,height=2160,framerate=30/1,format=UYVY ! nvvidconv ! nvv4l2h264enc ! h264parse ! filesink location=a.h264

With the above command it takes around 16 seconds to finish encoding for a 10second video, attaching the mediainfo , since there is latency in encoding it is affecting the capture also
image

any suggestions ?

i also tried one more experiement
Recorded 300 frame of 4kYUV frames and checked the encoding time it took
“gst-launch-1.0 -e filesrc location=/home/raw.yuv ! rawvideoparse format=uyvy width=3840 height=2160 ! nvvidconv ! nvv4l2h264enc ! h264parse ! mp4mux ! filesink location=raw_encode.mp4”

this took around 19 - 22 seconds.

Hi,
Please check

Jetson AGX Orin FAQ
Q: I have a USB camera. How can I launch it on AGX Orin?

There is a buffer copy when using v4l2src. Please try nvv4l2camerasrc to capture frame data into NVMM buffer directly.

With this old command which i was using it tooks around 15-16 seconds

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=300 ! video/x-raw,width=3840,height=2160,framerate=30/1,format=UYVY ! nvvidconv ! nvv4l2h264enc ! h264parse ! filesink location=old.h264

I recorded a video with this and observed that there was around ~14seconds of data in it


With this new command which i was using it tooks around 11 seconds

gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 num-buffers=300 ! ‘video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1,format=UYVY’ ! nvvidconv ! nvv4l2h264enc ! h264parse ! filesink location=new.h264

I recorded a video with this and observed that there was around ~11seconds of data in it, this is better but still high . For a live capture and encode it should happen at the same or faster speed (capture and encode) . If the encode takes more time then that means there will be some fps drop, As per the above ovservation for 300 frames it took ~11 seconds(sometimes ~12) which means there is loss in frames captures. The encoding should have completeted < 10 seconds (considering the input will be at 30fps)

Is there anything that i need to make sure there will not be any fps drop when doing live capture and encode ?

Also could you please give some info on this behaviour

“i also tried one more experiement
Recorded 300 frame of 4kYUV frames and checked the encoding time it took
“gst-launch-1.0 -e filesrc location=/home/raw.yuv ! rawvideoparse format=uyvy width=3840 height=2160 ! nvvidconv ! nvv4l2h264enc ! h264parse ! mp4mux ! filesink location=raw_encode.mp4”
this took around 19 - 22 seconds.”

Hi,
Please use fpsdisplaysink to check if the source generates frames in steady frame rate:

$ gst-launch-1.0 -v nvv4l2camerasrc device=/dev/video0 num-buffers=300 ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1,format=UYVY' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0

The performance of reading UYVY from storage may be dominated by FIO.

Not sure if it helps but you may try videoparse plugin:

... ! videoparse format=uyvy width=3840 height=2160 ! ...

Thanks for clarifying

The above command was not working, so i checked with the below command

gst-launch-1.0 -v nvv4l2camerasrc device=/dev/video0 num-buffers=300 ! ‘video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1,format=UYVY’ ! nvvidconv ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0

I have also used v4l2ctrl to check the input fps

v4l2-ctl --set-fmt-video=width=3840,height=2160,pixelformat=“UYVY” --set-ctrl bypass_mode=0 --device=/dev/video0 --stream-skip=0 --stream-count=300 --stream-mmap --stream-to=/dev/null
image

Hi,
There was a typo in the command. It is corrected. Please try again.

I have checked with the above command , attaching the logs here,

i have also tried the v4l2 command to check fps

v4l2-ctl --set-fmt-video=width=3840,height=2160,pixelformat=“UYVY” --set-ctrl bypass_mode=0 --device=/dev/video0 --stream-skip=0 --stream-count=300 --stream-mmap --stream-to=/dev/null

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<

There is no update from you for a period, assuming this is not an issue anymore.
Hence, we are closing this topic. If need further support, please open a new one.
Thanks

Is this still an issue to support? Any result can be shared?