Results 1 to 10 of 10

Thread: Limiting cupertinostreaming duration

  1. #1

    Default Limiting cupertinostreaming duration

    I have a bunch of IP cameras that I am streaming. I've figured out how to use JW Player and a secure token to protect my streams. I also set a duration in the JW Player javascript so that people can't leave the stream up for hours on end, eating bandwidth. However, I'm using WMS panel and I've noticed that I have several events where the duration was 3+ hours. I'm thinking this is coming from RTSP and/or HLS streaming. Is there anyway to set a max duration for RTSP and cupertinostreaming so this won't happen?

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    You would have to start a timer for the session in onHTTPSessionCreate and onRTPSessionCreate, which are shown here in these examples:

    http://www.wowza.com/forums/content....josestreaming)

    http://www.wowza.com/forums/content....TSP-RTP-stream

    Then you use httpSession.rejectSession() and rtspSession.rejectSession() to stop the sessions.

    This example shows how a timer is setup:
    http://www.wowza.com/forums/content....ics-on-a-timer

    Richard

  3. #3

    Default

    I'm new to this IDE stuff but I have the first two modules created in Eclipse. In the timer module, where do I specify the max viewing duration? Is it at the bottom (mTimer.schedule(mTask, 10000, 10000);? Are those in milliseconds?

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Referring to the example with the timer, it is this line:

    mTimer.schedule(mTask, 10000, 10000);
    Richard

  5. #5

    Default

    Quote Originally Posted by rrlanham View Post
    Referring to the example with the timer, it is this line:

    mTimer.schedule(mTask, 10000, 10000);
    Richard
    That's what I figured. I'm guessing those are in milliseconds? so If I wanted to limit the RTSP and HTTP duration to 2 minutes I would just do mTask, 120000, 120000?

  6. #6
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    That's right.

  7. #7

    Default

    Quote Originally Posted by rrlanham View Post
    That's right.
    I finally got around to doing this and I followed the directions to the T. When testing both the RTSP and HTTP streams in VLC they do not time out after 120 seconds.

  8. #8
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Use rtspSession.rejectSession() and rtspSession.shutdown()

    For VLC I have found that you have to do both.

    Richard

  9. #9

    Default

    Quote Originally Posted by rrlanham View Post
    Use rtspSession.rejectSession() and rtspSession.shutdown()

    For VLC I have found that you have to do both.

    Richard
    Sorry if I sound like a noob, but in the RTSP java file do I need to change rtp to rtsp for everything? Or just the final if (!isGood) statement? My file looks exactly like the one you linked to I didn't change anything except the package name to com.wms.module.

    Also, the HTTP stream also would not disconnect in VLC. Everything is exactly the same as the linked example for that one too.

    Again, sorry for all the questions! I'm new to this stuff.

  10. #10
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    I don't really understand. For HTTP streams, use the first link with onHTTPSessionCreate as the starting place. Then add a timer, use that last link as a reference for how to set a timer.

    Richard

Similar Threads

  1. Control live-record by limiting duration of streaming video or limiting file size
    By fjckls in forum Wowza Streaming Engine functionality
    Replies: 4
    Last Post: 10-21-2013, 11:18 AM
  2. Replies: 7
    Last Post: 10-18-2013, 05:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •