LINUX.ORG.RU

Что не так с моим HLS?

 , ,


0

1

сделал HLS на nginx+ffmpeg, в результате все плееры - ffplay, vlc, mplayer, hls плагин для хрома, андроидовский браузер этот поток воспроизводят нормально (указанный напрямую), но ни один web hls плеер его не воспроизводит, в т.ч. онлайн плееры, в которых можно указать адрес потока и они его воспроизводят:

nginx:
application hls {
live on;
sync 10ms;

exec_static /usr/local/bin/ffmpeg -i rtsp://10.255.18.201/user=admin&password=*******&channel=12&stream=0.sdp -rtsp_transport tcp -vcodec copy -an -pix_fmt yuv420p -f flv -hls_time 2 -hls_list_size 15 rtmp://127.0.0.1:1935/hls/live;

hls on;
hls_fragment 5s;
hls_playlist_length 50s;
hls_path /usr/local/nginx/hls/;
hls_fragment_naming timestamp;

}


live.m3u8:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:374
#EXT-X-TARGETDURATION:6
#EXTINF:6.017,
live-201999780.ts
#EXTINF:5.998,
live-202541310.ts
#EXTINF:5.985,
live-203081130.ts
#EXTINF:6.059,
live-203619780.ts
#EXTINF:5.996,
live-204165090.ts
#EXTINF:5.945,
live-204704730.ts
#EXTINF:6.000,
live-205239780.ts
#EXTINF:5.945,
live-205779780.ts
#EXTINF:6.060,
live-206314830.ts
#EXTINF:6.005,


содержимое hls каталога
live-206860230.ts
live-198222570.ts
live-198762300.ts
live-199302030.ts
live-199838160.ts
live-200379960.ts
live-200921400.ts
live-201471210.ts
live-201999780.ts
live-202541310.ts
live-203081130.ts
live-203619780.ts
live-204165090.ts
live-204704730.ts
live-205239780.ts
live-205779780.ts
live-206314830.ts
live-206860230.ts
live-207400680.ts
live.m3u8

ffplay:
ffplay http://****:8080/hls/live.m3u8
ffplay version 4.1.4-1build2 Copyright (c) 2003-2019 the FFmpeg developers
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[hls,applehttp @ 0x7efd70000bc0] Opening 'http://****:8080/hls/live-84311640.ts' for reading
[hls,applehttp @ 0x7efd70000bc0] Opening 'http://****:8080/hls/live-84859650.ts' for reading
[http @ 0x7efd70009b80] Opening 'http://****:8080/hls/live-85392270.ts' for reading
[http @ 0x7efd70009b80] Opening 'http://****:8080/hls/live-85933620.ts' for reading
[http @ 0x7efd70969180] Opening 'http://****:8080/hls/live.m3u8' for reading
[http @ 0x7efd70009b80] Opening 'http://****:8080/hls/live-86476950.ts' for reading
[hls,applehttp @ 0x7efd70000bc0] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, hls,applehttp, from 'http://****:8080/hls/live.m3u8':
Duration: N/A, start: 937.496000, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 90k tbr, 90k tbn, 180k tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp
Metadata:
variant_bitrate : 0
938.89 M-V: -0.040 fd= 14 aq= 0KB vq= 318KB sq= 0B f=15/15


Ты указываешь -vcodec copy и в тоже время -f flv. Причём с цветовой схемой -pix_fmt yuv420p. Без звука ключом -an где он на это и ругается [hls,applehttp @ 0x7efd70000bc0] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate

red_rain ()