What is the correct and efficient way to access the last 30 seconds of a mpeg ts stream using Python?

I have mpeg ts stream from my dvb card, which is written to disk. I want to access this stream continuously (last 30 seconds, every 20 seconds) from Python.

I am not looking for a complete solution here, but some ideas on how to do this in the most efficient way regarding the use of CPU and RAM.

Any ideas would be much appreciated!

+5
source share

Source: https://habr.com/ru/post/1246483/


All Articles