H264 bitstream decoding

Hi,
Can anyone please help me to figure out how to decode raw h264 bitstream from memory and use it with opencv.

From one of the thread posts I understand that the decoding is supported through gstreamer framework and not through ffmpeg.

https://devtalk.nvidia.com/default/topic/1005533/jetson-tk1/ffmpeg-gpu-support-on-tk-1-/

Please suggest.

Hi,
There is a post about camera source + opencv:
https://devtalk.nvidia.com/default/topic/1024245/jetson-tx2/opencv-3-3-and-integrated-camera-problems-/post/5210735/#5210735

You can achieve your usecase by replacing camera source with h264 decoding.

Hi DaneLLL
Thank you for the link. But I could not play the video file with the following piece of code:

cv::VideoCapture cap("filesrc location=/home/ubuntu/test/720p_Ducks_Take_Off.264 ! video/x-raw, width=1280, height=720,format=NV12, framerate=30/1 ! nvvidconv ! video/x-raw,format=I420 ! appsink");

	if (!cap.isOpened())
	{
		std::cout << "Failed to open camera." << std::endl;
		return -1;
	}

	for (;;)
	{
		cv::Mat frame;
		cap >> frame;
		cv::Mat bgr;
		cv::cvtColor(frame, bgr, CV_YUV2BGR_I420);
		cv::imshow("original", bgr);
		cv::waitKey(1);
	}

	cap.release();

720p_Ducks_Take_Off.264 is in annex b byte stream format.

Please refer to user guide.