Jul 27

Today I got a notice that the 3G movies in the Passie voor Horeca app no longer worked. When on a 3G connection, the movie would not play and exit immediately back to the list of movies.

It turns out that the AMR audio format (libamr) that ffmpeg uses by default for all .3gp based movies, is no longer supported. In order to fix this, you need to re-encode movies with a supported audio encoder like AAC, this is done by adding the -acodec libfaac option to the ffmpeg commandline.

Example commandline to get a working .3gp file for use over 3G and/or GPRS:
ffmpeg -i inputfile.flv -vcodec mpeg4 -acodec libfaac -r 10 -ac 1 -ar 8000 -b 52050 -ab 11950 -aspect 16:9 outputfile.3gp

I had to downscale the video bitrate a bit (-b option, decreased it with 4000) and up the audio bitrate (-ab option, added 4000) to get a decent audio track in the resulting .3gp file compared to the AMR format.

Apr 05

For one of my projects, I needed the makeiPhoneRefMovie executable which is normally only available on OSX. This program will make a .mov index file referencing various movies (.3gp, .m4v) for various available bandwidths and will compile under Linux (Tested on Debian and CentOS 5 64-bit), it’s based on the original source by Apple and some functions (mostly the OSSwapHostToBigInt32 unctions that aren’t known on Linux) merged together.

Extract and compile with cc -o makeiPhoneRefMovie -g makeiPhoneRefMovie.c


# ../makeiPhoneRefMovie
usage: ../makeiPhoneRefMovie foo-low.3gp foo-high.m4v foo-desktop.mov foo-ref.mov
     creates foo-ref.mov with a special-purpose iPhone ref movie
     the other files need not exist; they're just embedded as URLs
Tagged with:
preload preload preload