{"id":27373530,"url":"https://github.com/mrsobakin/cc2_audio_encoder","last_synced_at":"2025-08-22T02:08:22.140Z","repository":{"id":94656640,"uuid":"545413754","full_name":"mrsobakin/cc2_audio_encoder","owner":"mrsobakin","description":"A small toolbox for converting audio to CyberConnect2's formats","archived":false,"fork":false,"pushed_at":"2023-06-28T13:29:36.000Z","size":2179,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-29T18:03:34.895Z","etag":null,"topics":["bnsf","cyberconnect2","hca"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mrsobakin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-10-04T10:23:42.000Z","updated_at":"2024-05-19T15:24:52.000Z","dependencies_parsed_at":"2025-04-13T11:15:19.690Z","dependency_job_id":"66874a88-43e6-44a8-9b93-4a64e8dbccb9","html_url":"https://github.com/mrsobakin/cc2_audio_encoder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrsobakin/cc2_audio_encoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Fcc2_audio_encoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Fcc2_audio_encoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Fcc2_audio_encoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Fcc2_audio_encoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsobakin","download_url":"https://codeload.github.com/mrsobakin/cc2_audio_encoder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsobakin%2Fcc2_audio_encoder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271574431,"owners_count":24783319,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"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":["bnsf","cyberconnect2","hca"],"created_at":"2025-04-13T11:15:17.762Z","updated_at":"2025-08-22T02:08:22.113Z","avatar_url":"https://github.com/mrsobakin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CyberConnect2 audio encoding toolbox\nA small toolbox for converting `.wav` audio files to CyberConnect2's formats (`.bnsf`, `.hca`, encoded `.hca`)\n\n## How to install\n0. If you're using linux, install `wine`\n1. Install `ffmpeg`\n2. `cd` into the repository folder\n3. `pip install .`\n\n## How to use\n### As a cli app\n#### HCA\n`python -m cc2_audio_encoder hca \u003cin_file.wav\u003e \u003cout_file.hca\u003e`\n\n`python -m cc2_audio_encoder hca -t \u003ct\u003e -k1 \u003ck1\u003e -k2 \u003ck2\u003e \u003cin_file.wav\u003e \u003cout_file.hca\u003e`\n\n- t - encryption type\n- k1 - encryption key (1)\n- k2 - encryption key (2)\n\nFor JoJo ASBR, these arguments would be: `-t 56 -k1 012C9A53 -k2 00000000`\n\n#### BNSF\n\n`python -m cc2_audio_encoder bnsf \u003cin_file.wav\u003e \u003cout_file.bnsf\u003e`\n\nTo encode a stereo `bnsf`:\n\n`python -m cc2_audio_encoder bnsf --stereo \u003cin_file.wav\u003e \u003cout_file.bnsf\u003e`\n\nTo include loop data into `bnsf` (use `-h` for further info):\n\n`python -m cc2_audio_encoder bnsf --loop \u003cin_file.wav\u003e \u003cout_file.bnsf\u003e`\n\n### As a python module\n```python\nfrom cc2_audio_encoder import bnsf, hca\n\nbnsf_bytes = bnsf.encode(\"some_file.wav\")\nwith open(\"audio.bnsf\", \"wb\") as f:\n    f.write(bnsf_bytes)\n\nhca_bytes = hca.encode(\"some_file.wav\", encryption={\"t\": 56, \"k1\": \"012C9A53\", \"k2\": \"00000000\"}):\nwith open(\"audio.hca\", \"wb\") as f:\n    f.write(hca_bytes)\n```\nJust explore the source code. It's very small.\n\n## Special thanks to:\n- [**vgmstream**](https://github.com/vgmstream/vgmstream/blob/master/src/meta/bnsf.c) for reverse engineering the `.bnsf` header\n- [**This amazing article**](https://exvsfbce.home.blog/2020/02/04/guide-to-encoding-bnsf-is14-audio-files-converting-wav-back-to-bnsf-is14/) for reverse engineering the `.bnsf` header\n- **NSUNS4 Toolbox** for the compiled IS14 encoder (`encode.exe`), which I was too lazy to compile myself\n- [**Deretore**](https://github.com/OpenCGSS/DereTore) for the HCA encoder and encrypter (`hcaenc.exe`, `hcacc.exe`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsobakin%2Fcc2_audio_encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsobakin%2Fcc2_audio_encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsobakin%2Fcc2_audio_encoder/lists"}