Results 1 to 8 of 8

Thread: Control APPEND or VERSION dynamically

  1. #1
    Join Date
    Jul 2013
    Posts
    8

    Default Control APPEND or VERSION dynamically

    Hello

    I am in a need to control dynamically if a new ingress stream will be appended to the last recorder store, or create a new version store.
    I can control from the encoder when and to what url I publish the stream.

    I know I can control the APPEND or VERSION in the application.xml, but that will be the behavior for all published streams.
    Ideally, I could publish to something like rtmp://[server]/dvr/stream1?type=version or rtmp://[server]/dvr/stream1?type=append, and the server will know if to append or create new version.

    An alternative would be to change the archive strategy from the API, from some http command. In that case, I could call the command on the server before publishing the stream.

    Is this possible?

    thank!

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

    Default

    A good starting place for this is this example:

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

    Richard

  3. #3
    Join Date
    Jul 2013
    Posts
    8

    Default

    I don't see how that example helps me. If I understand it correctly, it explains some api for recording live events, and it's not dvr-recording related.
    From what I've read, the ability for versioning for recording is built in the nDVR add-on, so I would like to use it.

    Also, maybe I should explain what I intend to do with it.

    I need to record a continuously tv-channel, indefinitely.
    I know about the 30-hours limit for a single stream, because of index size and lots of chunk files issue.
    So, I thought I will restarting the publishing once in a 24-hour window.
    In that way, the nDVR will continue to the next version.

    Using that method, I could do the following:
    1) Watch the current live stream, and use the dvr for the current recorded stream.
    2) Using http responder I wrote, search the archive for a particular UTC time. The method will return the stream versioned name, so I could load it directly.

    For that system to work, I need to stop the stream publishing once a day, for example at 4:00, wait about a minute for the application to time-out and the continue with the recording. the nDVR will automatically create a new version.
    If I get a short brown-out time, less then a minutes, the recording will continue on the same version.

    Still, I would like to have the possibility, for example after a server unexpectedly restart, to continue the recording in the same version. For that, I will need the ability to dynamically choose the archive-strategy to be "version" or "append" on the fly.

    Also, regarding the same system, I would like to know if this method will limit me in any way - for example, by the number of version stores I can have, or the time it will take to search all the stores.
    Does the nDVR will, by itself, pass all the stores folders, or it will do it only when I do it programmatically?

    Thanks!

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

    Default

    Sorry, I misread. Thought it is LiveStreamRecord related.

    I'm not sure how practical this plan is. I will get back to you.

    Richard

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

    Default

    After some discussion among Support, we suggest you take another look at my first suggestion using LiveStreamRecord API for your long term archive needs, and just nDVR for current live streams with a practical window size.

    And take a look at this nDVR Planning guide


    Richard

  6. #6
    Join Date
    Jul 2013
    Posts
    8

    Default

    My project require the ability to select an arbitrary period of about a few hours, and playback that time.
    This arbitrary timeframe can be the current live time - for example, between 30 minutes ago until now.

    To my understanding, if I will take the live-stream-record approach, the system will create files with specified duration, like 30 minutes, and I couldn't use that file until it is done writing.
    So, I will have 2 problems:
    1) When I need to get a long period in the past, I will need to combine multiple files, and take parts of the first and list files.
    2) When I need to get the current recording, I won't be able to do so, unless I relay on the nDVR's recording.

    And yet, I'm not sure that relaying on the nDVR's versioning isn't practical. I made some tests, recording stream for a few days, and I can access past times without any slow-downs.
    I know that if I will wait a lot of days, the files count on the volume will be very large (10's millions, probably).
    Still, the complexity it will solve will be tremendous, so I don't want to give it up just yet.

    Are there any other practical issue that I will come across if I will continue this path?
    Can I do what I want using live-stream-recording, in a way that maybe I am missing?

    Thanks!

  7. #7
    Join Date
    Jan 2011
    Posts
    14

    Default

    I've asked almost the same question about using LiveStreamRecord in DVR workflow. Unfortunately there were no options to create server side VOD playlist to combine multiple recordings (it works only for RTMP).

    http://www.wowza.com/forums/showthre...220#post110220

    We have overridden DurationWindow to 14 days and result is like we were told - video is not played smoothly like expected ... it buffers every 4-10 seconds, some frames are skipped etc...

  8. #8
    Join Date
    Jul 2013
    Posts
    8

    Default

    I am trying a similar but slightly different approach.

    I am using duration of infinite, but I am using the window archive-type, and manually stop and start the application every 24 hours.
    In that way I do lose a few minutes, but hopefully, it will allow me to keep almost all the recordings.

    I created a custom module, which accept time parameters, and search all the versions for that time, and then return custom playlist.
    It seems to work for about a week - I will know in a few week how well it behave with a more lenghly time frame.

Similar Threads

  1. Dynamically control LiveStream
    By azrilnazli in forum General Forum
    Replies: 2
    Last Post: 08-25-2012, 04:49 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
  •