Re-add video concatenate example
This commit is contained in:
parent
1342399791
commit
8cc578725f
|
@ -2,4 +2,5 @@ videos
|
||||||
output
|
output
|
||||||
frames
|
frames
|
||||||
node/node_modules
|
node/node_modules
|
||||||
*.pth
|
*.pth
|
||||||
|
videos.txt
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
#####################################################
|
||||||
|
#
|
||||||
|
# This script will concatenate two videos in order
|
||||||
|
# and output the new video as ProRes file.
|
||||||
|
#
|
||||||
|
# Usage: bash ffmpeg/basic/concat.sh <input video 1> <input video 2> <output video>
|
||||||
|
#
|
||||||
|
#####################################################
|
||||||
|
|
||||||
|
INPUT_1=`realpath "${1}"`
|
||||||
|
INPUT_2=`realpath "${2}"`
|
||||||
|
OUTPUT="${3}"
|
||||||
|
|
||||||
|
# Check if output file extension is .mov
|
||||||
|
if [[ "${OUTPUT}" != *".mov" ]]; then
|
||||||
|
echo "Please use an .mov extension on your output file argument"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "file '${INPUT_1}'" > videos.txt
|
||||||
|
echo "file '${INPUT_2}'" >> videos.txt
|
||||||
|
|
||||||
|
ffmpeg -f concat \
|
||||||
|
-safe 0 \
|
||||||
|
-i videos.txt \
|
||||||
|
-c:v prores_ks \
|
||||||
|
-profile:v 3 \
|
||||||
|
-c:a aac \
|
||||||
|
"${OUTPUT}"
|
||||||
|
|
||||||
|
# cleanup file list
|
||||||
|
rm -f videos.txt
|
Loading…
Reference in New Issue