I'm building a script to create multiple videos from multiple images and audio inputs. I want to create randomness in selecting images to audio. I found the loop when using the ffmpeg script to build the video, but it did not support random pick up. I tried to understand the script in the language of windows and found out the use of the variable $ (shuf -n1 -e e: audio *) but I could not include it in the ffmpeg loop. I really hope to have help from the community. Sincere thanks! This is my scenario:
set audiorandom = $(shuf -n1 -e e:\audio\*.mp3)
: encode video
for %%i in ("%INPUT%\*.jpg") DO ffmpeg -i "%%i" -i "%%audiorandom" -threads 0 -shortest -preset ultrafast "%output%\%%~ni.mp4"
Aucun commentaire:
Enregistrer un commentaire