{"id":18365285,"url":"https://github.com/mit-lcp/plibflac","last_synced_at":"2025-07-04T13:34:03.605Z","repository":{"id":251121435,"uuid":"834295594","full_name":"MIT-LCP/plibflac","owner":"MIT-LCP","description":"Read and write FLAC audio files in Python","archived":false,"fork":false,"pushed_at":"2024-09-23T23:35:50.000Z","size":777,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-15T19:51:15.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MIT-LCP.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}},"created_at":"2024-07-26T21:48:30.000Z","updated_at":"2024-09-23T23:09:39.000Z","dependencies_parsed_at":"2024-11-05T23:13:08.625Z","dependency_job_id":"98433314-a3e8-4582-8ae9-d92c9b9a63e5","html_url":"https://github.com/MIT-LCP/plibflac","commit_stats":null,"previous_names":["mit-lcp/plibflac"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIT-LCP%2Fplibflac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIT-LCP%2Fplibflac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIT-LCP%2Fplibflac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIT-LCP%2Fplibflac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MIT-LCP","download_url":"https://codeload.github.com/MIT-LCP/plibflac/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225656,"owners_count":21068078,"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-05T23:13:02.815Z","updated_at":"2025-04-10T13:18:05.612Z","avatar_url":"https://github.com/MIT-LCP.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"plibflac\n========\n\nThis package provides a Python library for reading and writing audio\nfiles in FLAC (Free Lossless Audio Codec) format.\n\n`plibflac` is implemented as a wrapper around the reference FLAC\nimplementation (libFLAC) written by Josh Coalson and maintained by\nXiph.Org.\n\n\nInstallation\n------------\n\nInstall this package from PyPI by running:\n```\npip install plibflac\n```\n\nIf you want to build the package from source (e.g., from the git\nrepository), you will need to have a C compiler and the Python headers\ninstalled.\n\n\nProject goals\n-------------\n\nThe main goal of this project is to provide a portable and efficient\ninterface for reading and writing raw sample data, in FLAC format,\nfrom Python applications.\n\nThis package currently does not implement the complete functionality\nprovided by the FLAC library.  If there are particular missing\nfeatures that your application needs, please report them via GitHub\nissues.\n\n\nExample\n-------\n\nIn the code below, we first open a FLAC file and print the first 10\nsamples of each channel.  Next, we read the entire stream and write it\nout to a new FLAC file (re-encoding it using compression level 8.)\n\n```\nimport plibflac\n\nwith plibflac.Decoder(\"input.flac\") as decoder:\n    samples = decoder.read(10)\n    for i, s in enumerate(samples):\n        print(\"First 10 samples of channel {}: {}\".format(i, list(s)))\n\n    decoder.seek(0)\n    with plibflac.Encoder(\"output.flac\", compression_level=8,\n                          channels=decoder.channels,\n                          bits_per_sample=decoder.bits_per_sample,\n                          sample_rate=decoder.sample_rate) as encoder:\n        while data := decoder.read(1000):\n            encoder.write(data)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-lcp%2Fplibflac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmit-lcp%2Fplibflac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-lcp%2Fplibflac/lists"}