[Live-devel] Problems with MPEG-4 streaming...

Ross Finlayson finlayson at live.com
Fri Jan 16 17:53:41 PST 2004


>First, when trying to stream an MPEG-4 video with a fixed frame rate, I 
>found that the timing was off (it would only serve a frame every 33 
>seconds, instead of 30 per second). The problem was in the 
>MPEG4VideoStreamFramer.cpp file, line 388.  Even at a fixed rate,  the 
>fFrameRate should be set to vop_time_increment_resolution, so the code now 
>reads:
>
>       usingSource()->fFrameRate
>     = vop_time_increment_resolution;

But that's what the code currently *does* do (on line 389 of 
"MPEG4VideoStreamFramer.cpp"), and that code hasn't changed in weeks.  Are 
you sure you're using a recent version of the source code??

>The second problem is more puzzling.  When all I do is stream from 
>testOnDemand... to openRTSP, the output file from openRTSP is not the same 
>as the source file for testOnDemand....  I have looked at the output file, 
>and for some reason it is sending some information at the beginning of the 
>file twice.

No, the information is being *sent* only once.  However, "openRTSP" (the 
receiving client) is adding the information an extra time to the start of 
the file (see "testProgs/playCommon.cpp", line 547).

The reason it does this is that - for some live MPEG-4 streams - the 
VisualObjectSequence etc. headers are not present in the stream.  Instead, 
those headers are described only in the "config" information in the SDP 
description (returned by the RTSP "DESCRIBE" command).  In order for the 
recorded MPEG-4 data to be useful, those headers need to be present, so 
"openRTSP" adds them to the front of the file.

Of course, this means that for those MPEG-4 streams (e.g., prerecorded 
video) that *do* happen to include these headers, the output file will 
contain them twice.  That shouldn't be a problem, though.

>Similarly, testOnDemand, when it finds the 
>VisualObjectSequenceEnd  header, does not send out the last 4 bytes of 
>information (the end header).

That appears to be a bug.  I'll take a look at this.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list