Skip to content

Instantly share code, notes, and snippets.

@kidsil
Created January 17, 2024 15:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kidsil/9a306efdde9e261b3794eb77ce226bf3 to your computer and use it in GitHub Desktop.
Save kidsil/9a306efdde9e261b3794eb77ce226bf3 to your computer and use it in GitHub Desktop.
White and Brown noise on Linux - No sox needed
# Brown noise
ffmpeg.ffplay -f lavfi -showmode 0 -i 'anoisesrc=color=brown'
# White Noise
ffmpeg.ffplay -f lavfi -showmode 0 -i 'anoisesrc=color=white'
@kidsil
Copy link
Author

kidsil commented Jan 17, 2024

Background - I wanted to get a quick 1-liner for brown and white noise without installing sox.
Finally found out that ffmpeg has a built-in way of generating this.

@jezmck
Copy link

jezmck commented Jan 17, 2024

Thank you! Much better.

What OS are you using?
Installing ffmpeg with brew on MacOS doesn't give me a bin for ffmpeg.ffplay

On MacOS, use simply e.g.

ffplay -f lavfi -showmode 0 -i 'anoisesrc=color=brown'

@kidsil
Copy link
Author

kidsil commented Jan 19, 2024

I'm on Linux. Thanks for the much needed MacOS addition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment