Results 1 to 3 of 3

Thread: Deleting File When Someone Is Actively Playing Back

  1. #1
    Join Date
    Jul 2011

    Default Deleting File When Someone Is Actively Playing Back


    I have an issue here with the latest version of Wowza ( I'm sure the earlier ones have this behavior too ). I'm running Windows Server 2012 R2 with the latest JDK installed.

    We have various assets on a multi-tenant Wowza server and need to be able to rename, move or delete a file that is actively being streamed. We have a front-end that leverages APIs we built to manage the Wowza content for the customers. When our backend tries to delete a file we're running into an issue where, often due to demand, there is always 1+ user engaging the file and streaming it. This leaves a file lock on the asset in Java. We're not sure how to go about this in a way that:

    1) Allows us to remove the file ( so the customer doesn't get billed for disk usage )
    2) Allows people watching the asset, ideally, to gracefully end playback ( perhaps when cached data on the stream runs out )
    3) Does not cause issues with the data in the file ( in the case of moving or renaming ) and plays nice with Wowza / Java.

    I appreciate any time and help anyone can offer us!


  2. #2


    Hi Matthew , I guess, you can do it with HttpProvider Class and the application module.
    When your clients start to play ( in http , rtmp , rtsp ... ) add the client id and video name to the array list , map etc. Then

    In httpProvider class develop a module that listen your call. When you call it with video name , then
    get the video name and create an instance of your application module . Call the method that list active client id that watches this video .
    Kill client connection with getting instance via getClientById , then client.rejectConnection() will work . After disconnecting you can easily move,delete or rename file.

    public void onHTTPRequest(IVHost inVhost, IHTTPRequest req, IHTTPResponse resp)
    String queryStr = req.getQueryString();
    Map<String, String> queryMap = HTTPUtils.splitQueryStr(queryStr);
    if (queryMap.containsKey("unlockVideo"))
    killConnection kc = new killConnection();
    Emre Karataşoğlu

  3. #3
    Join Date
    Jul 2011


    Thank you very much Emre, we will take this route. A life saver =)

Similar Threads

  1. Teradek Cube RTMP recorded vod file not playing back
    By beyond in forum Video On Demand Streaming Discussion
    Replies: 3
    Last Post: 01-13-2012, 06:21 AM
  2. Replies: 15
    Last Post: 12-01-2011, 02:54 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