Skip to content

Instantly share code, notes, and snippets.

@Kyu
Forked from TheZoc/mp3-to-m4r.bat
Created May 23, 2018 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kyu/2f8e0b2a41975f7cf228b74b58f7a93e to your computer and use it in GitHub Desktop.
Save Kyu/2f8e0b2a41975f7cf228b74b58f7a93e to your computer and use it in GitHub Desktop.
Convert a MP3 file to an Apple iPhone's ringtone file (M4R), using FFMPEG.
@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 =====================================================
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 -i "%~f1" -ac 1 -ab 128000 -f mp4 -acodec aac -y "%~dpn1.m4r"
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment