[FFmpeg-user] Multiple Stream synchronization
David Cassany Viladomat
david.cassany at i2cat.net
Tue Mar 8 15:02:46 CET 2016
I am trying to syncronize the reproduction of a live RTSP (not seekable)
stream in different two different process. At the moment I am using the PTS
given from av_read_frame (from libavformat) and I noticed that each RTSP
session starts counting its timestamp from zero, independently from the
time the session is initiated.
At the moment, I am having pretty successful results initalizing my inner
timestamp to the system clock when the first frame arrives, then from them
I am just adding the offset given by the PTS (obviously taking into accout
timeBase units). I pretty sure this it no the way to do it and that ffmpeg
might provide some better options.
So the question is, should I (or can I) set the AVStream->start_time value
to some sort of system clock in order to be able to compare the current
demuxed timestamp witht he one in another process? Does FFMPEG have any
kind program clock reference?
Thanks in advance for any advice,
More information about the ffmpeg-user