[FFmpeg-user] Batch Join multimono to multichannel Auido (wav /
Luigi Rensinghoff
soundgigi at freenet.de
Thu Jul 10 19:17:39 CEST 2014
e it can be achieved more elegant - Suggestions ???
>
> *sigh*
> This is somewhat off-topic, but anyway, here is how I would do it:
It's off-topic, but useful ;-)
thank you very much ....
I dont understand the highlighted parts .... will do some more reading
Thanks a lot
Luigi
>
>
> #!/bin/sh
>
> channels="L R C LFE Ls Rs"
> filter="[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[aout]"
>
> for f in *-C.aif; do
> #echo "Processing $f"
>
> pre="${f%-C.aif}"
------------------
set --
^^^^^^^^^^^^
> for c in $channels; do
>
------------------
set --
^^^^^^^^^^^^
> -i "$pre-$c.aif"
> done
> out="${pre}_6ch.wav"
>
> ffmpeg "$@" -filter_complex "$filter" -map "[aout]" "$out"
------------------ ------------------ ------------------
if [ $? -ne 0 ]; then
echo "****
------------------ ------------------ ------------------
> ffmpeg failed! Not removing input files!"
> exit 1
> fi
>
> for c in $channels; do
> echo rm -- "$pre-$c.aif"
> done
> done
>
>
> Note that it is written in a way that all variables are protected
> by quotes, so this works even if file names contain "unusual"
> characters like spaces, tabs or newlines.
>
> Also note that the rm command has been disabled by an echo
> command. I recommend you enable it only if you've tested the
> script and you are sure that it does the right thing. Unless
> you have backup copies of the input files anyway, of course.
>
> Best regards
> Oliver
>
> --
> ``We are all but compressed light'' (Albert Einstein)
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
More information about the ffmpeg-user
mailing list