-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
Milestone
Description
The process of generating HLS involves the duration (dur) slowly increasing over time until the generated ts files have no video information. Previously, the hls_fragment was set to 10 seconds and hls_window to 60, but it didn't work. After increasing the values, it was able to generate a segment. However, the dur value is very unstable and doesn't gradually increase as configured (around 20 seconds). When it reaches around 40 seconds, the ts files are generated without video, and eventually, the dur value becomes extremely large, causing the ts files to be dropped. Please help identify the issue with this.
Version: 3.0.25
Configuration file:
listen 1935;
max_connections 1000;
srs_log_tank file;
srs_log_file ./objs/srs.log;
http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
listen 8080;
dir /usr/local/nginx/html;
}
stats {
network 0;
disk sda sdb xvda xvdb;
}
vhost __defaultVhost__ {
gop_cache off;
queue_length 1;
min_latency on;
mr {
enabled off;
}
mw_latency 100;
tcp_nodelay on;
hls {
enabled on;
hls_fragment 20;
hls_window 600;
hls_path /usr/local/nginx/html;
hls_m3u8_file [app]/[stream].m3u8;
hls_ts_file [app]/[stream]-[seq].ts;
}
http_remux {
enabled off;
mount [vhost]/[app]/[stream].flv;
hstrs on;
}
}
[root@localhost trunk]#
LOG printing:
[root@localhost trunk]# tail -f ./objs/srs.log
[2018-01-22 01:47:37.543][Trace][9311][106] source url=/live/livestream, ip=10.43.154.41, cache=0, is_edge=0, source_id=-1[-1]
[2018-01-22 01:47:37.555][Trace][9311][106] hls: win=600.00, frag=20.00, prefix=, path=/usr/local/nginx/html, m3u8=[app]/[stream].m3u8, ts=[app]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0
[2018-01-22 01:47:37.555][Trace][9311][106] ignore disabled exec for vhost=__defaultVhost__
[2018-01-22 01:47:37.555][Trace][9311][106] set TCP_NODELAY 0=>1
[2018-01-22 01:47:37.555][Trace][9311][106] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=1, rtcid=0
[2018-01-22 01:47:37.557][Trace][9311][106] got metadata, width=1280, height=720, vcodec=7, acodec=10
[2018-01-22 01:47:37.558][Trace][9311][106] protocol in.buffer=0, in.ack=0, out.ack=2500000, in.chunk=128, out.chunk=60000
[2018-01-22 01:47:37.558][Trace][9311][106] 43B video sh, codec(7, profile=Main, level=3.1, 1280x720, 0kbps, 0.0fps, 0.0s)
[2018-01-22 01:47:37.558][Trace][9311][106] 4B audio sh, codec(10, profile=LC, 1channels, 0kbps, 32000HZ), flv(16bits, 2channels, 44100HZ)
[2018-01-22 01:47:46.614][Trace][9311][106] -> HLS time=10000, sno=1, ts=livestream-0.ts, dur=17.75, dva=0p
[2018-01-22 01:47:56.608][Trace][9311][106] -> HLS time=20001, sno=1, ts=livestream-0.ts, dur=27.74, dva=0p
[2018-01-22 01:48:02.555][Trace][9311][106] <- CPB time=19053, okbps=1,0,0, ikbps=1903,0,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:48:06.617][Trace][9311][106] -> HLS time=30001, sno=1, ts=livestream-0.ts, dur=37.77, dva=0p
[2018-01-22 01:48:12.555][Trace][9311][106] <- CPB time=29053, okbps=0,0,0, ikbps=1889,1889,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:48:16.599][Trace][9311][106] -> HLS time=40001, sno=2, ts=livestream-1.ts, dur=24.92, dva=0p
[2018-01-22 01:48:22.555][Trace][9311][106] <- CPB time=39053, okbps=0,0,0, ikbps=1899,1889,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:48:26.615][Trace][9311][106] -> HLS time=50002, sno=2, ts=livestream-1.ts, dur=34.95, dva=0p
[2018-01-22 01:48:32.555][Trace][9311][106] <- CPB time=49054, okbps=0,0,0, ikbps=1890,1889,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:48:36.640][Trace][9311][106] -> HLS time=60002, sno=3, ts=livestream-2.ts, dur=28.31, dva=0p
[2018-01-22 01:48:42.555][Trace][9311][106] <- CPB time=59054, okbps=0,0,0, ikbps=1895,1901,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:48:46.620][Trace][9311][106] -> HLS time=70002, sno=4, ts=livestream-3.ts, dur=31.77, dva=0p
[2018-01-22 01:48:52.555][Trace][9311][106] <- CPB time=69054, okbps=0,0,0, ikbps=1889,1901,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:48:56.608][Trace][9311][106] -> HLS time=80002, sno=5, ts=livestream-4.ts, dur=31.48, dva=0p
[2018-01-22 01:49:02.555][Trace][9311][106] <- CPB time=79054, okbps=0,0,0, ikbps=1892,1901,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:49:06.617][Trace][9311][106] -> HLS time=90002, sno=6, ts=livestream-5.ts, dur=33.99, dva=0p
[2018-01-22 01:49:12.555][Trace][9311][106] <- CPB time=89054, okbps=0,0,0, ikbps=1888,1873,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:49:16.641][Trace][9311][106] -> HLS time=100003, sno=7, ts=livestream-6.ts, dur=38.59, dva=0p
[2018-01-22 01:49:22.555][Trace][9311][106] <- CPB time=99055, okbps=0,0,0, ikbps=1892,1873,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:49:26.619][Trace][9311][106] -> HLS time=110003, sno=11, ts=livestream-10.ts, dur=38.60, dva=0p
[2018-01-22 01:49:32.555][Trace][9311][106] <- CPB time=109055, okbps=0,0,0, ikbps=1889,1873,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:49:36.607][Trace][9311][106] -> HLS time=120003, sno=120, ts=livestream-119.ts, dur=41.23, dva=0p
[2018-01-22 01:49:42.555][Trace][9311][106] <- CPB time=119055, okbps=0,0,0, ikbps=1891,1901,0, mr=0/350, p1stpt=20000, pnt=5000
[2018-01-22 01:49:46.622][Trace][9311][106] -> HLS time=130006, sno=338, ts=livestream-337.ts, dur=43.97, dva=0p
TRANS_BY_GPT3