configuration template

Configuration template:

paths:
{
	//logfile path
	log_file   = "./avrecord.log";

	//output directory where generated movies will be saved
	output_dir = "./";

	//name template for output movies. For format description see: man date
	filename   = "movie-%Y-%m-%d_%H-%M.avi";

	mask_file  = "";
};

video:
{
	//video device file
	device = "/dev/video0";

	//device inputs (set on initialization)
	inputs:
	{
	};
	//chosen input
	input = 0;

	//standards supported by the device (set on initialization)
	standards:
	{
	};
	//chosen standard
	standard = 255L;

	//device controls (set on initialization)
	controls:
	{
	};

	//captured image width
	width = 640;

	//captured image height
	height = 480;

	//video codecs (see ffmpeg -formats for details)
	codecs = [];
	//chosen video codec
	codec = "msmpeg4";

	//bits per second
	bitrate  = 2500000;

	//quantizer value for variable bitrate: 0 for constant bitrate, 2-31 for variable with different quality (2 -- is the best, 31 -- is the worst)
	var_bitrate  = 0;
};

audio:
{
	//video codecs (see ffmpeg -formats for details)
	codecs = [];
	//codec name (see ffmpeg -formats for details)
	codec  = "mp2";

	//samples per second
	sample_rate  = 44100;

	//bits per second
	bitrate  = 96000;

	//number of audio channel
	channels = 1;

	//desired buffer length (in frames; 0 means auto)
	buffer_length = 0;

	//each audio sample will be multiplied on this value
	amplification_level = 1.0;
};

switches:
{
	//if true, do motion detection
	detect_motion    = true;

	//if true, do noise detection
	detect_noise     = true;

	//if true, record only when motion (or noise, if corresponding flag is set) is detected
	record_on_motion = true;

	//if true, record only when noise (or motion, if corresponding flag is set) is detected
	record_on_noise  = false;

	//if true, print number of motion pixels to the image
	print_motion_amount    = true;

	//if true, print sound peak value
	print_sound_peak_value = true;

	//if true, print current date to the image
	print_date       = true;

	//if ture, start and stop record events will be logged to a log file
	log_events = false;
};

detection:
{
	//time of no_motion that is required for starting a new movie file
	min_gap = 300; //seconds

	//movie duration that is required for starting new movie file
	min_record_time = 30; //minutes

	//when there's no motion, continue recording during this time
	post_motion_offset = 30; //seconds

	//number of frames to write before the one on whith motion (or noise) was detected
	latency = 10;	//value: 2 or grater

	//step in frames between the two compared ones
	frame_step  = 5; //value: 1 or grater

	//check each n-th pixel for difference
	pixel_step  = 1;

	//when detecting a motion, difference between two pixels is compared with this value
	video_noise_level = 20;

	//how many times to erode captured image to remove a noise
	video_noise_reduction_level = 0;

	//a motion is detected when number of differing pixels is grater than this value
	motion_threshold   = 100; //value: [0 - width*height]

	//function for sound peak value calculation: 0 - linear (default), 1 - 2pwr root, 2 - 4pwr root, 3 - 8pwr root, 4 - 2pwr, 5 - 4pwr, 6 - 8pwr
	sound_peak_value_function = 0;

	//sound noise is detected when peak value calculated with the "peak_value_function" is grater than this
	sound_peak_threshold  = 25000; //value: [0 - 100000]
};

schedule:
{
	//defines time, when recording will be started
	start_time = ""; //"dd.mm.yyyy-hh:mm:ss"

	//defines time, when recording will be finished
	end_time   = ""; //"dd.mm.yyyy-hh:mm:ss"

	//array of timestamp pairs. If not empty, record only when current time is between any pair.
	schedule   = ""; //"hh:mm:ss-hh:mm:ss;hh:mm:ss-hh:mm:ss;..."
};

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>