在虚拟机ubuntu上操作
1.先安装cmake
sudo apt install cmake
2.安装libssl
sudo apt install libssl-dev
3.mkdir crtmpserver
下载crtmpserver安装包
wget https://github.com/j0sh/crtmpserver/zip/centosinit
或者直接到https://github.com/j0sh/crtmpserver下载安装包
解压后
#cd crtmpserver-centosinit/
#cd builders/cmake
#cmake . (注意cmake后面有个点)
#make
#./crtmpserver/crtmpserver ./crtmpserver/crtmpserver.lua
可以看到服务器已经启动运行。
4.下载windows版本ffmpeg
运行.\ffmpeg -i test.mp4 -f flv rtmp://192.168.1.11/live/test1 (注意这里192.168.1.11)是运行crtmpserver服务器的虚拟机ubuntu地址)
5.用vlc播放流媒体
应该可以看到视频了