I have an ASP.NET Web API.
That API calls a separate API that I do not control to retrieve 7-second clips of continuous footage.
I am attempting to concat these clips together to turn them into a single livestream that I can stream down to a video player on request.
My previous setup involved streaming snapshots into a named pipe stream and using the -f image2jpeg
input format to convert it into a stream. However, I don't think this technique works with clips and I haven't been able to find any video equivalent.
All of the assistance I have found online says the same thing about concatenating videos using one of the three methods listed in the top answer of this question: How to concatenate two MP4 files using FFmpeg? But all of the three methods there require that the clips be specified in the parameters of the command. As I am attempting to livestream the footage I do not have access to all of the 7-second clips and the number of clips I will pipe to FFmpeg is indeterminate when creating the FFmpeg command.
Ideally, the solution would allow me to pipe clips into FFmpeg continuously without specifying each one individually, and FFmpeg would concatenate each clip onto the existing video so it can be sent down to any web client. It must also be able to send as much of the video down as it has currently concatenated, rather than waiting for the command to complete fully.
How do I go about concatenating an indeterminate number of videos together into a single stream?