RTSP协议播放网络视频

て烟熏妆下的殇ゞ 提交于 2020-02-15 13:52:25

海康摄像头

  1. 主码流 
  2. rtsp://admin:12345@192.0.0.64:81/h264/ch1/main/av_stream 
  3. rtsp://admin:12345@192.0.0.64:81/MPEG-4/ch1/main/av_stream 
  4.  
  5. 子码流: 
  6. rtsp://admin:12345@192.0.0.64/mpeg4/ch1/sub/av_stream 
  7. rtsp://admin:12345@192.0.0.64/h264/ch1/sub/av_stream 

爱谱华顿和海康相同

 

大华摄像头

rtsp://admin:admin@10.12.4.84:554/cam/realmonitor?channel=2&subtype=1

 

模态窗口

<div id="modalCamera" class="modal-block modal-block-md mfp-hide ">
    <section class="panel">
        <header class="panel-heading">
            <h2 class="panel-title">视频实时监控</h2>
            <div class="panel-actions">
                <button class="btn btn-xs btn-default modal-dismiss">
                    <i class="fa fa-times"></i>
                </button>
            </div>
        </header>
        <div class="panel-body">
            @*摄像头窗口*@
            <div id="cameraVideos" class="camera-plugin">
            </div>
        </div>
    </section>
</div>

js代码

            $('#cameraVideos').empty();
            $object="<object type='application/x-vlc-plugin' pluginspage='http://www.videolan.org/' id='vlc' events='false' width='560' height='410'>"+
     "<param name='mrl' value='rtsp://admin:12345@192.168.0.104:554/MPEG-4/ch1/main/av_stream' />"+
     "<param name='volume' value='50' />"+
     "<param name='autoplay' value='true' />"+
     "<param name='loop' value='false' />"+
     "<param name='fullscreen' value='false' />"+
     "<param name='controls' value='false' /></object>";
            $('#cameraVideos').append($object);

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!