[libav-api] read UDP Stream

Evgeny Yakimov john.yakimov at gmail.com
Tue Dec 6 15:17:29 CET 2011

Hmm, I recommend you first make sure that VLC is pushing a UDP stream that
libav can actually read,

The easiest way to do this would be to compile libav with avconv (or
ffmpeg) which is enabled by default anyways and run:
avconv -i udp://:1500 -vcodec copy -acodec copy -f mpegts /tmp/test.ts

If you get a lot of errors and it takes ages to open the file , then your
UDP buffer size maybe too small, this link explains how to do it (you dont
need to set any tcp settings)

I've tried to put together an example made from my scenario, it misses some
variable declerations such as pkt, orig and the AVStreams AVCodecContexts
and a few other things, but you can work them out from the return types of
the libav function calls:


You can find more info on the library reference here:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-api/attachments/20111206/a666fa6a/attachment.html>

More information about the libav-api mailing list