The script is to process images named
Image10.png. The images are resized then the resized image is converted to video with same file name with extension
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.pngis deleted at the end of session.
- The video created is
MP4.mp4which is from the last
Why is variable %FF% which is %~n1 not being passed through FFMPEG?