forked from LiveCarta/ContentGeneration
Video generation pipelines files added
This commit is contained in:
22
concat_merged.sh
Normal file
22
concat_merged.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Concatenates all merged/merged_n.mp4 into final_output.mp4
|
||||
|
||||
BASE_DIR="/home/madina/projects/short_videos"
|
||||
MERGED_DIR="$BASE_DIR/merged"
|
||||
OUTPUT="$BASE_DIR/results/run_3/final_output.mp4"
|
||||
FILELIST=$(mktemp /tmp/filelist_XXXXXX.txt)
|
||||
|
||||
# Build file list sorted by shot number
|
||||
for video in $(ls "$MERGED_DIR"/merged_*.mp4 | sort -t_ -k2 -n); do
|
||||
echo "file '$video'" >> "$FILELIST"
|
||||
done
|
||||
|
||||
echo "Concatenating the following files:"
|
||||
cat "$FILELIST"
|
||||
|
||||
ffmpeg -f concat -safe 0 -i "$FILELIST" -c copy -y "$OUTPUT"
|
||||
|
||||
rm -f "$FILELIST"
|
||||
echo ""
|
||||
echo "Done"
|
||||
Reference in New Issue
Block a user