datarhei / core

datarhei Core is management for FFmpeg processes without development effort. Whether your streaming has one viewer or a million, we have the tools to help you develop, deploy and manage any video project at any stage. We've solved the challenging problems so you can focus on your application, not your infrastructure.
https://docs.datarhei.com/core
Apache License 2.0
203 stars 46 forks source link

Sync the NTP timestamps for SRT,RTP, RTMP streams. [ enhancement ] #11

Open drunkod opened 1 year ago

drunkod commented 1 year ago

Please add synchronizing media streams function. This is a unique feature for the project and can attract users like OBS.

This is already implemented in RTP. SRT?, RTMP? implementation is necessary.

Larix Broadcaster (aka mobile obs) streaming client has added a feature to send NTP timestamps for all supported streams: Insert SEI time metadata and specify NTP server, this allows synchronizing streams on server side. https://softvelum.com/timesync/

RTP - Synchronizing media streams: Implementation of NTP is not required to use RTP... However, if NTP timestamp implemented in RTCP, it can be used to synchronize media streams even from different host... https://gist.github.com/simonkim/a9a3aa4f1ca04448c64212b3b079d107
Synchronizing Streams via SRT: Some SRT encoders like new JVC-cams , Haivision-encoder and software encoder LarixBroadcaster (iPhone/Android) can do this: synchronize internal clock by time-server (usually by NTP protocol). It means all encoders have one clock:if one camera has time 11:59:59 then other cameras have same time. send this time inside encoded feed (SEI metainfo) https://github.com/Haivision/srt/issues/2044#issuecomment-865034230 https://manpages.ubuntu.com/manpages/focal/man1/srt-multiplex.1.html
jstabenow commented 1 year ago

This is an interesting idea we will discuss in the future. However, this also requires integration with FFmpeg. Thank you very much.