I'm converting webm to mp4 using FFmpeg.
My batch file is
cd "C:\Users\Matt\Desktop\" && for %f in (*.webm) do ffmpeg -y -i "C:\Users\Matt\Desktop\%~f" -vcodec libx264 -b:v 600K -pass 1 -acodec aac -b:a 128k "C:\Users\Matt\Desktop\%~nf.mp4" && ffmpeg -y -i "C:\Users\Matt\Desktop\" -vcodec libx264 -b:v 600K -pass 2 -acodec aac -b:a 128k "C:\Users\Matt\Desktop\%~nf.mp4"
It works for CRF and 1 Pass, but using 2 Pass it stops on the second pass and gives the error:
C:\Users\Matt\Desktop" -vcodec libx264 -b:v 600K -pass 2 -acodec aac -b:a 128k C:\Users\Matt\Desktop\video: Invalid argument
The first double quote is missing on the Path, and the filename "video 01.mp4" is cut off.
-i
parameter in the second pass is correct? The other two times you've used it, you've specified a file. In the last instance, it appears to be a directory - possibly the terminal\"
is being interpreted as an escaped-"
– Magooffmpeg
, it just appeared more logical to me the way I said, but the tool seems to work differently (I guess there is a temporary file somewhere holding the information gathered during the first pass). Sorry for confusing you! – aschipfl