how to add openh264 to opencv
i want stream IP camera that compression is H264 i download open.h264 from openh
and add system path var OPENH264_LIBRARY
to dll files and even copy dll to my exe path but when i get image from camera this errors occur :
[h264 @ 000001ef9fd88c40] missing picture in access unit with size 120
[h264 @ 000001ef9fd88c40] No start code is found.
[h264 @ 000001ef9fd88c40] Error splitting the input into NAL units.
my code :
video_path = "http://admin:[email protected]:80/video.cgi?&.H264";
mCamera = new cv::VideoCapture();
mCamera->set(CV_CAP_PROP_FOURCC, CV_FOURCC('X', '2', '6', '4'));
isOpenedFile = mCamera->open(video_path);
I don't know what could be problem but I think you should run opencv_test_videoio. You should read this message : [==========] Running 15 tests from 4 test cases. [----------] Global test environment set-up. [----------] 11 tests from Videoio_Video [ RUN ] Videoio_Video.prop_resolution [ OK ] Videoio_Video.prop_resolution (15 ms) [ RUN ] Videoio_Video.actual_resolution [ OK ] Videoio_Video.actual_resolution (53 ms) [ RUN ] Videoio_Video.prop_framecount [ OK ] Videoio_Video.prop_framecount (11 ms) [ RUN ] Videoio_Video.ffmpeg_writebig OpenCV: FFMPEG: tag 0x34363248/'H264' is not supported with codec id 28 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x00000021/'!???'
There is also this issue