這個場景中,咱們能夠直接利用強大的ffmpeg將本地文件,以直播的方式輸出html
ffmpeg -re -stream_loop -1 -fflags +genpts -i F:\05CACHE\ss.mp4 -vcodec copy -acodec copy -strict -2 -f flv -y rtmp://demo.liveqing.com:10085/hls/marvin1311
此處的rtmp://demo.liveqing.com:10085/hls/test 是示例的推流服務地址git
運行以下:
ide
此時rtmp://demo.liveqing.com:10085/hls/marvin1311 也是播放地址oop
除了一路.net
此時流媒體服務提供了另外的兩路流插件
也可使用流媒體服務提供的播放器服務
http://demo.liveqing.com:10080/LivePlayer.htmlhtm
點擊下面的地址便可播放
http://demo.liveqing.com:10080/LivePlayer.html?videoUrl=rtmp://demo.liveqing.com:10085/hls/marvin1311blog