I have developed a custom Java module that, on the onPublish event of a live stream from a camera, records it as a MP4 file with this code:
Now I would like the user to be able to replay the live video, while still recording it.
//create a livestreamrecorder instance to create .mp4 files
ILiveStreamRecord recorder = new LiveStreamRecorderMP4();
// add it to the recorders list
ILiveStreamRecord prevRecorder = recorders.get(streamName);
if (prevRecorder != null)
Let's say, the live video lasts 2 hours, a user connects after 1 hour and would like to replay this first recorded hour before the recording has ended.
How can I programmatically create a new stream for this purpose, based on the partially recorded MP4 file?