mugenyi/m4rconverter

iphone audio ringtone converter MPEG4 audio,m4r converter

v1.1.3 2017-10-16 09:18 UTC

This package is auto-updated.

Last update: 2024-03-27 16:45:23 UTC


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