[Live-devel] MPEG-4 in MPEG2-PS

Scott Hays sdhays at neon.com.tw
Tue Dec 20 08:59:56 PST 2005


Leon Woestenberg wrote:
> Hello Scott,
> 
> Scott Hays wrote:
> 
>> Thanks, Leon.  I've gotten it to work more or less myself after  
>> hacking the MPEG-2 Program Stream demuxer and parser classes.  I'm  
>> not sure I would have had to do any hacking if the MPEG-4 data inside  
>> had included the VS and VO headers.  Anyway, after all that work, we  
>> decided that we want to remultiplex the MPEG-2 PS stream to an MP4  
>> file as it comes from the encoder anyway because MPEG-2 Program  
>> Streams don't seem to be very good for anything other than straight  
>> playing (they're not really good for efficient "trick-mode" playing).
>>
>> Thanks for the resp
> 
> 
> Ah yes, now you triggered my mind again (without out me having a chance 
> to review our own code base); we had our MPEG-4 VES encoder insert VOS 
> headers. I find your remark on trick-mode playing a bit ackward, as I 
> understand DVD players use MPEG-2 PS as well (not that I know if this is 
> efficient or not).
> 
What I mean about the trick-mode playing is that it is of course 
possible (all major media players that I know of are able to do it), but 
Program Streams weren't designed like MP4 files with random access in 
mind.  MP4 files have tables that make it possible to seek directly to 
the frame you want, while Program Streams require extra parsing or 
building a separate table outside the PS file that records that data. 
The application we're working on is VERY performance oriented and can't 
waste time doing unnecessary parsing and seeking.  Hence our intention 
to move to the MP4 standard file format.


> But assuming you are on a good path, this question remains: converting 
> the stream to a file, is this done in real-time, or offline before any 
> client listens in to the stream?
> 
We need the streams to be accessible live over RTP and recorded to a 
file (and the file needs to be accessible over RTP too).  So we take the 
ES data and send it to our MP4 file writer and also to our 
LIVE.COM-based streaming server.  Right now, we're using Darwin 
Streaming Server for file playback.

> We are also interested in revisiting this path, but without any proxy or 
> repeater inbetween, and I would be glad to learn from other people's 
> experiences and work in this area.
> 
> Regards,
> Leon.
> 
> 
Cheers,
Scott

-- 
Scott Hays
R&D Engineer
http://www.neon.com.tw/
Neon Advanced Technology Co., Ltd.


More information about the live-devel mailing list