The script is to process images named Image1.png
thru Image10.png
. The images are resized then the resized image is converted to video with same file name with extension mp4
.
Please consider the following script:
FOR %%G IN (Image*.png) DO (
ffmpeg -i %%G -vf scale=4096:-1 -y out.png
Set "FF=%~n1"
ffmpeg -loop 1 -i out.png -c:v libx264 -t 1 -crf 25 -pix_fmt yuv420p -y %FF%.mp4
del out.png
)
The result from this script is:
- Each Image file is resized and written to file
out.png
in turn. - File
out.png
is deleted at the end of session. - The video created is
MP4.mp4
which is from the last.png
file beingImage9.png
Why is variable %FF% which is %~n1 not being passed through FFMPEG?