BlueXIII's Blog

热爱技术,持续学习

0%

常用推流测试工具

Android推流

RTSP Camera

https://play.google.com/store/apps/details?id=com.miv.rtspcamera&hl=zh

播流地址:

RTMP Camera

https://play.google.com/store/apps/details?id=com.miv.rtmpcamera&hl=en_US

RTMP推流:
rtmp://10.30.22.242:1935/hls/mystream

需要提前搭建nginx-with-rtmp

OBS推流

https://obsproject.com/

ffmpeg推流

推视频文件

1
2
ffmpeg -i /tmp/test.mp4 -f flv rtmp://10.30.22.242:1935/hls/mystream
ffmpeg -i /tmp/test2.flv -f flv rtmp://10.30.22.242:1935/hls/mystream

推USB摄像头

1
2
3
4
5
6
7
8
9
10
11
# Windows列出设备
ffplay -f dshow -i video="USB2.0 Camera"

# macOS列出设备
ffmpeg -f avfoundation -list_devices true -i ""

# 只推摄像头
ffmpeg -f avfoundation -framerate 30 -video_size 1280x720 -i "0" -vcodec libx264 -acodec libfaac -f flv rtmp://10.30.22.242:1935/hls/mystream

# 推摄像头+麦克风
ffmpeg -f avfoundation -framerate 30 -video_size 1280x720 -i "0:1" -vcodec libx264 -preset ultrafast -acodec libmp3lame -ar 44100 -ac 1 -f flv rtmp://10.30.22.242:1935/hls/mystream

推桌面录屏

1
2
ffmpeg -f avfoundation -pixel_format uyvy422 -i "1" -f flv rtmp://10.30.22.242:1935/hls/mystream
ffmpeg -f avfoundation -i "1" -vcodec libx264 -preset ultrafast -acodec libfaac -f flv rtmp://10.30.22.242:1935/hls/mystream