基于video.js/flv.js前端播放流媒体

1.使用ffmpeg 推流测试:

1、使用rtsp方式推流
# h264推流
ffmpeg -re -i “G:\as.mp4” -vcodec h264 -acodec aac -f rtsp -rtsp_transport tcp rtsp://127.0.0.1/live/test
http://127.0.0.1/live/test.flv

2、使用rtmp方式推流
#如果未安装FFmpeg,你也可以用obs推流
ffmpeg -re -i “G:\as.mp4” -vcodec h264 -acodec aac -f flv rtmp://127.0.0.1/live/test

http://127.0.0.1/live/test.flv
ws://127.0.0.1/live/test.flv
3、使用rtp方式推流
# h264推流
ffmpeg -re -i “G:\as.mp4” -vcodec h264 -acodec aac -f rtp_mpegts rtp://127.0.0.1:10000

测试:
ffmpeg -re -i “G:\as.mp4” -vcodec copy -acodec copy -f flv rtmp://127.0.0.1/live/01
ffmpeg -re -i “C:\Users\zxw\Desktop\ps\10-7\06358358.video” -vcodec copy -acodec copy -f flv rtmp://127.0.0.1/live/01
http://127.0.0.1/live/01