FFMPEG API: How to connect to RTSP stream using av_open_input_file?

I’m trying to connect to some RTSP stream using av_open_input_file() like this:

AVFormatContext* ic; avcodec_register_all(); av_register_all(); av_open_input_file(&ic, “rtsp://login:[email protected]/videoinput_1/mjpeg/media.stm”, NULL, 4096, NULL);

It always returns ‘file not found’. The same url, though, I can see in, say, VLC player. Do I do something wrong in my code?

I’m using FFMPEG 0.6, shall I use the latest instead?



reading rtsp stream using ffmpeg (latest) api

can anyone guide me how to capture rtsp stream data using ffmpeg latest api. The examples are not compiling on the latest ffmpeg 0.8 release.

Receiving RTSP stream using FFMPEG library

I have an IPCamera on my LAN streaming video using RTSP. I have been able to capture and display it successfully using ffplay command: ffplay rtsp://admin:[email protected]:7070 (with authentication

FFmpeg: How to control console output while reading from RTSP?

So I created simple Consol app: FFmpeg RTSP Video stream reader (using only general FFmpeg C API) But while ffmpeg reads from RTSP it shows lots of info. I did not asked for if… At least not all of

Recognizing ffmpeg’s rtsp disconnecting

Can I recognizing such events as ConnectionLost while using ffmpeg for reading rtsp stream for doing reconnect??

Record RTSP stream with FFmpeg libavformat

I’m trying to record RTSP stream from Axis camera with FFmpeg libavformat. I can grab video from files and then save it to another file, this is OK. But camera sends strange data, FPS is 100 and camer

Can not play local rtsp URL using FFmpeg in iOS

I am using FFmpeg for stream rtsp URL in iOS. I am trying to stream a local url but my app is failed to open url avformat_open_input method always return -5 I have played the same url rtsp://172.16.1.

Embedding an RTSP stream on a web page using QuickTime

I am attempting to embed an rtsp stream from an IP camera, using the quicktime plugin. Currently I can connect to the RTSP stream both locally and externally using QuickTime player, however when I att

How to convert RTSP stream into flv/swf Stream (w. ffmpeg)?

I want embed a webcam stream (From geovision video server) into a website. Unfortunately only the rtsp stream gives direct access to the video data. I tried a bunch of different variants. With this ve

FFMPEG to send RTSP encoded stream C++

I am trying to figure out a way to take an encoded H264 image that I have created in FFMEG and send it out via RTSP using FFMPEG, is there some sample code or a tutorial out there that shows how to do

How to acquire image stream from RTSP camera through HTTP?

I was wondering if I can use an HTTP protocol to acquire an image stream from an RTSP camera? I am currently using VLC Media ActiveX Plugin to connect to and view the RTSP stream, but I would like to

Answers

Turned out I did not enable network support when building FFMPEG.

The following options worked for me:

–enable-network –enable-protocol=tcp –enable-demuxer=rtsp –enable-decoder=h264