<body>
<x-mpv
id="player"
src=""
hwaccel="auto"
locale="en-US"
online-detection
screenshot-path=""
screenshot-format="png"
transport="udp"
video-sync="audio"
disable-audio="false"
volume="60"
mute="false"
show-loading
>
</x-mpv>
<script>
const el = document.getElementByID('player')
el.addEventListener('start-file', () => {
console.log('ready to play')
})
e.setAttribute('src', 'E:\\test.mp4')
</script>
</body>
- [mpv] https://github.com/mpv-player/mpv
- [FFmpeg] https://github.com/FFmpeg/FFmpeg
- [mpv.js] https://github.com/Kagami/mpv.js
- [darknet] https://github.com/AlexeyAB/darknet
- Windows 10 x64 (Not tested on Non-windows system or 32bit machine)
- CMake 3.9 or ablove
- Visual Studio 2017 or ablove
- nodejs 12 or ablove
- python3
- [nacl sdk] (https://developer.chrome.com/docs/native-client/sdk/download/)
- download nacl_sdk
UNZIP PREBUILT LIBRARIES TO /.third-party/prebuilt
COPY OPENGL HEADERS TO /.third-party/prebuilt/include
Download yolov4-tiny.weights and put it in electron-mpv root directory
- source code: https://github.com/AlexeyAB/darknet
- pretranied model: * yolov4-tiny.cfg - 40.2% mAP@0.5 - 371(1080Ti) FPS / 330(RTX2070) FPS - 6.9 BFlops - 23.1 MB: yolov4-tiny.weights
npm i
npm run configure:player
npm run build:player
npm run dev