mugenyi / m4rconverter
iphone audio ringtone converter MPEG4 audio,m4r converter
Installs: 104
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
Type:package
Requires
- php: >=5.5
- php-ffmpeg/php-ffmpeg: 0.8.*
Requires (Dev)
- mikey179/vfsstream: ~1
- phpunit/phpunit: 4.*
README
This is an iphone ringtone converter using php. Its a simplest way of creating ( .m4r ) format audio which is the recommended type for IOS product tones.
installation
This package uses ffmpeg and ffprobe libraries so make sure they are installed before you install it.
composer require mugenyi/m4rconverter
basic usage
Provide the class with 2 values.
-
Path to the file to be converted.
-
Directory to save the converted file.
$converter = new M4rconverter\Converter('tracks/avril.mp3','converted'); $converter->convert();
configuration
M4rconverter allows you to easily configure the underlying FFmpeg and audio.
-
configure ffmpeg
$converter->setFFMpegConfiguration([ 'ffmpeg.binaries' => '/opt/local/ffmpeg/bin/ffmpeg', 'ffprobe.binaries' => '/opt/local/ffmpeg/bin/ffprobe', 'timeout' => 3600, // The timeout for the underlying process 'ffmpeg.threads' => 12, // The number of threads that FFMpeg should use ]);
-
configure audio
$converter->setAudioFormatConfiguration([ 'bitrate' => 256, //AudioKiloBitrate 'audioChannel' => 2, 'duration'=>30 //time in seconds for the output file 'seek'=>30 //time in seconds to seek ]);
special thanks
M4rconverter is built on top of php-ffmpeg package. special thanks to the team behind the project.
Example apps
itunemachine.com uses this package to make name ringtones