majestic icon indicating copy to clipboard operation
majestic copied to clipboard

Records.path parameters

Open mikecarr opened this issue 1 year ago • 1 comments

In Fpv system, because it cannot connect to ntp server, the files keep writing to the same file. Are there any parameters we can put in the file to make each one unique?

mikecarr avatar Mar 31 '25 04:03 mikecarr

In newer versions, you can set majestic.yaml records.notime to true. This will allow video files to be numbered instead of time.

records: enabled: true path: /mnt/mmcblk0p1/%F split: 1 maxUsage: 95 notime: true

In older versions, you can add a script to the system startup script /etc/rc.local to scan the files on the storage card and modify the system time based on the latest file time to avoid file overlap.

target_dir="/mnt/mmcblk0p1" [ ! -d "$target_dir" ] && echo "not find" && exit 0

latest_time=$(find "$target_dir" -exec stat -c '%Y' {} ; 2>/dev/null | sort -nr | head -1) [ -z "$latest_time" ] && echo "no sub dir" && exit 0 echo latest_time $latest_time

current_time=$(date +%s) echo current_time $current_time

if [ "$latest_time" -gt "$current_time" ]; then date -s "@$latest_time" >/dev/null && echo "ok" || echo "fail" fi

robin-debug avatar Jul 14 '25 10:07 robin-debug