0
votes

I have a dedicated server with ffmpeg and the x264 tool installed. I can encode any video and works really well. But now I need to encode videos to play on iPads, iPhones... the format needs to be mp4 and using the h.264 codec.

I'm using PHP to enconde videos, I'm just looking for an exec command to do the above encoding. what I'm using for the other videos is:

exec("ffmpeg -i movie.mov -sameq -acodec mp3 -ar 22050 -ab 32 -f flv -s 1280x720 movie.flv");

I just need something similar to that for encoding mp4 by the way, I can't use libx264. I can only use the x264 tool

Cheers

3
I asked my host to intall libx264 and they told me:matt
that the libx264 packages are broken in Ubuntu 10.04 so that's why i cant use itmatt
I recently packaged libx264 for Redhat, but alas Ubuntu uses a different package manager.matzahboy

3 Answers

0
votes

gpac can be used to creat MP4 files.

0
votes
exec("ffmpeg -i movie.mov -sameq -ar 22050 -ab 32k -s 1280x720 movie.mp4");

ffmpeg can do mp4 on its own without libx264. It will encode the video as h264 with audio as aac.

0
votes

Make a raw h264 file with x264, encode raw audio using ffmpeg, then combine them into a mp4 file using MP4Box from gpac.