Skip to content

prudyntcfg command sometimes breaks /etc/prudynt.cfg #713

Description

@felipecrs

Sometimes when running prudyntcfg, the /etc/prudynt.cfg gets broken with some property at the end "lost" like:

[...]
        # roi_0_x: 0;
        # roi_0_y: 0;
        # roi_1_x: 1920;
        # roi_1_y: 1080;
        # roi_count: 1;
};


+               logo_enabled: false;

The specific line that ends up at the end seems random, but I can always reproduce this issue with the initial version of /etc/prudynt.cfg shown below and then running the commands below.

Commands:

Copy and paste this entire command set, run them at once:

prudyntcfg set stream0.osd.logo_enabled false
prudyntcfg set stream0.osd.uptime_enabled false
prudyntcfg set stream0.osd.user_text_enabled false
prudyntcfg set stream0.osd.pos_time_x 10
prudyntcfg set stream0.osd.pos_time_y -10
prudyntcfg set stream0.audio_enabled false
prudyntcfg set stream1.osd.logo_enabled false
prudyntcfg set stream1.osd.uptime_enabled false
prudyntcfg set stream1.osd.user_text_enabled false
prudyntcfg set stream1.osd.pos_time_x 10
prudyntcfg set stream1.osd.pos_time_y -10
prudyntcfg set audio.input_format '"AAC"'
prudyntcfg set audio.input_high_pass_filter true
prudyntcfg set audio.input_gain 23
prudyntcfg set audio.input_noise_suppression 3
prudyntcfg set audio.output_enabled true

Initial /etc/prudynt.cfg:

# Prudynt Configuration
# ---------------------
# This configuration file allows customization of Prudynt's behavior.
# Uncomment the desired lines to override the default settings.

# Some options are only supported on specific SOC versions.  See the wiki for details:
# https://github.com/gtxaspec/prudynt-t/wiki/Configuration

version = "1.0";

# General Settings
# ----------------
general: {
	loglevel: "INFO";
	# osd_pool_size: 1025;
	# imp_polling_timeout: 500;
};

# RTSP (Real-Time Streaming Protocol) Settings
# -------------------------------------------
rtsp: {
	# port: 554;
	# name: "thingino prudynt";
	# est_bitrate: 5000;
	# out_buffer_size: 500000;
	# send_buffer_size: 307200;
	# session_reclaim: 65;
	# auth_required: true;
	# username: "thingino";
	# password: "thingino";
};

# Sensor Settings
# ---------------
sensor: {
	# model: "gc2053";
	# i2c_address: 0x37;
	# i2c_bus: 0 # I2C bus ID of the sensor. (T40/T41 only)
	fps: 25;
	# width: 1920;
	# height: 1080;
	# boot: 0;
	# mclk: 1;
	# video_interface: 0;
	# gpio_reset: 91;
};

# Image Settings
# ----------------
image: {
	# vflip = false;
	# hflip = false;
	# ae_compensation = 128;
	# anti_flicker = 2;
	# backlight_compensation = 0;
	# brightness = 128;
	# contrast = 128;
	# core_wb_mode = 0;
	# defog_strength = 128;
	# dpc_strength = 128;
	# drc_strength = 128;
	# highlight_depress = 0;
	# hue = 128;
	# max_again = 160;
	# max_dgain = 80;
	# running_mode = 0;
	# saturation = 128;
	# sharpness = 128;
	# sinter_strength = 128;
	# temper_strength = 128;
	# wb_bgain = 0;
	# wb_rgain = 0;
};

# Stream0 Settings
# ----------------
stream0: {
	# enabled: true;
	audio_enabled: false;
	# rtsp_endpoint: "ch0";
	# rtsp_info: "stream0";
	# format: "H264";
	# bitrate: 3000;
	# mode: "SMART";
	# width: 1920;
	# height: 1080;
	buffers: 1;
	fps: 25;
	# gop: 20;
	# max_gop: 60;
	# profile: 2;
	# rotation: 0;
	osd: {
		# enabled: true;
		# start_delay: 0;
		# font_path: "/usr/share/fonts/NotoSansDisplay-Condensed2.ttf";
		# font_size: 64;
		# font_color: 0xFFFFFFFF;
		# font_stroke_enabled: true;
		# font_stroke_size: 64;
		# font_stroke_color: 0xFF000000;
		# time_enabled: true;
		# time_format: "%F %T";
		user_text_enabled: false;
		# user_text_format: "%hostname";
		uptime_enabled: false;
		# uptime_format: "Uptime: %02lu:%02lu:%02lu";
		logo_enabled: false;
		# logo_path: "/usr/share/images/thingino_logo_1.bgra";
		# logo_width: 100;
		# logo_height: 30;
		# logo_transparency: 255;
		pos_time_x: 10;
		pos_time_y: -10;
		# pos_user_text_x: 900;
		# pos_user_text_y: 5;
		# pos_uptime_x: 1600;
		# pos_uptime_y: 5;
		# pos_logo_x: 1800;
		# pos_logo_y: 1030;
		# font_stroke: 1;
		# font_xscale: 100;
		# font_yscale: 100;
		# font_yoffset: 3;
		# logo_rotation: 0;
		# time_rotation: 0;
		# time_transparency: 255;
		# uptime_rotation: 0;
		# uptime_transparency: 255;
		# user_text_rotation: 0;
		# user_text_transparency: 255;
		# pos_logo_x: 1800;
		# pos_logo_y: 1030;
	};
};

# Stream1 Settings
# ---------------------------------
stream1: {
	# enabled: true;
	# audio_enabled: true;
	# rtsp_endpoint: "ch1";
	# rtsp_info: "stream1";
	# format: "H264";
	# bitrate: 1000;
	# mode: "SMART";
	# width: 640;
	# height: 360;
	buffers: 1;
	fps: 25;
	# gop: 20;
	# max_gop: 60;
	# profile: 2;
	# rotation: 0;
	osd: {
		# enabled: true;
		# start_delay: 0;
		# font_path: "/usr/share/fonts/NotoSansDisplay-Condensed2.ttf";
		# font_size: 64;
		# font_color: 0xFFFFFFFF;
		# font_stroke_enabled: true;
		# font_stroke_size: 64;
		# font_stroke_color: 0xFF000000;
		# time_enabled: true;
		# time_format: "%F %T";
		user_text_enabled: false;
		# user_text_format: "%hostname";
		uptime_enabled: false;
		# uptime_format: "Uptime: %02lu:%02lu:%02lu";
		logo_enabled: false;
		# logo_path: "/usr/share/images/thingino_logo_1.bgra";
		# logo_width: 100;
		# logo_height: 30;
		# logo_transparency: 255;
		pos_time_x: 10;
		pos_time_y: -10;
		# pos_user_text_x: 900;
		# pos_user_text_y: 5;
		# pos_uptime_x: 1600;
		# pos_uptime_y: 5;
		# pos_logo_x: 1800;
		# pos_logo_y: 1030;
		# font_stroke: 1;
		# font_xscale: 100;
		# font_yscale: 100;
		# font_yoffset: 3;
		# logo_rotation: 0;
		# time_rotation: 0;
		# time_transparency: 255;
		# uptime_rotation: 0;
		# uptime_transparency: 255;
		# user_text_rotation: 0;
		# user_text_transparency: 255;
	};
};

# Stream2 Settings (JPEG)
# ---------------------------------
stream2: {
	# enabled: true;
	# jpeg_path: "/tmp/snapshot.jpg";
	# jpeg_quality: 75;
	# jpeg_refresh: 1000;
	# jpeg_channel: 0;
	# jpeg_idle_fps: 1;
};

# WebSocket Settings
# ------------------
websocket: {
	# enabled: true;
	# secured: false;
	# loglevel: 4096;
	# port: 8089;
};

# Audio Settings
# --------------
audio: {
	# input_enabled: true;
	input_format: "AAC";
	# input_bitrate: 40;
	# input_sample_rate: 16000;
	input_high_pass_filter: true;
	# input_agc_enabled: false;
	# input_vol: 80;
	input_gain: 23;
	# input_alc_gain: 0;
	# input_agc_target_level_dbfs: 10;
	# input_agc_compression_gain_db: 0;
	input_noise_suppression: 3;
	# force_stereo: false;
	output_enabled: true;
	# output_sample_rate: 16000;
};

# Motion Settings
# ---------------
motion: {
	enabled: false;
	# ivs_polling_timeout: 1000;
	# monitor_stream: 1;
	# script_path: "/usr/sbin/motion";
	# debounce_time: 0;
	# post_time: 0;
	cooldown_time: 5;
	# init_time: 5;
	# min_time: 1;
	sensitivity: 1;
	# skip_frame_count: 5;
	# frame_width: 1920;
	# frame_height: 1080;
	# roi_0_x: 0;
	# roi_0_y: 0;
	# roi_1_x: 1920;
	# roi_1_y: 1080;
	# roi_count: 1;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions