[Libav-user] Mux output to buffer instead of file
lulebo at gmail.com
Tue May 22 10:09:36 CEST 2012
2012/5/21 Carl Lindqvist <lulebo at gmail.com>
> 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
> 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
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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user