Skip to content

Instantly share code, notes, and snippets.

@mperlet
Created April 9, 2019 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mperlet/bfcd77864250833d2bc62cacf160803e to your computer and use it in GitHub Desktop.
Save mperlet/bfcd77864250833d2bc62cacf160803e to your computer and use it in GitHub Desktop.
# record from soundcard
parec -d 1 | lame -r -V0 - my.mp3
# split file by silence
ffmpeg -i my.mp3 -af silencedetect=noise=-30dB:d=0.5 -f null - 2>&1 | grep silence_end | cut -d" " -f 5 | xargs -L 2 | nl | xargs -l bash -c 'ffmpeg -i my.mp3 -acodec copy -ss $1 -to $2 my$0.mp3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment