我遵循此主题以流式传输rtsp here
现在这是我在服务器中的配置文件:ffmpeg -v info -i rtsp://XXXXX.ddns.net/onvif1 -c:v copy -c:a copy -bufsize 1835k -pix_fmt yuv420p -flags -global_header -hls_time 10 -hls_list_size 6 -hls_wrap 10 -start_number 1 /var/www/html/p433/assets/video/test.m3u8 -loglevel debug
客户:
<link rel="stylesheet" href="https://releases.flowplayer.org/7.2.6/skin/skin.css">
<!-- hls.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.10.1/hls.light.min.js"></script>
<!-- flowplayer -->
<script src="https://releases.flowplayer.org/7.2.6/flowplayer.min.js"></script>
<!-- body section -->
<div id="player"></div>
<script>
flowplayer('#player', {
live: true, // set if it's a live stream
ratio: 9/16, // set the aspect ratio of the stream
clip: {
sources: [
// path to the HLS m3u8
{ type: "application/x-mpegurl", src: "<?php echo asset_url();?>video/test.m3u8"},
// path to an optional MP4 fallback
{ type: "video/mp4", src: "//yourserver/path/index.mp4"}
]
}
});
</script>
有问题吗?不要在“实时”中显示视频,仅显示20秒左右的视频,并且视频正在加载循环图标
我在做什么错?我整夜都在尝试,但我认为它到达了找不到正确路径的地步
感谢您的时间!