In order to encode a sequence of images to a file I have written a function 
that works very well. I can produce a h264, theora, mpeg4 
and webm files.
With this row:

if (avio_open(&pFormatCtx->pb, "b.mp4", AVIO_FLAG_WRITE)< 0) ...

I decide the name of the output file (in this case is "b.mp4"). If I modify the 
row in this mode:

if (avio_open(&pFormatCtx->pb, "http://localhost:3000";, AVIO_FLAG_WRITE)< 0) ...

automatically the output is sent to that web server. The problem is that I want 
to send the output at a buffer that I can read.
I have tried in this mode:

if (avio_open(&pFormatCtx->pb, NULL, AVIO_FLAG_WRITE)< 0) ...
pFormatCtx->pb->opaque= this;
pFormatCtx->pb->write_packet= WritePacket; // Callback
pFormatCtx->pb->write_flag= AVIO_FLAG_WRITE;


but does not work. The file is not correct. mplayers can play it only in mpegts 
but not with the others codecs.

The question is: Wich is the right way to encode in a buffer and not in a file? 
I am surfing on the web from many weeks without find the 
solution. I am studing the source of ffmpeg and ffserver but nothing. Can you 
help me?

-- 
www.denisgottardello.it
Skype: mrdebug
Videosurveillance and home automation! 
http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to