This is an old revision of the document!


Configuration files

There are three configuration files that will be loaded if found:

  • /etc/vcs.conf: System-wide configuration
  • ~/.vcs.conf: User configuration 1)
  • ./vcs.conf: (i.e. vcs.conf in the current directory) Per-dir configuration

They're loaded in this order, and when a configuration option is present in more than one file the last file takes precedence.

Configuration files follow a simplified shell-like syntax:

  • Lines starting with # are comments (and are ignored)
  • Configuration options are set as OPTION=VALUE
  • Options not recognised will be ignored

Certain options have no equivalent command-line option. They can be set from the command-line by using the special option -O (--override) followed by OPTION=VALUE. In general, customisation of the script shouldn't require any editing of the script itself.

Examples:

  • Setting background colour for the heading to blue: bg_heading=blue. Added to a configuration file or from the command-line: $ vcs -O 'bg_heading=blue' file.avi
  • Output to JPEG by default: output_format=jpg. Added to a configuration file (the command-line option -j does the same for a single run).

In a future version (probably 1.2) a cleanup of these options will be made, some will be renamed and maybe others removed. Those options marked as deprecated in the list below. The list of deprecated options and their replacements is not final.

FIXME List of options to be added

Option Default Description Additional details Deprecated?
Low level options
GETOPT getopt Getopt command The getopt command must be set correctly or the script won't work. Must be a version accepting GNU syntax. Can only be set in configuration files (i.e. not from the command-line).
timecode_from $TC_INTERVAL Selects between number of captures or interval mode Symbolic: $TC_INTERVAL ⇒ interval mode, $TC_NUMCAPS ⇒ number of captures mode Yes 2)
DEBUG 0 Control debug mode default status Integer: 0=Off, 1=On
decoder $DEC_FFMPEG Controls which capturer to use by default Symbolic: $DEC_FFMPEG ⇒ FFmpeg, $DEC_MPLAYER ⇒ MPlayer
Main behaviour options
DEFAULT_INTERVAL 300 Default capture interval Integer: Seconds FIXME Does it take symbolic values?
DEFAULT_NUMCAPS 16 Default number of captures Integer only
DEFAULT_COLS 2 Default number of columns Integer only
user_signature “Preview created by” Text before the user name in the signature
user $(id -un) 3) User name for signature. See -u (--user) and -U (--fullname)
output_format png Sets the output format Should match the extension of a format known by ImageMagick Maybe
output_quality 92 Image quality for output in lossy formats Integer, Only affects the final image

Cut'n paste:

# Options used in imagemagick, these options set the final aspect
# of the contact sheet
declare output_format=png     # ImageMagick decides the type from the extension
declare -i output_quality=92  # Output image quality (only affects the final
                              # image and obviously only in lossy formats)
# Colours, see convert -list color to get the list
declare bg_heading=YellowGreen  # Background for meta info (size, codec...)
declare bg_sign=SlateGray       # Background for signature
declare bg_title=White          # Background for the title (see -T)
declare bg_contact=White        # Background of the thumbnails
declare bg_tstamps='#000000aa'  # Background for the timestamps box
declare fg_heading=black        # Font colour for meta info box
declare fg_sign=black           # Font colour for signature
declare fg_tstamps=white        # Font colour for timestamps
declare fg_title=Black          # Font colour for the title
# Fonts, see convert -list type to get the list
declare font_tstamps=courier    # Used for timestamps over the thumbnails
declare font_heading=helvetica  # Used for the heading (meta info box)
declare font_sign=$font_heading # Used for the signature box
# Unlike other font_ variables this doesn't take a font name directly
# but is restricted to the $FF_ values. This is to allow overrides
# from the command line to be placed anywhere, i.e. in
#  $ vcs -I file.avi -O 'FONT_MINCHO=whatever'
# as the font is overridden is after requesting its use, it wouldn't be
# affected 
# The other font_ variables are only affected by overrides and not command
# line options that's why this one is special.
declare font_filename=$FF_DEFAULT # Used to print only the filename in the heading
declare font_title=$font_heading # Used for the title (see -T)
# Font sizes, in points
declare -i pts_tstamps=18          # Used for the timestamps
declare -i pts_meta=16             # Used for the meta info box
declare -i pts_sign=11             # Used for the signature
declare -i pts_title=36            # Used for the title (see -T)
# See --shoehorn
declare shoehorned=
# See -E / $end_offset
declare -i DEFAULT_END_OFFSET=60
# If the video is less than this length, end offset won't be used at all 
declare MIN_LENGTH_FOR_END_OFFSET=19m30s
# This can only be changed in the configuration file
# Change it to change the safe renanimg:
# When writing the output file, the input name + output extension is
# used (e.g.: "some video.avi.png"), if it already exists, though,
# a number if appended to the name. This variable dictates where the number is
# placed.
# By default "%b-%N.%e" where:
# %b is the basename (file name without extension)
# %N is the appended number
# %e is the extension
# The default creates outputs like "output.avi-1.png"
#
# If overridden with an incorrect value it will be silently set to the default
declare safe_rename_pattern="$DEFAULT_SAFE_REN_PATT"
# Controls how many extra captures will be created in the extended mode
# (see -e), 0 is the same as disabling the extended mode
# This number is multiplied by the total number of captures to get
# the number of extra captures. So, e.g. -n2 -e2 leads to 4 extra captures.
declare extended_factor=0
# Options added always to the ones in the command line
# (command line options override them).
# Note using this is a bit tricky :P mostly because I've no clue of how this
# should be done.
# As an example: you want to set always the title to "My Title" and output
# to jpeg: default_options="-T'My Title' -j"
#declare default_options=
# Verbosity level so far from the command line can only be muted (see -q)
# it can be overridden, though
declare -i verbosity=$V_ALL
# When set to 0 the status messages printed by vcs while running
# are coloured if the terminal supports it. Set to 1 if this annoys you.
declare -i plain_messages=0
# Experimental in 1.0.7b:
# Experiment to get international font support
# I'll need to get some help here, so if you use anything beyond a latin
# alphabet, please help me choosing the correct fonts
# To my understanding Ming/Minchō fonts should cover most of Japanse,
# Chinese and Korean
# Apparently Kochi Mincho should include Hangul *and* Cyrillic... which would be
# great :) Although it couldn't write my hangul test, and also the default font
# (helvetica) in my system seems to include cyrillic too, or at least a subset of
# it.
declare FONT_MINCHO=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf
# Output of capturing programs is redirected here
declare stdout=/dev/null stderr=/dev/null
declare -i DVD_MODE=0 DVD_TITLE=1
declare DVD_FILE=
declare -i multiple_input_files=0

# }}} # End of override-able variables

1)
~ means the user's home directory
2)
Replaced by capture_mode
3)
i.e. your username
All dates/times in this page are UTC.
  • vcs/docs/conf_files.1267450944.txt.gz
  • Last modified: 2010/03/01 13:42
  • by Toni Corvera