a2w

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 18 Imported by: 0

README

Audio to Waveform (a2w) Video Generator

A command line tool written in Go which generates a waveform video from an audio files (mp3, wav etc.). The visual representation of the audio waveform is displayed as bars in a smooth animation. Uses FFmpeg to encode and output as various video formats including mp4, avi, webm.

waveform_sample
View full mp4 video sample video with audio

Requirements

Installing

Download the precompiled release binaries for your system or clone and build as per the instructions below.

# 1. Clone the repo
git clone https://github.com/bradsec/a2w.git

cd a2w

# 2. Build the applicaton (below command makes a a2w binary/executable)
go build -o a2w main.go

(Copy the binary to a directory in your system PATH)

# 3. Run the program see usage flags below

Usage Examples

a2w -i sample.mp3

a2w -i sample.mp3 -format "webm"

terminal_screenshot

Options
Options:
  -b int
    	Number of bars on the video at once (default 50)
  -bg string
    	Background color (RGB or hex: #RRGGBB) (default "#000000")
  -duration float
    	Duration in seconds from the seek time
  -fg string
    	Foreground color (RGB or hex: #RRGGBB) (default "#007D9C")
  -format string
    	Output video format (e.g., mp4, avi, mkv, webm, mov) (default "mp4")
  -h int
    	Height in pixels of the animation (default 600)
  -i string
    	Input audio file
  -oversample float
    	Lower values will feel less reactive (default 5)
  -r int
    	Video framerate (default 60)
  -seek float
    	Seek to time in seconds in the video
  -speed float
    	Higher values mean faster transitions between frames (default 3.5)
  -t float
    	Amount of audio shown at once on a frame (default 0.4)
  -w int
    	Width in pixels of the animation (default 800)

Credit

This project is an adaptation of the Python version of SEEWAV by adefossez.

The original code is licensed under The Unlicense, which allows for public domain use.

The functionality of the Python version has been translated to Go and may have been modified or optimized to suit the Go programming language.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL