VLC用作视频点播服务器设置

来源:互联网 发布:哪些蔬菜能生吃知乎 编辑:程序博客网 时间:2024/05/21 07:51

1. 打开CMD窗口,切换到VLC的安装目录,输入以下命令:
vlc --ttl 12 -vvv --color -I telnet --rtsp-host 127.0.0.1:8000

2. telnet 到VLC的4212端口,默认密码admin
telnet localhost 4212

3. 进入telnet 后,输入help 命令获得帮助
> show
    media : ( 0 broadcast - 0 vod )
    schedule
> new     //new test vod enabled, 注意没有回显,输入的时候要小心
> show
    media : ( 0 broadcast - 1 vod )
        test
            type : vod
            enabled : yes
            mux : (null)
            inputs
            output :
            options
            instances
    schedule
> setup     //setup test input test.h264 注意test.h264应该放在vlc的安装目录下
> show
    media : ( 0 broadcast - 1 vod )
        test
            type : vod
            enabled : yes
            mux : (null)
            inputs
                1 : test.h264
            output :
            options
            instances
    schedule
> logout

4. 在vlc下面输入
vlc rtsp://127.0.0.1:8000/test

5. 在网页中嵌入VLC进行测试,rtsp server:
<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
    codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
width="460" 
height="320" 
id="vlc" 
events="True" 
controller="True" 
name="vlc">
 <param name="Src" value="rtsp://localhost:8000/test" />
 <param name="ShowDisplay" value="True" />
 <param name="AutoLoop" value="False" />
 <param name="AutoPlay" value="True" />
 <param name="Controller" value="True" />
  
 </object>

by zhc_mengzhiyi@163.com 转载请注明出处!TKS!