{"id":17172945,"url":"https://github.com/20tab/mpg123-python","last_synced_at":"2025-04-13T16:31:38.202Z","repository":{"id":57443432,"uuid":"98080169","full_name":"20tab/mpg123-python","owner":"20tab","description":"mpg123 python wrapper","archived":false,"fork":false,"pushed_at":"2017-07-23T13:10:12.000Z","size":6332,"stargazers_count":16,"open_issues_count":4,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T13:18:37.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/20tab.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}},"created_at":"2017-07-23T06:53:21.000Z","updated_at":"2024-11-20T15:05:40.000Z","dependencies_parsed_at":"2022-09-26T17:21:16.890Z","dependency_job_id":null,"html_url":"https://github.com/20tab/mpg123-python","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/20tab%2Fmpg123-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fmpg123-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fmpg123-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fmpg123-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/20tab","download_url":"https://codeload.github.com/20tab/mpg123-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248743830,"owners_count":21154748,"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-10-14T23:49:06.210Z","updated_at":"2025-04-13T16:31:36.449Z","avatar_url":"https://github.com/20tab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mpg123-python\nmpg123 python wrapper using ctypes\n\nmpg123 libraries are available on the official site: https://www.mpg123.de/\n\nCPython 2 and 3 are supported as well as PyPy\n\n## Quick intro\n\nthis is a simple mp3 player using the first available sound device as the output (libout123 is part of the mpg123 distribution)\n\n```python\nfrom mpg123 import Mpg123, Out123\n\n# load an mp3 file\nmp3 = Mpg123('tests/bensound-scifi.mp3')\n\n# use libout123 to access the sound device\nout = Out123()\n\n# decode mp3 frames and send them to the sound device\nfor frame in mp3.iter_frames(out.start):\n    out.play(frame)\n```\n\nthis is another example showing how to encode an mp3 to a wave file:\n\n```python\nfrom mpg123 import Mpg123\nimport wave\n\nmp3 = Mpg123('tests/bensound-epic.mp3')\n\n# get informations about the file\nrate, channels, encoding = mp3.get_format()\n\n# prepare the wave header\nwav = wave.open('bensound-epic.wav', 'wb')\nwav.setnchannels(channels)\nwav.setframerate(rate)\nwav.setsampwidth(mp3.get_width_by_encoding(encoding))\n\n# fill the wave file\nfor frame in mp3.iter_frames():\n    wav.writeframes(frame)\n\nwav.close()\n```\n\n\nmore examples, included streaming of webradio are available here: https://github.com/20tab/mpg123-python/tree/master/examples\n\n## Test suite\n\nThe example files are \"Royalty Free Music from Bensound\" (http://www.bensound.com). For all of the test files a ID3v1 record has been added\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20tab%2Fmpg123-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F20tab%2Fmpg123-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20tab%2Fmpg123-python/lists"}