[Libav-user] Synchronizing two or more RTMP streams: need common start time to compute delay

Team Lixo teamlixo at gmail.com
Sat Feb 11 18:19:09 EET 2017

I have a problem where I will need to sync two RTMP streams together: they
will switch between each-other while live and I will need to determine a
relationship between the two to ensure I am switching between them at a
relative time. This output will be live, so I will have to be sure that
both streams are shown at real-world delays that match.

I've found AVFormatContext.start_time_realtime, but it seems this isn't set
in an RTMP stream (it is left as AV_NOPTS_VALUE). I've looked at the
specification for FLV files, and I've found this:


The "moov" box (apparently a header) contains an mvhd box, which has a
CreationTime parameter. Am I correct in assuming I may be able to use this,
provided both streams are created and have their CreationTime properties
initialized by the same clock? As far as I can tell, RTMP wraps FLV streams.

I am new to this, so bear with me here!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170211/569521f1/attachment.html>

More information about the Libav-user mailing list