orcasound / orcanode

Software for live-streaming and recording lossy (AAC) or lossless compressed audio (HLS, DASH, FLAC) via AWS S3 buckets. :star:
GNU Affero General Public License v3.0
34 stars 12 forks source link

Handle lag/slow data case on OOI network #41

Open mcshicks opened 2 years ago

mcshicks commented 2 years ago

Even though we read the data with a delay sometimes data can come in later. So if data come in later (say within 24 hours) we would still like to have that data put into the delayed livestream so it can be listened to or possibly analyzed. This would mean keeping track of the gaps for one day say and if new data comes in then transcoding it and inserting it into the m3u8 file, or as a minimum just posting the .ts files and maybe logging. Here are some definitions we can use to cover this case.

not delayed: now - file-timestamp < delay gap: file-timestamp - (prev-file-timestamp + prev-file-duration) > 1 minute microgap: 1 minute > file-timestamp - (prev-file-timestamp + prev-file-duration) > 0 lag: file with timestamp in range of a gap some time greater than delay. Maybe 24 hours recovered: file with timestamp after some time greater than 24 hours

use the mseed branch for this