I have files, like these:
- 01 - A.wav
- 02 - AB.wav
- 03 - C.wav ... and so on until 15 - BLA.wav
and I have some command line like these:
dirinwav="/home/akrogun/Videos/CD1" && \
diringraphics="/home/akrogun/Videos/graphics/" && \
dirout="/home/akrogun/Videos/ffmpegout/" && \
file01="01 - A" && \
file02="02 - AB" && \
file03="03 - C" && \ and so on until file15="15 - BLA"
\
echo "Encoding " $file01..... && \
file_n=$file01 && \
number=01 && \
ffmpeg -y -i "$dirinwav/$file_n.wav" -acodec libfdk_aac -b 128k out-aac.aac && \
ffmpeg -y -i "$diringraphics/background.jpg" -i "$diringraphics/$number.png" -filter_complex "overlay" out-background.png && \
ffmpeg -y -loop 1 -i out-background.png -i out-aac.aac -vcodec mpeg4 -b:v 800k -acodec copy -shortest "$dirout/$file_n.mp4" && \
\
echo "Encoding " $file02..... && \
file_n=$file02 && \
number=02 && \
ffmpeg -y -i "$dirinwav/$file_n.WAV" -acodec libfdk_aac -b 128k out-aac.aac && \
ffmpeg -y -i "$diringraphics/background.jpg" -i "$diringraphics/$number.png" -filter_complex "overlay" out-background.png && \
ffmpeg -y -loop 1 -i out-background.png -i out-aac.aac -vcodec mpeg4 -b:v 800k -acodec copy -shortest "$dirout/$file_n.mp4" && \
\
echo "Encoding " $file03..... && \
file_n=$file03 && \
number=03 && \
ffmpeg -y -i "$dirinwav/$file_n.WAV" -acodec libfdk_aac -b 128k out-aac.aac && \
ffmpeg -y -i "$diringraphics/background.jpg" -i "$diringraphics/$number.png" -filter_complex "overlay" out-background.png && \
ffmpeg -y -loop 1 -i out-background.png -i out-aac.aac -vcodec mpeg4 -b:v 800k -acodec copy -shortest "$dirout/$file_n.mp4"
and so on until file15
Those command lines are working just fine. I'm just wondering how to make those lines work in loop? Perhaps using for; do; done? Or something else?
Thanks in advance