YouTube-to-Mp3 Converter :: PHP Script for Win32 Systems

Posted by Yi Zhan

This software does the following for you:

. Converts YouTube, Dailymotion, Vimeo, Facebook, Metacafe, VK, SoundCloud, Instagram, AOL, RedTube, XVideos, and Pornhub content (12 of the most popular video/audio hosting sites in the world)
. Outputs converted files to mp3, aac, m4a, mp4, webm, f4v, and/or 3gp formats
. Enables volume adjustment prior to conversion via jQuery slider control

. Displays download AND conversion progress via corresponding progress bars
. Leverages the power of FFmpeg ( to create crisp, clean, quality conversions of audio/video files.
. Reduces server load by skipping FFmpeg conversion for video/audio file types (i.e., mp4 or mp3) that are already available from the video/audio hosting sites
. Further reduces server load by providing users with a conversion "cancel" button that aborts ongoing conversions and subsequently kills unnecessary FFmpeg processes
. Minimizes bandwidth required for YouTube video conversion to audio formats (like mp3, aac, and m4a) by directly downloading audio from YouTube if it is available!
. Provides options to cache converted files, drastically and even further reducing the consumption of server resources (primarily CPU and bandwidth).
. Includes a tool that crops converted audio AND video files (with live preview of converted media during cropping process!)
. Provides an editor for converted mp3/aac/m4a file meta data (ID3 tags), to control track information displayed on some audio players.
. Integrates Dropbox and OneDrive "Saver" buttons that enable converted files to be saved to site users' accounts in the "cloud" -- in addition to regular file download.
. Features a completely "responsive" default design (leveraging the Bootstrap framework) to provide optimal viewing for ALL device types and sizes!
. Includes JavaScript bookmarklet/browser plugin that enables your site visitors to convert files directly on supported sites' video/audio pages. Bookmarklet loads conversion interface directly into video page, and forwards user to your site for actual conversion and converted file retrieval.
. Enables multi-language support via a corresponding drop down menu and XML translation files
. Dynamically changes HTML title and meta tag content to reflect information about the currently converting video/audio (i.e., the song title)
. Allows a user to share a "direct-to-conversion" URL and post it on a variety of social networking sites following download/conversion, so that the user's friends can automatically download/convert the same video/audio by simply clicking on the posted link! This feature is triggered when the user clicks to download his/her converted file, and the frequency that the share option appears is adjustable.
. Provides the ability to easily incorporate static pages (i.e., About, FAQ, and Contact pages) as well as rudimentary "templating" support for (primarily) static pages via common header/footer files
. Initiates conversions via form submission (POST request) as well as URL query string (GET request)
. Automatically updates the code required to decipher changing, encrypted, YouTube video signatures
. Optionally rotates between multiple outgoing IPs for YouTube downloads/conversions to avoid temporary IP bans and/or CAPTCHAs imposed by YouTube.
. Validates video/audio URLs prior to conversion
. Facilitates the addition of more video hosting sites as well as converted file types (by editing the code)
. Expanded Config file for a more customizable interface (i.e., easy access to FFmpeg commands for different converted file types and the ability to configure default video/audio qualities, default volume, and maximum allowed length of video/audio content)
. Secures access to the server so that FFmpeg commands can only be run if a unique token is present
. Includes script that can be run as a scheduled task on the server, that regularly deletes old converted files
. Programmed entirely in easy-to-read PHP OOP (Object Oriented Programming), JavaScript/jQuery, and CSS to facilitate effortless editing/customization of code

This software requires the following server configuration:

. Linux, Windows, or XAMPP/WAMP server
. For commercial servers: Shared, Dedicated, and VPS hosting supported
. Apache or IIS
. PHP 5.3+
. cURL and PHP cURL extension enabled
. ffmpeg.exe (executable file, provided in Win32 distribution of this software!) for Windows & XAMPP/WAMP; FFmpeg and codecs packages (libvorbis, libvpx, libmp3lame, libx264, and/or aac codecs) installed on Linux
. MySQL, PHP MySQLi extension enabled, and additional IPs configured as outgoing network interfaces (only required IF using IP rotation feature)
. id3.exe (executable file, provided in Win32 distribution of this software!) for Windows & XAMPP/WAMP; 'id3v2' package installed on Linux
. That's it!


. Unpack/Unzip the distribution file and upload the contents to a new directory on your web server via FTP
- This directory should be set to the lowest permissions possible that still enable programmatic creation, opening, and modification of the containing files
. Ensure that the 'logs', 'output', 'output_edited', and 'videos' folders (in your new directory), as well as software.xml, have write permissions
- On Linux systems, this generally means marking the folders/files with chmod 0777
. Set the location of FFmpeg in Config.class.php via the _FFMPEG constant
- On windows systems, this is something like /YourDirectory/ffmpeg.exe
- On Linux, this will generally be something like /usr/bin/ffmpeg or /usr/local/bin/ffmpeg
. Configure additional constants/variables in Config.class.php as needed
. Set up schedule.php as a scheduled task (or cron job on Linux systems) if you require old, converted files to be deleted on a regular basis
- The age of files marked for deletion is configurable via _MAX_AGE_FILES constant in Config.class.php
- It is recommended that the scheduled task run daily
. IF you want to rotate outgoing IPs for YouTube downloads/conversions:
- Set the corresponding constant values in Config.class.php
- Configure additional IPs as outgoing network interfaces
- Use the SQL in 'docs/ips.sql' to build the required database table
. Navigate to index.php of your new directory, and start converting videos! 

Price : 40.95 USD