[Ffmpeg-devel] question on rtsp with libavformat

Michael A. Kohn mike
Thu Jun 22 18:04:56 CEST 2006


ffmpeg doesn't support RTSP on Windows (unless something's changed 
recently).  I submitted a patch that adds this support in, but the patch 
was unfortunately never added in...

If you'd like to try and use the old patch with the new source (I'm 
guessing it won't work anymore) I believe this is the latest patch I 
made...

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-April/009992.html

/mike

On Thu, 22 Jun 2006, sfjester at umd.edu wrote:

> Hello all,
>
> I'm currently working on a program using the avformat and
> avcodec libraries that will take a video file and output a
> jpeg image for each frame.  It's working exactly as I want it
> so far except for one thing: it doesn't work for rtsp stream
> input.
>
>
> Unfortunatly, I really don't have any choice but to write the
> program in VC++, so I've had to use the avformat.dll and
> avcodec.dll files, and since the .lib files are missing, I
> have to use run-time linking.
>
> For the input portion of the code, I followed Martin B?hme's
> demo program closely.
>
>> From what I can tell (which isn't much), rtsp_init() is never
> called, or if it is, because of the run-time linking or
> similar problem it fails to accomplish what it's meant to.
>
> When I call:
> av_open_input_file(&pFormatCtx, stream, NULL, 0, NULL);
>
> The actuall code being (all of this included for each
> function I mention):
>
> typedef int (av_open_input_file)(AVFormatContext**, const
> char*, AVInputFormat*, int, AVFormatParameters*);
> av_open_input_file * avOpen = (av_open_input_file*)
> GetProcAddress(avFormat, "av_open_input_file");
> 	if(avOpen == NULL)
> 		cout<<"couldn't get function 'open
> file'"<<endl;
> 	if((i = avOpen(&pFormatCtx, stream,	pRTSP, 0,
> NULL))<0)
> 	{
> 		cout<<"couldn't open the file, error
> code: "<<i<<endl;
>        }
>
> it returns with error code -2, AVERROR_IO, and in
> av_open_input_file, that can occur by failing the url_fopen
> call.
>
> I then tried to pass the rtsp_demux AVInputFormat instance
> into av_open_input_file directly, after having tried to find
> it through av_find_input_format("rtsp"), but that didn't work
> either, av_find_input_format returned NULL.
>
> I can't even call rtsp_init() myself, as a GetProcAddress to
> find it returns NULL as well.
>
>
>
> I guess I have a number of questions:
> 1) Is rtsp input format supported for what I'm trying to do?
> 2) Is there a better way to open an rtsp stream than through
> av_open_input_file()?
> 3) If not, how do you open an rtsp stream through
> av_open_input_file()?
> 4) Are there better smaple programs to look at that
> output_example.c or the demo program I mentioned before?
> 5) Is there actually some way to accomplish this with these
> libraries, or am I better off trying something else?
> 6) Is there a way to get the missing .lib files so that I
> could try this program with static linking?
>
>
> Thanks much,
> -Scott
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>



More information about the ffmpeg-devel mailing list