https://blog.gmem.cc/research-on-html5-video-surveillance
First try this demo can play on ios
http://jsmpeg.com/
Second
https://github.com/phoboslab/jsmpeg#encoding-videoaudio-for-jsmpeg
view-stream.html (nodejs localhost:8080 maybe can see)
websocket-relay.js this is use node.js then get ws server
Import !!
ffmpeg -re -i rtmp://xxx.xxx.xxx.xxx/live/ooo -f mpegts -codec:v mpeg1video -bf 0 -codec:a mp2 -s 640x360 -r 30 -q 4 -muxdelay 0.001 http://localhost:8081/password -re 參數表示以視頻實際播放速率解碼,不加這個參數一般會導致直播速率變得飛快
-re一定要加,代表按照帧率发送,否则ffmpeg会一股脑地按最高的效率发送数据。
-muxdelay 0.001 reduce lag (maybe no use)
-q 4 Need test
You’re setting -q 1, which is the best possible quality.
master 192.168.105.20 srs.conf
isten 1935;
max_connections 1000;
srs_log_tank console; #file; #console;
srs_log_file ./objs/srs.log;
daemon off; #on or delete this line
http_api {
enabled on;
listen 1985;
}
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
stats {
network 0;
disk sda sdb xvda xvdb;
}
vhost __defaultVhost__ {
ingest livestream {
enabled on;
input {
type stream;
url rtmp://xxx.
https://github.com/ossrs/srs
https://github.com/ossrs/srs/wiki/v2_CN_Home
https://github.com/ossrs/srs/wiki/v1_CN_SampleRTMP
https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=srs&starCount=0
http://ossrs.net/srs.release/releases/
====低延时配置======
https://github.com/ossrs/srs/wiki/v2_CN_LowLatency
考虑GOP-Cache和累积延迟,推荐的低延时配置如下(参考min.delay.com):
# the listen ports, split by space. listen 1935; vhost __defaultVhost__ { gop_cache off;
queue_length 10;
min_latency on;
mr { enabled off; }
mw_latency 100;
tcp_nodelay on; }
当然,服务器的性能也要考虑,不可以让一个SRS进程跑太高带宽,一般CPU在80%以下不会影响延迟,连接数参考性能。
https://www.hongweipeng.com/index.php/archives/835/
http://www.cnblogs.com/lingyunhu/p/rtc28.html
https://jitsi.org/Projects/JitsiVideobridge
https://www.youtube.com/watch?v=OT6kwzsQeVc&feature=youtu.be
https://my.oschina.net/langhuihui/blog/598338
https://my.oschina.net/langhuihui/blog/602265
https://my.oschina.net/langhuihui/blog/612144
http://flashphoner.com/broadcasting-of-a-streaming-video-from-a-professional-video-capturing-device-live-encoder-via-the-rtmp-protocol/
這套大概是目前可以把rtmp轉成websocket和webrtc
https://wcs5-eu.flashphoner.com/dashboard.xhtml
這是他的deom,Streamer就是把攝像頭和聲音轉成html5 (websocket、webRTC)能接收的
有下載 web call server 5.0 但要序號,問官方,說沒試用
============
另一個可能
Monaserver http://www.monaserver.ovh/
https://github.com/sbidolach/video-live-streaming