Wowza Community

DVR streamTimeout unexpectedly

Hi!

I’m using DVR’s streamTimeout setting to clear the DVR cache 15 seconds after a stream ends:

<Property>
	<Name>streamTimeout</Name>
	<Value>15000</Value>
	<Type>Integer</Type>
</Property>

My question is, what exactly is the event that triggers this timeout? Is it stream unpublish, or client disconnects, or what is it? Does the DVR clear 15s after the unpublish event?

The reason I’m asking is because I’ve been running into a weird situation where the timeout would kick in for no apparent reason. Normally 15s before the cache clears (at 23:09:50) I’d see a console output from this method:

public void onUnPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend)

but in this case the nearest output was at 23:07:20, and unrelated.

2015-04-20      23:07:20        UTC     comment server  INFO    200     -    W
ASA onHTTPSessionDestroy: 1821994150    -       -       -       5822.267     -
        -       -       -       -       -       -       -       -       -    -
        -       -       -       -       -       -       -       -       -    -
        -       -       -       -
2015-04-20      23:09:50        UTC     comment server  INFO    200     -    D
vrStreamManagerBase [live/_definst_/5454601949f818b16e90c404] : Timeout occurr
ed.  Destroying DVR recorder.   -       -       -       405156.497      -    -
        -       -       -       -       -       -       -       -       -    -
        -       -       -       -       -       -       -       -       -    -
        -       -       -
2015-04-20      23:09:50        UTC     comment server  INFO    200     -    L
iveStreamDvrRecorderBase.shutdown[live/_definst_/5454601949f818b16e90c404]   -
        -       -       405156.498      -       -       -       -       -    -
        -       -       -       -       -       -       -       -       -    -
        -       -       -       -       -       -       -       -       -
2015-04-20      23:09:50        UTC     comment server  INFO    200     -    DvrStreamManagerBase [live/_definst_/5454601949f818b16e90c404] : Timeout occurred.  Destroying DVR packetizer. -       -       -       405156.498      -    -
        -       -       -       -       -       -       -       -       -    -
        -       -       -       -       -       -       -       -       -    -
        -       -       -
2015-04-20      23:09:50        UTC     comment server  INFO    200     -    DvrStreamManagerBase.shutdown[live/_definst_/5454601949f818b16e90c404]   -    -        -       405156.499      -       -       -       -       -       -    -        -       -       -       -       -       -       -       -       -    -        -       -       -       -       -       -       -       -
2015-04-20      23:09:50        UTC     comment server  INFO    200     -    D
vrStreamManagerBase.removeStreamStore[live/_definst_/5454601949f818b16e90c404]
 : stream:{DvrStreamStoreBase streamName:5454601949f818b16e90c404.29 isLoaded:true canPlay:true canRecord:true hasEncryption:false isLive:false isRecording:false isRecordingPaused:false props:{Properties: streamTimeout: 15000, dvrMinimumAvailableChunks: 5, dvrChunkDurationMinimum: 5000, dvrAllowableAVPacketDelta: 2000, dvrPacketSortTime: 2000, isDvrPacketizer: true}].      -       -    -
        405156.499      -       -       -       -       -       -       -    -
        -       -       -       -       -       -       -       -       -    -
        -       -       -       -       -       -       -
2015-04-20      23:09:50        UTC     comment server  INFO    200     -    MediaStreamMap.removeLiveStreamPacketizer[live/_definst_/5454601949f818b16e90c404]: Destroy live stream packetizer: dvrstreamingpacketizer     -       -    -
        405156.499      -       -       -       -       -       -       -    -
        -       -       -       -       -       -       -       -       -    -
        -       -       -       -       -       -       -

Follow up question. If the encoder for some reason stops sending data to wowza for X seconds, without unpublish firing, could this trigger the streamTimeout? How long is X?

Thanks

Trong

Hi,

streamTimeout is explained in the Wowza nDVR Advanced Config page.

Specifically, it’s defined as:

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.

So the trigger is essentially zero packets arriving within the StreamTimeout window.

Example,

<Properties>
     <Property>
          <Name>streamTimeout</Name>
          <Value>300000</Value>
          <Type>Integer</Type>
     </Property>
</Properties>