{"id":15086030,"url":"https://github.com/williamvenner/ffaudio2json","last_synced_at":"2025-07-14T17:31:56.150Z","repository":{"id":248341361,"uuid":"828075009","full_name":"WilliamVenner/ffaudio2json","owner":"WilliamVenner","description":"Convert audio files to JSON waveforms using FFmpeg","archived":false,"fork":false,"pushed_at":"2024-09-19T15:13:18.000Z","size":53444,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-23T01:33:55.037Z","etag":null,"topics":["audio","ffmpeg","json","rust","sound","sound-processing","soundcloud","wav2json","wav2png","waveform","waveforms"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WilliamVenner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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-13T03:59:02.000Z","updated_at":"2024-10-17T16:50:35.000Z","dependencies_parsed_at":"2024-09-14T21:05:30.948Z","dependency_job_id":"0994dc52-8b02-4b0d-ab50-fb81965e914c","html_url":"https://github.com/WilliamVenner/ffaudio2json","commit_stats":null,"previous_names":["williamvenner/ffaudio2json"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fffaudio2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fffaudio2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fffaudio2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fffaudio2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WilliamVenner","download_url":"https://codeload.github.com/WilliamVenner/ffaudio2json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225989819,"owners_count":17556045,"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":["audio","ffmpeg","json","rust","sound","sound-processing","soundcloud","wav2json","wav2png","waveform","waveforms"],"created_at":"2024-09-25T07:03:46.150Z","updated_at":"2024-11-23T01:34:11.885Z","avatar_url":"https://github.com/WilliamVenner.png","language":"Rust","readme":"[![crates.io](https://img.shields.io/crates/v/ffaudio2json.svg)](https://crates.io/crates/ffaudio2json)\n[![docs.rs](https://docs.rs/ffaudio2json/badge.svg)](https://docs.rs/ffaudio2json/)\n![license](https://img.shields.io/crates/l/ffaudio2json)\n[![CI Status](https://github.com/WilliamVenner/ffaudio2json/workflows/ci/badge.svg)](https://github.com/WilliamVenner/ffaudio2json/actions?query=workflow%3A%22ci%22)\n\n# FFAudio2JSON\n\nConvert audio files to JSON waveforms!\n\nBased on [wav2json](https://github.com/beschulz/wav2json)\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ch2\u003eExample\u003c/h2\u003e\u003c/summary\u003e\n\n```sh\nffaudio2json song.wav --channels \"left right mid side min max\" -o song.json\n```\n\n```json\n{\n  \"_generator\": \"ffaudio2json version 0.1.2 on x86_64-pc-windows-msvc (https://github.com/WilliamVenner/ffaudio2json)\",\n  \"left\": [\n    0.947125, 0.901331, 0.76628, 0.578968, 0.744371, 0.57511, 0.624754, 0.7391,\n    0.534745, 0.561727, 0.565447, 0.777101, 0.633872, 0.443988, 0.451541\n  ],\n  \"right\": [\n    0.895935, 0.869228, 0.782387, 0.58325, 0.80669, 0.592015, 0.599639,\n    0.731451, 0.472213, 0.571442, 0.524964, 0.792326, 0.549566, 0.50713,\n    0.494696\n  ],\n  \"mid\": [\n    0.92153, 0.74639, 0.774334, 0.494298, 0.775531, 0.508056, 0.601378,\n    0.735276, 0.393787, 0.566585, 0.459236, 0.784713, 0.426951, 0.43994,\n    0.462662\n  ],\n  \"side\": [\n    0.218711, 0.460376, 0.446356, 0.467093, 0.535112, 0.556382, 0.327098,\n    0.455026, 0.365384, 0.321987, 0.514186, 0.492502, 0.398223, 0.324473,\n    0.365328\n  ],\n  \"min\": [\n    0.947125, 0.869228, 0.76628, 0.567466, 0.744371, 0.592015, 0.60579,\n    0.731451, 0.534745, 0.571442, 0.565447, 0.792326, 0.633872, 0.49244,\n    0.494696\n  ],\n  \"max\": [\n    0.895935, 0.901331, 0.782387, 0.58325, 0.80669, 0.537654, 0.624754, 0.7391,\n    0.465301, 0.563098, 0.524964, 0.777101, 0.549566, 0.50713, 0.475655\n  ],\n  \"duration\": 168.552\n}\n```\n\n\u003c/details\u003e\n\n## Usage\n\nFFAudio2JSON can be used as a [Rust library](https://docs.rs/ffaudio2json) or as a standalone binary.\n\n```sh\nConvert audio files to JSON waveforms using FFmpeg\n\nUsage: ffaudio2json.exe [OPTIONS] \u003cINPUT\u003e\n\nArguments:\n  \u003cINPUT\u003e\n\nOptions:\n  -s, --samples \u003cSAMPLES\u003e      Number of samples to generate [default: 800]\n      --db-min \u003cDB_MIN\u003e        Minimum value of the signal in dB that will be visible in the waveform [default: -48]\n      --db-max \u003cDB_MAX\u003e        Maximum value of the signal in dB that will be visible in the waveform. Useful,if you know that your signal peaks at a certain level [default: -48]\n  -d, --db-scale               Use logarithmic (e.g. decibel) scale instead of linear scale\n  -p, --precision \u003cPRECISION\u003e  Precision of the floats that are generated. Reduce for smaller sized files. Usually 2 should be sufficient [default: 6]\n  -n, --no-header              Do not include the version info banner in the output\n  -o, --output \u003cOUTPUT\u003e        Name of output file, defaults to \u003cname of inputfile\u003e.json\n      --channels \u003cCHANNELS\u003e    Channels to compute: left, right, mid, side, min, max [default: \"left right\"]\n  -q, --quiet                  Suppress all output\n  -h, --help                   Print help\n  -V, --version                Print version\n```\n\n## Downloads\n\nffaudio2json offers many different builds that are suitable for different needs.\n\n**Dynamic** linking means the build does not include ffmpeg and you will need to install it to your system as a shared library. [Instructions](#dynamic-linking)\n\n**Static** linking means the build should be \"portable\" and ran without having to install additional dependencies (including ffmpeg)\n\n**Bold = Recommended**\n\n| OS          | Arch               | Linking     | Download                                                                                                                                              |\n| ----------- | ------------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Linux**   | **x86-64**         | **Dynamic** | [**`ffaudio2json_linux_x86-64_shared`**](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_linux_x86-64_shared)     |\n| Linux       | x86-64             | Static      | [`ffaudio2json_linux_x86-64_static`](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_linux_x86-64_static)         |\n| **Linux**   | **arm64**          | **Dynamic** | [**`ffaudio2json_linux_arm64_shared`**](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_linux_arm64_shared)       |\n| Linux       | arm64              | Static      | [`ffaudio2json_linux_arm64_static`](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_linux_arm64_static)           |\n| **macOS**   | **arm64 (M1)**     | **Dynamic** | [**`ffaudio2json_macos_arm64_shared`**](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_macos_arm64_shared)       |\n| macOS       | arm64 (M1)         | Static      | [`ffaudio2json_macos_arm64_static`](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_macos_arm64_static)           |\n| **macOS**   | **x86-64 (Intel)** | **Dynamic** | [**`ffaudio2json_macos_x86-64_shared`**](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_macos_x86-64_shared)     |\n| macOS       | x86-64 (Intel)     | Static      | [`ffaudio2json_macos_x86-64_static`](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_macos_x86-64_static)         |\n| **Windows** | **x86-64**         | **Static**  | [**`ffaudio2json_win_x86-64_static.exe`**](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_win_x86-64_static.exe) |\n| Windows     | x86-64             | Dynamic     | [`ffaudio2json_win_x86-64_shared.exe`](https://github.com/WilliamVenner/ffaudio2json/releases/latest/download/ffaudio2json_win_x86-64_shared.exe)     |\n\n### Dynamic Linking\n\n#### Linux\n\nFor Debian-based systems:\n\n```sh\nsudo apt update\nsudo apt install -y ffmpeg\n```\n\n#### macOS\n\n```\nbrew install ffmpeg\n```\n\n## Building\n\n### Got Rust?\n\nBefore attempting compilation of this program, [install Rust](https://rustup.rs/).\n\n### Linux\n\n```sh\ngit clone https://github.com/WilliamVenner/ffaudio2json\ncd ffaudio2json\nsudo apt update\nsudo apt install -y clang libavcodec-dev libavformat-dev libavutil-dev pkg-config\ncargo build --release\n```\n\nYour compiled binary can be found in `target/release/ffaudio2json`\n\n### macOS\n\n```sh\ngit clone https://github.com/WilliamVenner/ffaudio2json\ncd ffaudio2json\nbrew install ffmpeg\ncargo build --release\n```\n\nYour compiled binary can be found in `target/release/ffaudio2json`\n\n### Windows\n\n```pwsh\ngit clone https://github.com/WilliamVenner/ffaudio2json\ncd ffaudio2json\ncurl -L -o ffmpeg-release-full-shared.7z \"https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z\"\n7z x ffmpeg-release-full-shared.7z\nmkdir ffaudio2json-ffmpeg-release-full-shared\nmv ffmpeg-*/* ffaudio2json-ffmpeg-release-full-shared/\nset FFMPEG_DIR=%cd%\\ffaudio2json-ffmpeg-release-full-shared\\\ncargo build --release\n```\n\nYour compiled binary can be found in `target/release/ffaudio2json.exe`\n\nYou will probably need to move the following DLLs from `ffaudio2json-ffmpeg-release-full-shared/bin/` to the same folder as `ffaudio2json.exe`:\n\n- `avcodec-61.dll`\n- `avutil-59.dll`\n- `avformat-61.dll`\n- `swresample-5.dll`\n\n## Feature Flags\n\n| Feature         | Default | Description                                                     |\n| --------------- | ------- | --------------------------------------------------------------- |\n| `static-ffmpeg` | No      | Statically links ffmpeg instead of linking to shared libraries. |\n| `build-ffmpeg`  | No      | Builds ffmpeg from source and statically links to it.           |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamvenner%2Fffaudio2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamvenner%2Fffaudio2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamvenner%2Fffaudio2json/lists"}