vinceau / project-clippi

An automation framework for Super Smash Bros. Melee. Detect an event → execute an action.
MIT License
143 stars 28 forks source link

Have Clippi remove black frames in videos #165

Open TheJaredWilcurt opened 1 year ago

TheJaredWilcurt commented 1 year ago

Clippi makes the combo JSON, Dolphin plays it back, and OBS records the playback. Makes sense, but Dolphin needs to take time to load up the stage and playback between each clip. So the recording will have black frames that need to be manually removed. FFMPEG can remove these automatically, but is too complex for most users to do without a GUI.

Resources:

Combining these two would probably work, but if you looked into FFMPEG's CLI switches documentation there is probably a simpler approach that just removes all black frames entirely in one go.

This would be a nice tool to add in to the sidebar in Clippi to save people time. Ultimately a good compilation will have good editing to chop out the boring bits and reorganize the action to be in a better order, but no matter what, EVERYONE will want the black frames removed, and it would be nice to build that tool in.

Note: FFMPEG has weird licensing. You'll need to have the user opt-in to downloading it themselves. Either by telling Clippi where it is located on disk, or by clicking a button in Clippi that automatically downlaods FFMPEG into Clippi's folder (this is what ScreenToGif and many other tools do).

TheJaredWilcurt commented 1 year ago

This would also open the door for other video automations. For example. It would be nice to just point to a video as an input, a folder as an output, click a button and it splits it up into a bunch of clips based on black frames, then removes the black frames from each clip. Then you could just drag them into a time line in Resolve, reorder them, and tighten them up. Would make the process really efficient and painless.

TheJaredWilcurt commented 1 year ago

I realize I've proposed a solution instead of explaining the need (fundamental UX error).

My ideal tool would take the clips that Clippi has found, then generate separate video files for each clip with file names like:

Those video files would not have any dead frames at the start or end. So they could be reviewed, deleted, sorted, posted directly to social media, or dragged into a time line in a video editor.

vinceau commented 1 year ago

Have you followed this replay guide? If you have pausing enabled in OBS it should be able to record your videos without the black frames in between.

If you want to have all your indivual clips recorded separately you can also do that by clicking record as separate clips. If you want the MP4 files to also have the same name as the SLP you can also enable this experimental setting under Playback (assuming you've already renamed all your SLP files beforehand):

Screenshot 2023-03-07 at 13 13 18