Created
August 7, 2014 19:10
-
-
Save jiaaro/d7ee73891691ebedb936 to your computer and use it in GitHub Desktop.
Split Stereo Files (ffmpeg)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INFILE="${1}" | |
LFILE=$(SND="$INFILE" python -c "import os; print '{0}.L{1}'.format(*os.path.splitext(os.environ['SND']))") | |
RFILE=$(SND="$INFILE" python -c "import os; print '{0}.R{1}'.format(*os.path.splitext(os.environ['SND']))") | |
echo "Splitting $INFILE into:" | |
echo " LEFT: $LFILE" | |
echo " RIGHT: $RFILE" | |
echo | |
ffmpeg -i "$INFILE" -map_channel 0.0.0 "$LFILE" -map_channel 0.0.1 "$RFILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment