{"id":19012223,"url":"https://github.com/binaryify/mpg123-static","last_synced_at":"2025-08-20T18:44:13.828Z","repository":{"id":74334722,"uuid":"70400051","full_name":"Binaryify/mpg123-static","owner":"Binaryify","description":"mpg123 static binaries for Mac OSX and Linux and Windows","archived":false,"fork":false,"pushed_at":"2016-10-10T02:56:35.000Z","size":912,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T16:03:58.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Binaryify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2016-10-09T11:57:17.000Z","updated_at":"2024-10-30T15:06:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"2eea00d5-552d-4ca5-b0ce-9c419dd7b828","html_url":"https://github.com/Binaryify/mpg123-static","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binaryify%2Fmpg123-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binaryify%2Fmpg123-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binaryify%2Fmpg123-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Binaryify%2Fmpg123-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Binaryify","download_url":"https://codeload.github.com/Binaryify/mpg123-static/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250343638,"owners_count":21415035,"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":[],"created_at":"2024-11-08T19:17:12.059Z","updated_at":"2025-04-22T23:40:54.917Z","avatar_url":"https://github.com/Binaryify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mpg123-static\n\nmpg123 static binaries for Mac OSX and Linux and Windows\n\u003cp\u003e\n\u003ca href=\"https://www.npmjs.com/package/mpg123-static\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/mpg123-static.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/mpg123-static\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/mpg123-static.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/mpg123-static\"\u003e\u003cimg src=\"https://img.shields.io/david/dev/binaryify/mpg123-static.svg\" alt=\"devDependencies\" \u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/mpg123-static\"\u003e\u003cimg src=\"https://img.shields.io/david/binaryify/mpg123-static.svg\" alt=\"devDependencies\" \u003e\u003c/a\u003e\n\u003ca href=\"https://travis-ci.org/Binaryify/mpg123-static\"\u003e\u003cimg src=\"https://api.travis-ci.org/Binaryify/mpg123-static.svg?branch=master\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\nThis module is installed via npm:\n\n``` bash\n$ npm install mpg123-static\n```\n\n## Example Usage\n\nReturns the path of a statically linked mpg123 binary on the local filesystem.\n\n``` js\nconst mpg123 = require('mpg123-static')\nconst mpg123path=mpg123.path\nconsole.log(mpg123path)\n// // /Users/eugeneware/Dropbox/work/mpg123-static/bin/darwin/x64/mpg123\nconst exec = require('child_process').exec\nconst filename=\"1.mp3\"\nconst cmdStr = `${mpg123path}  ${filename}.mp3`\nexec(cmdStr, (err, stdout, stderr) =\u003e {\n    if (err) {\n      console.log('error:' + stderr)\n    } else {\n      console.log(\"now playing the mp3...\")\n    }\n})\n\n```\n\nCurrently supports Mac OS X (64-bit), Linux (64-bit) and Windows\n(32 and 64-bit).\n\n* 64 bit Mac OSX\n* 64 bit Linux\n* 64 bit Windows\n* 32 bit Windows\n\n## Notice\nif you use OSX/Linux,you should use this command before you use this package\n```\n$ sudo chmod 775 ./node_modules/mpg123-static/bin/{your platfrom}/x64/mpg123\n```\nOSX's platfrom is 'darwin'.\nlinux's  platfrom is 'linux'\nfor example,\n```\n$ sudo chmod 775 ./node_modules/mpg123-static/bin/darwin/x64/mpg123\n```\n\nif you use windows,you should install git-bash or cmder,then add run.sh to your project path,and use my package like my example in you js file\n```js\nconst mpg123 = require('mpg123-static')\nconst fs=require('fs')\nconst os = require('os')\nconst path = require('path')\nconst mpg123path=mpg123.path\nconst exec = require('child_process').exec\nconst platform = os.platform()\nconst arch = os.arch()\n\nconst filename=\"1.mp3\"\nconst content=`#!/usr/bin/env bash\ncd node_modules/mpg123-static/bin/win32/${arch}\n./mpg123.exe ${filename}\n`\nconst cmdStr=\"bash run.sh\"\nfs.writeFile('./run.sh',content)\nexec(cmdStr, (err, stdout, stderr) =\u003e {\n    if (err) {\n      console.log('error:' + stderr)\n    } else {\n      console.log(\"now playing the mp3...\")\n    }\n})\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinaryify%2Fmpg123-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinaryify%2Fmpg123-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinaryify%2Fmpg123-static/lists"}