ошибка Range Java NanoHTTPD служит HTTP Live Streamingошибка Range Java NanoHTTPD служит HTTP Live Streaming
Я пытаюсь служить HLS видео потока с использованием сервера на основе NanoHTTPD HTTP Java. Я также использую VLC для воспроизведения файла .m3u8. Смешно, что VLC может воспроизводить мое видео, но NanoHTTPD бросает «java.net.SocketException». Я использую SimpleWebServer.java, который поставляется с NanoHTTPD
Вот мой .m3u8 файл
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
sample_320k-1.ts
#EXTINF:10,
sample_320k-2.ts
#EXTINF:10,
sample_320k-3.ts
#EXTINF:10,
sample_320k-4.ts
#EXTINF:11,
sample_320k-5.ts
#EXTINF:11,
sample_320k-6.ts
#EXTINF:11,
sample_320k-7.ts
#EXTINF:11,
sample_320k-8.ts
#EXTINF:10,
sample_320k-9.ts
#EXTINF:11,
sample_320k-10.ts
#EXTINF:11,
sample_320k-11.ts
#EXTINF:10,
sample_320k-12.ts
#EXTINF:10,
sample_320k-13.ts
#EXTINF:10,
sample_320k-14.ts
#EXTINF:10,
sample_320k-15.ts
#EXTINF:11,
sample_320k-16.ts
#EXTINF:9,
sample_320k-17.ts
#EXT-X-ENDLIST
Вот моя консоль из Eclipse, сервер начал, Нажмите Enter, чтобы остановить.
GET '/'
HDR: 'connection' = 'keep-alive'
HDR: 'accept-language' = 'en-US,en;q=0.8'
HDR: 'host' = '127.0.0.1:8080'
HDR: 'accept' = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HDR: 'user-agent' = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31'
HDR: 'accept-encoding' = 'gzip,deflate,sdch'
HDR: 'accept-charset' = 'ISO-8859-1,utf-8;q=0.7,*;q=0.3'
GET '/favicon.ico'
HDR: 'connection' = 'keep-alive'
HDR: 'accept-language' = 'en-US,en;q=0.8'
HDR: 'host' = '127.0.0.1:8080'
HDR: 'accept' = '*/*'
HDR: 'user-agent' = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31'
HDR: 'accept-encoding' = 'gzip,deflate,sdch'
HDR: 'accept-charset' = 'ISO-8859-1,utf-8;q=0.7,*;q=0.3'
GET '/Http_Live_Streaming/vodhls/stream-local.m3u8'
HDR: 'connection' = 'close'
HDR: 'host' = 'localhost:8080'
HDR: 'range' = 'bytes=0-'
HDR: 'icy-metadata' = '1'
HDR: 'user-agent' = 'VLC/2.0.7 LibVLC/2.0.7'
GET '/Http_Live_Streaming/vodhls/sample_320k-1.ts'
HDR: 'connection' = 'close'
HDR: 'host' = 'localhost:8080'
HDR: 'range' = 'bytes=0-'
HDR: 'icy-metadata' = '1'
HDR: 'user-agent' = 'VLC/2.0.7 LibVLC/2.0.7'
java.net.SocketException
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:662)
at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:124)
at java.lang.Thread.run(Thread.java:722)
GET '/Http_Live_Streaming/vodhls/sample_320k-2.ts'
HDR: 'connection' = 'close'
HDR: 'host' = 'localhost:8080'
HDR: 'range' = 'bytes=0-'
HDR: 'icy-metadata' = '1'
HDR: 'user-agent' = 'VLC/2.0.7 LibVLC/2.0.7'
java.net.SocketException
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:662)
at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:124)
at java.lang.Thread.run(Thread.java:722)
GET '/Http_Live_Streaming/vodhls/sample_320k-3.ts'
HDR: 'connection' = 'close'
HDR: 'host' = 'localhost:8080'
HDR: 'range' = 'bytes=0-'
HDR: 'icy-metadata' = '1'
HDR: 'user-agent' = 'VLC/2.0.7 LibVLC/2.0.7'
java.net.SocketException
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:662)
at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:124)
at java.lang.Thread.run(Thread.java:722)
GET '/Http_Live_Streaming/vodhls/sample_320k-4.ts'
HDR: 'connection' = 'close'
HDR: 'host' = 'localhost:8080'
HDR: 'range' = 'bytes=0-'
HDR: 'icy-metadata' = '1'
HDR: 'user-agent' = 'VLC/2.0.7 LibVLC/2.0.7'
java.net.SocketException
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:662)
at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:124)
at java.lang.Thread.run(Thread.java:722)
java.net.SocketException
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:662)
at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:124)
at java.lang.Thread.run(Thread.java:722)
java.net.SocketException
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:662)
at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:124)
at java.lang.Thread.run(Thread.java:722)
java.net.SocketException
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:662)
at fi.iki.elonen.NanoHTTPD$1$1.run(NanoHTTPD.java:124)
at java.lang.Thread.run(Thread.java:722)
Server stopped.