Vitakrypt Audio Codec (VAC) is a lightweight command-line tool for encoding FLAC files into an encrypted VAC format, inspecting metadata, and playing them securely. This version uses single-passphrase AES-GCM encryption. It is designed for safe audio streaming, allowing users to download music without risking piracy.
- Encode FLAC files to encrypted
.vacformat. - Batch encode entire folders of FLAC files.
- Play VAC files directly using
ffplay,vlc, ormpv. - View metadata of VAC files: title, artist, album, duration, bitrate, sample rate, and track number.
- Single-passphrase encryption (default:
"hello mario"). - Fully cross-platform (requires a media player installed).
Visit Releases to download the binary for your platform.
git clone https://github.com/yourusername/vitakrypt-vac.git
cd vitakrypt-vac
go build -o vac main.goMake sure ffplay, vlc, or mpv is installed and in your system PATH.
vac <command> [options]Single file:
vac encode -flac path/to/file.flac [-output path/to/file.vac] [-passphrase "yourpass"]Folder (batch mode):
vac encode -flac path/to/folder -batch [-output path/to/folder] [-passphrase "yourpass"]- If no output path is specified, VAC files are created in the same folder as input.
- Batch mode processes all
.flacfiles recursively.
vac play path/to/file.vac [-player ffplay|vlc|mpv]- Default player is automatically detected (
mpv > vlc > ffplay).
vac info path/to/file.vac- Outputs metadata like title, artist, album, duration, bitrate, and sample rate.
# Encode a single FLAC file
vac encode -flac "song.flac" -passphrase "supersecret"
# Batch encode all FLAC files in a folder
vac encode -flac "./albums" -batch -passphrase "supersecret"
# Play a VAC file with mpv
vac play "./albums/song.vac" -player mpv
# Display metadata of a VAC file
vac info "./albums/song.vac"- Magic number:
CSNG(4 bytes) - Version: 1 (4 bytes)
- Key size: 32 bytes (AES-256)
- Metadata fields: title, artist, album (each 64 bytes)
- Duration:
float64(8 bytes) - Bitrate, Sample Rate, Track: 4 bytes each
- Encrypted FLAC data follows header (AES-GCM)
- AES-256 GCM with a passphrase-derived key (
SHA-512 → 32 bytes). - Nonce is randomly generated per file and prepended to ciphertext.
- Single-passphrase simplifies key management.
- Go standard library
github.com/dhowden/tag(for FLAC metadata)- External players:
ffplay,vlc, ormpv
Notes:
- VAC files can only be played by this CLI (or any app implementing the same header/decryption logic).
- Default passphrase is
"hello mario"— strongly recommended to change it in production.
If you prefer a terminal-based interface to browse, queue, and play .vac files interactively, you can use VAC Player.
-
Built with Textual, it allows you to:
- Browse your VAC library
- Enqueue and manage a playback queue
- Play songs one-by-one or all in sequence
- Skip or remove songs on-the-fly
-
Integrates with the VAC CLI and supports mpv, VLC, or ffplay.
GitHub Repository: VAC Player
GNU License