Giter Site home page Giter Site logo

nginx-ts-module's Introduction

NGINX MPEG-TS Live Module

  • receives MPEG-TS over HTTP
  • produces and manages live HLS
  • produces and manages live MPEG-DASH
  • nginx version >= 1.11.5

Building nginx with the module:

# static module
$ ./configure --add-module=/path/to/nginx-ts-module

# dynamic module
$ ./configure --add-dynamic-module=/path/to/nginx-ts-module
Syntax: ts
Context: location

Sets up a live MPEG-TS handler for the location. This directive is required for HLS or MPEG-DASH generation.

The last URI component is used as a stream name. For example, if the URI is /foo/bar/baz, the stream name is baz.

A simple way to stream MPEG-TS over HTTP is by running ffmpeg:

$ ffmpeg ... -f mpegts http://127.0.0.1:8000/foo

By default, HTTP request body size is limited in nginx. To enable live streaming without size limitation, use the directive client_max_body_size 0.

Syntax: ts_hls path=PATH [segment=MIN[:MAX]] [segments=NUMBER] [max_size=SIZE] [noclean]
Context: location

Enables generating live HLS in the location. The PATH parameter specifies a directory where HLS playlist and segment files will be created. The directory is created if missing. For every publshed stream a subdirectory with the stream name is created under the PATH directory. The HLS playlist file created in the stream subdirectory is named index.m3u8. A path handler is installed to watch files in the directory. The old files in the directory are automatically deleted once they get old enough and are not supposed to be accessed by clients anymore. It is not allowed to reuse the path in other ts_hls or ts_dash directives.

The segment parameter specifies minimum and maximum segment durations. If the stream has video, segments are started at video key frames. If a key frame does not appear within MAX duration, the segment is truncated. The default value for minimum segment duration is 5 seconds. If unspecified, maximum segment duration is set to be twice as much as the minimum.

The segments parameter specifies the maximum number of segments in a playlist. As new segments are added to the playlist, the oldest segments are removed from it.

The max_size parameter specifies the maximum size of a segment. A segment is truncated once it reaches this size.

The noclean parameter indicates that the old files (segments and the playlist) should not be automatically deleted from disk.

Example:

location / {
    ts;
    ts_hls path=/var/hls segment=10s;
}
Syntax: ts_dash path=PATH [segment=MIN[:MAX]] [segments=NUMBER] [max_size=SIZE] [noclean]
Context: location

Enables generating live MPEG-DASH in the location. The PATH parameter specifies a directory where MPEG-DASH manifest and segment files will be created. The directory is created if missing. For every publshed stream a subdirectory with the stream name is created under the PATH directory. The MPEG-DASH manifest file created in the stream subdirectory is named index.mpd. A path handler is installed to watch files in the directory. The old files in the directory are automatically deleted once they get old enough and are not supposed to be accessed by clients anymore. It is not allowed to reuse the path in other ts_hls or ts_dash directives.

The segment parameter specifies minimum and maximum segment durations. If the stream has video, segments are started at video key frames. If a key frame does not appear within MAX duration, the segment is truncated. The default value for minimum segment duration is 5 seconds. If unspecified, maximum segment duration is set to be twice as much as the minimum.

When setting an explicit value for the MAX parameter, the following note should be taken into account. If the next segment is shorter than the previous one by a factor more that two, dash.js can end up in a busy cycle requesting the second segment over and over again.

The segments parameter specifies the maximum number of segments in a manifest. As new segments are added to the manifest, the oldest segments are removed from it.

The max_size parameter specifies the maximum size of a segment. A segment is truncated once it reaches this size.

The noclean parameter indicates that the old files (segments and the manifest) should not be automatically deleted from disk.

Example:

location / {
    ts;
    ts_dash path=/var/hls segment=10s;
}

nginx.conf:

# nginx.conf

events {
}

http {
    server {
        listen 8000;

        location / {
            root html;
        }

        location /publish/ {
            ts;
            ts_hls path=/var/media/hls segment=10s;
            ts_dash path=/var/media/dash segment=10s;

            client_max_body_size 0;
        }

        location /play/ {
            types {
                application/x-mpegURL m3u8;
                application/dash+xml mpd;
                video/MP2T ts;
                video/mp4 mp4;
            }
            alias /var/media/;
        }
    }
}

HLS in HTML:

<body>
  <video width="640" height="480" controls autoplay
         src="http://127.0.0.1:8000/play/hls/sintel/index.m3u8">
  </video>
</body>

MPEG-DASH in HTML using the dash.js player:

<script src="http://cdn.dashjs.org/latest/dash.all.min.js"></script>

<body>
  <video data-dashjs-player
         width="640" height="480" controls autoplay
         src="http://127.0.0.1:8000/play/dash/sintel/index.mpd">
  </video>
</body>

Broadcasting a single-bitrate mp4 file:

$ ffmpeg -re -i ~/Movies/sintel.mp4 -bsf:v h264_mp4toannexb
         -c copy -f mpegts http://127.0.0.1:8000/publish/sintel

Broadcasting an mp4 file in multiple bitrates. For proper HLS generation streams should be grouped into MPEG-TS programs with the -program option of ffmpeg:

$ ffmpeg -re -i ~/Movies/sintel.mp4 -bsf:v h264_mp4toannexb
         -map 0:0 -map 0:1 -map 0:0 -map 0:1
         -c:v:0 copy
         -c:a:0 copy
         -c:v:1 libx264 -b:v:1 100k
         -c:a:1 libfaac -ac:a:1 1 -b:a:1 32k
         -program "st=0:st=1" -program "st=2:st=3"
         -f mpegts http://127.0.0.1:8000/publish/sintel

nginx-ts-module's People

Contributors

arut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx-ts-module's Issues

Secure Link Support

I'm trying to add protection to my m3u8 links using nginx secure_link module

I'm able to connect to playlist, anyway as soon as I try to consume the ts, the hash for the m3u8 URL becomes invalid for the TS and I get a forbidden error.

Do you have any recommendation on protecting links? I spent a lot of time trying to do this but I'm totally lost

Many thanks

variable ‘ts’ set but not used error on fresh install

ubuntu@ubuntu:~/$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial

nginx version 1.13.3

...
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
	-o objs/addon/src/ngx_ts_dash.o \
	/home/ubuntu/nginx-ts-module-master/src/ngx_ts_dash.c
/home/ubuntu/nginx-ts-module-master/src/ngx_ts_dash.c: In function ‘ngx_ts_dash_cleanup’:
/home/ubuntu/nginx-ts-module-master/src/ngx_ts_dash.c:122:25: error: variable ‘ts’ set but not used [-Werror=unused-but-set-variable]
     ngx_ts_stream_t    *ts;
                         ^
/home/ubuntu/nginx-ts-module-master/src/ngx_ts_dash.c: In function ‘ngx_ts_dash_pes_handler’:
/home/ubuntu/nginx-ts-module-master/src/ngx_ts_dash.c:304:25: error: variable ‘ts’ set but not used [-Werror=unused-but-set-variable]
     ngx_ts_stream_t    *ts;
                         ^
cc1: all warnings being treated as errors
objs/Makefile:1228: recipe for target 'objs/addon/src/ngx_ts_dash.o' failed
make[1]: *** [objs/addon/src/ngx_ts_dash.o] Error 1
make[1]: Leaving directory '/home/ubuntu/nginx-1.13.3'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2

Working with GStreamer

Has anyone got this working with GSteamer?

The only plugin that can stream data to http from gstreamer is souphttpclientsink which does a series of PUTs rather than one POST (curlhttpsink as far as I can tell doesn't seem to handle streaming video) This doesn't appear to work with the module. I get a file or 2 but they're tiny and the stream always quits with a closed connection error.

EDIT: If it helps, I got it working using ffmpeg as a proxy. E.g.

nginx running on 80 at publishing on /publish/

ffmpeg tcp server for input sending to nginx:

ffmpeg -f mpegts -i tcp://0.0.0.0:7654?listen -c copy -f mpegts http://127.0.0.1/publish/test

gstreamer processing sending mpegts stream to ffmpeg's tcp listener:

gst-launch-1.0 [...]  mpegtsmux ! tcpclientsink port=7654

vp9 doesn't work in dash

If you try to use vp9 encoding it works in HLS but not in DASH

Command I used
/usr/bin/ffmpeg -i rtmp://127.0.0.1:1935/video/1080 -c:v libvpx-vp9 -c:a libopus -quality realtime -speed 5 -threads 16 -qmin 4 -qmax 48 -b:v 4000k -f mpegts http://127.0.0.1/publish/1080

I am trying to use RTMP module with this one to use Google's vp9 encoding.

DASH is not supporting vp9 in this module

WebRTC to Ffmpeg

Hi.

Your experimens are great but i didn't find solution for my trouble.

I need to translate real-time audiostream from WebRTC-supported browser to ffmeg and later to rtmp media server. Reason is to Safari users can listen/watch translation withous any plugins.

I look at RecordRTC but it send stream only on end of record and i need real-time streaming.

Can you help me?

nginx-rtmp-module vs. nginx-ts-module

Could you please explain key advantages for this module over nginx-rtmp-module? Are they comparable at all? Could I use them both at the same time? And I would very appreciate you if you explain then it is preferable to use each of them in details.

Hello

Hi there, nice to see you around, long time user of the rtmp module

I was wondering what was the difference and benefits of this module compared to the former nginx-rtmp-module.

Is it because this only handle dash and hls, and not rtmp anymore?

regards

Can't start nginx with NFS mount, permission denied

I have a NFS mount on where I want to generate the hls and dash files. The directory is mounted as nobody:nobody and has sufficient permissions.

Nginx won't startup because it can't create the path in the ts_hls and ts_dash directive.

I suspect that it wants to set the uid/gid to that of the user defined in the nginx.conf. Can this be circumvented somehow?

TS input from external URL

Hi Arut,

I'm using your module and is working very well, but I'm using ffmpeg in order to send the ts stream to your module as you have in your examples:

ffmpeg -re -i http://127.0.0.1:2000/test.ts -c:v copy -c:a copy -f mpegts http://127.0.0.1:9000/publish/test

But, as you can check in the ffmpeg command, the input is a TS stream.

Actually, I'm using Cesbo astra in order to receive a channel in DVB-S/S2 and send it to a https TS URL like http://127.0.0.1:2000/test.ts, so, it will be very usefully get this ts stream directly into your module from the ts URL, without use ffmpeg for get it and send to your module.

Do you think this feature could be possible, (if you think is usefully), or maybe is very hard to develop.

Thanks.

David.

Can not play mpeg-dash created with nginx-ts-module

Hi,

I'm trying to stream media using the nginx-ts-module.
Everything looks fine (the index.mpd and mp4 filed are created under /var/media/dash) also browsing to the index.mpd url works fine, but trying to play this dash using Dash JavaScript Player doesn't work.

I'm using nginx-1.13.9 with nginx-ts-module.

My nginx configuration is (/usr/local/nginx/conf/nginx.conf):
`user root;
worker_processes 1;

error_log logs/error.log info;

pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile        on;

keepalive_timeout  65;

server {
    listen 8000;

    location /publish/ {
        # This directive sets unlimited request body size
        client_max_body_size 0;

        ts;
        ts_hls path=/var/media/hls segment=10s;
        ts_dash path=/var/media/dash segment=10s;
    }

    location /play/ {
        types {
            application/x-mpegURL m3u8;
            application/dash+xml mpd;
            video/MP2T ts;
            video/mp4 mp4;
        }
        alias /var/media/;
    }
}

server {
    listen       80;
    server_name  localhost;

    location / {
        root   html;
        index  index.html index.htm;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
}

}
`

My ffmpeg command to stream media to nginx is:
ffmpeg -re -i "The LEGO Batman Movie - Trailer.mp4" -bsf:v h264_mp4toannexb -c copy -f mpegts http://{my_nginx_server_ip}:8000/publish/alilive

NOW.
When I browse to http://{my_nginx_server_ip}:8000/play/dash/alilive/index.mpd I able to download the index.mpd.
BUT, when I put this url in Dash JavaScript Player it is not playing the media.

On my nginx's error log I found a lots of this records:
dropping unexpected TS packet pid:0x0011
But I read that I can ignore it here

One more thing,
I also trying to stream live web cam recording instead of The LEGO Batman Movie - Trailer.mp4 using ffmpeg with the following command:
ffmpeg -y -f dshow -i "video=Lenovo EasyCamera:audio=Microphone (High Definition Audio Device)" -bsf:v h264_mp4toannexb -c copy -f mpegts http://{my_nginx_server_ip}:8000/publish/alilive
But when I execute this command I get:
Codec 'mjpeg' (8) is not supported by the bitstream filter 'h264_mp4toannexb'
Why?

  1. What am I doing wrong?
  2. As all seems to be working well, why DASH-ID player can't play my media?
  3. How can I stream my video cam?

'Too big PAT' - gstreamer to nginx-ts-module

Using given example 'nginx.conf' and this gstreamer pipeline:

$ gst-launch-1.0 -v \
    rpicamsrc ! video/x-h264,width=320,height=240,framerate=8/1 ! \
    h264parse ! mpegtsmux ! curlhttpsink location=http://192.168.128.114:8000/publish/test

Fails saying: '[..] failed to transfer data: Failed sending data to the peer.'

$ cat /var/log/nginx/error.log
2017/11/30 11:59:01 [error] 159#0: *5 too big PAT: 3504, client: 192.168.128.114, server: , request: 
"POST /publish/test HTTP/1.1", host: "192.168.128.114:8000"
Any advice?

VOD solution

Hi,

I am trying to build a VOD solution using nginx and one of your modules. RTMP module seems to be stuck with Flash as HTML 5 will not support it. HLS seems to be the way to go specially with mobile devices.

Case scenario:

I have a lot of videos ( MP4 ) and I want them to be accesible thru the web either thru a computer and mobile device ( HTML5 ). Which of your module I can use to accomplish this?

Note: I was able to make it work with your RTMP module, but unless you can recommend me a better RTMP HTML 5 player, JW Player worked on my desktop, but got stuck on my mobile.

Possible memory leak

I'm using this module and I see that the nginx process is eating memory without stop. ¿any idea how to debug this problem?
Thank you ;)

make: build error

Distributor ID: Debian
Description: Debian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch

../nginx-ts-module/src/ngx_ts_hls.c: In function ‘ngx_ts_hls_set_slot’:
../nginx-ts-module/src/ngx_ts_hls.c:988:28: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
hls->path->manager = ngx_ts_hls_file_manager;
^
cc1: all warnings being treated as errors
objs/Makefile:1204: recipe for target 'objs/addon/src/ngx_ts_hls.o' failed
make[1]: *** [objs/addon/src/ngx_ts_hls.o] Error 1
make[1]: Leaving directory '/root/nginx/nginx-1.10.3'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2

Publish multiple streams dynamically

Can I somehow dynamically manage streams that server is accepting to be published?

The problem I am trying to solve is a system that each user can open its own stream at any given moment, I am expecting to pass him a URL to publish a video. This would require Nginx to accept any new incoming stream and automatically create /media directory structure for it. I can sign URLs so I would be sure that only URLs generated from my system are valid new streams to handle.

DASH: gaps between segments with audio only

This issue seems to exist with nginx-rtmp-module, too.

When playing the DASH manifest in dash.js or Shaka player, there are gaps between the segments. These gaps don't occur when playing back the HLS manifest, hinting at a problem in the segmentation.

The problem doesn't seem to happen when I send the server both audio and video.

I'm using the following config

server {

	listen localhost:8081;
	server_name localhost;
	
	root /tmp/htdocs;

	client_max_body_size 0;

	location /ingest {

		allow 127.0.0.1;
		deny all;
	
		ts;
		ts_hls path=/tmp/htdocs/egest/a segment=10s segments=30;
		ts_dash path=/tmp/htdocs/egest/b segment=10s segments=30;
	
	}

	location / {
		add_header Access-Control-Allow-Origin *;
	}

}

And this ffmpeg command:

ffmpeg -i https://stream.cor.insanityradio.com/insanity_test.mp3 -c:a libfdk_aac -f mpegts http://127.0.0.1:8081/ingest

Problem occurs regardless of what codec I use (HE/LE have the issue).

H.265 Issues while streaming to other server

I've two servers:

  • First server doing the encoding process have a NVIDIA Quadro P2000 GPU (NVIDIA HEVC Encoding) 28 IPTV channels with around ~5MBIT/source MPEG2-MPEG4 streams. The output bandwidth of one channel between 1MBIT/1.5MBIT using VBR.
  • Second server going to be something like a CDN server where only the NGINX and MPEG-TS plugin runs.
    I'd like to stream instantly to the second server which is doing only the HLS processing. But when I do that there's some issues. Stdout of MPV media player on my local machine:

[ffmpeg] NULL: PPS id out of range: 0
[ffmpeg/video] hevc: PPS id out of range: 0
[ffmpeg/video] hevc: Error parsing NAL unit #2.

It seems there's no issues with the FFMPEG encoding process on the first server. I didn't see any issues on NGINX error log either. Nginx configuration based on your example. The only difference is I've set the worker process count to 4.
When I play the stream from STB the first frame appears and there's audio and after 2-3 seconds the stream is going to be absolutely fine.

When I'm doing both encoding and segmenting on the first server and HLS again on the second server it works perfectly.
I'm not sure if it's possible to do that correctly.

Generated output goes stale

When running nginx-ts-module (only audio has been tested) in production for over 24 hours, it becomes unstable and stops generating output randomly for a few minutes every few hours. This happens until the source is restarted.

The exact environment we're using can be replicated in Docker (https://github.com/InsanityRadio/AudioEngine/). Audio is being fed directly by capture card over a local network, and when running ffmpeg in verbose mode, there is no clear indication of an issue with ffmpeg.

HLS fMP4

With HLS supporting mp4 fragments instead of ts since sometime last year, do you have any plans to make it possible to write HLS and DASH manifests that reference the same segment chunks?

Low latency streaming MPEG DASH instead of chunking

I've had success generating MPEG DASH and sending it through websocket, and then loading into video buffer with the browser media source extension API, and getting 1 second of latency. It looks like there may be a similar standard soon: https://www.iso.org/obp/ui/#iso:std:iso-iec:23009:-6:dis:ed-1:v1:en

would you consider implementing something similar for low latency, or support streaming to another named pipe, socket, or http endpoint so another application can handle low latency streaming?

Unknown directive "ts"

I have installed Nginx 1.14 on Ubuntu 18.04.

I cloned this module onto the machine.

I ran sudo ./configure --add-module=<my path to cloned module>

I ran sudo make

Then I ran sudo make install

Then I updated /etc/nginx/nginx.conf to have the example nginx.conf found in ReadMe.

When I try to reload my nginx, I get:

I am getting: Unknown directive ts in /etc/nginx/nginx.conf

I have never added a module to Nginx. What am I doing wrong?

make: *** [build] Error 2

  • nginx version = 1.12.0
  • system = 52~16.04.1-Ubuntu
  • build Error
../nginx-ts-module/ngx_http_ts_module.c: In function ‘ngx_http_ts_handler’:
../nginx-ts-module/ngx_http_ts_module.c:99:30: error: variable ‘tlcf’ set but not used [-Werror=unused-but-set-variable]
     ngx_http_ts_loc_conf_t  *tlcf;
                              ^
../nginx-ts-module/ngx_http_ts_module.c: In function ‘ngx_http_ts_pmt_handler’:
../nginx-ts-module/ngx_http_ts_module.c:213:25: error: unused variable ‘r’ [-Werror=unused-variable]
     ngx_http_request_t *r = ts->data;

Hls_continuous support

Hi Arus,
Nice module for x265 without transcode. Can you add support for hls_continuous (ext-x-discontinuity) like in nginx-rtmp-module?

Is it possible to set receiving MPEG-TS over UDP?

Hello,

I have encoders that are currently flooding the network using UDP multicast, and I'm trying to set this module up to receive MPEG-TS over UDP and then stream HLS. Is this possible or do I have to come up with some sort mechanism to overcome this?

Thanks,

Using this with Google Cloud's Extensible Service Proxy

Hi, I'd like to use your module on a Google Cloud instance (virtual machine).
GCloud uses a customised version of nginx called Extensible Service Proxy (ESP): https://github.com/cloudendpoints/esp
Usually I install it using apt install, but it can also be built from source: https://github.com/cloudendpoints/esp/blob/master/doc/build-esp-on-ubuntu-16-04.md
using bazel. Do you thing there is a way of adding this module while building?
I've also posted a question on the google-cloud-endpoints google group. But if you have any ideas, please let me know. Thanks!

Append instead of overwrite?

With the RTMP module, it is possible to append to an existing stream if the incoming stream stops and resumes. When it happens with the HLS module, the existing stream is overwritten. Is it possible to make it append to an existing playlist instead of starting over?

invalid AVC frame while using nginx-ts-module

Hi,

I'm using nginx-ts-module in order to produce MPEG-DASH from MPEG-TS.

So, I have nginx along with nginx-ts-module.

My config file is as follow:

server {

        listen 8000;

        location /publish/ {
            ts;
            ts_dash path=/var/media/dash segment=2s segments=10;

            client_max_body_size 0;
        }

        location /play/ {
            types {
                application/x-mpegURL m3u8;
                application/dash+xml mpd;
                video/MP2T ts;
                video/mp4 mp4;
            }
            alias /var/media/;
        }
    }

I'm running ffmppeg command in order to stream an MPEG-TS live stream to my nginx:
ffmpeg -re -i http://10.0.0.211:55555/Ch%2011%20Kan -strict -2 -c:v copy -c:a aac -f mpegts http://localhost:8000/publish/kan_from_ts
[Note: the ffmpeg command run on the same server as the nginx with the ts-module runs]

It's all works fine until it's stops, i.e. there is no index.mpd file under /var/media/dash/kan_from_ts and also there is no segments.

At the log file of nginx I found:
2018/05/21 12:52:47 [error] 11075#0: *2 invalid AVC frame, client: 127.0.0.1, server: , request: "POST /publish/kan_from_ts HTTP/1.1", host: "localhost:8000"
When it's stops working.

Note:
The log file of nginx full with the following error as well:
2018/05/21 12:52:47 [info] 11075#0: *2 dropping unexpected TS packet pid:0x0011, client: 127.0.0.1, server: , request: "POST /publish/kan_from_ts HTTP/1.1", host: "localhost:8000"
But I saw issue with this same line and the answers were that this is nothing.

Any help? pls.

Edit:
Also I'll very thankful if I can get answers to the following questions:

  1. Does ts-module reencode (decode/encode) the media?
  2. Does ts-module reduce the quality of the audio/video?
  3. In other words, what exactly or how exactly ts-module "convert" mpeg-ts to mpeg-dash?

Thanks again.

streams shutdown on graceful reload

How can I avoid restarting the streams when I reload: service nginx reload
I just want to make a small change but I don't want to restart the publisher.

Не проигрывается dash

Сделал все по инструкции
hls генерится и играет
c dash след проблема
в папке появляются манифест и файлы
но проиграть не могу пробовал как плеером из примера
так и http://dashif.org/reference/players/javascript/1.3.0/samples/dash-if-reference-player/index.html

возможно связано с тем что в манифесте

        media="$RepresentationID$.$Time$.mp4"
        initialization="$RepresentationID$.init.mp4">

P.S. Спасибо за Вашу работу.

полный манифест ниже


















HEVC in Dash

HEVC in HLS seems to work fine. In DASH, only h264 seems to work.

To reproduce:
ffmpeg -re -i testVideo.mp4 -vcodec libx265 -preset ultrafast -s 320x240 -f mpegts http://***/publish/demo

I only see segments in the HLS folder, not in Dash. Same with libx264 works.

supported input formats ?

hello,
please can i use this module with nginx for my camera ? or the use is only for .mp4 videos?

thank you

How is this different from rtmp-module from vod perspective?

nginx/video streaming noob here. I am trying to figure out the best way to stream videos from mp4 files on top of an nginx server. I'd like to support both browsers and mobile devices.

I have looked at rtmp-module and this one. How are they different from video on demand perspective? Looks like this one module works on top of HTTP while the other RTMP. Besides the protocol difference, what are pros and cons?

Ошибка при сборке

использую версию nginx 1.12.0
при сборке появляется ошибка:

In file included from /usr/src/nginx-ts-module//src/ngx_ts_avc.c:8:0: /usr/src/nginx-ts-module//src/ngx_ts_avc.c: In function ‘ngx_ts_avc_read’: src/core/ngx_core.h:101:37: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] #define ngx_min(val1, val2) ((val1 > val2) ? (val2) : (val1)) ^ /usr/src/nginx-ts-module//src/ngx_ts_avc.c:60:13: note: in expansion of macro ‘ngx_min’ k = ngx_min(8 - br->shift, n); ^ src/core/ngx_core.h:101:54: error: signed and unsigned type in conditional expression [-Werror=sign-compare] #define ngx_min(val1, val2) ((val1 > val2) ? (val2) : (val1)) ^ /usr/src/nginx-ts-module//src/ngx_ts_avc.c:60:13: note: in expansion of macro ‘ngx_min’ k = ngx_min(8 - br->shift, n); ^ cc1: all warnings being treated as errors objs/Makefile:1195: recipe for target 'objs/addon/src/ngx_ts_avc.o' failed make[1]: *** [objs/addon/src/ngx_ts_avc.o] Error 1 make[1]: *** Waiting for unfinished jobs.... cc1: all warnings being treated as errors objs/Makefile:1181: recipe for target 'objs/addon/src/ngx_ts_dash.o' failed make[1]: *** [objs/addon/src/ngx_ts_dash.o] Error 1 make[1]: Leaving directory '/usr/src/nginx-1.12.0' Makefile:8: recipe for target 'build' failed make: *** [build] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.