Log in

View Full Version : How to encode in mp4(avc+aac) from the server side of a website ? Which softwares ?


sauvage78
18th May 2014, 20:19
Hello everyone,

I am currently a student doing a website (HTML-CSS-PHP-SQL) which involve a database of car accidents with video & for this website I need the user to be able to upload video in any formats (including wmv & mpeg4-asp in avi) in the client side & convert it on fly, in the server side, to both mp4(avc+aac) & ogv (theora+vorbis) in order to output video & audio streams compliant with all the major browsers.

The only problem is that I have no clue how to do that, which softwares (encoders) to use & which langages. As far as possible I need to do it with free softwares & not online API. I have looked at ffmpeg & PHP, but I didn't succeed so far. So I am looking for any help, advices, tutorials.

Thanks for any answer ;)

Blue_MiSfit
18th May 2014, 23:35
ffmpeg will do the job fine.

Learn how to use it on your desktop first so you can get the hang of its cli. Then, once you know which CLI options you'll need to use, script it using PHP.

Honestly tho, you probably don't want to be doing video transcoding on your web server. You'll likely need to figure out a clever way to have the user submitted videos land on shared storage and have a dedicated transcoder box / VM to handle the load so your web server can keep serving web pages ;)

LoRd_MuldeR
19th May 2014, 12:29
Honestly tho, you probably don't want to be doing video transcoding on your web server. You'll likely need to figure out a clever way to have the user submitted videos land on shared storage and have a dedicated transcoder box / VM to handle the load so your web server can keep serving web pages ;)

That reminds me of a case where the customer was complaining that our software is "crashing" all the time. Since we couldn't reproduce the crash at all, we added tons of debugging outputs, trying to figure out where it does crash. But it seemed to crash at completely random positions. After a few days of debugging, it turned out they were running on a shared web-server that would simply kill all user processes that take too much CPU time...