Skip to content

Latest commit

 

History

History
82 lines (62 loc) · 2.3 KB

README.md

File metadata and controls

82 lines (62 loc) · 2.3 KB

mpv embeded in web, using Yolov4 tiny model as detection

Screenshot

Web Component Tag

<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>

Credits

Requirements:

NACL SDK:

  • download nacl_sdk

Prebuilt dev libraries:

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

YOLOv4:

Compile & Run

npm i
npm run configure:player
npm run build:player
npm run dev