#!/usr/bin/perl ############################################################################### # CountourHD settings / Linux version / Ubuntu # the ubuntu way # Author: vulcho@gmail.com # References: # http://vholdr.com/forums/contourhd1080p/fw-rtc-txt # http://vholdr.com/forums/software/easy-edit-software-does-not-recognize-my-1080p-camera # http://vholdr.com/forums/software/contourhd-software-does-not-run-my-pc ############################################################################### # SW HI: (Video format for the cameras "Hi" setting) - A:1920x1080 30fps, B:1280x960 30fps, C:1280x720 60fps, D:1280x720 30fps # SW LO: (Video format for the cameras "Lo" setting) - A:1280x720 60fps, B:1280x960 30fps, C:1280x720 30fps, D:848x480 60fps # BR: (Bit Rate) - M:Max, H:High, D:Default # EV: (Exposure) - -4~4 # SHRP: (Sharpness) - 1~5 # AE: (Metering) - C:Center, A:Average, S:Spot # CTST: (Contrast) - 1~255 # MIC: (Microphone Gain) - 0~59 dB # Zone: (Time Zone) - -12~+13 # RTC: (Time) - YYYY/MM/DD hh:mm:ss # YYYY: 2008~2099 # MM: 01~12 # DD: 01~31 ############################################################################### # Time # # Video # * HI resolution # - Full HD # - Tall HD # - Action HD # - Contour HD # * LO resolution # - Tall HD # - Action HD # - Contour HD # - Fast SD # * bit rare # * microphone # Lightening presets # * everyday outdoor # * dusk # * custom ############################################################################### use strict; use warnings; use Data::Dumper; my $chd_options = { 'FW version' => { Label => 'Firmware version', Values => { '1080 v1.12' => '1080 v1.12', }, Current => undef, }, 'SW HI' => { # 1080p Label => 'Video format for the cameras "Hi" setting', Values => { 'A' => 'Full HD - 1080p (1920x1080 @30fps)', 'B' => 'Tall HD - 960p (1280x960 30fps)', 'C' => 'Action HD - 720p (1280x720 60fps)', 'D' => 'Contour HD - 720p (1280x720 30fps)', }, Current => undef, }, 'SW LO' => { # 1080p Label => 'Video format for the cameras "Lo" setting', Values => { 'A' => 'Tall HD - 960p (1280x720 @60fps)', 'B' => 'Action HD - 720p (1280x960 @30fps)', 'C' => 'Contour HD - 720p (1280x720 @30fps)', 'D' => 'Fast SD - WVGA (848x480 @60fps)', }, Current => undef, }, 'BR' => { Label => 'Bit Rate', Values => { 'M' => 'Max', 'H' => 'High', 'D' => 'Default' }, Current => undef, }, 'EV' => { Label => 'Exposure', Values => [-4 .. 4], Current => undef, }, 'SHRP' => { Label => 'Sharpness', Values => [1 .. 5], Current => undef, }, 'AE' => { Label => 'Metering', Values => { 'C' => 'Center', 'A' => 'Average', 'S' => 'Spot', }, Current => undef, }, 'CTST' => { Label => 'Contrast', Values => [1 .. 255], Current => undef, }, 'MIC' => { Label => 'Microphone Gain', Values => [0 .. 59], Current => undef, }, 'Zone' => { Label => 'Time Zone', Values => [-12 .. 13], Current => undef, }, 'RTC' => { Label => 'Time', Values => { 'YYYY' => [2008 .. 2099], 'MM' => [1 .. 12], 'DD' => [1 .. 31], }, Current => undef, }, }; sub chd_find_configs { my @ContourHD; my $found = `find /media -type f -name FW_RTC.txt`; my @found = split "\n", $found; if ( @found > 0 ) { for (@found) { push @ContourHD, $_ if -f $_; } } return @ContourHD; } sub chd_parse_config { my ($config_file) = @_; open my $config_fh, } sub main { my @chd_config_files = chd_find_configs(); if (@chd_config_files < 1) { #die("No ContourHD configurations found. Are you sure you mounted your camera?\n"); } elsif (@chd_config_files > 1) { #die("Found more than one configuration file, but this is not supported.\n"); } map { print "[*] " . $chd_options->{$_}->{Label} . "\n"; # hash values if (ref $chd_options->{$_}->{Values} eq 'HASH') { foreach my $val ( keys %{$chd_options->{$_}->{Values}} ) { if (ref $chd_options->{$_}->{Values}->{$val} eq 'ARRAY') { $chd_options->{$_}->{Values}->{$val} = sprintf "[%s~%s]", $chd_options->{$_}->{Values}->{$val}->[0], $chd_options->{$_}->{Values}->{$val}->[-1]; } printf " [%s] %s\n", $val, $chd_options->{$_}->{Values}->{$val}; } } # array values if (ref $chd_options->{$_}->{Values} eq 'ARRAY') { printf " [%s~%s]\n", $chd_options->{$_}->{Values}->[0], $chd_options->{$_}->{Values}->[-1] } } ("SW HI", "SW LO", "BR", "EV", "SHRP", "AE", "CTST", "MIC", "Zone", "RTC", "FW version"); } main();