V4l2 buffer time stamp for ov5693 camera on Tx2 SDK32.4.3

I am using ov5693 camera and i want to capture time stamp in v4l2 buffer for ov5693.

i found that

kernel/nvidia/drivers/media/platform/tegra/camera/vi/channel.c

is the function

  • Update the timestamp of the buffer
    */
    void set_timestamp(struct tegra_channel_buffer *buf,
    const struct timespec *ts)

this updates the time in v4l2 buffer right?? i want to sync the camera video data with externel sync pulse who will have its own time and want to update that time in camera captured frame.

Any help will be appreciated.

This source only for raw capture. If you need to get the timestamp from the ISP pipeline need to implement argus APP.

https://docs.nvidia.com/jetson/l4t-multimedia/classArgus_1_1ICaptureMetadata.html#ae4ff79489b0aef6766742a61d1a17cfc

only API is is the method to capture time stamp from ISP?

do we have some example avialbe who can capture using argus APP??have you tried on ov5693

Have a check the yuvJpeg sample code of the jetson-multimedia-api.

sudo apt list -a nvidia-l4t-jetson-multimedia-api
sudo apt install nvidia-l4t-jetson-multimedia-api=xxxxxx

my use case is that…i wan to update the time stamp of captured video buffer…how i can do that using this multimedia api…

i wan to update my own time stamp on this capture video…will i be able to do that?

Hi,
Please check the sample:

/usr/src/jetson_multimedia_api/samples/01_video_encode

There is an option:

--copy-timestamp <st> Enable copy timestamp with start timestamp(st) in seconds

You can refer to it for assigning manual timestamps to v4l2 buffers.

Hi Dane,
I am using gst-launch nvcamerargus command to capture video…so is it possible to pass own time stamp in this commnd so that v4l2 buffer and copy it.

so my use case is that i wan to assign my own time time stamp during video capture(this time stamp assigning time is at every 33 ms)

so it is not possibe to directly do in v4l2- core driver source code??

Hi,
The nvarguscamerasrc plugin is open source. You can download the source code, apply the logic of overwriting timestamps, and rebuid/replace it. The source code is in
https://developer.nvidia.com/EMBEDDED/linux-tegra
L4T Driver Package (BSP) Sources

Hi,can you please help me out …in which file of nvarguscamera we have to do changes for time stamp??

Hi Dane,
can you please tell where i have to do changes for overwriting timestamp

gst-launch-1.0 nvarguscamerasrc sensor-id=0 num-buffers=500 ! ‘video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12’ ! omxh264enc ! qtmux ! filesink location=inward.mp4 -e

this is the command i am using to capture video…to enable time stamp what paramter i need to add here.

Hi,
Please check consumer_thread() in the source code. The timestamps are in pts in GstBuffer:
https://gstreamer.freedesktop.org/documentation/gstreamer/gstbuffer.html?gi-language=c