Advertisement
Tbruff13

Untitled

Sep 22nd, 2011
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/bin/bash # Copyright 2008-2009, Kees Cook <kees@outflux.net> # # Records the PulseAudio monitor channel. # http://www.outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/ # #This script require sox #sudo apt-get install sox if [ -n "$1" ]; then OUTFILE="$1" else TIME=$(date +%d-%b-%y_%H%M-%Z) OUTFILE="recording_$TIME.wav" fi # Get sink monitor: MONITOR=$(pactl list | grep -A2 '^Source #' | grep 'Name: .*\.monitor$' | awk '{print $NF}' | tail -n1) # Record it raw, and convert to a wav echo "Recording. Ctrl-C or close window to stop" parec -d "$MONITOR" | sox -t raw -r 44100 -sLb 16 -c 2 - "$OUTFILE"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement