1、下载所需包:
2、配置nginx-win-rtmp.conf
ngnix-win-rtmp.conf配置详情
#user nobody; # multiple workers works ! worker_processes 5; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 8192; # max value 32768, nginx recycling connections+registry optimization = # this.value * 20 = max concurrent connections currently tested with one worker # C1000K should be possible depending there is enough ram/cpu power # multi_accept on; } rtmp { server { listen 1935; chunk_size 1024; application live { live on; } application hls{ live on; hls on; hls_path temp/hls; hls_fragment 8s; } } } http { #include /nginx/conf/naxsi_core.rules; include mime.types; server { listen 8080; server_name localhost; location / { root html; index index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html{ root html; } } }
3.启动linux
.\nginx.exe -c .\conf\nginx-win-rtmp.conf
将ffmpeg添加到系统环境变量中
4.启动ffmpeg rstp转rtmp
ffmpeg -re -rtsp_transport tcp -i "rtsp://admin:12345@192.168.0.111:554/h264/ch1/main/av_stream" -f flv -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 1280x720 -q 10 "rtmp://192.168.0.125:1935/live/"
5.下载VLC,播放串流地址rtmp://192.168.0.125:1935/live/
ffmpeg -re -rtsp_transport tcp -i "rtsp://admin:12345@192.168.0.111:554/h264/ch1/main/av_stream" -f flv -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 1280x720 -q 10 "rtmp://venton.cn/push?auth_key=1607496736-0-0-5eb96eee7be306ca60b25006c791a819"
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。