Last active
April 28, 2017 23:07
-
-
Save zinntikumugai/072d3c292a1a3837e3582397ac2b1a3a to your computer and use it in GitHub Desktop.
スペース対応版 「.mp4」から音声抽出「.m4a」AAC版
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 ||行末のスペース削除 | |
rem ----------------------- | |
set FFMPEG=ffmpeg.exe -y -i | |
set FFMPEGOUT=-acodec copy | |
rem ----------------------- | |
rem ||「.mp4」のファイルを取得(スペースありも可) | |
for /f "usebackq delims=" %%i in (`dir /B /S *.mp4`) do ( | |
echo ---------------------------------------------------- | |
echo %%i | |
echo. | |
rem ||変数に一旦格納 | |
set dmpppp=%%i | |
rem ||ffmpegで抽出 上部変数初期化時点でのスペースをこちらに移動 | |
%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