I mainly use these three CMDs on a button to with parameter "%P%O.%E"
Convert audio to AC3:
Code: Select all
%~dp0ffmpeg.exe -i %1 -map 0 -vcodec copy -scodec copy -acodec ac3 -b:a 640k "%~dpn1-AC3.mkv"
Convert to 720p x264 and AC3:
Code: Select all
%~dp0ffmpeg.exe -i %1 -map 0 -vf scale=1280:-2 -c:v libx264 -pix_fmt yuv420p -crf 18 -preset slow -scodec copy -acodec ac3 -b:a 640k "%~dpn1-720p-AC3.mkv"
Convert with Nvidia NVENC:
Code: Select all
%~dp0ffmpeg.exe -hwaccel_output_format cuda -i %1 -map 0 -c:v h264_nvenc -pix_fmt yuv420p -preset fast -rc vbr -cq 25 -b:v 0K -scodec copy -acodec copy "%~d1%~p1%~n1-720p-nv.mkv"
NVENC was not very well documented and there might have been changes...
The "-map 0" parameter copies all subtitles and other streams.
The "-vf scale=1280:-2" keeps the correct aspect ratio when scaling to 720p.