本地创建RTSP视频流测试地址

166 阅读1分钟
依赖工具

[mediamtx](Releases · bluenviron/mediamtx)
[ffmpeg](Download FFmpeg)\

步骤

1 运行mediamtx \

image.png

2``

ffmpeg -re -f lavfi -i testsrc=size=640x480:rate=30 -c:v libx264 -f rtsp rtsp://localhost:8554/mystream
// rtsp://localhost:8554/mystream 替换为想要指定的地址,端口为上图白色选中的端口

3

ffplay -rtsp_transport tcp rtsp://localhost:8554/mystream //地址同上 
建议使用tcp,udp***可能***会导致丢包花屏