[Live-devel] Live h264 streaming in Android

Ross Finlayson finlayson at live555.com
Mon Jan 4 17:06:04 PST 2016


> On Jan 5, 2016, at 1:34 PM, <Eric_Hsieh at alphanetworks.com> <Eric_Hsieh at alphanetworks.com> wrote:
> 
> Hi Danielya,
> 
> What you face now, it is exactly what I faced before.
> Try to check your video and audio timestamp.

And by “timestamp”, Eric means “presentation time”.  (LIVE555 applications do not deal with RTP timestamps directly.)

In your “OnDemandServerMediaSubsession” subclasses - where you deliver media data - make sure that you’re setting “fPresentationTime” correctly.  These values must be aligned with ‘wall clock’ time - i.e., the time that you’d get by calling “gettimeofday()”.

This is the biggest difference between streaming from a prerecorded file vs. streaming from a live source.  (When you stream from a file, you’re using an intermediate ‘Framer’ object that computes “fPresentationTime” itself.  When you’re streaming from a live source, OTOH, you need to set “fPresentationTime” yourself.)

This still doesn’t really  explain why your stream works OK with VLC as a client, but not on your ‘Android’ media player client, but it’s a start...


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




More information about the live-devel mailing list