Wowza Community

The DVR internal data remains after deleted

Hi, I wanted to implement a START, STOP, DELETE DVR control using API. To that that I configured the DVR/ArchiveStrategy to “append” (in application.xml), and I have used the code of nDVR-AddOn-recording-API, and I have added the delete function:

    public boolean stopAndDeleteRecording(String streamName) 
    {
        boolean bRc = false;
        ILiveStreamDvrRecorder dvrRecorder = null;
        synchronized (dvrRecorders) 
        {
            dvrRecorder = dvrRecorders.remove(streamName);
        }
        if (dvrRecorder != null) 
        {   
            // stop recording
            dvrRecorder.stopRecording();
           
            try 
            {
                Thread.sleep(500);
            } 
            catch (InterruptedException e) 
            {
                e.printStackTrace();
            }
            
            IDvrStreamManager dvrManager = dvrRecorder.getDvrManager();
            if (dvrManager != null) 
            {
                 IDvrStreamStore store = dvrManager.getRecordingStreamStore();
                 IDvrFileSystem fs = store.getFileSystem();
                 fs.deleteFileSystem(); 
                 bRc = true;
            }
        }
        
        return bRc;
    }

The start & stop functions works well, but the delete function deletes the DVR stream data in the disc as expected, but the internal DVR stream data remains in wowza server, for example:

  • If I query the deleted stream using Wowza-nDVR-Duration-Query-API it gives me same data as the stopped stream

  • If I re-start the DVR, the times that the system gives me (using Wowza-nDVR-Duration-Query-API) are incorrect, It seems that the stream is append but is not real because all previous contents in the disc have been deleted.

If I restart the server after the delete function all works good.

Anyone could tell me how delete the internal DVR stream data using the API please.

Thanks.

I think the best way to do this is by setting a WindowDuration in your DVR configuration and letting Wowza handle managing these files. Deleting them yourself or programatically will have unexpected results

Richard