Rename file before remuxing with ffmpeg

I’ve this code:

@echo off
set dialog=”about:FILE.click();new ActiveXObject
set dialog=%dialog%(‘Scripting.FileSystemObject’).GetStandardStream(1).WriteLine(FILE.value);
set dialog=%dialog%close();resizeTo(0,0);”

for /f “tokens=* delims=” %%p in (‘mshta.exe %dialog%’) do set “file=%%p”
echo El archivo seleccionado es: “%file%”

pause

ffmpeg -i “%file%” -vf scale=2560×1440:flags=lanczos -c:v libx264 -pix_fmt yuv422p -preset medium -crf 14 -c:a copy output.mp4

pause

What I want to do is to have the possibility to rename the file before proceeding with the remux.

Right now the final file will be called “output.mp4”, but what I want to do is to have a dialog pop up where I am allowed to write the file name however I want. Something like:

Rename the file to: (And then I would write for instance … example1.mp4 instead of output.mp4).

I know that instead of “copy output.mp4” I could write “copy example1.mp4” but that’s not what I want.

Read more here: Source link