xTeVe
xTeVe copied to clipboard
2nd client connecting to an existing stream will be start at the beggining of the buffered stream (using ffmpeg)
Describe the bug When a second client connects to a stream that is already being watched the second client will start watching video from the start of the buffer which can be significantly behind. This is particularly annoying if the stream fails for some reason as when restarting the stream on the first client you are shown previously watched content.
Server (please complete the following information):
- Windows Server 2012 R2
- Intel 64 Bit
- xTeVe 2.2.0
To Reproduce Steps to reproduce the behavior:
- Open a stream using any client
- Watch for several minutes
- Open the same stream using a separate client
- Video will start from several minutes behind
Expected behavior Stream for the second client will start nearer to the end of the buffered stream
Additional context
Buffer Size: 3MB
Timeout for new client connections: 200
FFmpeg Options: -hide_banner -loglevel error -i [URL] -map 0 -map -0:m:language:NAR? -map -0:m:language:nar? -ignore_unknown -c copy -f mpegts pipe:1
I know it's been a year since this was reported, but I'm seeing the same thing.
My assumption is that when reading from the TEMP directory for a new client, it should only be using the most-recent ts. But, also of note: I've noticed that when I watch a channel for a while, the TEMP directory just grows and grows. If I'm reading buffer.go correctly, it looks like only 20 TS files should be kept, but I'm regularly seeing 100s of TS files for one channel.