[Live-devel] Received Frames not written.

Saumya Chandra saumya at ece.ucsd.edu
Mon Jun 27 02:49:47 PDT 2005


Hi Ross,

It does not seem to make much difference.

Another problem is : if only last packet of a frame is written it is still
written in the file even though complete frame is not received (since pkt
size is less than max pkt size and marker bit is one). Because of this my
scripts are failing since I assumed that frames written are a subset of
frames sent wherein size of the frame written is equal to corresoponding
sent frames.

Is there a way I can find out which "frames" are actually written in the
file?

Thanks
Saumya.


> >I am using mpeg4 encoder (ffmpeg coder), essentially .m4v file. I have not
> >noticed this loss when there is no loss due to network at all.
>
> The current code doesn't handle packet loss in incoming MPEG-4 RTP streams
> as well as it could.  In particular, if the last packet of a fragmented
> frame (indicated by the RTP "M" bit) is lost, then the packets that make up
> the next frame will be discarded also.
>
> Try making the following change, which I think will improve things:
>
> In "MPEG4ESVideoRTPSource.cpp", line 49:
>
> Replace:
>          fCurrentPacketBeginsFrame = fCurrentPacketCompletesFrame;
>                  // whether the *previous* packet ended a frame
> with
>          fCurrentPacketBeginsFrame
>                  = fCurrentPacketCompletesFrame // the *previous* packet
> ended a frame
>                  || (packet->dataSize() >= 4 && (packet->data())[0] == 0
>                      && (packet->data())[1] == 0 && (packet->data())[2] == 1);
>
> Please let us know if that makes a difference.
>
>
> 	Ross Finlayson
> 	LIVE.COM
> 	<http://www.live.com/>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live.com
> http://lists.live.com/mailman/listinfo/live-devel
>


More information about the live-devel mailing list