Bipack with fewer steps
This commit is contained in:
parent
8e8b96152c
commit
ca3afd4b24
|
@ -13,7 +13,6 @@ OUTPUT=${4}
|
|||
MATTE1=matte1.mov
|
||||
MATTE2=matte2.mov
|
||||
PASS1=pass1.mov
|
||||
PASS2=pass2.mov
|
||||
|
||||
echo "Generating mattes from $MATTE..."
|
||||
|
||||
|
@ -29,30 +28,21 @@ ffmpeg -y -i "$A" -i "$MATTE1" \
|
|||
-shortest \
|
||||
"$PASS1"
|
||||
|
||||
echo "Applying matte to $B..."
|
||||
|
||||
ffmpeg -y -i "$B" -i "$MATTE2" \
|
||||
-filter_complex 'color=0x000000:size=1280x720,format=rgb24[bla];[bla][0][1]maskedmerge' \
|
||||
-c:v prores_ks \
|
||||
-profile:v 4 \
|
||||
-shortest \
|
||||
"$PASS2"
|
||||
|
||||
echo "Cleaning up tmp matte files..."
|
||||
|
||||
rm "$MATTE1"
|
||||
rm "$MATTE2"
|
||||
|
||||
|
||||
echo "Combining matted layers together into $OUTPUT_FILE..."
|
||||
|
||||
ffmpeg -y -i "$PASS1" -i "$PASS2" \
|
||||
-filter_complex "[0][1]blend=all_mode='lighten'" \
|
||||
ffmpeg -y -i "$PASS1" -i "$B" -i "$MATTE2" \
|
||||
-filter_complex '[0][1][2]maskedmerge' \
|
||||
-c:v prores_ks \
|
||||
-profile:v 3 \
|
||||
-profile:v 4 \
|
||||
-shortest \
|
||||
"$OUTPUT"
|
||||
"${OUTPUT}"
|
||||
|
||||
echo "Cleaning up temp files..."
|
||||
|
||||
rm "$MATTE2"
|
||||
rm "$PASS1"
|
||||
rm "$PASS2"
|
Loading…
Reference in New Issue