Motion - Conversion Specifiers

Conversion Specifiers for Advanced Filename and Text Features

The table below shows all the supported Conversion Specifiers you can use in the options text_event, text_left, text_right, sql_query, snapshot_filename, jpeg_filename, ffmpeg_filename, timelapse_filename, on_event_start, on_event_end, on_picture_save, on_movie_start, on_movie_end, and on_motion_detected.

In text_left and text_right you can additionally use '\n' for new line.

Conversion Specifier DescriptionSorted ascending
%s The number of seconds since the Epoch, i.e., since 1970-01-01 00:00:00 UTC.
%V The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. See also %U and %W.
%p Either 'AM' or 'PM' according to the given time value, or the corresponding strings for the current locale. Noon is treated as `pm' and midnight as `am'.
%F Equivalent to %Y-%m-%d (the ISO 8601 date format).
%v Event number. An event is a series of motion detections happening with less than 'gap' seconds between them.
%f File name - used in the on_picture_save, on_movie_start, on_movie_end, and sql_query features.
%n Filetype as used in the on_picture_save, on_movie_start, on_movie_end, and sql_query features.
%J Height of the rectangle containing the motion pixels (the rectangle that is shown on the image when locate is on).
%P Like %p but in lowercase: `am' or `pm' or a corresponding string for the current locale.
%E Modifier: use alternative format, see below.
%N Noise level.
%Q Number of detected labels found by the despeckle feature
%D Number of pixels detected as Motion. If labelling is enabled the number is the number of pixels in the largest labelled motion area.
%q Picture frame number within current second. For jpeg filenames this should always be included in the filename if you save more then 1 picture per second to ensure unique filenames. It is not needed in filenames for mpegs.
%C Text defined by the text_event feature
%b The abbreviated month name according to the current locale.
%a The abbreviated weekday name according to the current locale.
%d The day of the month as a decimal number (range 01 to 31).
%w The day of the week as a decimal, range 0 to 6, Sunday being 0. See also %u.
%u The day of the week as a decimal, range 1 to 7, Monday being 1. See also %w.
%j The day of the year as a decimal number (range 001 to 366).
%B The full month name according to the current locale.
%A The full weekday name according to the current locale.
%l The hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank. (See also %I.)
%k The hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank. (See also %H.)
%I The hour as a decimal number using a 12-hour clock (range 01 to 12).
%H The hour as a decimal number using a 24-hour clock (range 00 to 23).
%M The minute as a decimal number (range 00 to 59).
%m The month as a decimal number (range 01 to 12).
%c The preferred date and time representation for the current locale.
%x The preferred date representation for the current locale without the time.
%X The preferred time representation for the current locale without the date.
%S The second as a decimal number (range 00 to 61).
%R The time in 24-hour notation (%H:%M).
%T The time in 24-hour notation (%H:%M:%S).
%r The time in a.m. or p.m. notation.
%Z The time zone or name or abbreviation.
%z The time-zone as hour offset from GMT.
%W The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01.
%U The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also %V and %W.
%Y The year as a decimal number including the century.
%y The year as a decimal number without a century (range 00 to 99).
%t Thread number (camera number)
%o Threshold. The number of detected pixels required to trigger motion. When threshold_tune is 'on' this can be used to show the current tuned value of threshold.
%i Width of the rectangle containing the motion pixels (the rectangle that is shown on the image when locate is on).
%K X coordinate in pixels of the center point of motion. Origin is upper left corner.
%L Y coordinate in pixels of the center point of motion. Origin is upper left corner and number is positive moving downwards (I may change this soon).

-- KennethLavrsen - 12 Dec 2005
Topic revision: r10 - 21 Dec 2005, KennethLavrsen
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.