video_mp4box_fps can be fractional.

V4.3.1
Setting a fractional video_mp4box_fps slightly different from video_fps
can tune possible audio/video drift for longer videos.
This commit is contained in:
Bill Wilson 2019-08-04 10:32:03 -05:00
parent 6afc8ec42c
commit 08ed7926e5
6 changed files with 155 additions and 114 deletions

Binary file not shown.

View File

@ -522,6 +522,21 @@ config_value_int_set(char *arg, ConfigResult *result)
return valid;
}
static int
config_value_float_set(char *arg, ConfigResult *result)
{
int valid = TRUE;
if (isdigit(*arg) || (*arg == '-' && isdigit((*(arg + 1)))))
*result->value_float = atof(arg);
else
{
printf(" Bad config_value_float_set: %s\n", arg);
valid = FALSE;
}
return valid;
}
static Config config[] =
{
@ -866,19 +881,19 @@ static Config config[] =
"#",
"video_height", "1080", TRUE, {.value = &pikrellcam.camera_config.video_height}, config_value_int_set },
{ "# Video frames per second. The processing required to implement the\n"
"# multiple video paths in PiKrellCam limits this fps to about 24.\n"
"# Above that may cause web page mjpeg frames to be dropped. But if\n"
"# you are overclocking the GPU you may be able to set higher.\n"
{ "# Video frames per second. If set higher than 24 the motion detecting\n"
"# preview stream can drop frames depending on Pi model (GPU clock speed).\n"
"#",
"video_fps", "24", FALSE, {.value = &pikrellcam.camera_adjust.video_fps}, config_value_int_set },
{ "# MP4Box output frames per second if video filename is a .mp4\n"
"# If this is non zero and different from video_fps, the final mp4 will\n"
"# If set non zero and different from video_fps, the final mp4 will\n"
"# be a slow or fast motion video.\n"
"# Normally leave this set to zero so it will track video_fps.\n"
"# Normally leave this set to zero so it will track video_fps or set\n"
"# to fractional values slightly different from video_fps to tune for\n"
"# possible audio/video drift for longer videos.\n"
"#",
"video_mp4box_fps", "0", FALSE, {.value = &pikrellcam.camera_adjust.video_mp4box_fps}, config_value_int_set },
"video_mp4box_fps", "0", FALSE, {.value_float = &pikrellcam.camera_adjust.video_mp4box_fps}, config_value_float_set },
{ "# Video bitrate affects the quality and size of a video recording.\n"
"# Along with pre_capture and event_gap times, it also determines the\n"
@ -1351,6 +1366,13 @@ config_load(char *config_file)
pikrellcam.annotate_string_space_char = '_';
n = (int) ((pikrellcam.camera_adjust.video_mp4box_fps + .0005) * 100.0);
if (n < 0)
n = 0;
if (n > 3000)
n = 3000;
pikrellcam.camera_adjust.video_mp4box_fps_display = n;
camera_adjust_temp = pikrellcam.camera_adjust;
motion_times_temp = pikrellcam.motion_times;
@ -1420,6 +1442,8 @@ config_save(char *config_file)
fprintf(f, "%s\n", cfg->description);
if (cfg->config_func == config_value_int_set)
fprintf(f, "%s %d\n\n", cfg->option, *(cfg->result.value));
else if (cfg->config_func == config_value_float_set)
fprintf(f, "%s %.3f\n\n", cfg->option, *(cfg->result.value_float));
else if (cfg->config_func == config_value_bool_set)
fprintf(f, "%s %s\n\n", cfg->option, *(cfg->result.value) ? "on" : "off");
else

View File

@ -104,9 +104,10 @@ InformLine inform_line[N_INFORM_LINES];
static int inform_line_index;
static boolean inform_shown;
static int display_state;
static int display_menu;
static int display_action;
static int display_state,
display_menu,
display_action,
display_action_repeat_count;
static DrawArea top_status_area,
inform_area,
@ -1084,7 +1085,8 @@ typedef struct
increment,
value,
prev_value,
revert_value;
revert_value,
precision;
char *units;
CameraParameter
*cam_param;
@ -1095,17 +1097,17 @@ typedef struct
static Adjustment picture_adjustment[] =
{
{ "sharpness", -100, 100, 1, 0, 0, 0, "", NULL, NULL },
{ "contrast", -100, 100, 1, 0, 0, 0, "", NULL, NULL },
{ "brightness", 0, 100, 1, 0, 0, 0, "", NULL, NULL },
{ "saturation", -100, 100, 1, 0, 0, 0, "", NULL, NULL },
{ "iso", 0, 800, 100, 0, 0, 0, "", NULL, NULL },
{ "exposure_compensation", -25, 25, 1, 0, 0, 0, "", NULL, NULL },
{ "video_stabilisation", 0, 1, 1, 0, 0, 0, "", NULL, NULL },
{ "rotation", 0, 270, 90, 0, 0, 0, "", NULL, NULL },
{ "hflip", 0, 1, 1, 0, 0, 0, "", NULL, NULL },
{ "vflip", 0, 1, 1, 0, 0, 0, "", NULL, NULL },
{ "shutter_speed", 0, 6000000, 100, 0, 0, 0, "usec", NULL, NULL }
{ "sharpness", -100, 100, 1, 0, 0, 0, 0, "", NULL, NULL },
{ "contrast", -100, 100, 1, 0, 0, 0, 0, "", NULL, NULL },
{ "brightness", 0, 100, 1, 0, 0, 0, 0, "", NULL, NULL },
{ "saturation", -100, 100, 1, 0, 0, 0, 0, "", NULL, NULL },
{ "iso", 0, 800, 100, 0, 0, 0, 0, "", NULL, NULL },
{ "exposure_compensation", -25, 25, 1, 0, 0, 0, 0, "", NULL, NULL },
{ "video_stabilisation", 0, 1, 1, 0, 0, 0, 0, "", NULL, NULL },
{ "rotation", 0, 270, 90, 0, 0, 0, 0, "", NULL, NULL },
{ "hflip", 0, 1, 1, 0, 0, 0, 0, "", NULL, NULL },
{ "vflip", 0, 1, 1, 0, 0, 0, 0, "", NULL, NULL },
{ "shutter_speed", 0, 6000000, 100, 0, 0, 0, 0, "usec", NULL, NULL }
};
#define N_PICTURE_ADJUSTMENTS \
@ -1117,14 +1119,14 @@ static Adjustment picture_adjustment[] =
*/
Adjustment motion_settings_adjustment[] =
{
{ "Startup_Motion", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.startup_motion_enable },
{ "Confirm_Gap", 0, 30, 1, 0, 0, 0, "", NULL, &motion_times_temp.confirm_gap },
{ "Pre_Capture", 1, 180, 1, 0, 0, 0, "", NULL, &motion_times_temp.pre_capture },
{ "Event_Gap", 1, 300, 1, 0, 0, 0, "", NULL, &motion_times_temp.event_gap },
{ "Post_Capture", 1, 180, 1, 0, 0, 0, "", NULL, &motion_times_temp.post_capture },
{ "Video_Time_Limit", 0, 1800, 10, 0, 0, 0, "sec", NULL, &pikrellcam.motion_record_time_limit },
{ "Motion_Stills_(no_videos)", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_stills_enable },
{ "Max_Stills_per_Minute", 1, 60, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_stills_per_minute}
{ "Startup_Motion", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.startup_motion_enable },
{ "Confirm_Gap", 0, 30, 1, 0, 0, 0, 0, "", NULL, &motion_times_temp.confirm_gap },
{ "Pre_Capture", 1, 180, 1, 0, 0, 0, 0, "", NULL, &motion_times_temp.pre_capture },
{ "Event_Gap", 1, 300, 1, 0, 0, 0, 0, "", NULL, &motion_times_temp.event_gap },
{ "Post_Capture", 1, 180, 1, 0, 0, 0, 0, "", NULL, &motion_times_temp.post_capture },
{ "Video_Time_Limit", 0, 1800, 10, 0, 0, 0, 0, "sec", NULL, &pikrellcam.motion_record_time_limit },
{ "Motion_Stills_(no_videos)", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_stills_enable },
{ "Max_Stills_per_Minute", 1, 60, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_stills_per_minute}
};
#define N_MOTION_SETTINGS_ADJUSTMENTS \
@ -1132,10 +1134,10 @@ Adjustment motion_settings_adjustment[] =
Adjustment motion_limit_adjustment[] =
{
{ "Vector_Magnitude", 2, 50, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_magnitude_limit },
{ "Vector_Count", 2, 50, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_magnitude_limit_count },
{ "Burst_Count", 50, 2000, 10, 0, 0, 0, "", NULL, &pikrellcam.motion_burst_count },
{ "Burst_Frames", 2, 20, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_burst_frames }
{ "Vector_Magnitude", 2, 50, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_magnitude_limit },
{ "Vector_Count", 2, 50, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_magnitude_limit_count },
{ "Burst_Count", 50, 2000, 10, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_burst_count },
{ "Burst_Frames", 2, 20, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_burst_frames }
};
#define N_MOTION_LIMIT_ADJUSTMENTS \
@ -1147,18 +1149,18 @@ Adjustment motion_limit_adjustment[] =
*/
Adjustment settings_adjustment[] =
{
// { "Vertical_Filter", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_vertical_filter },
{ "Check_Media_Diskfree", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.check_media_diskfree },
{ "Check_Archive_Diskfree", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.check_archive_diskfree },
{ "Diskfree_Percent", 5, 90, 1, 0, 0, 0, "", NULL, &pikrellcam.diskfree_percent },
{ "video_bitrate", 1000000, 25000000, 100000, 0, 0, 0, "", NULL, &camera_adjust_temp.video_bitrate },
{ "video_fps", 1, 30, 1, 0, 0, 0, "", NULL, &camera_adjust_temp.video_fps },
{ "video_mp4box_fps", 0, 30, 1, 0, 0, 0, "", NULL, &camera_adjust_temp.video_mp4box_fps },
{ "mjpeg_divider", 1, 12, 1, 0, 0, 0, "", NULL, &pikrellcam.mjpeg_divider },
{ "still_quality", 5, 100, 1, 0, 0, 0, "", NULL, &camera_adjust_temp.still_quality },
{ "Vector_Counts", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_show_counts },
{ "Vector_Dimming", 30, 60, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_vectors_dimming },
{ "Preview_Clean", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_preview_clean },
// { "Vertical_Filter", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_vertical_filter },
{ "Check_Media_Diskfree", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.check_media_diskfree },
{ "Check_Archive_Diskfree", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.check_archive_diskfree },
{ "Diskfree_Percent", 5, 90, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.diskfree_percent },
{ "video_bitrate", 1000000, 25000000, 100000, 0, 0, 0, 0, "", NULL, &camera_adjust_temp.video_bitrate },
{ "video_fps", 1, 30, 1, 0, 0, 0, 0, "", NULL, &camera_adjust_temp.video_fps },
{ "video_mp4box_fps", 0, 3000, 1, 0, 0, 0, 2, "", NULL, &camera_adjust_temp.video_mp4box_fps_display },
{ "mjpeg_divider", 1, 12, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.mjpeg_divider },
{ "still_quality", 5, 100, 1, 0, 0, 0, 0, "", NULL, &camera_adjust_temp.still_quality },
{ "Vector_Counts", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_show_counts },
{ "Vector_Dimming", 30, 60, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_vectors_dimming },
{ "Preview_Clean", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_preview_clean },
};
@ -1168,9 +1170,9 @@ Adjustment settings_adjustment[] =
Adjustment loop_settings_adjustment[] =
{
{ "Startup_Loop", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.loop_startup_enable },
{ "Time_Limit", 10, 900, 10, 0, 0, 0, "sec", NULL, &pikrellcam.loop_record_time_limit },
{ "Diskusage_Percent", 5, 95, 1, 0, 0, 0, "", NULL, &pikrellcam.loop_diskusage_percent }
{ "Startup_Loop", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.loop_startup_enable },
{ "Time_Limit", 10, 900, 10, 0, 0, 0, 0, "sec", NULL, &pikrellcam.loop_record_time_limit },
{ "Diskusage_Percent", 5, 95, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.loop_diskusage_percent }
};
#define N_LOOP_SETTINGS_ADJUSTMENTS \
@ -1178,9 +1180,9 @@ Adjustment loop_settings_adjustment[] =
Adjustment audio_settings_adjustment[] =
{
{ "Audio_Trigger_Video", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.audio_trigger_video },
{ "Audio_Trigger_Level", 2, 100, 1, 0, 0, 0, "", NULL, &pikrellcam.audio_trigger_level },
{ "Box_MP3_Only", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.audio_box_MP3_only }
{ "Audio_Trigger_Video", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.audio_trigger_video },
{ "Audio_Trigger_Level", 2, 100, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.audio_trigger_level },
{ "Box_MP3_Only", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.audio_box_MP3_only }
};
#define N_AUDIO_SETTINGS_ADJUSTMENTS \
@ -1188,17 +1190,17 @@ Adjustment audio_settings_adjustment[] =
Adjustment servo_settings_adjustment[] =
{
{ "Motion_Off_Preset", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.motion_off_preset },
{ "Move_Step_msec", 0, 200, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_move_step_msec },
{ "Preset_Step_msec", 0, 100, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_preset_step_msec },
{ "Servo_Settle_msec", 200, 1000, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_settle_msec },
{ "Move_Steps", 5, 30, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_move_steps },
{ "Pan_Left_Limit", SERVO_MIN_WIDTH, SERVO_MAX_WIDTH, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_pan_min },
{ "Pan_Right_Limit", SERVO_MIN_WIDTH, SERVO_MAX_WIDTH, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_pan_max },
{ "Tilt_Up_Limit", SERVO_MIN_WIDTH, SERVO_MAX_WIDTH, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_tilt_max },
{ "Tilt_Down_Limit", SERVO_MIN_WIDTH, SERVO_MAX_WIDTH, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_tilt_min },
{ "Servo_Pan_Invert", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_pan_invert },
{ "Servo_Tilt_Invert", 0, 1, 1, 0, 0, 0, "", NULL, &pikrellcam.servo_tilt_invert }
{ "Motion_Off_Preset", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.motion_off_preset },
{ "Move_Step_msec", 0, 200, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_move_step_msec },
{ "Preset_Step_msec", 0, 100, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_preset_step_msec },
{ "Servo_Settle_msec", 200, 1000, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_settle_msec },
{ "Move_Steps", 5, 30, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_move_steps },
{ "Pan_Left_Limit", SERVO_MIN_WIDTH, SERVO_MAX_WIDTH, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_pan_min },
{ "Pan_Right_Limit", SERVO_MIN_WIDTH, SERVO_MAX_WIDTH, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_pan_max },
{ "Tilt_Up_Limit", SERVO_MIN_WIDTH, SERVO_MAX_WIDTH, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_tilt_max },
{ "Tilt_Down_Limit", SERVO_MIN_WIDTH, SERVO_MAX_WIDTH, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_tilt_min },
{ "Servo_Pan_Invert", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_pan_invert },
{ "Servo_Tilt_Invert", 0, 1, 1, 0, 0, 0, 0, "", NULL, &pikrellcam.servo_tilt_invert }
};
#define PAN_LEFT_LIMIT_INDEX 5
@ -1321,6 +1323,8 @@ apply_adjustment(void)
}
else if (adjustments == &settings_adjustment[0])
{
camera_adjust_temp.video_mp4box_fps =
(float) camera_adjust_temp.video_mp4box_fps_display / 100.0;
if ( camera_adjust_temp.video_fps != pikrellcam.camera_adjust.video_fps
|| camera_adjust_temp.still_quality != pikrellcam.camera_adjust.still_quality
|| camera_adjust_temp.video_bitrate != pikrellcam.camera_adjust.video_bitrate
@ -1374,8 +1378,8 @@ display_adjustment(uint8_t *i420)
DrawArea *da = &adj_control_area;
GlcdFont *font = normal_font;
char buf[50];
int bar_x0, bar_y0, bar_dy, bar_width, adj_x, fast_factor;
int pan, tilt, max, min;
int bar_x0, bar_y0, bar_dy, bar_width, adj_x, accel;
int pan, tilt, max, min, scale, n;
static int prev_action;
boolean boolean_flag = FALSE;
@ -1433,12 +1437,18 @@ display_adjustment(uint8_t *i420)
|| prev_action == REPEAT_RIGHT_ARROW
)
)
{
display_action = prev_action;
display_action_repeat_count += 1;
}
else if (display_action == REPEAT_LEFT_ARROW && prev_action == REPEAT_LEFT_ARROW)
display_action = ACTION_NONE;
else if (display_action == REPEAT_RIGHT_ARROW && prev_action == REPEAT_RIGHT_ARROW)
display_action = ACTION_NONE;
if (display_action == ACTION_NONE)
display_action_repeat_count = 0;
/* Set cur adjust to config value if it changed while adjusting.
| For if a FIFO command sets it while we are adjusting.
*/
@ -1462,22 +1472,43 @@ display_adjustment(uint8_t *i420)
}
#endif
fast_factor = 2;
while ((cur_adj->max - cur_adj->min) / (fast_factor * cur_adj->increment)
> 50)
fast_factor += 1;
for (n = 1, scale = 1; n <= cur_adj->precision; ++n)
scale *= 10;
if (fast_factor > 20) /* XXX for shutter_speed, this needs work */
fast_factor = 20;
accel = 1;
n = (cur_adj->max - cur_adj->min) / scale;
while (n / (accel * cur_adj->increment) > 200)
accel += 1;
if (display_action_repeat_count > 80)
accel *= 50;
else if (display_action_repeat_count > 70)
accel *= 20;
else if (display_action_repeat_count > 60)
accel *= 12;
else if (display_action_repeat_count > 50)
accel *= 8;
else if (display_action_repeat_count > 35)
accel *= 5;
else if (display_action_repeat_count > 25)
accel *= 3;
else if (display_action_repeat_count > 15)
accel *= 2;
if (display_action == REPEAT_LEFT_ARROW || display_action == REPEAT_RIGHT_ARROW)
display_action_repeat_count += 1;
if (accel > 400)
accel = 400;
if (display_action == LEFT_ARROW)
cur_adj->value -= cur_adj->increment;
else if (display_action == RIGHT_ARROW)
cur_adj->value += cur_adj->increment;
else if (display_action == REPEAT_LEFT_ARROW)
cur_adj->value -= fast_factor * cur_adj->increment;
cur_adj->value -= accel * cur_adj->increment;
else if (display_action == REPEAT_RIGHT_ARROW)
cur_adj->value += fast_factor * cur_adj->increment;
cur_adj->value += accel * cur_adj->increment;
if (cur_adj->value > cur_adj->max)
{
@ -1570,13 +1601,13 @@ display_adjustment(uint8_t *i420)
if (boolean_flag)
snprintf(buf, sizeof(buf), "%s", "");
else
snprintf(buf, sizeof(buf), "%d", cur_adj->min);
snprintf(buf, sizeof(buf), "%d", cur_adj->min / scale);
i420_print(da, font, 0xff, 1, bar_x0 - 2, 0, JUSTIFY_LEFT_AT_X, buf);
if (boolean_flag)
snprintf(buf, sizeof(buf), "%s", "");
else
snprintf(buf, sizeof(buf), "%d", cur_adj->max);
snprintf(buf, sizeof(buf), "%d", cur_adj->max /scale);
i420_print(da, font, 0xff, 1, bar_x0 + bar_width + 2, 0, JUSTIFY_LEFT, buf);
if (boolean_flag)
@ -1585,6 +1616,8 @@ display_adjustment(uint8_t *i420)
&& cur_adj->value == 0
)
snprintf(buf, sizeof(buf), "OFF");
else if (scale > 1)
snprintf(buf, sizeof(buf), "%.2f", (float) cur_adj->value / (float) scale);
else
snprintf(buf, sizeof(buf), "%d", cur_adj->value);

View File

@ -845,10 +845,7 @@ video_record_stop(VideoCircularBuffer *vcb)
tmp_dir = ((uint64_t) st_h264.st_size < tmp_space)
? "/tmp" : pikrellcam.video_dir;
if ( pikrellcam.camera_adjust.video_mp4box_fps == 0
|| pikrellcam.camera_adjust.video_mp4box_fps
== pikrellcam.camera_adjust.video_fps
)
if (pikrellcam.camera_adjust.video_mp4box_fps == 0)
encode_fps = pikrellcam.video_last_fps;
else
encode_fps = (double) pikrellcam.camera_adjust.video_mp4box_fps;
@ -1221,6 +1218,7 @@ command_process(char *command_line)
char command[64], args[256], arg1[128], arg2[64], arg3[256], buf[128];
char *fmt, *path;
int i, n;
float f;
if (!command_line || *command_line == '\0')
return;
@ -1560,9 +1558,9 @@ command_process(char *command_line)
break;
case video_mp4box_fps:
n = atoi(args);
camera_adjust_temp.video_mp4box_fps = n;
pikrellcam.camera_adjust.video_mp4box_fps = n;
f = atof(args);
camera_adjust_temp.video_mp4box_fps = f;
pikrellcam.camera_adjust.video_mp4box_fps = f;
pikrellcam.config_modified = TRUE;
break;

View File

@ -57,7 +57,7 @@
#include "utils.h"
#define PIKRELLCAM_VERSION "4.3.0"
#define PIKRELLCAM_VERSION "4.3.1"
//TCP Stream Server
@ -496,8 +496,9 @@ typedef struct
{
int video_fps,
video_bitrate,
video_mp4box_fps,
still_quality;
still_quality,
video_mp4box_fps_display;
float video_mp4box_fps;
boolean modified;
}
CameraAdjust;
@ -840,6 +841,7 @@ typedef struct
typedef union
{
int *value;
float *value_float;
char **string;
}
ConfigResult;

View File

@ -67,9 +67,13 @@ And there is a Raspberry Pi
<a href="https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=115583">PiKrellCam forum</a>
</div>
<span style='font-size: 1.5em; font-weight: 650;'>Release Notes</span><hr>
<span style='font-size: 1.5em; font-weight: 650;'>Recent Release Notes</span><hr>
<div class='indent0'>
Version 4.3.1 - video_mp4box_fps can be fractional. For audio/video drift
tuning.
<br>
Version 4.3.0
<div class='indent1'>
Motion events can record stills instead of videos. See
@ -133,27 +137,6 @@ Version 4.0.5
<a href="help.php#DISKFREE">Disk free limit for media videos</a><br>
Stills have a thumbs view.
</div>
<p>
Version 4.0.4 - Fix annotation strings to allow spaces and longer length.
<br>
Version 4.0.2 - Bugfix for $v variable passed to on_motion_end.
<br>
Version 4.0.1 - Change for libmp3lame segfault. Simplify running on_motion_end_cmd.
<br>
Version 4.0.0
<div class='indent1'>
<a href="help.php#AUDIO">Audio recording</a> - For Jessie Lite & Minibian
users, libmp3lame0 and libasound2 need to be installed or else after
upgrading to PiKrellCam 4.0, a restart will fail.
Rerun the install script or install by apt-get.
</div>
<p>
Version 3.1
<div class='indent1'>
<a href="help.php#MULTICAST_INTERFACE">multicast interface</a><br>
<a href="help.php#MOTION_EVENTS">motion-events file</a><br>
</div>
</div>
@ -1042,15 +1025,16 @@ Preset group and there will be no Servo button in the Config group.
to reduce the size of the videos.
</li>
<p>
<li><span style='font-weight:700'>video_fps</span> - typically this should be no higher
than 24 or the motion detecting preview jpeg camera stream may start dropping frames.
(I have no data on the effect GPU overclocking might have on this limitation).
<li><span style='font-weight:700'>video_fps</span> - if set higher
than 24 the motion detecting preview camera stream can drop frames
depending on Pi model (GPU clock speed).
</li>
<p>
<li><span style='font-weight:700'>video_mp4box_fps</span> - keep this value set to zero
unless you want to create fast or slow motion videos. When zero, mp4 boxing fps will be
the same as video_fps which is normally what you want. But this value can be set to a
non zero value different from video_fps if you want fast or slow motion videos.
<li><span style='font-weight:700'>video_mp4box_fps</span> - when zero, the mp4
boxing fps will track video_fps which is normally what you want. Set this to
a non zero value different from video_fps for fast or slow motion videos.
Or set to fractional values slightly different from video_fps to tune possible
audio/video drift for longer videos.
</li>
<p>
<li><span style='font-weight:700'>mjpeg_divider</span> - this value is divided into