Skip to content

Instantly share code, notes, and snippets.

@robballou
Created February 25, 2011 15:59
Show Gist options
  • Save robballou/843995 to your computer and use it in GitHub Desktop.
Save robballou/843995 to your computer and use it in GitHub Desktop.
Find the number of channels in an audio file
#!/bin/bash
#
# Usage:
# ./channels.sh [filename]
#
echo "$1: " `ffmpeg -i "$1" 2>&1 | awk '/[[:digit:]] channels?/ {print "Channels:",$7}'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment