Creating an ffmpeg script in Windows?

I really need a way for a client to easily convert videos to a certain resolution. I can accomplish exactly what I want with an ffmpeg command in Linux, and their system should already have ffmpeg even though it’s Windows, cause client uses OBS. So ffmpeg definitely seems like the ideal solution.

However I need it to be stupid easy. Preferred way would be to just drag a video file on top of a BAT file or an EXE file in Explorer and have the program take the file and spit out a transcoded version in the same directory.

How can I make a BAT file (or an EXE, I am not opposed to scratchbuilding a simple thing for this) that will process files dragged and dropped onto it?

handbrake has a queue I guess.

1 Like

if it doesn’t need any other input than a file, maybe make a context menu option. Or a hotkey shortcut with autohotkey or phraseexpress, call ffmpeg on all selected files.

If it needs extra GUI input, can try phraseexpress again or a windows script like wsh or Powershell.

Download from the releases page. Remember to change the encoding defaults inside of the main vencode.bat script.

I just use cmd.exe and can’t be bothered to implement drag-drop support. Feel free to fork and code it yourself if you want that feature.

windows key + r
vencode C:\Users\Public\Videos\Misc\video.mkv

So either change to the directory of the video cd /d C:\Users\Public\Videos\Misc prior to calling vencode or use an absolute path.

Remember to change the encoding defaults inside of the main vencode.bat script.

Changing the defaults is very important.


To clarify, drag and drop does work, but because the Windows batch language uses ! and & as special characters and these are also valid path and file names, drag-drop will fail if either of those characters is present in the path or filename. This is a limitation of the language itself, not specifically vencode.bat which is why I will not be fixing it. Doing so would require re-writing the entire thing in python.