summaryrefslogtreecommitdiff
path: root/ar/.local/bin/concatvideo
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-05-02 19:41:27 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-05-02 19:41:27 +0900
commit5dcf75654cfb2b8d05e67b3769a17cce92fa0d15 (patch)
tree61d94e57dac60981227fc984e6014298c9b3f55f /ar/.local/bin/concatvideo
parentca495a07901065a973cfc141fe867da1cf248298 (diff)
deleted bin/concatvideo, deleted bin/cutvideo, modified bin/iwaf
Diffstat (limited to 'ar/.local/bin/concatvideo')
-rwxr-xr-xar/.local/bin/concatvideo56
1 files changed, 0 insertions, 56 deletions
diff --git a/ar/.local/bin/concatvideo b/ar/.local/bin/concatvideo
deleted file mode 100755
index 93a2060..0000000
--- a/ar/.local/bin/concatvideo
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-usage() {
- echo "Combine multiple video files that share the same pattern and extension"
- echo "into a single video file."
- echo ""
- echo "Usage: ${0##*/} <base filename>"
- echo ""
- echo "Arguments:"
- echo " <base filename>: The name of one of the video files to use as a pattern."
- echo " For example, if your files are named video_cut1.mp4,"
- echo " video_cut2.mp4, you can provide video_cut1.mp4."
- echo ""
- echo "Example:"
- echo " ${0##*/} video_cut.mp4"
- echo " This will combine all files matching video_cut*.mp4 into a single file."
- exit 1
-}
-
-# Check if the correct number of arguments are provided
-if [ $# -ne 1 ]; then
- usage
-fi
-
-# Extract the pattern and extension from the input filename
-input_file="$1"
-pattern="${input_file%.*}" # This removes the extension
-extension="${input_file##*.}" # This extracts the extension
-
-# Find all video files matching the generated pattern and extension
-video_files=$(ls "${pattern}"*."${extension}" 2>/dev/null)
-
-# Check if any files are found
-if [ -z "$video_files" ]; then
- echo "No video files found with the pattern '${pattern}*.${extension}'."
- exit 1
-fi
-
-# Create a temporary file list for ffmpeg
-file_list=$(mktemp)
-
-# Populate the file list with the found video files, properly quoting each full path
-for video in "${pattern}"*."${extension}"; do
- full_path=$(realpath "$video")
- echo "file '$full_path'" >>"$file_list"
-done
-
-# Combine the videos into a single file using ffmpeg
-output_file="${pattern}_combine.${extension}"
-ffmpeg -f concat -safe 0 -i "$file_list" -c copy "$output_file" 2>/dev/null
-
-# Clean up the temporary file
-cat "$file_list"
-rm -f "$file_list"
-
-echo "All videos combined into '$output_file'."