problems using libavcodec/format to recieve a RTSP stream

closed account (236Rko23)
hi everyone, i'm doing an app to display a stream directly from an ip camera to the screen. so far i can decode from a file on the disk, but now i got stuck with the streaming part.

i'm using libavcodec and format, and opengl/sdl for display, the problem is ffmpeg, as everyone know, lacks a lot of documentation, and i can't find any single clue about how to recieve a rtsp stream.....ffmpeg supports rtsp, so it should work...
from the camera i have this link rtsp://1.1.1.1/live.sdp, (in http you get the rtsp descriptor. )
using url_open() it returns errno 2 aka file or dir not found. tried with a disk path and worked showing prot=file. with a http url the same prot=http.


1
2
3
4
5
6
7
8
9
10
11
void test(){
//const char* url = {"rtsp://192.168.1.12/live.sdp"};
const char* url = {"http://192.168.1.12/video2.mjpg"};
//const char* url = {"/media/Verbatim/Programacion/test_videos/000053_cam0.avi"};

URLContext** ppuc = new URLContext*;

int rc = url_open( ppuc, url, URL_RDONLY);

exit(0);
}



any idea?
Last edited on
Topic archived. No new replies allowed.