Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to convert any type of video to mp4?

how can i let users upload video to mp4 using php code? I've been trying to find a code that converts video to mp4 automatically no mater what type of video format it is this possible?

like image 234
user3076412 Avatar asked Dec 14 '13 06:12

user3076412


1 Answers

If you are trying this at your server/ not using any online tool. You can use FFmpeg for this. Sample code for conversion:

ffmpeg -i {input}.mov -vcodec h264 -acodec aac -strict -2 {output}.mp4

FFmpeg is most widely used tool for this purpose and you can download the same here.

like image 99
Aditya Avatar answered Sep 21 '22 10:09

Aditya