aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/ffmpeg-batch
blob: 3d297554b82013ebcee119f2cc58c0d1dbfb156a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash

srcExt=$1
destExt=$2

srcDir=$3
destDir=$4

opts=$5

for filename in "$srcDir"/*.$srcExt; do

	basePath=${filename%.*}
	baseName=${basePath##*/}

	ffmpeg -i "$filename" $opts "$destDir"/"$baseName"."$destExt" & #le epic posix-compliant parallelization

done

echo "Conversion form ${srcExt} to ${destExt} complete!"