nDVR live streaming and positioning from recording (growing) media file

Hello!

We are interested to stream a media that is being recorded, media file is growing. Also we want the capability of positioning along the stream.

We have tried to solve it with ffmpeg and the nDVR AddOn. Ffmpeg reads the growing media file in real-time and streams data to Wowza through rtmp protocol. All this work fine.

The problem came when the recording has ended. It seams the ffmpeg has streamed all media to Wowza, but the nDVD don’t realize of the ffmpeg ending. Always last 10 or 20 segons (chunks file size) are lost, so the player (OSMF or Silverlight player proved) don’t show that last 10 or 20 seconds.

The same behavior has been noted if orignal media is closed, not growing, before starts to stream to Wowza.

We have seen that last files corresponding to 10 or 20 seconds are not recorded inside the nDVR folder (definst\test01.0\0000_00_00).

ffmpeg command used: ffmpeg\bin\ffmpeg.exe -re -i test01.mxf -vcodec libx264 -ar 44100 -f flv rtmp://192.168.14.225/dvr/test01

Thank you.

Do you mean that you are using StreamType “live-record” or the LiveStreamRecord addon or API? Because that is how you would get a single “growing” file. It is not possible to stream that file while it is being recorded. You need to use the nDVR playback methods.

Richard

What version of Wowza are you using? I below, 3.1.2, update to that first:

https://www.wowza.com/downloads/WowzaMediaServer-3-1-2/WowzaMediaServer-3.0.x-3.1.2.zip

Then apply patch 16 over that.

https://www.wowza.com/downloads/WowzaMediaServer-3-1-2/WowzaMediaServer3.1.2-patch16.zip

That might, though I do not know that this will help, but it will be necessary to be on the latest before we can look at this from the Wowza side.

Richard

Engineering commented that Wowza might be ignoring data after the last key frame is received.

Can you provide a description of how they are starting/stopping recording.

Richard

Hello Richard,

I’m using StreamType “live”. I’ve attached the Application.xml of dvr conf. So I’m using nDVR AddOn playback.

With ffmpeg it’s possible to read an growing file (-re option helps to do this) that it is recording. Also, ffmpeg can stream through RTMP to Wowza. Then we can play the recorded (nDVR) stream with the nDVR OSMF Player and Silverlight player that comes with Wowza nDVR sample players.

The problem is that we can’t not play the last 10 seconds, and exactly that duration is lost. It seems that ffmpeg sends all media to Wowza (via RTMP), but Wowza don’t save last chunk. But we are not sure. Also, the player is waiting more media in live mode. Only 5 minuts later, when player timeout is done, the player shows the media closed and no live mode is shown. But latest 10 seconds are not accessible.

Thank you.

Pepe.

------ BEGIN conf\dvr\Application.xml -----------------------------------------------------

true

${com.wowza.wms.context.VHostConfigHome}/content

${com.wowza.wms.context.VHostConfigHome}/keys

dvrstreamingpacketizer,cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer

${SourceStreamName}.xml,transrate.xml

${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles

${com.wowza.wms.context.VHostConfigHome}/transcoder/templates

dvrrecorder

dvrfilestorage

0

${com.wowza.wms.context.VHostConfigHome}/dvr

version

streamTimeout

300000

Integer

dvrMinimumAvailableChunks

1

Integer

dvrChunkDurationMinimum

1000

Integer

dvrWaitForCodecTime

1000

Integer

cupertinostreaming,smoothstreaming,sanjosestreaming

-1

*

*

*

*

digest

none

senderreport

12000

75

90000

0

0.0.0.0

127.0.0.1

*

interleave

base

Base

com.wowza.wms.module.ModuleCore

properties

Properties

com.wowza.wms.module.ModuleProperties

logging

Client Logging

com.wowza.wms.module.ModuleClientLogging

flvplayback

FLVPlayback

com.wowza.wms.module.ModuleFLVPlayback

------ END conf\dvr\Application.xml -------------------------------------------------------