sannies / isoviewer

GUI application to have closer look ISO 14496-12 and other MP4 files.
Apache License 2.0
232 stars 55 forks source link

Support for streaming? #4

Closed rankinc closed 9 years ago

rankinc commented 9 years ago

Hi,

We're currently using a heavily customised version of a (very!!) old release of the IsoParser, and are trying to upgrade to the latest version. However, our use-case means that we need to rewrite MP4 metadata "on the fly" - preferrably while it's travelling across the network as an InputStream and has not been written to disk. Our customised version reads all header boxes up to the mdat box into memory and then leaves the rest "on the wire". It then modifies the header and streams the mdat box afterwards; the original IsoFile class made this approach not too difficult. However, not only has the new IsoParser replaced InputStream with a DataSource, but this DataSource must now be seekable! A network stream is obviously not seekable. I think we've come up with some kind of "file-backed cache" approach here, but it feels as if we're fighting a losing battle to bridge what we need the IsoParser to do and where the IsoParser is currently heading. Does the IsoParser need to use a seekable data source? Could there a way of using it that doesn't need the source to be seekable please?

Cheers, Chris