Last active
May 12, 2018 13:22
-
-
Save the-eric-kwok/ee0925eb40bd23f495415c5dfadb873c to your computer and use it in GitHub Desktop.
Merge video and audio
This file contains 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 | |
:: This is help menu | |
if "%1"=="/h" (goto help) | |
if "%1"=="/help" (goto help) | |
if "%1"=="/?" (goto help) | |
if "%1"=="-h" (goto help) | |
if "%1"=="--help" (goto help) | |
if "%1"=="" (goto help) | |
set video=%1 | |
set audio=%2 | |
set output=%3 | |
if exist %output% ( | |
choice /N /M "文件已存在,是否继续? 是(Y)否(N)" | |
if errorlevel 2 ( | |
echo 操作终止! | |
goto end | |
) | |
if errorlevel 1 goto merge | |
) | |
:help | |
echo merge_av {video} {audio} {output} | |
exit | |
:merge | |
ffmpeg -i %video% -i %audio% -c:v copy -y %output% | |
:end | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment