This commit is contained in:
rozbrian
2026-01-10 20:46:22 +09:00
commit 304cbcc554
66 changed files with 1291 additions and 0 deletions

26
ffmpeg_cut Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Check if all required arguments are provided
if [ $# -lt 4 ]; then
echo "Usage: $0 <input_file> <output_file> <start_time> <duration>"
echo ""
echo "Arguments:"
echo " <input_file> Path to the input video file."
echo " <output_file> Path to the output video file."
echo " <start_time> Start time in format HH:MM:SS or seconds."
echo " <duration> Duration of the segment in format HH:MM:SS or seconds."
echo ""
echo "Example:"
echo " $0 input.mp4 output.mp4 00:01:00 30"
echo ""
exit 1
fi
# Assign input arguments to variables
input_file=$1
output_file=$2
start_time=$3
duration=$4
# Run ffmpeg command
ffmpeg -i "$input_file" -ss "$start_time" -t "$duration" -vcodec copy -acodec copy "$output_file"