use cuda for mask

This commit is contained in:
2024-12-07 12:04:58 -08:00
parent ad5db644fa
commit 61d525dc83
3 changed files with 115 additions and 52 deletions

View File

@@ -18,7 +18,7 @@ output_folder="${input_file%.*}_segments"
mkdir -p "$output_folder"
# Split the video into segments using ffmpeg
ffmpeg -i "$input_file" -c copy -f segment -segment_time "$time" -reset_timestamps 1 "$output_folder/segment_%03d.mp4"
ffmpeg -i "$input_file" -force_key_frames "expr:gte(t,n_forced*5)" -c copy -f segment -segment_time "$time" -reset_timestamps 1 -copyts "$output_folder/segment_%03d.mp4"
# Change to the output folder
cd "$output_folder"