Merge pull request #49 from outis1one/claude/fix-mvt-video-playback-NhFjs
4-seasons: fix VFR pause/jump in daily MVT clips
This commit is contained in:
+4
-2
@@ -135,8 +135,10 @@ if [ "${#images[@]}" -eq 0 ]; then
|
||||
fi
|
||||
|
||||
for img in "${images[@]}"; do
|
||||
printf "file '%s'\n" "$img"
|
||||
printf "file '%s'\nduration 0.04\n" "$img"
|
||||
done > "$temp_file"
|
||||
# ffmpeg concat demuxer requires a final entry with no duration for image files
|
||||
printf "file '%s'\n" "${images[-1]}" >> "$temp_file"
|
||||
|
||||
# ── Step 1: Build raw video ───────────────────────────────────────────────────
|
||||
echo "Step 1/2: encoding raw video from ${#images[@]} frames..."
|
||||
@@ -155,7 +157,7 @@ echo "Step 2/2: speed factor $speed_factor..."
|
||||
final_file="$output_dir/${CAM_NAME}-${yesterday}_Mvt${MVT_NUM}-Day${DAY_OF_MVT}of${DAYS_IN_MVT}-final.mp4"
|
||||
if ! ffmpeg -loglevel warning \
|
||||
-i "$temp_video" \
|
||||
-vf "setpts=PTS/$speed_factor" \
|
||||
-vf "setpts=PTS/$speed_factor,fps=25" \
|
||||
-c:v libx264 -pix_fmt yuv420p -preset "$ENCODE_PRESET" -crf "$CRF_SEASONS_FINAL" \
|
||||
-t "$target_per_clip" -an \
|
||||
-y "$final_file"; then
|
||||
|
||||
Reference in New Issue
Block a user