Coder Social home page Coder Social logo

guest271314 / native-messaging-mkvmerge Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 9.86 MB

Merge Matroska and WebM files using Native Messaging, mkvmerge, JavaScript

License: GNU General Public License v2.0

JavaScript 84.93% HTML 7.70% Shell 7.37%
native-messaging mkvmerge javascript

native-messaging-mkvmerge's Introduction

native-messaging-mkvmerge

Merge Matroska and WebM files using Native Messaging, mkvmerge, JavaScript

Tested at Chromium 77, which currently supports Native File System for writing files to local filesystem using JavaScript shipped with the browser. mkvmerge requires the complete file at local filesystem. TODO: Write version for Firefox.

Install

  • Download the repository.
  • Build or install MKVToolNix version >= 36.0.0.
  • Save mkvmerge in host folder and set cmd as "./mkvmerge" or "mkvmerge" to execute the command installed by package manager.
  • Open native_messaging_mkvmerge.json within host folder in a text editor. Set value of "path" to local path native-messaging-host.js.
  • Open install_host.sh and uninstall_host.sh within host folder in a text editor. Set the value of TARGET_DIR within install_host.sh and uninstall_host.sh to point to NativeMessagingHost folder within Chromium user data directory.
  • Set mkvmerge, .js and .sh files executable.
  • Install nodejs.
  • Run ./install_host.sh.
  • At chrome://extensions set Developer mode to on.
  • Click Load unpacked.
  • Select app folder.

Usage

  • Click Apps on Chromium browser bookmarks bar.
  • Click native-messaging-mkvmerge icon.
  • Input URL's to media files the <video> element can play, optionally including a media fragment identifier, to fetch delimited by space character at <textarea> element, e.g., <textarea>https://path/to/0.ogg#t=0,2 https://path/to/1.webm#t=0,2 https://path/to/2.mp4 https:/path/to/3.ogv </textarea> to be played and recorded using MediaRecorder.
  • Optionally upload files from host folder to <input type="file" multiple>.
  • Click Connect.
  • Click Send.
  • Grant permission for "Let sites read this folder" prompt
  • Grant permission for "Save changes to original files" prompt

Output: A <video> element will be appended to the HTML document with src to a Blob URL representation of the merged media files as a Blob.

Note: If the resulting Blob does not display all of the merged videos the first time Connect and Send are clicked, navigate to chrome://extensions select the extension, click the reload symbol to the right of Details and Remove, then repeat the above process.

Uninstall

Navigate to chrome://extensions, select the extenion, click Remove. Run ./uninstall_host.sh.

native-messaging-mkvmerge's People

Contributors

guest271314 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.