MagicPodcast/bash_commands/split_channels_to_two_ways.sh

15 lines
327 B
Bash

#!/bin/bash
tmp_dir=$1
number_of_files=$2
file_1=$3
file_2=$4
if [ $number_of_files != "2" ]
then
ffmpeg -i $file_1 -map_channel 0.0.0 $tmp_dir/left.wav -map_channel 0.0.1 $tmp_dir/right.wav -y
else
ffmpeg -i $file_1 -map_channel 0.0.0 $tmp_dir/left.wav -y
ffmpeg -i $file_2 -map_channel 0.0.1 $tmp_dir/right.wav -y
fi