D
D
dr_stein2014-02-04 14:21:41
Nginx
dr_stein, 2014-02-04 14:21:41

How to set up a video streaming server using NGINX and http-mp4?

Good afternoon.
Need advice and assistance in adapting the subject to a streaming video surveillance system.
Given:
A server that writes video from ip cameras to a fs structure of the form /Camera_name/day-month-year/hour/videos-from-one-to-10-minutes.mp4
I would like to:
HTTP request Get /camera_name?start=day_month_year_minute_second
Receive streaming video from the archive.
Ideally, by HTTP request Get /camera_name.jpg?frame=day_month_year_minute_second
Get a single frame from the archive.
What is the best way to proceed in this situation?
Inspired by articles from Habr about using nginx as an http-mp4 and rtmp server. So far, I see two implementations: a web application and a self-written nginx module.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Syomov, 2014-02-04
@kotomyava

To get a stream, you don't need any module. This is what http-mp4 does. It can be viewed by any player on the site, or by any player that supports http pseudo-streaming.
Probably, in addition to this, it will be necessary to process the files with one of the programs that transfer metadata to the beginning of the file. This is not very difficult to do with a cron script, for example.
To get a single frame, you can write a script in any language that will process such requests, and pull the desired frame from the video using ffmpeg, for example, and then give it to the client, and possibly save the frame so that you don’t have to do processing on such same request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question