DarwinStreamServer 简单测试 720P 2Mbps 4Mbps码流 RTSP 20路推20路拉

本文详细记录了一次音视频直播流媒体的测试过程,包括使用Darwin服务器进行流媒体服务,通过FFMPEG推流20路720P4Mbps恒定码流视频,以及在Windows客户端使用VLC播放器进行TCP和UDP模式拉流测试。测试结果显示,UDP推流和TCP拉流下画质良好,首屏偶有花屏现象。
摘要由CSDN通过智能技术生成

网络:一个百兆交换机,只接Darwin服务器,win客户端,Linux 推流端

 

1,运行DarwinStreamServer

 

2,使用FFMPEG 推流20路,片子为720P 4Mbps恒定码流,UDP TCP推流参数可改

[root@localhost 03_Tools]# cat auto_streaming.sh 
IP='1.1.1.2'
PORT='554'
VideoDir='/home/svn.chunli/1.1.1.2/Streaming_Media_New_Tech/03_Tools/03_各种分辨率的各种码流_测试视频/01_Nigel_Stanford_Cymatics'
ffmpeg='/home/ffmpeg/ffmpeg/bin/ffmpeg'

Pusher()
{
    #ffmpeg_flags='-c copy -rtsp_transport tcp -f rtsp'
    ffmpeg_flags='-c copy -rtsp_transport udp -f rtsp'
    #ffmpeg_flags='-c copy  -strict -2 -c:a opus -b:a 200K -rtsp_transport tcp -f rtsp'
    #ffmpeg_flags='-vn  -strict -2 -c:a opus -b:a 200K -rtsp_transport tcp -f rtsp'
    FileName=$1;
    SdpName=$2;
    cmd="${ffmpeg} -re -i ${FileName} ${ffmpeg_flags} rtsp://$IP:$PORT/${SdpName}"
    ps -ef > pusher.log
    grep ${SdpName} pusher.log 2>&1 > /dev/null
    if [ $? -ne 0 ]
    then
        $cmd &
    fi
    sleep 1
}


while true
do
    #Pusher ${VideoDir}/1920x1080/Nigel_Stanford_Cymatics_1080_4Mbits.mp4     1080_4Mbits.sdp
    #Pusher ${VideoDir}/1920x1080/Nigel_Stanford_Cymatics_1080_8Mbits.mp4     1080_8Mbits.sdp
    #Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_2Mbits.mp4       720_2Mbits.sdp
    #Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits.sdp
    #Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_8Mbits.mp4       720_8Mbits.sdp

    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_1.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_2.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_3.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_4.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_5.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_6.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_7.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_8.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_9.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_10.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_11.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_12.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_13.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_14.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_15.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_16.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_17.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_18.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_19.sdp
    Pusher ${VideoDir}/1280x720/Nigel_Stanford_Cymatics_720_4Mbits.mp4       720_4Mbits_20.sdp
    

done




[root@localhost 03_Tools]# 

 

 

win  VLC 拉流端


TCP模式拉流
cd C:\Program Files\VideoLAN\VLC              & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_1.sdp  & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_2.sdp  & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_3.sdp  & choice /t 1% /d y /n >nul 
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_4.sdp  & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_5.sdp  & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_6.sdp  & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_7.sdp  & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_8.sdp  & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_9.sdp  & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_10.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_11.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_12.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_13.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_14.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_15.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_16.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_17.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_18.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_19.sdp & choice /t 1% /d y /n >nul
start /b vlc --rtsp-tcp rtsp://1.1.1.2/720_4Mbits_20.sdp & choice /t 1% /d y /n >nul





UDP模式拉流

cd C:\Program Files\VideoLAN\VLC              & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_1.sdp  & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_2.sdp  & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_3.sdp  & choice /t 1% /d y /n >nul 
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_4.sdp  & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_5.sdp  & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_6.sdp  & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_7.sdp  & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_8.sdp  & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_9.sdp  & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_10.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_11.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_12.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_13.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_14.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_15.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_16.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_17.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_18.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_19.sdp & choice /t 1% /d y /n >nul
start /b vlc --no-rtsp-tcp rtsp://1.1.1.2/720_4Mbits_20.sdp & choice /t 1% /d y /n >nul


 

 

 

720_2M.20路UDP推流20路TCP拉流.jpg

 

720_2M.20路UDP推流20路UDP拉流.jpg

 

Darwin服务器压力.png

 

推流端网卡速率.png

 

观测过程中,VLC 打开RTSP流媒体,首屏会花屏。

很少很少马赛克,画质相当好。

 

 

 

 

转载于:https://my.oschina.net/u/3776585/blog/1633309

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值