Playing MPEG-4 (mp4) files is a recent addition to the SOS system, and is pretty limited at present. Not all mp4 files will play on our system, but we have had good luck creating ours with either ffmpeg on Linux or QuickTime Pro on the Mac. If you have an mp4 from another source, you might try converting it with QuickTime Pro, using output settings similar to those below. Here's a couple examples of the settings we have successfully used to create a playable mp4 from a directory of cylindrical image files.
Creation Using QuickTime Pro
We have QuickTime Pro only on the Mac at present. We have no experience using it on a Windows platform, but I would expect the output files to be compatible. Here's the procedure we use on the Mac.
- From the File menu, select item Open Image Sequence...
- From the resulting Open dialog box:
- Navigate to the input file directory.
- Select the first file in the directory.
- Wait while the files load. This may take a while.
- When prompted, select frame rate of 30 frames per second.
- From the File menu, select item Export...
- From the resulting Save exported file as... dialog box:
- Navigate to target directory and specify file name. Make sure the file extension is mp4.
- From Export: menu, pick Movie to MPEG-4.
- Click Options...
- From the resulting MPEG-4 Export Settings dialog box:
- Select Video Tab.
- Video Format: MPEG-4 Improved
- Data Rate: 25000 kbits/sec
- Optimized for: Download
- Image Size: Custom
- w: 2048 x h: 1024
- Frame Rate: 30
- Key Frame: Every 24
- Click OK
- Click Save
Creation using ffmpeg
ffmpeg is an open source, command line driven program. This example assumes the input image files are in a directory (folder) named indir and the files within are named file0001.jpg, file0002.jpg, etc.
ffmpeg -i indir/file%4d.jpg -b 25000 -s 2048x1024 -qscale 1 outfile.mp4
ffmpeg -h describes all the command-line options.
Note: The previously recommended "-r 30" parameter in the ffmpeg command line was incorrect and produced too many frames in the resulting mp4 file. Using the default value by omitting the parameter works correctly. [Updated 5/17/07]
Playing an MPEG-4 File on SOS
The mp4 files must be stored somewhere in the /shared/sos/media directory tree, so they are accessible from the server on all the projector hosts. The mp4 file names must end with extension .mp4 currently. They can be played directly from the SOS user interface programe sos_stream_gui without a playlist, by selecting Open MPEG-4 File... from the File menu, then navigating to and selecting the file you wish to play. Note: You will need to navigate to /shared, since the dialog box doesn't start in that directory.
To play an mp4 from a playlist, just add it as a clip, with the datadir parameter being the mp4 file itself.
Here again, the filename must be stored somewhere in /shared, and has to end with the .mp4 extension.
There is a GUI script can be run with Linux to make a mp4 movie
This page was last modified on 2007-04-05.