PHP + ffmpeg video converter
Description:
this script is used for converting videos to severeal diferent video formats and audio mp3 format.
Features:
1. converts input video to several video formats including audio format mp3
2. calculate video duration in next format 00:00:00 (hh:mm:ss)
3. takes picture from video
4. prevents uploading unsuported files before uploading is startet
5. user have an option to set quality of video/audio file
6.suported files:
input:3gp, avi, mpg, mpeg, mpe4, mov, m4a, mj2, flv, wmv, mp3, ogg, webm
output: .flv, mp4, avi, wmv, mp3, ogg, webm
Demo
Usage:
1. start step_1.php
2. choose your video file and follow instructions
3. only extensions for videos are enabled for upload – if you choose some non-suported extesnion you will get alert window BEFORE upload is started
4. Choose output video type and quality settings
5. wait until conversion is over – new video duration is displayed
6. image for video is created
7. preview your video / or download link is shown
8. log file is created for every video conversion and image creation
Info:
all uploaded videos are renamed to a name based on a microtime stamp like 0342731001282903919.avi this will make easier for ffmpeg to read uploaded file before converting (preventing video names with special characters)
log file of every conversion is created with a same name like converted video
Image from video is taken based on total video duration, php splits total video duration time by 2 and at that point picture is taken from video.
Download