arut / nginx-ts-module

NGINX MPEG-TS Live Module
BSD 2-Clause "Simplified" License
420 stars 91 forks source link

invalid AVC frame while using nginx-ts-module #35

Open almoghzn opened 6 years ago

almoghzn commented 6 years ago

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.

almoghzn commented 6 years ago

Hi again,

more details about this issue:

I have live stream of mpeg-ts created by box which connected to terrestrial antenna and the box stream the channels with mpeg-ts.

I've server in order to repackage the mpeg-ts (which come from the box) to mpeg-dash:

  1. In parallel I ran the same ffmpeg command on my computer in order to create *.ts file from the same mpeg-ts live stream.

Thanks for your kind help!