{"id":50816017,"url":"https://github.com/ydah/vorbis-ruby","last_synced_at":"2026-06-13T09:33:40.864Z","repository":{"id":341193274,"uuid":"1169264291","full_name":"ydah/vorbis-ruby","owner":"ydah","description":"Ruby FFI bindings for libvorbis and libvorbisenc. Provides Vorbis audio codec encoding functionality.","archived":false,"fork":false,"pushed_at":"2026-02-28T12:46:51.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-13T15:14:22.713Z","etag":null,"topics":["audio","audio-codec","bindings","encoding","ffi","libvorbis","libvorbisenc","ruby","vorbis"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ydah.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-28T12:24:07.000Z","updated_at":"2026-02-28T12:42:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ydah/vorbis-ruby","commit_stats":null,"previous_names":["ydah/vorbis-ruby"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ydah/vorbis-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fvorbis-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fvorbis-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fvorbis-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fvorbis-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ydah","download_url":"https://codeload.github.com/ydah/vorbis-ruby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fvorbis-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34279898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["audio","audio-codec","bindings","encoding","ffi","libvorbis","libvorbisenc","ruby","vorbis"],"created_at":"2026-06-13T09:33:39.519Z","updated_at":"2026-06-13T09:33:40.852Z","avatar_url":"https://github.com/ydah.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vorbis-ruby [![Gem Version](https://badge.fury.io/rb/vorbis.svg)](https://badge.fury.io/rb/vorbis) [![Ruby](https://github.com/ydah/vorbis-ruby/actions/workflows/main.yml/badge.svg)](https://github.com/ydah/vorbis-ruby/actions/workflows/main.yml)\n\nRuby FFI bindings for libvorbis and libvorbisenc. Provides Vorbis audio codec encoding functionality.\n\n## Installation\n\n### System Requirements\n\nlibvorbis and libvorbisenc must be installed on your system.\n\nmacOS:\n\n```bash\nbrew install libvorbis\n```\n\nDebian / Ubuntu:\n\n```bash\nsudo apt-get install libvorbis-dev\n```\n\nFedora / RHEL:\n\n```bash\nsudo dnf install libvorbis-devel\n```\n\n### Gem Installation\n\nAdd to your Gemfile:\n\n```ruby\ngem \"vorbis-ruby\"\n```\n\nOr install directly:\n\n```bash\ngem install vorbis-ruby\n```\n\n## Usage\n\n```ruby\nrequire \"vorbis\"\n\nFile.open(\"output.ogg\", \"wb\") do |f|\n  encoder = Vorbis::Encoder.new(\n    channels: 2,\n    rate: 44100,\n    quality: 0.4,\n    comments: { \"ARTIST\" =\u003e \"Test\", \"TITLE\" =\u003e \"Hello\" }\n  )\n\n  encoder.write_headers { |data| f.write(data) }\n\n  # PCM data as per-channel float arrays (-1.0 to 1.0)\n  samples = [Array.new(1024, 0.0), Array.new(1024, 0.0)]\n  encoder.encode(samples) { |data| f.write(data) }\n\n  encoder.finish { |data| f.write(data) }\n  encoder.close\nend\n```\n\n## API Reference\n\n### `Vorbis::Encoder`\n\nHigh-level encoder that manages all Vorbis resources internally.\n\n- `initialize(channels:, rate:, quality: 0.4, comments: {})` — Create encoder with VBR quality (-0.1 to 1.0)\n- `write_headers { |data| }` — Yield OGG header pages\n- `encode(samples) { |data| }` — Encode PCM samples (array of per-channel float arrays) and yield OGG pages\n- `finish { |data| }` — Signal end-of-stream and yield remaining OGG pages\n- `close` — Release all resources\n\n### `Vorbis::Info`\n\nLow-level wrapper for `vorbis_info`.\n\n- `encode_init_vbr(channels:, rate:, quality:)` — Set up VBR encoding\n- `encode_init(channels:, rate:, nominal_bitrate:, max_bitrate: -1, min_bitrate: -1)` — Set up CBR/ABR encoding\n- `channels`, `rate`, `bitrate_nominal` — Accessors\n- `clear` — Release resources\n\n### `Vorbis::Comment`\n\nLow-level wrapper for `vorbis_comment`.\n\n- `add_tag(tag, value)` — Add a comment tag\n- `query(tag, index = 0)` — Query a tag value\n- `query_count(tag)` — Count tags with a given name\n- `vendor` — Get the vendor string\n- `clear` — Release resources\n\n### `Vorbis::DspState`\n\nLow-level wrapper for `vorbis_dsp_state`.\n\n- `headerout(comment)` — Generate 3 header packets\n- `analysis_buffer(samples)` — Get per-channel write buffers\n- `wrote(samples)` — Notify samples written (0 for EOS)\n- `clear` — Release resources\n\n### `Vorbis::Block`\n\nLow-level wrapper for `vorbis_block`.\n\n- `blockout` — Extract a block from DSP state\n- `analysis_and_addblock` — Analyze block and add to bitrate management\n- `flush_packet` — Flush a packet from bitrate management\n- `clear` — Release resources\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fvorbis-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fydah%2Fvorbis-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fvorbis-ruby/lists"}