This is part four of a four-part series on media editing for live performance. Start with part one, or catch up on part two and part three.
You should now have a 03-selects folder full of named, banked clips. They're good clips. They might still be the wrong shape for the machine that has to play them.
Conform the keepers
If everything came from one source through scene-cut, the clips already share a codec, pixel format and audio layout. Skip this step. If you're mixing sources, or your rig expects a particular resolution and frame rate, conform them:
mkdir -p 04-ready
for f in 03-selects/*/*.mp4; do
out="04-ready/$(basename "$f")"
ffmpeg -y -i "$f" \
-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,fps=30,format=yuv420p" \
-c:v libx264 -profile:v high -crf 19 -preset medium \
-movflags +faststart -an "$out"
done
scale plus pad letterboxes rather than stretches. If you'd rather fill the frame, use crop instead of pad and accept that you're losing the edges. fps=30 conforms everything to the rig; use 60 if that's what your output runs at. -crf 19 is a quality choice, not a rule. Bigger screens and darker rooms forgive less compression.
-an strips the audio. For visual-only work that's what you want; a stray burst of source audio in the middle of a set is a special kind of awful. If your player insists on an audio stream, drop -an, keep the source audio and mute it in the player, or add a silent track.
The point of this pass is not to make the files pretty. It's to make them boring. Every clip should have the same resolution, frame rate, pixel format and audio behaviour, so the player never has to think about what it's opening.
It also makes the clips mergeable later. If every clip shares a resolution and frame rate, a stream-copy concat will work without re-encoding, which is exactly what the merge script in the Video Editing post expects.
Rehearse on the rig
Copy 04-ready to the show drive. Not the source, not the project folder. Plug it into the machine you'll actually use, and play every clip. Check the first frame, the last frame, the loop point, and whether the player stutters when you trigger two clips at once. A clip that stutters in rehearsal is a clip that stutters on stage.
Keep a second copy of the folder. The Video Editing post says "back up your clips kids", and this is that advice applied to the show drive. Drives die in the most dramatic way possible, usually during the second song.
A few things worth testing specifically:
- The first frame. Does the clip open on the image you expect, or does it flash a frame from the previous scene?
- The last frame. Does it end cleanly, or does it hold a frozen frame that looks like a mistake?
- The loop point. If you're looping textures, does the join click, jump or drift?
- Two clips at once. If your set layers sources, trigger a pair and watch for dropped frames.
- The venue's cable. Test the actual HDMI/SDI chain if you can. A clip that plays perfectly on the laptop can still fail at the projector.
The sharp edges
A few things I've learned the hard way, specific to the versions I have:
scene-timeoutputsstart,duration, notstart,end. If you hand-edit the cutlist, remember which one you're editing.- Use the default sexagesimal (
HH:MM:SS) output. A cutlist made withscene-detect -f seccuts correctly, but the end time in the generated filename can come out as00:00:00. The clip is fine; the name is a lie. If you want readable names, stick to the default. scene-imagewants the detection file, not the cutlist. Feed it the CSV and it will fail to make new images, with errors that are easy to miss in the scroll.- Range detection can duplicate the end timestamp. Dedupe before
scene-timeor you'll get a zero-length clip. - Both
-sand-eare required for a range. The script won't accept one on its own. - Filenames contain brackets. Quote them in the shell, or your glob will have a bad time.
- Fades and dissolves are not hard cuts. The detector may give you one long scene with a strange middle. Cut those by hand if they matter.
scene-cutis a re-encode, not a copy. A long source with a lot of cuts takes time. Start it before dinner.
The mechanical part, end to end
From the folder that contains show:
cd show
scene-detect -i 00-source/source.mp4 -t 0.25 -o 01-scenes/scenes.txt
awk '!seen[$0]++' 01-scenes/scenes.txt > 01-scenes/scenes-clean.txt
scene-time -i 01-scenes/scenes-clean.txt -o 01-scenes/cutlist.txt
cd 02-clips
scene-cut -i ../00-source/source.mp4 -c ../01-scenes/cutlist.txt
cd ..
Then the human part: look at the contact sheet, cut the list down, rename the keepers into banks, conform them for the rig, and rehearse. The scripts get you from two hours to two hundred candidates. The rest is taste.
If you need material to cut up, start with Video Sources.
The scripts are by NapoleonWils0n, released under BSD-3-Clause. The Rust port is here. If they save you an evening, tell him.
Now go and cut up something long.
The series: 1. Media Editing · 2. Finding the Cuts · 3. Cutting, Culling and Naming · 4. Performance-Ready Clips