In Multimedia there is a camera recording source code that uses H@^$ encoding.
thiz->m_outputFile->write((char *) buffer->planes.data,
In the above line I am not able to view the pixel data in the pointer (char*)buffer->planes.data.
Can you please guide how to view the image pointer data before writing it to the file.
The buffer->planes.data is compressed h264 stream, not pixel data. For checking pixel data, please get data pointer to NvBuffer.
Can you please guide how to get the image pointer using data pointer to NvBuffer.
Please refer to 10_camera_record sample. There is demo code about getting data pointer and modifying some pixels.
Can you give an example snippet of recording the pixel data from 10_camera_record sample.
If your camera source is a bayer sensor and the sensor driver is ready, you can run the sample directly and get a valid h264 stream.
Hi @DaneLLL ,
We need to do some post processing on our H264 stream and save the video stream.
So we need to know the exact position where the image pointer is handled to do the processing.
Kindly let us know.
The samples are for demonstrating some functions and can be reference for developing certain use-case. May not be able to fit your use-case exactly and would need to take some time to look into the code. For 10_camera_recording, it is run like:
Capture frames through Argus -> modify some pixels in the frame through NvBuffer APIs -> encode into h264 stream
Please grep NvBufferMemMap() in the sample and you should see the related code.
The sample is for Bayer sensor. If your camera source is YUV sensor or USB camera, please check 12_camera_v4l2_cuda sample
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.