1

I need to be able to stream VOD, but videos will be tracked per minute, so I need to constantly maintain information of how much minutes user has, and when he spend minutes, I need to terminate his stream.

I've implemented this in Wowza, now I'm trying to find a way to do this in nginx. Biggest issue is that I do not know, does nginx forward info about requested video chunk to my PHP (or any other script) where I can decide whether to allow current request, or not.

if someone could tell me is it even possible, and if so, to point me in the right direction.

1 Answer 1

0

It is possible to setup HLS streaming with vod capability using the open-source nginx-rtmp-module.

Rtmp module has Notify hooks.

For example:

on_play

Sets HTTP play callback. Each time a clients issues play command an HTTP request is issued asynchronously and command processing is suspended until it returns result code. HTTP result code is then analyzed.

  • HTTP 2xx code continues RTMP session
  • HTTP 3xx redirects RTMP to another stream whose name is taken from Location HTTP response header. If new stream name is started with rtmp:// then remote relay is created instead. Relays require that IP address is specified instead of domain name and only work with nginx versions greater than 1.3.10. See also notify_relay_redirect.
  • Otherwise RTMP connection is dropped

Nginx also has a commercial offering. Last I heard it was $1500/year per seat. At that price it should do what you require, but I'm not familiar with it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .