help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] help - optimization wanted for little script - batch con


From: Luigi Rensinghoff
Subject: Re: [Help-bash] help - optimization wanted for little script - batch converting audio files
Date: Fri, 11 Jul 2014 00:46:08 +0200

wow !!


     i find that quite fascinating ;-) Thanks a lot !

But i need to read a little more and play with it to fully understand - Thanks 
you for the links and the explanation.

My script looks like this and it is working:

It is stopping if a file is not existent - this could probably easily be fixed, 
but its ok for me now !

Thanks 

#!/bin/bash
 
process() 
 {
   ac=" -acodec pcm_s24le"
   mapping="[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[aout] -map [aout]"
   pre="${1%-C.aif}"
   L="$pre-(L).aif"$ac
   R="$pre-(R).aif"$ac
   C="$pre-C.aif"$ac
   LFE="$pre-LFE.aif"$ac
   Ls="$pre-S(L).aif"$ac
   Rs="$pre-S(R).aif"$ac
 
   ffmpeg   -i $L -i $R -i $C -i $LFE -i $Ls -i $Rs -filter_complex $mapping  
${pre-C.aif}_6ch_24bit.wav < /dev/null

}


while IFS= read -r -d '' file; do
process "$file"
done < <(find . -type f -name '*-C.aif' -print0)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]