Created
June 25, 2015 02:51
-
-
Save TheZoc/0e983964edb3eaa73282 to your computer and use it in GitHub Desktop.
Convert a MP3 file to an Apple iPhone's ringtone file (M4R), using FFMPEG.
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 ===================================================== | |
rem Converts a MP3 file to a M4R file using ffmpeg. | |
rem Usage: Drop a MP3 file at the top of this batch file. | |
rem ===================================================== | |
set ffmpeg_exe="C:\ffmpeg\ffmpeg-20150619-git-bb3703a-win64-static\bin\ffmpeg.exe" | |
rem %~f1 = Full File Path, with drive letter | |
rem %~p1 = Drive Letter | |
rem %~p1 = Path Only | |
rem %~n1 = File Name | |
rem %~x1 = Extension (with dot) | |
%ffmpeg_exe% -i "%~f1" -ac 1 -ab 128000 -f mp4 -acodec libvo_aacenc -y "%~dpn1.m4r" | |
pause |
Use -c:a aac
instead of -acodec libvo_aacenc
because libvo_aacenc has been removed from ffmpeg's default encoders.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shouldn't line 9 be
%~d1
instead ofp
?