alfg / ffmpeg-commander

🛠️ FFmpeg Command Generator Web UI
http://alfg.dev/ffmpeg-commander/
MIT License
711 stars 84 forks source link

[suggestion] Add option for 2-pass in windows shell #28

Open PabloDons opened 2 years ago

PabloDons commented 2 years ago

Currently the 2-pass command only works in linux systems. I'd like to suggest an option to select Windows shell for the 2-pass script. It would work like so: Replace the /dev/null with the Windows equivalent NUL virtual path (see this SO answer). ffmpeg asks for permission to overwrite this file, so an always overwrite flag on the first pass would be wonderful.

Also in PowerShell, the bash && operator does not work. The equivalent -and operator messes with the pipes, so the best alternative I could find is this:

ffmpeg -i input.mp4 -pass 1  -f mp4 -y nul; if ($?) { ffmpeg -i input.mp4 -pass 2 utput.mp4 }

NOTE: Not sure how this would look in command-prompt (cmd.exe). This would only work on powershell

alfg commented 2 years ago

Hey @PabloDons, thanks for the suggestion. This is something I can probably add as a toggle setting in the options menu. I'll keep this open as a TODO.

Thanks!