I've been searching around for this for some time but can't find a working solution. I found this question, which is close, but not exactly what I need.
I'm windows and ffmpeg to convert movs to mp4. What I would like to have is a cmd file on my desktop on which I can drop my mov from any folder and the cmd file will create an mp4 with the same name in the same folder as the original mov, except the extension should be mp4.
My cmd file looks like this:
@echo off
ffmpeg -i %1 -s 1920x1080 -c:v libx264 -preset slow -bf 2 -crf 18 -pix_fmt yuv420p -movflags faststart -r 25 -profile:v baseline -level 3.0 -c:a aac -b:a 192k %1.mp4
pause
This creates the file Test.mov.mp4.
I tried
-f mp4 "%1~nf.mp4"
instead of %1.mp4
but this outputs Test.mov~nf.mp4.
%~n1.mp4
.%~p1%~n1.mp4
and it works!