add program description

This commit is contained in:
filifa 2024-09-02 21:03:17 -05:00
parent f0b432614d
commit bf6bf28635
2 changed files with 12 additions and 9 deletions

View File

@ -1,4 +1,7 @@
# milkbucket # milkbucket
milkbucket is an audio visualizer. It uses
[Milkdrop](https://www.geisswerks.com/milkdrop/) preset files to generate
visualizations from standard input.
## Build ## Build
milkbucket depends on the milkbucket depends on the
@ -20,13 +23,16 @@ generate the PCM stream, then pipe to milkbucket, like so:
ffmpeg -i $audio -ar 44100 -f s16le - | ./milkbucket -p $preset ffmpeg -i $audio -ar 44100 -f s16le - | ./milkbucket -p $preset
``` ```
Note that neither of these commands will output any audio! If you want to hear the audio at the same time (and assuming your machine uses pipewire), run: Note that neither of these commands will output any audio! If you want to hear
the audio at the same time (and assuming your machine uses pipewire), run:
``` ```
ffmpeg -i $audio -ar 44100 -f s16le - | tee >(pw-play --rate=44100 --format=s16 -) | ./milkbucket -p $preset ffmpeg -i $audio -ar 44100 -f s16le - | tee >(pw-play --rate=44100 --format=s16 -) | ./milkbucket -p $preset
``` ```
(If you don't use pipewire try using `aplay` instead of `pw-play`, or some other command for playing PCM streams.) (If you don't use pipewire try using `aplay` instead of `pw-play`, or some
other command for playing PCM streams.)
You can also generate a visualization from your system sound. Assuming pipewire again, and that you have audio coming from Firefox, run: You can also generate a visualization from your system sound. Assuming pipewire
again, and that you have audio coming from Firefox, run:
``` ```
pw-record --target Firefox - | ./milkbucket -p $preset pw-record --target Firefox - | ./milkbucket -p $preset
``` ```

View File

@ -91,13 +91,10 @@ func milkbucket(cmd *cobra.Command, args []string) {
// rootCmd represents the base command when called without any subcommands // rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{ var rootCmd = &cobra.Command{
Use: "milkbucket", Use: "milkbucket",
Short: "A brief description of your application", Short: "Audio visualizer",
Long: `A longer description that spans multiple lines and likely contains Long: `milkbucket is an audio visualizer.
examples and usage of using your application. For example:
Cobra is a CLI library for Go that empowers applications. It uses Milkdrop preset files to generate visualizations from standard input.`,
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: milkbucket, Run: milkbucket,
} }