Results 1 to 4 of 4

Thread: Replay live video while still recording

  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Default Replay live video while still recording

    Hi,

    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:
          			//create a livestreamrecorder instance to create .mp4 files
          			ILiveStreamRecord recorder = new LiveStreamRecorderMP4();
          		    recorder.setRecordData(true);
          		    recorder.setStartOnKeyFrame(true);
          		    recorder.setVersionFile(true);
          		       
          			// add it to the recorders list
          			synchronized (recorders)
          			{
          				ILiveStreamRecord prevRecorder = recorders.get(streamName);
          				if (prevRecorder != null)
          					prevRecorder.stopRecording();
          				recorders.put(streamName, recorder);
          			}
          		  recorder.startRecording(stream, false);
    Now I would like the user to be able to replay the live video, while still recording it.
    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?

  2. #2

    Default

    Hi,

    If using LiveStreamRecord you will need the MP4 file to be finalized before playback. This occurs when the recording of that specific file has ended.


    Paul

  3. #3
    Join Date
    Jul 2012
    Posts
    6

    Default

    Quote Originally Posted by Paul_S View Post
    Hi,

    If using LiveStreamRecord you will need the MP4 file to be finalized before playback. This occurs when the recording of that specific file has ended.


    Paul
    Thank you Paul for your answer.
    Is there another way to be able to accomplish the "replay while recording" feature (e.g. recording the stream in a different format)?

  4. #4
    Join Date
    Jun 2011
    Posts
    1,037

    Default

    Hi,
    Segmenting/splitting the recordings into small chunks that can be played individually might be the best option.
    You would need a way to manage the playback of the segmented files. The recording / Splitting can still be accomplished using the
    Recording API

    Daren

Similar Threads

  1. Replies: 4
    Last Post: 01-13-2015, 11:00 AM
  2. Replies: 5
    Last Post: 06-04-2014, 07:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •