GISTS/windows/video scripts/convertion-videos-mp4.bat

18 lignes
547 o
Batchfile
Brut Vue normale Historique

2024-05-02 00:13:10 +02:00
@echo off
set binpath=%~dp0
if not exist "%binpath%\ffmpeg.exe" echo ffmpeg not found. exiting... & echo. & pause & exit 1
:do
if [%1]==[] goto noarg
2024-06-12 19:44:14 +02:00
"%binpath%\ffmpeg.exe" -hwaccel cuda -hwaccel_output_format cuda -i %1 -c:v hevc_nvenc -map 0 "%~dpn1[HEVC].mkv"
2024-05-02 00:13:10 +02:00
IF %ERRORLEVEL% NEQ 0 pause
shift /1
if [%1] NEQ [] goto do
2024-06-12 19:44:14 +02:00
::alert, use a wav file with CLI player from https://elifulkerson.com/projects/commandline-wav-player.php
"%binpath%\sounder.exe" "%binpath%\alert.wav"
2024-05-02 00:13:10 +02:00
exit 0
:noarg
echo Usage: %~nx0 "video to convert.flv"
echo.
pause
exit