Created
April 28, 2017 15:17
-
-
Save zinntikumugai/5fa6479928cfead533993eec1cac6a07 to your computer and use it in GitHub Desktop.
「.mp4」ファイルの音声(AAC)のみ抽出して、「.m4a」ファイルとして保存するスクリプト
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 | |
cd /d %~dp0 | |
setlocal enabledelayedexpansion | |
rem || ffmpegの設定及び引数 | |
rem ------------------------ | |
set FFMPEG=ffmpeg.exe -y -i | |
set FFMPEGOUT= -acodec copy | |
rem ------------------------ | |
rem ||ファイル名が「.mp4」のみ対象 | |
for /f "usebackq" %%i in (`dir /B /S *.mp4`) do ( | |
echo ---------------------------------------------------- | |
echo %%i | |
echo. | |
rem ||ファイル名を変数に格納 | |
set dmpppp=%%i | |
rem ||抽出コマンド実行(ffmpeg.exe -y -i <ファイル名> -acodec copy <出力ファイル名> | |
%FFMPEG%%%i%FFMPEGOUT%!dmpppp:~0,-3!m4a | |
echo ---------------------------------------------------- | |
) | |
echo. | |
rem pause>NUL | |
pause | |
exit /b 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment