Service Host Administrator Guide

Version 2.1 | Published July 20, 2021 ©

Loop Recording

This mode of recording only works with Timecode Source time of day. Loop recordings can also be split into various chunks. These can either be specified via timecode format or with fields being written.

An example on how to run a loop recording using regular Channel Recorder commands:

RECORD LOOP CHUNK=00:01:00:00
RECORD LOOP PREFIX=Loopy
RECORD LOOP POSTFIX=End
RECORD LOOP START

This generates chunks, each consisting of one minute, until you stop the recording.

Possible options for loop recordings are:

  • LENGTH: Determines the length of the loop in frames or timecode. At least this amount of frames will reside on the disk. The minimum length value is 00:02:00:00 or the equivalent number of fields / frames.

  • CHUNK: Determines the size of one chunk in frames or timecode. The chunk size influences the loop length. The minimum chunk value is 00:00:10:00 or the equivalent number of fields / frames.

  • DISKSIZE: Determines the size of the loop, defined by the size of the clips on the disk. The oldest clips are deleted until the size of the clips drops below the specified value.

  • DISKFREE: Determines the size of the loop, defined by the space left on the disk. If it drops below the value, the oldest clips are deleted until at least the specified amount is free again.

  • NAME: Name of the file that accepts a subset of strftime.

  • PREFIX: Adds a prefix to the generated filename.

  • POSTFIX: Adds postfix to the generated filename.

DISKSIZE and DISKFREE are defined in bytes. It is possible to add the following postfix which will multiply the base values by different factors:

Postfix

Factor

kib

1024

kb

1000

k

1024

mib

1024*1024

mb

1000000

m

1024*1024

gib

1024 * 1024 * 1024

gb

1000000000

g

1024 * 1024 * 1024

Understanding Chunk and Length Parameters

An example on how LENGTH and CHUNK parameters are related:

RECORD LOOP CHUNK=00:00:30:00
RECORD LOOP LENGTH=00:04:00:00
RECORD LOOP PREFIX=Loopy
RECORD LOOP START

This generates a total of nine files after four minutes. One of the files is always zero bytes, this is the next file the Channel Recorder writes to. Another file has a changing size, this is the file Channel Recorder is currently writing to. The other seven files have already been written. When Channel Recorder reaches four minutes it starts removing the first file it has written.

Chunk File Naming

When performing a loop recording the chunks have by default the following name format: {}{:02}{:02}{:02}{:02}_{}{}. Each {} translates to the following in the same order:

  • Prefix specified with the RECORD LOOP PREFIX command.

  • Two digit hour specifying when the chunk started recording.

  • Two digit minute specifying when the chunk started recording.

  • Two digit seconds specifying when the chunk started recording.

  • Two digit frame / field specifying when the chunk started recording.

  • Postfix specified with the RECORD LOOP POSTFIX command.

  • Numerical value that increases for each chunk.

An example chunk name would be Loopy_13593509_0_End.mxf

For the above example prefix would be Loopy_ and postfix would be _End.

More Flexible Chunk File Naming

It is also possible to be more flexible with the naming by using the standard format strftime . strftime is a function to format date and time into a readable form.

An example would be RECORD LOOP NAME=%F_recording_%n.mxf. This generates something like the following: 2001-08-23_recording_0, 2001-08-23_recording_1, etc.

The key specified %n is mandatory as to prevent collision between chunks. If this is not specified, one is provided at the end of the filename before the extension. So for example RECORD LOOP NAME=%F_recording.mxf generates the same as the above. Even though %n was not specified.

Not all specifiers in strftime are supported. This is because Windows file name does not allow some of the characters returned by strftime . The following are excluded because it would result in an invalid name for Windows:

Specifier

Description

Result

%c

Date and time representation

Thu Aug 23 14:55:02 2001

%D

Short MM/DD/YY date, equivalent to %m/%d/%y

08/23/01

%r

12-hour clock time

02:55:02 pm

%R

24-hour HH:MM time, equivalent to %H:%M

14:55

%t

Horizontal-tab character ('\t')

%T

ISO 8601 time format (HH:MM:SS), equivalent to %H:%M:%S

14:55:02

%x

Date representation

08/23/01

%X

Time representation

14:55:02

Ability to Protect Chunks of Ongoing Loop Recordings

The ability to protect chunks of on-going loop recordings by specifying time-spans that are not overwritten by the ongoing recordings if the recording reaches the size/length limit and starts to overwrite the oldest content of the current recording.

  • RECORD LOOP PROTECT IN=hh:mm:ss:ff OUT=hh:mm:ss:ff (can be called multiple times if multiple protections are needed)

  • RECORD LOOP UNPROTECT (assuming no specific files / time-span to unprotect, this removes all active protection)

Alternative with files:

  • RECORD LOOP PROTECT file3.mxf file4.mxf (can also be called multiple times)

  • RECORD LOOP UNPROTECT (assuming no specific files / time-span to unprotect, this will remove all active protection)

It is not possible to protect all files. The minimum number of unprotected files is the number of writers. This is to prevent a lock down and the recorder not being able to record anything.

  • RECORD LOOP IN=00:00:00:00 OUT=23:59:59:59 PROTECT

This attempts to protect all the files.