[Libav-user] Mux output to buffer instead of file
Daniel Henell
henell at gmail.com
Tue May 22 10:35:11 CEST 2012
Hello,
I did this in an previous project. The code is available here
https://github.com/EvilTengil/kinect-streamer/blob/master/src/kstreamer/ffv1_depth_encoder.cpp
Best,
Daniel Henell
On Tue, May 22, 2012 at 5:09 PM, Carl Lindqvist <lulebo at gmail.com> wrote:
> 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
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
More information about the Libav-user
mailing list