{"id":13835609,"url":"https://github.com/mpv-easy/mpv-easy","last_synced_at":"2025-04-12T11:59:47.343Z","repository":{"id":219922448,"uuid":"745779336","full_name":"mpv-easy/mpv-easy","owner":"mpv-easy","description":"TS and React toolkit for mpv script","archived":false,"fork":false,"pushed_at":"2025-04-10T04:26:15.000Z","size":23698,"stargazers_count":42,"open_issues_count":29,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T04:38:50.916Z","etag":null,"topics":["mpv","mpv-script","react"],"latest_commit_sha":null,"homepage":"https://mpv-easy.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpv-easy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-20T05:38:11.000Z","updated_at":"2025-04-10T04:19:03.000Z","dependencies_parsed_at":"2024-04-09T05:26:09.302Z","dependency_job_id":"f8cbfcc4-394b-4667-be97-730c4faba1f0","html_url":"https://github.com/mpv-easy/mpv-easy","commit_stats":null,"previous_names":["mpv-easy/mpv-easy"],"tags_count":108,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpv-easy%2Fmpv-easy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpv-easy%2Fmpv-easy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpv-easy%2Fmpv-easy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpv-easy%2Fmpv-easy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpv-easy","download_url":"https://codeload.github.com/mpv-easy/mpv-easy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161085,"owners_count":21057552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mpv","mpv-script","react"],"created_at":"2024-08-04T14:01:06.288Z","updated_at":"2025-04-12T11:59:47.325Z","avatar_url":"https://github.com/mpv-easy.png","language":"TypeScript","funding_links":[],"categories":["Other","react"],"sub_categories":[],"readme":"## mpv-easy\r\n\r\nTS and React toolkit for mpv script\r\n![mpv-easy](./assets/img/mpv-easy.gif)\r\n\r\n## install\r\n\r\n[install](./mpv-easy-react/install.md)\r\n\r\n## CONTRIBUTING\r\n\r\n[CONTRIBUTING](./mpv-easy-react/CONTRIBUTING.md)\r\n\r\n## dev\r\n\r\nbash\r\n\r\n```bash\r\nexport MPV_SCRIPT_DIR=/your_mpv_dir/portable_config/scripts \u0026\u0026 pnpm run dev-copy\r\n```\r\n\r\nfish\r\n\r\n```fish\r\nset -x MPV_SCRIPT_DIR /your_mpv_dir/portable_config/scripts ; pnpm run dev-copy\r\n```\r\n\r\n## scripts\r\n\r\n[mpv-easy-scripts](./mpv-easy-react/docs/index.md)\r\n\r\n- [anime4k](./mpv-anime4k/readme.md)\r\n- [autoload](./mpv-autoload/readme.md)\r\n- [clipboard-play](./mpv-clipboard-play/readme.md)\r\n- [copy-screen](./mpv-copy-screen/readme.md)\r\n- [copy-time](./mpv-copy-time/readme.md)\r\n- [thumbfast](./mpv-thumbfast/readme.md)\r\n- [play-with](./mpv-play-with/readme.md)\r\n- [translate](./mpv-translate/readme.md)\r\n- [cut](./mpv-cut/readme.md)\r\n- [crop](./mpv-crop/readme.md)\r\n\r\n## short key\r\n\r\n| key        | command                              |\r\n| ---------- | ------------------------------------ |\r\n| ENTER      | cycle fullscreen                     |\r\n| [          | script-message change-speed -0.25    |\r\n| ]          | script-message change-speed +0.25    |\r\n| c          | script-message cut                   |\r\n| C          | script-message crop                  |\r\n| o          | script-message output                |\r\n| g          | script-message output-gif            |\r\n| ESC        | script-message cancel                |\r\n| UP         | script-message change-volume +10     |\r\n| DOWN       | script-message change-volume -10     |\r\n| ctrl+UP    | script-message change-fontSize +0.25 |\r\n| ctrl+DOWN  | script-message change-fontSize -0.25 |\r\n| ctrl+o     | script-message open-dialog           |\r\n| ctrl+t     | script-message translate             |\r\n| ctrl+i     | script-message interactive-translate |\r\n| ctrl+T     | script-message mix-translate         |\r\n| CTRL+0     | script-message Anime4K-Clear         |\r\n| CTRL+1     | script-message Anime4K-AA-HQ         |\r\n| CTRL+2     | script-message Anime4K-B-HQ          |\r\n| CTRL+3     | script-message Anime4K-C-HQ          |\r\n| CTRL+4     | script-message Anime4K-A-HQ          |\r\n| CTRL+5     | script-message Anime4K-BB-HQ         |\r\n| CTRL+6     | script-message Anime4K-CA-HQ         |\r\n| CTRL+v     | script-message clipboard-play        |\r\n| CTRL+c     | script-message copy-screen           |\r\n| CTRL+C     | script-message copy-time             |\r\n| MOUSE_BTN0 | script-message mouse-left-click      |\r\n| MOUSE_BTN1 | script-message mouse-mid-click       |\r\n| MOUSE_BTN2 | script-message mouse-right-click     |\r\n| MOUSE_BTN3 | script-message mouse-wheel-up        |\r\n| MOUSE_BTN4 | script-message mouse-wheel-down      |\r\n\r\n\r\n## UI\r\n\r\n### uosc\r\n\r\n\u003cdiv style=\"display: flex;\"\u003e\r\n  \u003cimg src=\"./assets/img/uosc-dark.webp\" alt=\"uosc-dark\"/\u003e\r\n  \u003cimg src=\"./assets/img/uosc-light.webp\" alt=\"uosc-light\"/\u003e\r\n\u003c/div\u003e\r\n\r\n### osc\r\n\r\n\u003cdiv style=\"display: flex;\"\u003e\r\n  \u003cimg src=\"./assets/img/osc-dark.webp\" alt=\"osc-dark\"/\u003e\r\n  \u003cimg src=\"./assets/img/osc-light.webp\" alt=\"osc-light\"/\u003e\r\n\u003c/div\u003e\r\n\r\n### oscx\r\n\r\n\u003cdiv style=\"display: flex;\"\u003e\r\n  \u003cimg src=\"./assets/img/oscx-dark.webp\" alt=\"oscx-dark\"/\u003e\r\n  \u003cimg src=\"./assets/img/oscx-light.webp\" alt=\"oscx-light\"/\u003e\r\n\u003c/div\u003e\r\n\r\n## example\r\n\r\n### drag-ball\r\n\r\n![drag-ball](./assets/img/drag-ball.gif)\r\n\r\n### snake\r\n\r\n![snake](./assets/img/snake.gif)\r\n\r\n### i18n\r\n\r\n![i18n](./assets/img/i18n.gif)\r\n\r\n### counter-ui\r\n\r\n![counter-ui](./assets/img/counter-ui.gif)\r\n\r\n## config\r\n\r\n### mouseHoverStyle\r\n\r\nOnly supports Windows, requires installation of PowerShell to enable script execution permissions\r\n\r\n```powershell\r\nset-executionpolicy remotesigned\r\n```\r\n\r\n![mouseHoverStyle](./assets/img/mouseHoverStyle.png)\r\n\r\n## quick start\r\n\r\n[mpv-easy-demo](https://github.com/ahaoboy/mpv-easy-demo)\r\n\r\n[more example](./mpv-easy-react/src/example/)\r\n\r\n[mpv-easy-tpl](https://github.com/mpv-easy/mpv-easy-tpl)\r\n\r\n## Q\u0026A\r\n\r\n### mujs stack overflow\r\n\r\nIf your code throw a stack overflow error with mujs, you need to use the babel plugin [hack.js](./mpv-easy-react/src//babel//hack.js)\r\n. It adds a function variable at the beginning of all functions to expand the stack size. Alternatively, you can use a custom compiled version of mujs and mpv, change mujs JS_STACKSIZE\r\n\r\nfixed: [Increase default stack sizes.](https://github.com/ccxvii/mujs/commit/7e27931468a7c0f41b2c8a64c9cb6b069f47a5ac)\r\n\r\n```diff\r\n- #define JS_STACKSIZE 256\t/* value stack size */\r\n\r\n+ #define JS_STACKSIZE 1024\t/* value stack size */\r\n```\r\n\r\n## perf\r\n\r\nMaybe should use GitHub action to automatically update this\r\n\r\n| js engine   | first render | average | js file size |\r\n| ----------- | :----------: | ------: | -----------: |\r\n| qjs         |    358ms     |  3.58ms |         1.4M |\r\n| qjs+minify  |    334ms     |  3.42ms |         300K |\r\n| mujs+es5    |    402 ms    | 14.05ms |         1.1M |\r\n| deno        |    291 ms    |  0.23ms |         1.4M |\r\n| deno+minify |    464 ms    |  0.23ms |         306K |\r\n| boa+es6     |    400 ms    | 21.88ms |         1.2M |\r\n\r\n## changlog\r\n\r\n- [0.1.12](./assets/changelog/0.1.12.md)\r\n\r\n## todo\r\n\r\n- [ ] flex (30%)\r\n- [ ] grid\r\n- [ ] logo\r\n- [ ] bilibili\r\n- [ ] youtube\r\n- [ ] animation\r\n- [ ] es2022\r\n- [ ] test\r\n- [ ] mpv prop type\r\n- [ ] plugin system\r\n- [ ] menu system\r\n- [ ] CI snapshot test\r\n- [ ] font rem\r\n- [ ] node console\r\n- [ ] es/cjs plugin module\r\n- [ ] real-time subtitle translation\r\n- [ ] sourcemap\r\n\r\n![star-history](https://api.star-history.com/svg?repos=mpv-easy/mpv-easy\u0026type=Date)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpv-easy%2Fmpv-easy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpv-easy%2Fmpv-easy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpv-easy%2Fmpv-easy/lists"}