Command-line Options Reference

Summary

Usage: CLAutoThumbnailer [OPTIONS] videofilename.ext |
                                   -d directory      |
                                   commandfile.txt
Generates thumbnail pages for videos.

Options:
  -d, --directory=DIRECTORY  DIRECTORY to process. Generate thumbnails for
                               files with the following extensions:
                               3gp, asf, avi, divx, flv, m2v, m2p, m2ts, mkv,
                               mov, mpeg, mpg, mp2, mp4, mts, ogm, rmvb, vob,
                               wmv
      --exts=EXTENSIONS      add/remove video EXTENSIONS (“[+]ext1, -ext2”)
      --minsize=FILESIZE     Minimum FILESIZE of video files (0 to disable)
                               [104857600 (100MB)]
  -m, --cmddir=DIRECTORY     create initial command file for DIRECTORY
  -s, --start=TIME           start TIME in h:mm:ss [0:00:05]
  -e, --end=TIME             end TIME in h:mm:ss [-0:00:05]
  -v, --overview            create Overview page (-v- disables) [True]
  -n=ROWS or COLUMNS         Overview page desired # of ROWS or COLUMNS [12]
  -c, --columns=COLUMNS      Overview page actual # of COLUMNS [12]
  -r, --rows=ROWS            Overview page actual # of ROWS [12]
  -i, --interval=SECONDS     Detail page thumbnail interval SECONDS [10.00]
      --autointerval          use automatic interval based on duration [False]
      --autointervals=SPECIFICATION
                             automatic interval SPECIFICATION
                               ( <min1=secs1, <min2=secs2, <min3=secs3, secs4 )
                               [ <15=5, <30=10, <60=15, <90=30, 60 ]
  -N=ROWS or COLUMNS         Detail page desired # of ROWS or COLUMNS [4]
  -C, --Columns=COLUMNS      Detail page actual # of COLUMNS [4]
  -R, --Rows=ROWS            Detail page actual # of ROWS [4]
      --dfts                 add Detail page filename timestamps
                               (–dfts- disables) [True]
  -y, --layout=MODE          layout MODE
                               (0=Auto,1=Actual,2=Row Priority,3=Column
                               Priority) [Auto]
      --othres=THRESHOLD     video aspect ratio THRESHOLD for
                               Auto Layout of Overview Page [0.00]
      --dthres=THRESHOLD     video aspect ratio THRESHOLD for
                               Auto Layout of Detail Pages [0.00]
      --rcopt                do row/column optimizations
                               (–rcopt- disables) [True]
      --maxoptsteps=STEPS    max # of row/column optimization STEPS
                               (0=unlimited) [2]
      --wthres=THRESHOLD     width THRESHOLD for adding columns (0.1 - 1.0)
                               [0.60]
      --hthres=THRESHOLD     height THRESHOLD for adding rows (0.1 - 1.0)
                               [0.60]
      --mincols=COLUMNS      minimum # of COLUMNS [3]
      --minrows=ROWS         minimum # of ROWS [3]
  -p, --crop=ASPECT RATIO    crop ASPECT RATIO
      --rect=RECTANGLE       source RECTANGLE ( X,Y+WxH )
  -t, --stretch=ASPECT RATIO stretch ASPECT RATIO
      --aar                  do auto aspect ratio adjustment
                               (–aar- disables) [True]
  -o, --outdir=DIRECTORY     Output DIRECTORY
      --subdir=NAME          Output sub-directory NAME [“”]
      --name=NAME            Display NAME
  -l, --label=POSITION       timestamp label POSITION
                               (0=Off,1=LR,2=LL,3=UR,4=UL) [LowerRight]
      --ms                   show non-zero millisecond display in timestamps
                               [False]
  -f, --scalefactor=SCALE FACTOR
                             page SCALE FACTOR [1.00]
  -w, --width=PIXELS         page width PIXELS [1280]
  -h, --height=PIXELS        page height PIXELS [1024]
      --margin=PIXELS        margin between thumbnails PIXELS [2]
      --border=PIXELS        thumbnail border width PIXELS [1]
      --save                 save current settings as defaults
      --reset                reset settings to initial defaults
      --dumpcr[=FILE]        dump # columns/rows diagnostic plot to FILE
      --debug[=VALUE]       show debugging information
  -?, --help                 show this message and exit
      --version              show version and exit

In general, only the options with single letter abbreviations are normally used and even most of those are for somewhat advanced customizations.

Here’s the list of options you’ll most likely use:

-?, --help
Show help message.
-v, --overview
Control creation of Overview page.
-s, --start
Set time to start thumbnailing.
-e, --end
Set time to end thumbnailing.
-n
Set Overview page desired number of rows or columns.
-N
Set Detail page desired number of rows or columns.
-i, --interval
Set Detail page thumbnail interval.
-d, --directory
Generate thumbnails for a directory.
-o, --outdir
Set output directory.
-l, --label
Set timestamp label position.
-m, --cmddir
Create initial command file for a directory.

“Boolean” options can be set to False by adding a - to the end of the option. For example, to turn off the -v, --overview option you can specify either -v- or --overview-.

To set a boolean option to True just specify the option or add a + to the end. For example, to turn on the --ms option specify either --ms or --ms+.

CLAutoThumbnailer option processing is done using the NDesk.Options “callback-based program option parser for C#”.

Input Options

-d <directory>, --directory <directory>

Generate thumbnails for all video files in directory and its sub-directories. All files with recognized video extensions and that are greater than a minimum size will have thumbnails generated for them.

By default, thumbnails are written to the original directory of each video file. The -o, --outdir option will change this to a single directory (not recommended when generating Detail thumbnail pages for multiple directories).

Use the -?, -h, --help option to see the list of valid video extensions used during directory processing.

If CLAutoThumbnailer sees any files that match *_overview.jpg, *_pageNNNN.jpg, or *_pageNNNN_NN_NN_NN.jpg in a directory, it will be skipped since it is assumed that thumbnails have already been generated for it. You can trick the -d option into skipping particular directories by putting dummy files in them with names like skipthisdirectory_overview.jpg.

A directory will also be skipped if it already has a sub-directory with the same name as --subdir.

Checking for already created thumbnails only affects -d, --directory option processing. If you explicitly list a file in the arguments to CLAutoThumbnailer it will always be thumbnailed, regardless of the presence of previously generated thumbnails (which will be silently overwritten).

While the best organization is to have one directory per movie, this isn’t a requirement.

Examples:

clatn -d .

will generate Overview and Detail thumbnail pages for all video files found in the current working directory and its sub-directories. The thumbnail pages will be placed in the original directories of each video file.

clatn -d "C:\MyVideos\Latest"

will generate Overview and Detail thumbnail pages for all video files found in C:\MyVideos\Latest\. The thumbnail pages will be placed in the original directories of each video file.

clatn -i 0 -o . -d "C:\MyVideos\Latest"

will write only Overview thumbnail pages of all video files found in C:\MyVideos\Latest\ to the current working directory.

See Thumbnail an entire directory for a detailed example.

--exts <extensions>

Add/remove video extensions that will be recognized during -d, --directory processing. Extensions is a comma separated list of extensions. Prefix the extension with a - to remove it from the list, and with nothing or + to add it to the list.

Examples:

clatn --exts "abc, -mov" --directory .

will add the extension abc and remove the extension mov while processing the current directory.

clatn --exts "abc, -mov" --save

will change CLAutoThumbnailer’s default settings to add the extension abc and remove the extension mov.

--minsize <bytes>

Set the minimum size for video files during -d, --directory processing to bytes.

Range: bytes >= 0.

Default is 104857600 = 100 * 1024 * 1024 (100MB).

Examples:

clatn --minsize=0 --directory .

will allow files of any size while processing the current directory.

clatn --minsize=0 --save

will change CLAutoThumbnailer’s default settings to allow files of any size during -d, --directory processing.

-m <directory>, --cmddir <directory>

Create an initial command file called CLAutotn-temp.txt in the current working directory for directory.

CLAutotn-temp.txt is just a text file that has an entry that looks like the following for each video found in directory and all its sub-directories:

-i 0 -s 0:0:0 -e "reldir\videofilename.ext"

Lines for files in directories that have already had thumbs generated for them will the be prefixed with a # character. It uses the same method that the -d, --directory option uses to decide when to skip directories during processing.

Example:

clatn -m .

will create a file called CLAutotn-temp.txt in the current directory that contains entries for all its video files.

See Skip thumbnailing the credits in lots of movies for a detailed example of how to create and use a Command File.

Time Range Options

-s <time>, --start <time>

Set the start time to begin thumbnailing, where the time is h:mm:ss.fff. This is useful when you want to avoid wasting thumbnails on any boring opening credits.

The default is 0:0:5.

Example:

clatn -s 0:1:30 his_girl_friday_512kb.mp4

will start thumbnailing 1 minute 30 seconds from the beginning of the video.

See Skip the video credits for a detailed example.

-e <time>, --end <time>

Set the time to end thumbnailing, where the time is h:mm:ss.fff. This is useful when you want to avoid wasting thumbnails on the closing credits. A negative time means time from the end of the video.

The default is -0:0:5 (meaning create thumbnails until 5 seconds from the end of the video).

Example:

clatn -e -0:2:05 his_girl_friday_512kb.mp4

will stop thumbnailing at 2 minute 5 seconds from the end of the video.

See Skip the video credits for a detailed example.

Overview Page Options

-v, --overview

Controls Overview page thumbnail generation. Add a - to turn off Overview page generation.

Default is True.

Examples:

clatn -v- his_girl_friday_512kb.mp4

will skip generating the Overview thumbnail page for the current video.

clatn --overview- --save

will change CLAutoThumbnailer’s default settings to normally skip Overview thumbnail page generation.

-n <nRows or nColumns>

Set the desired number of Overview page rows or columns to nRows or nColumns. Ignored when in Actual Layout mode.

The value specified is interpreted as the desired # of rows in Row Priority Layout mode and the desired # of columns in Column Priority Layout mode.

In Auto Layout mode, it is interpreted as the desired # of rows when the video’s aspect ratio is greater than or equal to the thumbnail pages, otherwise it is treated as the desired # of columns.

Notice that this option is lowercased to distinguish it from the -N option.

Range: nRows or nColumns >= 1.

Default is 12.

Example:

clatn -n 10  his_girl_friday_512kb.mp4
-c <nColumns>, --columns <nColumns>

Set the actual number of Overview page columns to nColumns. Only used when in Actual Layout mode.

Notice that this option is lowercased to distinguish it from the -C option.

Range: nColumns >= 1.

Default is 12.

-r <nRows>, --rows <nRows>

Set the actual number of Overview page rows to nRows. Only used when in Actual Layout mode.

Notice that this option is lowercased to distinguish it from the -R option.

Range: nRows >= 1.

Default is 12.

Detail Page Options

-i <interval>, --interval <interval>

Set the Detail page time between thumbnails to interval where interval is ss.fff. Set interval to 0 to skip Detail page generation completely.

Range: 0 or interval >= 1 / 30 (0.0333).

Default is 10.

Examples:

clatn -i 60 his_girl_friday_512kb.mp4

will generate a thumbnail every minute, while:

clatn -i 0.20 his_girl_friday_512kb.mp4

will generate 5 thumbnails per second.

clatn -i 0 his_girl_friday_512kb.mp4

will only generate an Overview thumbnail page and not generate any Detail thumbnail pages.

--autointerval

Controls setting the interval between thumbnails for Detail pages based on the thumbnailing duration.

Default is False.

Here are the default auto-intervals:

Thumbnailing Duration Interval
<15 minutes seconds
<30 minutes 10 seconds
<60 minutes 15 seconds
<90 minutes 30 seconds
>=90 minutes 60 seconds
--autointervals <intervals>

Set the automatic intervals to intervals where intervals is of the form <minutes1=seconds1, <minutes2=seconds2, <minutes3=seconds3, minutes4.

Example:

clatn --autointervals "<60=30, <120=60, 120" --directory .

will change to the following auto-intervals while processing the current directory:

Thumbnailing Duration Interval
<60 minutes 30 seconds
<120 minutes 60 seconds
>=120 minutes 120 seconds
clatn --autointervals "<60=30, <120=60, 120" --save

will change CLAutoThumbnailer’s default settings to those auto-intervals.

-N <nRows or nColumns>

Set the desired number of Detail page rows or columns to nRows or nColumns. Ignored when in Actual Layout mode.

The value specified is interpreted as the desired # of rows in Row Priority Layout mode and the desired # of columns in Column Priority Layout mode.

In Auto Layout mode, it is interpreted as the desired # of rows when the video’s aspect ratio is greater than or equal to the thumbnail pages, otherwise it is treated as the desired # of columns.

Setting nRows or nColumns to less than 3 is not generally recommended because Row/Column Optimization can lead to results far from the desired number of rows or columns. In those situations either turn off Row/Column Optimization using --rcopt- or use the -y, --layout option to use Actual Layout. Also remember that you might need to change the minimum number of rows and columns using --mincols and --minrows.

Notice that this option is Capitalized to distinguish it from the -n option.

Range: nRows or nColumns >= 1.

Default is 4.

Example:

clatn -N 10  his_girl_friday_512kb.mp4
-C <nColumns>, --Columns <nColumns>

Set the actual number of Detail page columns to nColumns. Only used when in Actual Layout mode.

Notice that this option is Capitalized to distinguish it from the -c option.

Range: nColumns >= 1.

Default is 4.

-R <nRows>, --Rows <nRows>

Set the actual number of Detail page rows to nRows. Only used when in Actual Layout mode.

Notice that this option is Capitalized to distinguish it from the -r option.

Range: nRows >= 1.

Default is 4.

--dfts

Controls adding the timestamp of the first thumbnail on a Detail page to its filename. Normally the Detail thumbnail page filenames look like displayfilename_pageNNNN_hh_mm_ss.jpg, but specifying --dfts- will change it to just displayfilename_pageNNNN.jpg.

Default is True.

Layout Options

-y <mode>, --layout <mode>

Set the Page Layout Mode to mode, where mode is

Actual Layout also uses -c, --columns and -r, --rows or -C, --Columns and -R, --Rows to determine the desired number of columns and rows.

Default is 0, Auto Layout.

Example:

clatn -l 1 -c 8 -r 9 -C 3 -R 4 his_girl_friday_512kb.mp4

will force the Overview page to have 8 columns and 9 rows, and the Detail pages to have 3 columns and 4 rows.

--othres <aspect ratio>

In Auto Layout of an Overview thumbnail page, aspect ratio to use when switching between Column Priority Layout and Row Priority Layout. 0.0 means use thumbnail page aspect ratio.

Range: 0.00 or 0.20 <= aspect ratio <= 4.0.

Default is 0.0.

--dthres <aspect ratio>

In Auto Layout of Detail thumbnail pages, aspect ratio to use when switching between Column Priority Layout and Row Priority Layout. 0.0 means use thumbnail page aspect ratio.

Range: 0.00 or 0.20 <= aspect ratio <= 4.0.

Default is 0.0.

--rcopt

Controls Row/Column Optimization.

Default is True.

Examples:

clatn --rcopt- his_girl_friday_512kb.mp4

will disable row/column adjustment optimizations during the processing of the current video file.

clatn --rcopt- --save

will change CLAutoThumbnailer’s default settings to normally disable row/column optimization.

--maxoptsteps <steps>

Set the maximum allowed number of row/column optimization steps to step. Set step to 0 to allow unlimited optimization steps. Use --rcopt to completely disable row/column optimization.

Range: steps >= 0.

Default is 2.

--wthres <threshold>

Set the width threshold for adding columns to theshold where theshold is between 0.1 and 1.0. This is ignored if Row/Column Optimization is turned off via the --rcopt option or the Row Priority Layout is not being used.

Range: 0.1 <= threshold <= 1.0.

Default is 0.60.

--hthres <threshold>

Set the height threshold for adding rows to theshold where theshold is between 0.1 and 1.0. This is ignored if Row/Column Optimization is turned off via the --rcopt option or the Column Priority Layout is not being used.

Range: 0.1 <= threshold <= 1.0.

Default is 0.60.

--mincols <nColumns>

Set the minimum allowed number of columns to nColumns.

Range: nColumns >= 1.

Default is 3.

--minrows <nRows>

Set the minimum allowed number of rows to nRows.

Range: nRows >= 1.

Default is 3.

Aspect Ratio Options

-p <aspect ratio>, --crop <aspect ratio>

Manually set the thumbnail cropping to aspect ratio. If you set the aspect ratio smaller than the video frame’s aspect ratio, you end up chopping off the sides of the video. If you set the aspect ratio larger, then you chop off the top and bottom.

Automatically disables the --aar option.

Range: 0.20 <= aspect ratio <= 4.0.

In order to crop a letterboxed video you specify an aspect ratio to the -p, --crop option that is larger than the video frame’s actual aspect ratio. Common aspect ratios to specify would be the following (where you specify a slightly — about 2% — smaller value than the desired aspect ratio to leave a little bit of black to avoid overcropping):

Cropping letterboxed videos (black bars on top and bottom)
Desired Aspect Ratio –crop Aspect Ratio
1.33 1.30
1.78 1.74
1.85 1.81
2.35 2.30

In order to crop a pillarboxed video you specify an aspect ratio to the -p, --crop option that is smaller than the video frame’s actual aspect ratio. Common aspect ratios to specify would be the following (where you specify a slightly — about 2% — larger value than the desired aspect ratio to leave a little bit of black to avoid overcropping):

Cropping pillarboxed videos (black bars on sides)
Desired Aspect Ratio –crop Aspect Ratio
1.33 1.36
1.78 1.81
1.85 1.89
2.35 2.40

Example:

clatn --crop 1.35 his_girl_friday.mpeg

to leave a little bit more black border on the sides of the video than the automatically determined 1.33 aspect ratio.

See Remove the black bars from the edges of thumbnails for a detailed example.

--rect <rectangle>

Set the source thumbnailing rectangle, where rectangle is of the form X,Y+WIDTHxHEIGHT.

Automatically disables the --aar option.

See Cropping windowboxed videos for a detailed example that uses the --rect option.

-t <aspect ratio>, --stretch <aspect ratio>

Manually set the thumbnail stretching to aspect ratio.

Automatically disables the --aar option.

Range: 0.20 <= aspect ratio <= 4.0.

In order to fix squished videos you specify an aspect ratio to the -t, --stretch option that is larger (wider) than the video frame’s actual aspect ratio.

In order to fix stretched videos you specify an aspect ratio to the -t, --stretch option that is smaller (narrower) than the video frame’s actual aspect ratio.

Common aspect ratios to try would be the following:

Common aspect ratios
Aspect Ratio
1.33
1.78
1.85
2.35

Example:

clatn --stretch 1.35 his_girl_friday_512kb.mp4

See Fix distorted thumbnails for a detailed example that uses the -t, --stretch option.

--aar

Controls automatic aspect ratio adjustment.

Automatically disabled when the -p, --crop, -t, --stretch, or --rect options are specified.

Default is True (enabled).

See Auto Aspect Ratio Adjustment for more information.

Output Page Options

-o <directory>, --outdir <directory>

Set the output directory for thumbnail pages to directory. Directory must already exist, it will not be created automatically. Normally you navigate to the directory where you want the thumbnails created and use -o ..

This option is required when the video file resides in a read-only directory (like on a DVD drive).

In conjunction with the -d, --directory and i, --interval options, it can be used to summarize entire directories of videos by putting their Overview thumbnails in a single directory.

Overrides the --subdir option.

Default is the original directory (or sub-directory if --subdir is not an empty string) of each video file.

Examples:

clatn -o . E:\VIDEO_TS\VTS_01_*.VOB

will write thumbnails of the first title set of the unencrypted DVD in drive E: to the current working directory .

clatn -i 0 -o "C:\MyThumbnails" -d .

will write only Overview thumbnails of all the video files in the current working directory (and all its sub-directories) to C:\MyThumbnails\.

--subdir <name>

Set the output directory for thumbnail pages to the sub-directory name of the original video directory. The name sub-directory will be created if it doesn’t exist. Name can only contain alphanumerics, _ (underline), and - (minus) characters.

Overridden by the -o, --outdir option.

Default is the empty string (use original directory of each video file for output).

Example:

clatn --subdir=Thumbs -d .

will create thumbnails in a Thumbs subdir for each directory that contains videos. This is useful if you don’t like mixing lots of thumbnail pages in with your video files.

--name <displayname>

Set the “display name” of the video file or files to displayname. The display name is put in the center of the thumbnail header and is also used to generate the output filenames.

The default is the video filename, or in the case of multi-VOBs, the name of the parent directory + _-_vts_tt.dvd, where tt is the DVD title number. Wildcard filenames like videofilename_cd*.ext become videofilename_MULTI.ext.

-l <pos>, --label <pos>

Set the position of the timestamp label to pos, where pos is:

0 = No timestamp.

1 = Timestamp in lower-right corner of thumbnails.

2 = Timestamp in lower-left corner of thumbnails.

3 = Timestamp in upper-right corner of thumbnails.

4 = Timestamp in upper-left corner of thumbnails.

Default is 1.

--ms

Controls whether to always show non-zero milliseconds on timestamps.

Non-zero milliseconds are always shown on Detail page timestamps of Multi-Part Video Files.

Default is False.

-f <factor>, --scalefactor <factor>

Set the scalefactor used to resize the thumbnail page to factor.

Range: 0.25 <= factor <= 3.0.

Default is 1.0.

-w <pixels>, --width <pixels>

Set the disired width of thumbnail pages to pixels.

Range: pixels >= 100.

Default is 1280.

-h <pixels>, --height <pixels>

Set the desired height of thumbnail pages to pixels.

Range: pixels >= 100.

Default is 1024.

--margin <pixels>

Set the width of the black space between thumbnails to pixels.

Range: pixels >= 0.

Default is 2.

--border <pixels>

Set the width of the white thumbnail border to pixels.

Range: pixels >= 0.

Default is 1.

Miscellaneous Options

--save

Save the current settings as CLAutoThumbnailer’s new default settings.

Any Help messages displayed from the same invocation that specified --save will show the previous default settings. Run:

clatn -?

to see the newly saved defaults.

--reset

Reset CLAutoThumbnailer’s default settings back to their initial values.

--dumpcr [<filename>]

For a range of video aspect ratios from 1.00 to 3.00, calculate the number of columns and rows that CLAutoThumbnailer would use based on the thumbnail page’s width (-w) and height (-h). It writes a plot of these results to filename or colrowsplot.png if filename is not specified.

Other current settings that affect the calculation are: the desired number of rows or columns (-n or -N), layout mode (-y), row/column optimization (--rcopt), max optimization steps (--maxoptsteps), Overview threshold (--othres), Detail threshold (--dthres), width threshold (--wthres), height threshold (--hthres), minimum columns (--mincols), and minimum rows (--minrows).

By default it uses the Detail desired number of columns or rows (-N). You can force it to use the Overview desired number of columns or rows (-n) by specifying an interval (-i) of 0.

Prefixing the filename with nothreshold| will turn off the wasted width and height thresholding lines.

--debug

Display more verbose progress messages during operation.

--help

Print a short description of all command line options.

--version

Print the CLAutoThumbnailer version number and exit.