[Libav-user] Mux output to buffer instead of file

Carl Lindqvist lulebo at gmail.com
Tue May 22 10:09:36 CEST 2012


2012/5/21 Carl Lindqvist <lulebo at gmail.com>

> Hello!
>
> This is my first post on this list. I am sorry if this has come up before,
> but I have been searching the archives and can't find a good answer to this.
>
> I have an application that encodes an incoming video stream and muxes it
> as a transport stream. This is working great when writing to a file like in
> the example muxing.c.
>
> Now what I would like to do is to capture the muxed output in a RAM buffer
> (queue of some sort) instead of writing directly to file. Is this possible?
>
> The reason is that I will be encoding the signal continuously, but the
> finished muxed TS will be passed on to different places and files as the
> application is running. Sometimes it will be written to multiple
> destinations at once and stuff like that.
>
> Any help is much appreciated!
>
> Thank you
>
> Regards
> Carl Lindqvist
>


After some more reading on the subject, I understand that I must implement
my own URLProtocol using something like file.c as a base.

I am writing my application in C++ and would like to implement the
buffer/queue system in a C++ class. How would I tell my protocol about this
class?

Also, if I do this, I have to recompile the libav libraries with this new
protocol. WIll this affect the licences of how I may use this in a
commercial application?

I have also seen something about using "avio_open_dyn_buf" and
"avio_close_dyn_buf" instead, but I haven't gotten my head around that yet.

Regards
Carl Lindqvist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120522/545808a5/attachment.html>


More information about the Libav-user mailing list