Welcome! Log In Create A New Profile

Advanced

How to debug or do profiling HLS stream

Posted by arturoar3nas 
How to debug or do profiling HLS stream
March 02, 2021 05:43PM
Hey every one,

I need help to debug my video stream using nginx. The stream some times get stucked or get a little jump between frames and I don't know how to solve this. I'm using the next config file:

```nginx
worker_processes auto;

events {
# Allows up to 1024 connections, can be adjusted
worker_connections 65000;
use epoll;
multi_accept on;
}

# RTMP configuration
rtmp {
server {
live on;
listen 1935; # Listen on standard RTMP port
chunk_size 4000;
# buflen 100ms;

# This application is to accept incoming stream


# This application is for splitting the stream into HLS fragments
application show {
# allow publish all;
# allow play all;
live on; # Allows live input from above
hls on; # Enable HTTP Live Streaming

# Pointing this to an SSD is better as this involves lots of IO
hls_path /mnt/hls/;
hls_fragment 1;
hls_playlist_length 4;

# Instruct clients to adjust resolution according to bandwidth
hls_variant _low BANDWIDTH=192000; # Low bitrate, sub-SD resolution
hls_variant _src BANDWIDTH=648000; # Source bitrate, source resolution

}

application show2 {
# allow publish all;
# allow play all;
live on; # Allows live input from above
hls on; # Enable HTTP Live Streaming

# Pointing this to an SSD is better as this involves lots of IO
hls_path /mnt/hls2/;
hls_fragment 1;
hls_playlist_length 4;

# Instruct clients to adjust resolution according to bandwidth
hls_variant _low BANDWIDTH=192000; # Low bitrate, sub-SD resolution
hls_variant _src BANDWIDTH=648000; # Source bitrate, source resolution

}
}
}

http {
# See http://licson.net/post/optimizing-nginx-for-large-file-delivery/ for more detail
# This optimizes the server for HLS fragment delivery
sendfile off;
tcp_nopush on;
aio on;
directio 512;
default_type application/octet-stream;

# Nginx optimizations
access_log off;


# HTTP server required to serve the player and HLS fragments
server {
listen 8080;

location / {
root /path/to/web_player/;
}

location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}

location /stat.xsl {
root /usr/local/nginx/html;
}

location /control {
rtmp_control all;
}

location /hls {
types {
application/vnd.apple.mpegurl m3u8;
}

root /mnt/;
add_header 'Cache-Control' 'no-cache'; # Prevent caching of HLS fragments
add_header 'Access-Control-Allow-Origin' '*'; # Allow web player to access our playlist
}
}
}

```
By the way I'm using video-js to play my stream.

Thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 67
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready