Last active
June 25, 2019 02:43
-
-
Save darkcolonist/c768ae2ee29db38b74a87c4e015cb58c to your computer and use it in GitHub Desktop.
send_to_mp4.bat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
rem For installation, just copy batch file to SendTo folder.. | |
SET _new_extention=mp4 | |
:start | |
if "%~1"=="" (call goto :the_end) | |
CALL :SUB_CONVERT %1 | |
SHIFT | |
goto :start | |
:SUB_CONVERT | |
SET _orig_path=%~1 | |
rem SET _orig_extention=%_orig_filename:*.=% | |
echo %_orig_path% | |
SET _orig_extention=%_orig_path:*.=% | |
CALL SET _new_path=%%_orig_path%:.%_orig_extention%=.%_new_extention%%% | |
set _new_path="%_new_path%" | |
echo. | |
echo Converting %1 ======TO===== %_new_path% ... | |
echo. | |
SET PARAMS= | |
:_PARAMS_LOOP | |
REM There is a trailing space in the next line; it is there for formatting. | |
SET PARAMS=%PARAMS%%1 | |
ECHO %1 | |
SHIFT | |
IF NOT "%1"=="" GOTO _PARAMS_LOOP | |
PAUSE | |
rem SET _ffmpeg_path="D:\Program Files\ffmpeg-20190105-2d580d7-win64-static\bin\ffmpeg.exe" | |
rem | |
rem IF /I "%_orig_extention%"=="mkv" ( | |
rem rem CALL %_ffmpeg_path% -i %1 -c:v copy -c:a copy %_new_path% | |
rem CALL %_ffmpeg_path% -i %1 -codec copy -c:s mov_text %_new_path% | |
rem rem echo %_orig_extention% IS mkv | |
rem rem pause | |
rem ) ELSE ( | |
rem CALL %_ffmpeg_path% -i %1 %_new_path% | |
rem rem echo %_orig_extention% is NOT mkv | |
rem rem pause | |
rem ) | |
rem GOTO :eof | |
rem | |
rem :the_end | |
rem echo ********************************************************************** | |
rem echo * FINISHED * | |
rem echo ********************************************************************** | |
rem pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment