问题描述
我已经安装了 (x_obj'/x_x_axis',y_obj'/y_y_axis')
和 (x_new,y_new)=(x_old * cos(theta) - y_old * sin(theta),x_old * sin(theta) + y_old * cos(theta))
来将流转换为 HTML 可复制视频。如何使用这些包在客户端显示流?
服务器端 (fluent-ffmpeg
):
ffmpeg-static
客户端(main.js
):
const { app,browserWindow } = require('electron');
const ffmpeg = require('fluent-ffmpeg');
const ffmpegPath = require('ffmpeg-static').replace('app.asar','app.asar.unpacked');
ffmpeg.setFfmpegPath(ffmpegPath);
function createWindow () {
const win = new browserWindow({
width: 800,height: 600,webPreferences: {
nodeIntegration: true
}
});
win.loadFile('index.html');
}
function testStream () {
let source = 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov';
}
app.whenReady().then(createWindow).then(testStream);
解决方法
如果我理解正确;您可能希望从这样的事情开始:
<video id="video-player" controls preload="none" style="border: 5px solid red; height: 1080px; width: 1920px; ">
<source src="index.m3u8" type="application/x-mpegURL">
</video>