Multiple locations for VOD in 0.9.8

Last week I’ve added support for multiple play locations in VOD engine. Until 0.9.8 play directive could only receive a single directory or http location to play from. Now it receives multiple locations. Playback is started from the first location where file is found.

application vod {
    # search in /var/videos; in case of failure search in /www
    play /var/videos /www;
}

application vod {
    # search in local directories; if not found go to remote server
    play /tmp/cache /var/videos http://example.com/videos;
}

Another new feature in 0.9.8 is play_local_path setting. This directive sets directory where remote files are copied after they are completely downloaded from http location. The setting is unset by default. This directory should be on the same device as play_temp_path setting which sets temporary location where remote files are downloaded. Default is /tmp.

With the new features it’s easy to set up local cache for remote files.

application cached_vod {
    # remote files are copied to /tmp/videos after download
    # and played later from local directory until deleted manually

    play_local_path /tmp/videos;
    play /tmp/videos http://video.example.com/videos;
}

Advertisements
  1. #1 by Malcolm MX Taylor on February 27, 2013 - 3:20 pm

    Hi there,

    after seeing your module a month or so ago I found time to do a compile of nginx with the rtmp module today and all is working (well I can use ffmpeg as an input and play a video and watch it using osmf player)

    Next thing I am going to try is one of your other blog posts about picture in picture as that seems a cool feature and not something I have seen before with FMS (im no expert on fms but seen a little)

    One question I have right now is whether there is DVR options for the module so a user can scroll back and forward in a live stream? I see the recording options but dont know how to use that or if it is timecoded in order to provide dvr functionality?

    If you could let me know here or better on my email address (mx@krisisdnb.com) it would be appreciated!!

    • #2 by rarut on February 27, 2013 - 5:20 pm

      DVR over RTMP is not supported,
      However if you use HLS you will also have DVR.

  2. #3 by Eduardo on April 14, 2013 - 5:37 pm

    This cache location has any cache control algorithm like LRU, or is just a folder that’s need to be controlled by external program?

    • #4 by rarut on April 14, 2013 - 5:55 pm

      No algorithm, just a folder.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: