Command line use
ODMax is first and foremost intended to be a command line utility. You simply call it with
$ odmax
and with a set of command line arguments. Below the possible arguments are described in full.
Usage: odmax [options]
Options:
-h, --help show this help message and exit
-i INFILE, --infile=INFILE
Input video file, compatible with OpenCV2. Place path
between " " to ensure spaces are interpreted
correctly.
-o OUTPATH, --outpath=OUTPATH
Directory to write output files (default: "."). Place
path between " " to ensure spaces are interpreted
correctly.
-p PREFIX, --prefix=PREFIX
Prefix to use for written image files (default:
"still").
-c ENCODER, --encoder=ENCODER
encoder to use to write stills (default: jpg). Can be
"jpg", "bmp", "jp2", "png" or "webp".
-s START_TIME, --start-time=START_TIME
Start time in seconds from start of movie (default:
0.0).
-e END_TIME, --end-time=END_TIME
End time in seconds from start of movie (default: end
of movie).
-d D_FRAME, --frame-interval=D_FRAME
Frame step size (default: 1, integer). 1 means all
frames between start and end time are processed, 2
means every second frame is processed, etc.
-r, --reproject Reproject 360 degree stills to cube with 6 faces
(default: not set, i.e. no reprojection is performed).
-f FACE_W, --face-width=FACE_W
Length of faces of reprojected cube in pixels
(default: not set, the optimal resolution will be
estimated from the video file). Only used in
combination with --reproject.
-m MODE, --mode=MODE Mode of reprojection interpolation, can be "bilinear"
or "nearest" (default: "bilinear"). Only used in
combination with --reproject.
--overlap=OVERLAP Overlap in cube faces in ratio of face length without
overlap. (default: 0.1). This setting ensures that
each face shares part of its objective with its
neighbouring faces. Only used in combination with
--reproject.
The command line options can also be shown by:
$ odmax --help
Below we show an example command, assuming you have a video file called a_walk_in_the_park.mp4
in the folder /home/random_user/videos
, that you wish to
extract still frames every 25 frames, starting at 10 seconds into the video, and ending at 2 minutes (i.e. 120 seconds).
We also assume that you wish to reproject the stills into 6-face cubes using bilinear interpolation. You will write
the results in a subfolder called stills
and use a prefix walk
.
$ odmax -r -m bilinear -s 0 -e 1 -d 5 -p "walk" -i "/home/random_user/videos/a_walk_in_the_park.mp4" -o "stills/home/random_user/videos/"
Note
Please make sure that path names and prefixes are always placed between quote signs such as
"/home/some user/some file"
. If you do not apply quote signs and the path contains spaces, the path will not be
parsed correctly.
When ODMax is installed with exiftool
the CLI will notify that an exiftool
installation was found and will
stamp each produced still image with time and geographical information. If not, the user will be notified of this
and the still will be processed without time and geographical information.