[Ffmpeg-devel] muxing to a memory buffer

Michel Bardiaux mbardiaux
Thu Dec 7 15:58:02 CET 2006


Luca Abeni wrote:
> Hi all,
> 
> for performing some tests, I need to mux an audio and a video stream in
> an MPEG2 TS, and to store such TS in a memory buffer (instead of writing
> it to a file).
> As a first prototype, I wrote a program that writes the TS to a pipe,
> while a second program is reading the pipe and storing the TS in the
> memory buffer... Now, I am wondering what's the best way to obtain the
> same result without using two separate programs and a pipe...
> Would I need to write my own URLProtocol? If yes, how can tell the
> URLProtocol where the output buffer is? (the "open" method of an
> URLProtocol accepts a filename as input). Or there is a better way?
> Suggestions are welcome...
> 

What I do is to register a new protocol called "hpany" and use 
"hpany:0x123456" as URL, where the address points to private data 
describing the buffer (start, max size, used size).

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list