{"id":18758656,"url":"https://github.com/eeeeeric/mpc-hc-api","last_synced_at":"2025-04-13T02:25:08.002Z","repository":{"id":30635591,"uuid":"34191100","full_name":"eeeeeric/mpc-hc-api","owner":"eeeeeric","description":"Java library for controlling MPC-HC over a network","archived":false,"fork":false,"pushed_at":"2016-06-06T01:38:00.000Z","size":29,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T06:06:58.928Z","etag":null,"topics":["java","mpc-hc"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eeeeeric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-19T02:47:42.000Z","updated_at":"2024-04-18T06:15:19.000Z","dependencies_parsed_at":"2022-08-27T19:40:11.080Z","dependency_job_id":null,"html_url":"https://github.com/eeeeeric/mpc-hc-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeeeeric%2Fmpc-hc-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeeeeric%2Fmpc-hc-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeeeeric%2Fmpc-hc-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeeeeric%2Fmpc-hc-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eeeeeric","download_url":"https://codeload.github.com/eeeeeric/mpc-hc-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248655033,"owners_count":21140417,"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":["java","mpc-hc"],"created_at":"2024-11-07T17:47:07.582Z","updated_at":"2025-04-13T02:25:07.973Z","avatar_url":"https://github.com/eeeeeric.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mpc-hc-api\n\n[MPC-HC](https://mpc-hc.org/), or Media Player Classic - Home Cinema, is an open source media player for Microsoft Windows.\n\nmpc-hc-api is a Java library for controlling MPC-HC over a network.\n\nDownload\n--------\n\nmpc-hc-api is available on Maven Central. Simply add it as a dependency to your pom.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.eeeeeric\u003c/groupId\u003e\n  \u003cartifactId\u003empc-hc-api\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nQuickstart\n----------\n\nFirst, you'll need to enable the network interface to MPC-HC. \n\n* Launch MPC-HC\n* Press `o` for options\n* Navigate to `Player` \u003e `Web Interface`\n* Check the box for `Listen on port`\n* Select a port\n\nNow in your Java application...\n\n```java\nMediaPlayerClassicHomeCinema mpc = new MediaPlayerClassicHomeCinema(\"127.0.0.1\", 55555);\n\n// Browse for files\nList\u003cFileInfo\u003e files = mpc.browse();\n\n// Realistically, you'll want to display this in your UI, and let the user\n// navigate the file tree, and select a file for playback\nif (!files.isEmpty())\n{\n  FileInfo file = files.get(0);\n  if (!file.isDirectory())\n  {\n    mpc.openFile(file);\n  }\n}\n\n// Control the player\nAssert.assertTrue(mpc.isPlaying());\nmpc.setMute(true);\nmpc.toggleMute();\nmpc.setVolume(50);\nmpc.pause();\nTimeCode fiveMinutes = new TimeCode(\"00:05:00\");\nmpc.seek(fiveMinutes);\nmpc.play();\n```\n\n\nLicense\n-------\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeeeeric%2Fmpc-hc-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feeeeeric%2Fmpc-hc-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeeeeric%2Fmpc-hc-api/lists"}