Artur
Artur

Reputation: 345

Run ffmpeg from batch locally

I can’t run ffmpeg using batch file.

I created run.bat in the same folder as ffmpeg.exe. There is also “out” folder with images. I want to convert that images to mp4 file. In batch file I wrote

ffmpeg -framerate 50 -i out/%d.jpg render.mp4

I tried all combinations of brackets, “run” or another batch commands. Ffmpeg seems to open but immediately closes.

If to use just cmd, with cd command to locate folder, all works fine.


I need to run it without inputting absolute path to ffmpeg

Upvotes: 0

Views: 1711

Answers (1)

Artur
Artur

Reputation: 345

As @Compo figured, I had to use %% as % character(like \\ to use \), and You may find useful to add “pause” to batch file, so the correct command is:

ffmpeg -framerate 50 -i out/%%d.jpg render.mp4
pause

Also, you better use \ instead of /

Upvotes: 1

Related Questions