I currently have a working way to get a live stream and start downloading it locally while it is still live.
ffmpeg -i source_hls.m3u8 -c copy output.mkv -y
The problem is I do not actually want to save the entire thing, I just periodically run another command on the output.mkv command to create a clip of part of the live stream.
I was wondering if it was possible to limit the output.mkv file to be only 60s long so once the stream goes over 1 minute it will just cut off the old video and be replaced by the new rolling video.
Is this possible or no?
See Question&Answers more detail:os