goa2w

command module
v1.0.0 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

Go Audio to Waveform (goa2w) 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

Full sample file with audio sample_mp3.mp4

Acknowledgements

This project is an adaptation of the Python version of SEEWAV by adefossez. The original code is licensed under The Unlicense. This Go version replicates the functionality of the Python code, with optimizations to better suit the Go programming language.

Requirements

Installing

Option 1

If you have Go installed you can install the latest version of goa2w with this command:

go install github.com/bradsec/goa2w@latest
Option 2 Clone Repo and Build
git clone https://github.com/bradsec/goa2w.git
cd goa2w
go build -o goa2w main.go

# Copy the goa2w binary/executable to a directory in your system PATH

Usage Examples

goa2w -i sample.mp3

goa2w -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)

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