nginx-vod-module | NGINX-based MP4 Repackager | Video Utils library
kandi X-RAY | nginx-vod-module Summary
kandi X-RAY | nginx-vod-module Summary
NGINX-based MP4 Repackager
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nginx-vod-module
nginx-vod-module Key Features
nginx-vod-module Examples and Code Snippets
Community Discussions
Trending Discussions on nginx-vod-module
QUESTION
I have a problem with nginx config for hls streaming. I use kaltura nginx vod module and try to add ngx_http_secure_link_module
to protect the stream. The strange thing is I have 404 error if I enable ngx_http_secure_link_module
(logs below). I think that is because it can't find a file with index.m3u8 on the end, but if I comment secure link block it works fine.
Also I tried to add alias inside location ~ \.m3u8$ {}
block, but it didn't work. What am I doing wrong? How to protect my stream?
My stream link: https://stream.example.com/hls/c14de868-3130-426a-a0cc-7ff6590e9a1f/index.m3u8?md5=0eNJ3SpBd87NGFF6Hw_zMQ&expires=1609448340
My NGINX config:
...ANSWER
Answered 2020-Jan-15 at 07:15Just moved out this block to server directory and added vod hls;
inside.
QUESTION
I have 3 docker containers in the same network:
- Storage (golang) - it provides API for uploading video files.
- Streamer (nginx) - it streams uploaded files
- Reverse Proxy (let's call it just Proxy)
I have HTTPS
protocol between User and Proxy.
Let's assume that there is a file with id=c14de868-3130-426a-a0cc-7ff6590e9a1f and User wants to see it. So User makes a request to https://stream.example.com/hls/master.m3u8?id=c14de868-3130-426a-a0cc-7ff6590e9a1f
. Streamer knows video id (from query param), but it doesn't know the path to the video, so it makes a request to the storage and exchanges video id for the video path. Actually it does proxy_pass to http://docker-storage/getpath?id=c14de868-3130-426a-a0cc-7ff6590e9a1f
.
docker-storage in an upstream server. And protocol is http, because I have no SSL-connection between docker containers in local network.
After Streamer gets path to the file it starts streaming. But User's browser start throwing Mixed Content Type
error, because the first request was throw HTTPS
and after proxy_pass it became HTTP
.
Here is nginx.conf file (it is a Streamer container):
...ANSWER
Answered 2019-Dec-27 at 16:20I think proxy_pass
isn't the problem here. When the vod module returns the index path it uses an absolute URL with HTTP
protocol. A relative URL should be enough since the index file and the chunks are under the same domain (if I understood it correctly).
Try setting vod_hls_absolute_index_urls off;
(and vod_hls_absolute_master_urls off;
as well), so your browser should send requests relative to stream.example.com
domain using HTTPS
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nginx-vod-module
Thumbnail capture
Playback rate change - 0.5x up to 2x
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page