arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.45k stars 3.51k forks source link

HLS can't play live stream #737

Closed rogerfar closed 8 years ago

rogerfar commented 8 years ago

I am trying to setup HLS to stream my webcam. This is my nginx.conf:

user root;
worker_processes 1;

 events {
   worker_connections 1024;
 }

 http {
      include /etc/nginx/mime.types;
      default_type application/octet-stream;
      sendfile on;
      keepalive_timeout 65;
      #if you want gzip enabled
      #gzip on;
      #gzip_disable "msie6";

 server {
     listen    80;
     server_name localhost;

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

     location /stat.xsl {
       # you can move stat.xsl to a different location
       root /usr/src/nginx-rtmp-module;
     }

     # rtmp control
     location /control {
       rtmp_control all;
     }

     location /hls {
       types {
         application/vnd.apple.mpegurl m3u8;
         video/mp2t ts;
       }
       root /tmp;
       add_header Cache-Control no-cache;
     }

     error_page  500 502 503 504 /50x.html;
     location = /50x.html {
       root  html;
     }
   }
 }
 rtmp {
   server {
     listen 1935;
     chunk_size 4000;
     ping 30s;
     notify_method get;

     application hls {
       live on;
       hls on;
       hls_path /tmp/hls;
     }
     application live {
       live on;
     }
   }
 }

I publish with ffmpeg like this: ffmpeg -loglevel verbose -re -i rtsp://192.168.10.8/profile4/media.smp -vcodec libx264 -vprofile baseline -acodec libmp3lame -ar 44100 -ac 1 -f flv rtmp://192.168.10.4:1935/hls/stream1

I can open this file in the browser: http://192.168.10.4/hls/stream1.m3u8 it will give me

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:31
#EXT-X-DISCONTINUITY
#EXTINF:31.467,
http://192.168.10.4/hls/stream1-0.ts

When I open the stream in VLC:

Your input can't be opened:
VLC is unable to open the MRL 'http://192.168.10.4/hls/stream1.m3u8'. Check the log for details.
VLC can't recognize the input's format:
The format of 'http://192.168.10.4/hls/stream1.m3u8' cannot be detected. Have a look at the log for details.

Log:


core debug: adding item `http://192.168.10.4/hls/stream1.m3u8' ( http://192.168.10.4/hls/stream1.m3u8 )
core debug: processing request item: http://192.168.10.4/hls/stream1.m3u8, node: null, skip: 0
core debug: rebuilding array of current - root Playlist
core debug: rebuild done - 2 items, index 1
core debug: starting playback of the new playlist item
core debug: resyncing on http://192.168.10.4/hls/stream1.m3u8
core debug: http://192.168.10.4/hls/stream1.m3u8 is at 1
core debug: creating new input thread
core debug: Creating an input for 'http://192.168.10.4/hls/stream1.m3u8'
core debug: requesting art for http://192.168.10.4/hls/stream1.m3u8
core debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Rogier\AppData\Local\Temp'
core debug: `http://192.168.10.4/hls/stream1.m3u8' gives access `http' demux `' path `192.168.10.4/hls/stream1.m3u8'
core debug: specified demux `any'
core debug: creating demux: access='http' demux='any' location='192.168.10.4/hls/stream1.m3u8' file='\\192.168.10.4\hls\stream1.m3u8'
core debug: meta ok for (null), need to fetch art
core debug: looking for access_demux module matching "http": 12 candidates
core debug: no access_demux modules matched
core debug: creating access 'http' location='192.168.10.4/hls/stream1.m3u8', path='\\192.168.10.4\hls\stream1.m3u8'
core debug: looking for access module matching "http": 21 candidates
http debug: querying proxy for http://192.168.10.4/hls/stream1.m3u8
http debug: no proxy
http debug: http: server='192.168.10.4' port=80 file='/hls/stream1.m3u8'
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
core debug: net: connecting to 192.168.10.4 port 80
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: connection succeeded (socket = 1816)
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: no meta fetcher modules matched
core debug: searching art for http://192.168.10.4/hls/stream1.m3u8
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
http debug: protocol 'HTTP' answer code 206
http debug: Server: nginx/1.9.3
http debug: Content-Type: application/vnd.apple.mpegurl
http debug: this frame size=275
http debug: Connection: close
http debug: stream size=275,pos=0,remaining=275
core debug: using access module "http"
core debug: Using stream method for AStream*
core debug: starting pre-buffering
core debug: received first data after 0 ms
core debug: pre-buffering done 275 bytes in 0s - 268554 KiB/s
core debug: looking for stream_filter module matching "any": 6 candidates
httplive info: HTTP Live Streaming (192.168.10.4/hls/stream1.m3u8)
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
httplive debug: parse_M3U8 #EXTM3U #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-TARGETDURATION:34 #EXT-X-DISCONTINUITY #EXTINF:33.967, http://192.168.10.4/hls/stream1-0.ts #EXTINF:10.689, http://192.168.10.4/hls/stream1-1.ts #EXT-X-DISCONTINUITY #EXTINF:33.812, http://192.168.10.4/hls/stream1-2.ts 
httplive debug: Live Playlist HLS protocol version: 3
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
httplive debug: #EXT-X-DISCONTINUITY #EXT-X-DISCONTINUITY
httplive debug: #EXT-X-DISCONTINUITY #EXT-X-DISCONTINUITY
httplive debug: Choose segment 0/3 (sequence=0)
core debug: using stream_filter module "httplive"
core debug: Inserted a stream filter
core debug: looking for stream_filter module matching "any": 6 candidates
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
core debug: creating access 'http' location='192.168.10.4/hls/stream1-0.ts', path='\\192.168.10.4\hls\stream1-0.ts'
core debug: looking for access module matching "http": 21 candidates
http debug: querying proxy for http://192.168.10.4/hls/stream1-0.ts
http debug: no proxy
http debug: http: server='192.168.10.4' port=80 file='/hls/stream1-0.ts'
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
core debug: net: connecting to 192.168.10.4 port 80
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: no art finder modules matched
core debug: looking for meta fetcher module matching "any": 1 candidates
core debug: no meta fetcher modules matched
core debug: searching art for http://192.168.10.4/hls/stream1.m3u8
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for http://192.168.10.4/hls/stream1.m3u8
core debug: looking for art finder module matching "any": 2 candidates
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
core debug: no art finder modules matched
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
core debug: connection succeeded (socket = 1868)
core debug: using meta fetcher module "lua"
core debug: removing module "lua"
core debug: searching art for http://192.168.10.4/hls/stream1.m3u8
core debug: looking for art finder module matching "any": 2 candidates
core debug: no art finder modules matched
core debug: art not found for http://192.168.10.4/hls/stream1.m3u8
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
core debug: no art finder modules matched
core debug: art not found for http://192.168.10.4/hls/stream1.m3u8
http debug: protocol 'HTTP' answer code 404
http error: error: HTTP/1.1 404 Not Found
http debug: switching to HTTP version 1.0
core debug: net: connecting to 192.168.10.4 port 80
core debug: connection succeeded (socket = 1868)
http debug: protocol 'HTTP' answer code 404
http error: error: HTTP/1.1 404 Not Found
core debug: net: connecting to 192.168.10.4 port 80
core debug: connection succeeded (socket = 1868)
qt4 debug: IM: Setting an input
access_mms error: error: HTTP/1.1 404 Not Found
core debug: no access modules matched
core error: no suitable access module for `http://192.168.10.4/hls/stream1-0.ts'
httplive error: downloading segment 0 from stream 0 failed
core debug: creating access 'http' location='192.168.10.4/hls/stream1-1.ts', path='\\192.168.10.4\hls\stream1-1.ts'
httplive error: segment 0 should have been available (stream 0)
core debug: looking for access module matching "http": 21 candidates
http debug: querying proxy for http://192.168.10.4/hls/stream1-1.ts
httplive error: segment 0 should have been available (stream 0)
http debug: no proxy
http debug: http: server='192.168.10.4' port=80 file='/hls/stream1-1.ts'
httplive error: segment 0 should have been available (stream 0)
core debug: no stream_filter modules matched
core debug: looking for stream_filter module matching "record": 6 candidates
core debug: using stream_filter module "record"
core debug: creating demux: access='http' demux='any' location='192.168.10.4/hls/stream1.m3u8.ts' file='\\192.168.10.4\hls\stream1.m3u8.ts'
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
core debug: looking for demux module matching "any": 66 candidates
core debug: net: connecting to 192.168.10.4 port 80
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
core debug: connection succeeded (socket = 1880)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
es error: cannot peek
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
es error: cannot peek
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
es error: cannot peek
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
es error: cannot peek
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
es error: cannot peek
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
http debug: protocol 'HTTP' answer code 206
http debug: Server: nginx/1.9.3
http debug: Content-Type: video/mp2t
httplive error: segment 0 should have been available (stream 0)
http debug: this frame size=1156388
http debug: Connection: close
http debug: stream size=1156388,pos=0,remaining=1156388
core debug: using access module "http"
core debug: Using stream method for AStream*
core debug: starting pre-buffering
httplive error: segment 0 should have been available (stream 0)
core debug: received first data after 0 ms
core debug: pre-buffering done 1024 bytes in 0s - 1000000 KiB/s
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
asx debug: not enough data
httplive error: segment 0 should have been available (stream 0)
pls debug: not enough data
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
mod debug: MOD validation failed (ext=ts)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
ps error: cannot peek
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
httplive error: segment 0 should have been available (stream 0)
mjpeg warning: no more data
mjpeg error: cannot peek
httplive error: segment 0 should have been available (stream 0)
mpgv error: cannot peek
httplive error: segment 0 should have been available (stream 0)
avcodec debug: trying url: \\192.168.10.4\hls\stream1.m3u8.ts
httplive error: segment 0 should have been available (stream 0)
avcodec warning: cannot peek
lua debug: Trying Lua scripts in C:\Users\Rogier\AppData\Roaming\vlc\lua\playlist
lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\playlist
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\anevia_streams.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\anevia_xml.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\appletrailers.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\bbc_co_uk.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\break.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\canalplus.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\cue.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\dailymotion.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\extreme.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\france2.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\googlevideo.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\jamendo.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\joox.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\katsomo.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\koreus.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\lelombrik.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\liveleak.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\metacafe.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\metachannels.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\mpora.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\pinkbike.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\pluzz.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\rockbox_fm_presets.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\soundcloud.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\vimeo.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\youtube.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\youtube_homepage.luac
lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\playlist\zapiks.luac
httplive error: segment 0 should have been available (stream 0)
ps error: cannot peek
httplive error: segment 0 should have been available (stream 0)
vobsub debug: could not read vobsub IDX file
httplive error: segment 0 should have been available (stream 0)
core debug: no demux modules matched
core error: no suitable demux module for `http/any://192.168.10.4/hls/stream1.m3u8'
core debug: removing module "record"
core debug: removing module "httplive"
core debug: removing module "http"
httplive debug: downloaded segment 1 from stream 0
core debug: creating access 'http' location='192.168.10.4/hls/stream1-0.ts', path='\\192.168.10.4\hls\stream1-0.ts'
core debug: looking for access module matching "http": 21 candidates
http debug: querying proxy for http://192.168.10.4/hls/stream1-0.ts
http debug: no proxy
http debug: http: server='192.168.10.4' port=80 file='/hls/stream1-0.ts'
core debug: net: connecting to 192.168.10.4 port 80
core debug: connection succeeded (socket = 1888)
http debug: protocol 'HTTP' answer code 404
http error: error: HTTP/1.1 404 Not Found
http debug: switching to HTTP version 1.0
core debug: net: connecting to 192.168.10.4 port 80
core debug: connection succeeded (socket = 1888)
http debug: protocol 'HTTP' answer code 404
http error: error: HTTP/1.1 404 Not Found
core debug: net: connecting to 192.168.10.4 port 80
core debug: connection succeeded (socket = 1888)
access_mms error: error: HTTP/1.1 404 Not Found
core debug: no access modules matched
core error: no suitable access module for `http://192.168.10.4/hls/stream1-0.ts'
httplive error: downloading segment 0 from stream 0 failed
core debug: creating access 'http' location='192.168.10.4/hls/stream1-2.ts', path='\\192.168.10.4\hls\stream1-2.ts'
core debug: looking for access module matching "http": 21 candidates
http debug: querying proxy for http://192.168.10.4/hls/stream1-2.ts
http debug: no proxy
http debug: http: server='192.168.10.4' port=80 file='/hls/stream1-2.ts'
core debug: net: connecting to 192.168.10.4 port 80
core debug: connection succeeded (socket = 1916)
http debug: protocol 'HTTP' answer code 206
http debug: Server: nginx/1.9.3
http debug: Content-Type: video/mp2t
http debug: this frame size=3503004
http debug: Connection: close
http debug: stream size=3503004,pos=0,remaining=3503004
core debug: using access module "http"
core debug: Using stream method for AStream*
core debug: starting pre-buffering
core debug: received first data after 0 ms
core debug: pre-buffering done 1024 bytes in 0s - 1000000 KiB/s
core debug: removing module "http"
httplive debug: downloaded segment 2 from stream 0

I can't really figure out what's going on here, is bit encoding?

sergey-dryabzhinsky commented 8 years ago

The deal seems in hostname for HTTP. http://192.168.10.4/ is not accessable by localhost probably. Change server_name in http server section to:

 server {
     listen    80;
     server_name localhost _ 192.168.10.4;
salmanbangash1176 commented 5 years ago

The rtmp link is working fine but the hls part isn't working with both localhost and ip. so what should i do?

MkMarko commented 3 years ago

这是权限问题 chmod -R www:www 相应的文件目录