Resizing a Fulldome Video
Digital Chaotics LLC
Mac/Linux script contributed by
The video files for sale here (DomeSavers », DomeLoops », and DomeArts ») are sized to fit the size ranges of most dome theaters, but we can’t support them all. Heck, we can’t even keep track of them. Sometimes you’ll just have to download the one whose size is closest to the requirements of your projection system, and then resize them to fit.
Keep in mind that down-sizing a video means you’ll lose some pixels. There’s just no way around it. You’re throwing them away. To keep the loss to a minimum you should convert from big to small, meaning that you’ll use a video file with larger dimensions to create one with smaller dimensions. For example, if you want to create a 1200 x 1200 video file, then 2048 x 2048 is a good size to start with. Starting with an even larger file won’t hurt, either. The conversion process below tries to keep as much information as possible by averaging the pixels in the source file, but there’s only so much it can do. Bigger is better.
- Download and install the free video conversion tool, FFMPEG [How to install FFMPEG »]
- Make sure it’s in your system PATH, so that you can run it from a command line. (“add to path” from Google: Windows » Mac » Linux »)
- Create an empty text file called “resize-src-dst-x-y.cmd” (Windows » Mac » Linux »)
- Open the new file, copy the appropriate script below into it, and save it.
- Mac/Linux only: Make the file executable: sudo chmod 555 resize-src-dst-x-y.sh
- Ensure that the directory containing it is in your system PATH, too.
- Open a command-line window (Windows » Mac » Linux »)
(Note the minor difference between the two command-lines above. The Mac/Linux line has an ‘x’ in the dimensions, while the Windows line does not.)
- Windows: resize-src-dst-x-y my_video.mp4 my_resized_video.mp4 1200 1200
- Mac/Linux: ./resize-src-dst-x-y.sh my_video.mp4 my_resized_video.mp4 1200×1200
- Wait for it to finish. (It could take a while.)
This will create a new file called “my_resized_video.mp4” using “my_video.mp4” as the input. The resized video will be 1200 x 1200 pixels. If the input video file had audio, then it will also be included in the output.
Quick note:If you do make the mistake of double-clicking on the icon for ‘resize-src-dst-x-y.cmd/.sh’, then you might see a command-line window flash on the screen very briefly. What happened is this: double-clicking on a ‘.cmd’ file causes your computer to try to execute the command. Double-clicking doesn’t give it the parameters it needs, so it runs without doing anything. Nothing bad happened. It just didn’t work. So don’t do that.
REM Reads a MOV or MP4 file, resizes the frames as specified, and writes them to a new video file.
REM Should work with most popular video file formats, but only MOV and MP4 have been tested.
REM Any audio is copied into a 320kbps stream.
REM ex: resize-src-dst-x-y src.MOV dst.MP4 1920×1920
ffmpeg -i %srcFile% -b:a 320K -c:v libx264 -preset veryslow -crf 18 -pix_fmt yuv420p -s %dstSizeX%x%dstSizeY% %dstFile%
# Reads a MOV or MP4 file, resizes the frames as specified, and writes them to a new video file.
# Should work with most popular video file formats, but only MOV and MP4 have been tested.
# Any audio is copied into a 320kbps stream.
# ex: ./resize-src-dst-x-y.sh src.MOV dst.MP4 1920×1920
ffmpeg -i $srcFile -b:a 320K -c:v libx264 -preset veryslow -crf 18 -pix_fmt yuv420p -s $dstSize $dstFile