日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SRS4.0.85流媒体搭建及HTTPS代理

發布時間:2024/1/1 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SRS4.0.85流媒体搭建及HTTPS代理 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

下載SRS4.0.85 :git clone -b v4.0.85 https://gitee.com/ossrs/srs.git

服務器配置參考鏈接:1-SRS 4.0開發環境搭建:包括推流、服務器配置、拉流測試 - 知乎

webRTC延遲基本在1s內,配置好webrtc文件后可用obs推流,見文Windows+nginx+rtmp+OBS中obs推流

另注:服務開啟命令:./objs/srs -c conf/rtc.conf

??????????將公網IP改到rtc.conf中的candidate 47.108.xx.xx;

? ? ? ? ?按照配置文件說明開放端口(linux):

iptables -I INPUT -p tcp --dport 8080 -j ACCEPT #如國標平臺接入需開udp-5060端口,否則獲取不到畫面 iptables -I INPUT -p udp --dport 5060 -j ACCEPT #最后不要忘 iptables-save

nginx作Https代理

nginx配置文件如下,將nginx證書與密鑰配置好即可。

先開啟nginx服務再開啟srs服務

如果nginx沒有http2模塊,運行以下命令

#安裝http2模塊 ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module #直接make不覆蓋編譯 make #啟動命令 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/srsnginx.conf #nginx.conf配置文件 worker_processes 1; events {worker_connections 1024; } ? http {include ? ? ? ? ? ? /etc/nginx/mime.types; ?server {listen ? ? ? 80;listen ? ? ? 443 ssl http2;server_name _;ssl_certificate ? ? /usr/local/srs/conf/server.crt;ssl_certificate_key /usr/local/srs/conf/server.key; ?# For SRS homepage, console and players# ? http://r.ossrs.net/console/# ? http://r.ossrs.net/players/location / {proxy_pass http://127.0.0.1:8080/;}# For SRS streaming, for example:# ? http://r.ossrs.net/live/livestream.flv# ? http://r.ossrs.net/live/livestream.m3u8location ~ /.+/.*\.(flv|m3u8|ts|aac|mp3)$ {proxy_pass http://127.0.0.1:8080$request_uri;}# For SRS backend API for console.location /api/ {proxy_pass http://127.0.0.1:1985/api/;}# For SRS WebRTC publish/play API.location /rtc/ {proxy_pass http://127.0.0.1:1985/rtc/;}} }

總結

以上是生活随笔為你收集整理的SRS4.0.85流媒体搭建及HTTPS代理的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。