by Russ TannerrtJPG2Video Command Line Utility
Version 1.00 Documentation
HomeDownloadDocumentationSupportHistory^ Software^^ Orbis Vitae
rtJPG2Video Version 1.00 DocumentationTable of Contents OverviewrtJPG2Video is a Windows command line utility that makes it easy to assemble a large number of JPG images into a video. It is especially useful for processing many directories at a time making batch processing easy. rtJPG2Video uses the free mencoder.exe utility to create high-quality video, so mencoder must be installed on the system. Here is a link to download it: mencoder.exe (Windows binary) Basic Process FlowrtJPG2Video begins by searching the directory specified with the -dir argument. If this directory contains one-or-more JPG images, then processing of this directory begins. If this directory does not contain one-or-more JPG images, then — if the -r or -r-depth arguments are specified — processing begins in the next recursive directory. If the argument -subtitle-text has been specified, then the specified title is built and saved in an "SRT" file in the current directory for use by mencoder.exe. To lean how subtitles are built, see the documentation for the -subtitle-text argument. The name of "SRT" file can be specified using the -srt-filename argument. Next, rtJPG2Video calls mencoder to build a video using all JPG files in the current directory. The name of the video file can be specified with the -video-filename argument. Finally, if the -r or -r-depth arguments are specified, rtJPG2Video iterates to the next directory. Otherwise, processing ends. Quick StartBelow is a list of common-usage examples. Display usage informationrtJPG2Video displays basic usage information if called without any arguments.
You can also specify the "usage" argument explicitly.
When the -usage argument is specified, the program will exit immediately after displaying usage information. No file processing will take place and all other arguments will be ignored. Display version informationrtJPG2Video displays version information using the -version argument.
Results
The program only displays version information, nothing else. This is done so other programs can easily determine the version of rtJPG2Video being used and alter their behavior accordingly. When the -version argument is specified, the program will exit immediately after displaying version information. No file processing will take place and all other arguments will be ignored. Display settings informationSometimes, you may want to see what settings will be used during a job so you can be sure they are correct. Use the -say-settings argument.
The program displays a complete list of settings are they are going to be used by the program. This allows you to fine-tune the arguments you use before beginning an actual job. When the -say-settings argument is specified, the program will exit immediately after displaying the current settings. No file processing will take place and all other arguments will be ignored. Convert all JPG files in a directory to a videoYou want to merge all JPG images in a particular directory into a video file:
This will create a video in the D:\timelapse directory from all JPG files in that directory. The file will be named "_movie.avi" by default. If the directory you are specifying contains spaces, be sure to quote it:
Convert all JPG files in a directory to a video and add a subtitleYou want to merge all JPG images in a particular directory into a video file and you want to display a subtitle on the video:
This will create a video in the D:\timelapse directory from all JPG files in that directory. The file will be named "_movie.avi" by default. A subtitle will be added to the video. You can specify the font typeface and size for the subtitle using the -subtitle-font-file and -subtitle-font-size arguments:
Convert all JPG files in all sub directories to videosYou want to merge all JPG images in a group of directories into videos:
In this case, you can use the recursion argument (-r) to recurse all directories below the one specified. This will create a video file in each directory which contains one-or-more JPG files. Directories which contain no JPG files will be ignored. Only recurse directories immediately below the one specifiedYou want to merge all JPG images into a video for all directories that are immediately below the one specified:
In this case, you can use the recursion-depth argument (-r-depth) to recurse directories immediately below the one specified. Directories below those directories will not be iterated. This will create a movie file in each directory which contains one-or-more JPG files. Directories which contain no JPG files will be ignored. Only recurse directories matching a specified regular expressionYou want to merge all JPG images into a video for all subdirectories matching a specified regular expression:
In this case, only directories containing the phrase "monthly" will be iterated. Specify the home directory of mencoderYou want to process a job but the path that mencoder.exe resides in is not included in the Windows PATH variable:
This enables you to use rtJPG2Video under more diverse circumstances. Tips & TricksThis section contains various information to help you use this program effectively. Command Line Arguments with SpacesIf you need to supply a command line argument that contains spaces, you can surround the argument with double-quotes:
In this example, the quotes are necessary because the -mencoder-path argument contains spaces. If the quotes were not supplied, then Files\MPlayer would be considered a new argument, which would generate an "Invalid argument" error. Argument Reference-dirThis specifies the directory we are going to process. If directory-recursion is specified (-r or -r-depth) then recursion begins with this directory. If this is omitted, it defaults to the current directory (the one that the program was launched from). Examples
-dir-filterThis is a regular expression that filters directories when directory recursion is used (-r or -r-depth). The directory specified in -dir is always processed for JPG images, but if the -r or -r-depth arguments are specified, then -dir-filter only recurses directories that match its regular expression. If this is omitted, then no directory filtering takes place. Regular expressions are processed by the PowerBasic regular expression engine. You can find specifications for it here: Examples
-log-pathThis is an absolute path to the log file. This log file keeps an easily-readable record of all directories that were processed. It also makes it easy to find directories that were not processed due to some kind of error. If this is omitted, then no log file is generated. If the specified log file already exists, new log entries are appended to it. Examples
-mencoder-pathThis is an absolute path to the mencoder.exe executable file. This is only required if the Windows environment variable PATH does not contain the directory containing mencoder.exe. If this is omitted, then rtJPG2Video attempts to find mencoder based on the Windows PATH environment variable. If rtJPG2Video can't find it, then an error will be displayed. DetailsNormally, when you download and install mencoder.exe on your computer, you will want to modify the PATH environment variable so it contains an entry for the the directory containing mencoder.exe. This will allow Windows (and rtJPG2Video) to find mencoder no matter where it resides. Setting the PATH variable can be done from the Windows control panel. Here are a few pages showing how to do this:
As an alternative to setting the PATH environment variable on Windows, you could simply copy mencoder.exe to a directory that already has an entry in the PATH variable. An example of such directories would be: ExamplesIf you don't want to bother setting the PATH variable, you can just tell rtJPG2Video where to find mencoder.exe by specifying the -mencoder-path argument:
-rThis causes the program to recurse directories. This is identical to specifying:
In fact, if you specify the -r argument and then view the settings, you will notice that -r simply changes the value of -r-depth to -1:
If this is omitted, then the program does not recurse directories unless -r-depth os specified. If both -r and -r-depth are specified, the value specified in -r-depth takes presidence. In fact, -r is actually just a shortcut for -r-depth -1. Examples
-r-depthThis causes the program to recurse directories to the specified depth. If 0 (zero) is specified, then no directory recursion takes place. Only JPG files in the current directory (if they exist) are used to build a movie. If 1 (one) is specified, then only directories in the current directly are recursed. Directories below that are ignored. JPG files in the current directory (if they exist) are also used to build a movie. if -1 (negative-one) is specified, then directory recursion is infinite. If this is omitted, then the program does not recurse directories (identical to -r-depth 0). If both -r and -r-depth are specified, the value specified in -r-depth takes presidence. In fact, -r is actually just a shortcut for -r-depth -1. Examples
-say-settingsThis causes the program to display all current settings. When this argument is specified, no processing takes place. The program simply exits after displaying settings. This is useful for debugging your command line arguments before actually processing files. Examples
-sleep-timeThis causes the program to sleep for a specified number of milliseconds after building each movie file. This is useful if you are running other important processes on a computer and want to give back some time to the operating system for use with other processes. You may specify any value greater-than or equal-to zero. If you specify a negative value, an error will occur. Examples
-srt-filenameThis specifies the name of the SRT file that will be created in each processed directory that contains one-or-more JPG images. This file is only generated if -subtitle-text is specified. If -subtitle-text is not specified, this argument is ignored. If omitted, this defaults to "_title.srt". DetailsAn SRT file is a special file format used to specify titles in movies. The file format is fairly simple and is used by mencoder when generating subtitles in movies. If -subtitle-text is specified, rtJPG2Video creates an SRT file in each directory it processes which contains one-or-more JPG images. This SRT file is then used by mencoder to build and display a subtitle. You can control the name of the SRT file that is created in each directory by specifying this argument. You can learn more about SRT files by searching the internet, although knowledge of SRT files is not necessary to build movie subtitles using rtJPG2Video. Examples
-subtitle-font-fileWhen the program generates a title for the movie, you can select the font that the title is displayed in. In order to do this, you must supply a complete path to the font-file containing the font you want to use. If this argument is omitted, the program searches for font files on your computer in the following order. If one is found, it is used by default: If one of the previous font files cannot be found on your computer, then this argument defaults to "" (zero-length). In this case, if you want to display a subtitle in the movie, you must supply this argument with a valid path to the font file you want to use. This argument is only used if -subtitle-text is specified. Examples
-subtitle-font-sizeThis specifies the font size in pixels for the subtitle displayed in a movie. If this argument is omitted, it defaults to 16. This argument must be an integer. This argument is only used if -subtitle-text is specified. Examples
-subtitle-textThis specifies the subtitle that will be displayed in the movie. If this argument is omitted, no subtitle is displayed in the movie. DetailsThe subtitle can contain tokens that will be expanded for each movie that is created. The following tokens are currently supported: {YearModified} {MonthModified} {DayModified}
{CRLF}
Examples
-usageThis displays standard usage information. This program will also display usage information when run with no arguments. When this argument is used, no file processing takes place. Examples
-versionThis displays program-version information. When this argument is used, no file processing takes place. Examples
-video-codecThis tells mencoder to use the specified video codec when encoding the movie. This argument is passed to mencoder in this way:
If omitted, this argument defaults to mjpeg (Motion JPEG). Examples
-video-filenameBy default, the movie files created are named "_movie.avi". You can change this name by using this argument. If omitted, this argument defaults to "_movie.avi". Examples
-video-frames-per-secondThis determines frame rate of the created movie in frames-per-second. The valid range for this argument is 1 to 100, inclusive. If omitted, this argument defaults to 25. Examples
|
Copyright 2012, Russ Tanner, All Rights Reserved