[FFmpeg-devel] [PATCH]FLVmetainjection(similartoFLVTOOLS2butanaddon patchfor FFMPEG)

Michael Niedermayer michaelni
Sat Aug 18 01:28:16 CEST 2007


Hi

On Fri, Aug 17, 2007 at 04:32:34PM +0000, andrew wrote:
> Is there a way to insert some bytes into a ByteIOContext (and move the
> remaining bytes after the insertion along) .. put_byte simply overwrites.

no its not possible to insert bytes into a file on most filesystems
efficiently, you can of course move everything by that amount you want to
insert
this has nothing to do with ByteIOContext


> If this is not possible .. is writing a header to a file, and then the stream to
> another file, and then concatenating the stream to the header on
> write_trailer acceptable? 

a muxer cannot access a second file (the computer on which libavformat
runs might not even have a writeable filesystem)
also this is even less efficient than moving all data


> If this is not, then what would be the best way to
> insert information into the header of a stream. when the stream has
> already been written. 

if the stream is seekable you can move all data to make space and
insert the new header
note you need to open a second ByteIOContext for reading or you will
experience problems if you try to mix reads and write in a single
ByteIOContext

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070818/afd1e1d7/attachment.pgp>



More information about the ffmpeg-devel mailing list