Skip to content

Instantly share code, notes, and snippets.

@the-eric-kwok
Last active May 12, 2018 13:22
Show Gist options
  • Save the-eric-kwok/ee0925eb40bd23f495415c5dfadb873c to your computer and use it in GitHub Desktop.
Save the-eric-kwok/ee0925eb40bd23f495415c5dfadb873c to your computer and use it in GitHub Desktop.
Merge video and audio
@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