Hi there!
Is it possible to clear the DVR store and reset the time back to 0 immediately when a stream ends, instead of waiting 5 minutes as it is by default? At the moment if I stream for say 30 minutes, stop streaming, and then restart the stream within 5 minutes, the playback time in the player continues from the 30 minute mark from the previous stream, making it 31, 32, and so on. But if I wait 5 minutes and restart the stream, the playback time is reset to 0, and goes to 1, 2, and so on, as usual.
Can I reset the time to 0 as in the second behavior, but without having to wait 5 minutes?
Thanks
Trong
Hi,
nDVR doesn’t allow for clearing the DVR store outside of nDVR’s own mechanism. I can suggest this requirement as a backlog item for you to see if this functionality is not working as you expect.
Paul
Hi Trong,
OK I’ll send this to our Backlog queue. Please note that I can’t give timescales for when or if this functionality will be made available.
Paul
Hi Trong,
I’ve had a response from one of the engineers involved in nDVR design. He states that you can set this to work as you wanted to now by setting one of the Wowza nDVR Advanced Properties.
In particular,
Look at setting the streamTimeout property.
This is the amount of time, in milliseconds (ms), that Wowza nDVR will wait for packets until it stops recording. The default value is 300,000 ms (5 minutes). This timeout is meant to account for when encoders disconnect and then restart. The value should be a non-zero value or else your recording will stop whenever there is no data. You could look at reducing that value in order to reduce the reset time:
<Properties>
<Property>
<Name>streamTimeout</Name>
<Value>300000</Value>
<Type>Integer</Type>
</Property>
</Properties>
Like all DVR advanced properties, they are added to the DVR/Properties section in Application.xml.
Paul
Good to hear. The simplest approach is often the best :).
Regards,
Paul
Hi Paul
That works! I was gonna use the Java API like this:
public void onUnPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend) {
ILiveStreamDvrRecorder dvrRecorder = stream.getDvrRecorder(IDvrConstants.DVR_DEFAULT_RECORDER_ID);
if (dvrRecorder.isRecording()) {
dvrRecorder.stopRecording();
}
}
But setting it in the configs is much simpler. Thanks so much
Trong