[Solved] Open h264 RTSP Camera OpenCV 3.1.0

asked 2016-07-13 04:59:11 -0600

ClementD gravatar image

updated 2016-07-20 08:27:28 -0600

Hello ,

i wrote a little programme to open a camera with openCV and it always fails.

The error message is :

[rtsp @ 00000000003f7fc0] method SETUP failed: 461 Unsuported transport warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:578)

I have already been looking for solutions on furoms like : http://code.opencv.org/issues/2235 the modifications into the "cap_ffmpeg_impl.hpp" are already included in 3.1.0 and it's still fail openning the stream.

I do want to know if there is an existing solution for this problem.

Thanking you in advance,

Clément

Solution :

I finally solved the probleme using this example The solution uses libVlc to decode Frames and, by changing callbacks, creating cv::Mat.

I can give you my code if someone doesn't understand the example.

edit retag flag offensive close merge delete

Comments

Hello.

I am trying to use sources from this repository github.com/MicrocontrollersAndMore/OpenCV_3_Car_Counting_Cpp/blob/master/main.cpp#L46, but work with rtsp stream, not with file. I'm trying to modify the code but I still can not run the rtsp stream. Could to post your working example of code?

Dimasmir gravatar imageDimasmir ( 2017-03-10 00:52:55 -0600 )edit

@Dimasmir , please do not post an answer, if you have a question or comment ..

berak gravatar imageberak ( 2017-03-10 00:57:40 -0600 )edit

@ClementD: I am currently trying to read an h264 RTSP stream using LibVLC and converting it to an OpenCV Mat. Could you share your code for the solution? Currently running OpenCV 3.2 on Ubuntu 16.04 using LibVLC 2.2.5.1 :)

ThorbjornSomod gravatar imageThorbjornSomod ( 2017-04-26 04:19:50 -0600 )edit

Hi, @ClementD, @ThorbjornSomod I want to do the same thing but i don't understand how to do it. A sample code will be useful

psykomusic gravatar imagepsykomusic ( 2017-05-23 03:04:25 -0600 )edit