FFmpeg hangs when opening UDP

Hello!
I'm doing an app for decoding video feeds to bitmaps using the Tao.FFmpeg in C#. When decoding from file it works fine, but when trying to set an udp-address it hangs at av_op_input_file(). The code is basically a merge of http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html and http://www.taoframework.com/node/648.

unsafe{
FFmpeg.avcodec_init();
FFmpeg.av_register_all();

filename = "udp://192.168.2.9:5000";
IntPtr pFormatCtx = FFmpeg.av_alloc_format_context();

if (Tao.FFmpeg.FFmpeg.av_open_input_file(out pFormatCtx, filename, IntPtr.Zero, 0, IntPtr.Zero) != 0) return false;
[...]

--------------------
The program hangs at av_op_input_file() without returning any error code. Should I use av_op_input_stream(), but I cant find any documentation on that?

Thank for any help!

I found the solution myself

I found the solution myself the address must be given as udp://192.168.2.9?localport=5000

This is not the same as in for example VLC, and not documented.

But now it works perfect!

Theme by La Boite a site | Powered by Drupal