Skip to content

stevevista/electron-mpv

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published