[FFmpeg-devel] rtp streaming x264+audio issues (and some ideas to fix them)

Martin Storsjö martin
Sun Feb 7 10:25:52 CET 2010


On Sat, 6 Feb 2010, Ronald S. Bultje wrote:

> On Feb 6, 2010, at 4:25 PM, Martin Storsj? <martin at martin.st> wrote:
> > Ideally, the first_rtcp_ntp_time field should be set to the exact same
> > ntp_time() value for all RTP sessions within the same stream, but  
> > I'm not
> > sure what the best way to synchronize it between them would be.  
> > Setting
> > it in some metadata field?
> 
> Bettter have the muxer (or any caller) coordinate the value (instead  
> of rtp_write_header()). That'd work for demuxing also (which has thd  
> same bug, as said).

Yes, the caller (which knows about all the RTP muxers for the session), be 
it either ffmpeg.c, the upcoming RTSP muxer or an application using the 
RTP muxers directly, would have to coordinate the value - the RTP muxer 
itself can't do it since it doesn't know anything about the other RTP 
streams. (Didn't know for sure which muxer you referred to above.) The 
proposed patch at least is a step in this direction, getting less bad 
sync, although it isn't the full, final solution.

So, how should the RTP muxer callers communicate the coordinated NTP start 
time for the stream? My suggestion is setting it in some metadata field - 
then the RTP muxer can use that if it is set, otherwise just locally fetch 
the current NTP time as it does currently.

// Martin



More information about the ffmpeg-devel mailing list