[Live-devel] Storing MPEG-2 TS data over multple 2GB files

Ross Finlayson finlayson at live555.com
Fri Dec 1 12:58:15 PST 2006


>What is the best method for storing incoming MPEG-2 TS data across
>multiple 2GB files? This would be for a scenario where it is not
>possible to store more than 2GB per file, so that the stream would need
>to be segmented into blocks no greater than 2GB on disk.

Is it not possible to upgrade to a more modern operating system that 
supports files larger than 2 GBytes?  (Note that this will work even 
with 32-bit CPUs.)  That would be the best solution.

>
>Specifically, I'm interested in knowing:
>
>1) What is the best place to "split" the stream (on an I-frame boundary?)

I'd say: Split the file on a Transport Stream frame boundary - i.e., 
on a 188-byte boundary.

>2) Can live555 be instructed to treat these multiple files as a single
>logical stream, so that the resultant segmented MPEG-2 data could be
>later streamed to clients without significant additional complication
>such as manually concatenating the files?

While I'm generally disinclined to add hacks to the code to support 
broken (or archaic) operating systems, in this case there is a 
mechanism in the code (the "ByteStreamMultiFileSource" class) that 
could support this.  So you're in luck...
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list