diff --git a/notebooks/rvm_get_frames.sh b/notebooks/rvm_get_frames.sh index 5ceeff2..a3181ae 100755 --- a/notebooks/rvm_get_frames.sh +++ b/notebooks/rvm_get_frames.sh @@ -13,7 +13,7 @@ output_folder="$1" for segment_dir in "$output_folder"/segment_*; do if [ -d "$segment_dir" ]; then # Find the output_N.mp4 file in the segment folder - segment_file=$(find "$segment_dir" -name "output_*.mp4" -print -quit) + segment_file=$(find "$segment_dir" -name "segment_*.mp4" -print -quit) if [ -n "$segment_file" ]; then # Create the frames directory diff --git a/notebooks/rvm_split_seconds.sh b/notebooks/rvm_split_seconds.sh index aa45252..dc143cd 100755 --- a/notebooks/rvm_split_seconds.sh +++ b/notebooks/rvm_split_seconds.sh @@ -18,14 +18,14 @@ 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/output_%03d.mp4" +ffmpeg -i "$input_file" -c copy -f segment -segment_time "$time" -reset_timestamps 1 "$output_folder/segment_%03d.mp4" # Change to the output folder cd "$output_folder" # Create a file list for the segments and move each segment to its own folder counter=1 -for segment in output_*.mp4; do +for segment in segment_*.mp4; do segment_folder="segment_$counter" mkdir -p "$segment_folder" mv "$segment" "$segment_folder/"