Friday, February 22, 2013

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;
}

4 comments:

  1. 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!!

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

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

    ReplyDelete