I need to take all audio files from a directory, and export them along with one of multiple pictures listed in a text file.
It's working to take all the audio files one by one, but I cannot make it have a different picture for each video. I have same picture all the time.
- I don't know how to make the loop working for the pictures files.
- Will be nice if someone can tell me how I can group pictures in order to export as a slideshow.
Thank you.
In .txt file my pictures are like this :
1.jpg
2.jpg
3.jpg
And my code looks like this:
@echo off
set "sourcedir=E:\test slideshow imagini"
set "outputdir=E:\test slideshow imagini\1"
PUSHD "%sourcedir%"
for /F "tokens=*" %%A in (poze3.txt) do (
echo %%A
:: pictures names
for %%F in (*.wav *.mp3) DO ffmpeg -loop 1 -i %%A -i "%%F" -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest -vf scale=1920:1080 "%outputdir%\%%F.mp4"
POPD
)