[Libav-user] Server out stream as RTP

Simon Brown simon.k.brown at gmail.com
Mon Sep 26 17:10:28 EEST 2016

> With ffmpeg or writing code to use the libs?
> Probably get more ffmpeg help over in ffmpeg-user at ffmpeg.org

With writing code using the libs - I can get it to work with ffmpeg - so I
know it's possible!

>> For my use though, I don't want to wade through ffmpeg.c to find what
>> it's doing, and wanted a much simpler example that isn't transcoding,
>> but just transmitting a ready made transport stream.  I found in the
>> examples directory "http_multiclient.c" and thought this would do for
>> me, at least as a starting point.
>> My problem is that if I start ffplay with "?listen" first, then
>> http_multiclient won't connect, yet if I start http_multiclient first it
>> says "Client not accepted" and aborts.
>> My http_multiclient command line is:
>> ./http_multiclient ts_file tcp://localhost:60010
>> It seems that http_multiclient is trying to listen on the server socket,
>> but not avio_accept is returning immediately with a "client not
>> accepted".  How can I make this work?
>> Regards,
>> Simon
> I was not able to get that sample to work, it always core dumped on
> ret = ffurl_accept(sc, &cc); in libavformat/aviobuf.c
> Prob because of the     av_assert0(!*c); in avio.c since I have a debug
> build.
Ah - not just me then.  Perhaps it should be removed from the distribution
then?  Or fixed?

> If you are trying to write code to do this, start with transcoding.c
> In the main while loop, just use the "else"
>         } else {
>             /* remux this frame without reencoding */
> That should get you pretty close to what you want...ignore the extra code
> open in, open out, while in frame write out frame...
> Thanks
> cco
> Ok, I've taken a look at that, and can't quite see what I'm aiming at -
 do I really need to read a frame at a time, when I'm supplying a TS in
real time from a hardware encoder?  Can't I just open a suitable output
port and push the data out as and when I get it?  Ideally I want RTP over
UDP, but thought starting with TCP might be easier....

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160926/35e65bc8/attachment.html>

More information about the Libav-user mailing list