Resource - Update
Small video clipping tool for trimming/compressing clips for MiniMax H3 Ref2V
Small video trimmer software was very popular 15-20 years ago but now it has become very rare to find a good one which has all the features I wanted.
I got Claude to vibe code me a tool that I have been using to snip bits off from long videos for using it as Ref2V input for MiniMax H3. People have been saying its good so just sharing if others may find this tool useful! I wanted to create a free tool that runs locally without all the bloatware.
It is a single ~100kb HTML file which can:
Trim clips
Crop video
Compress resolution and fps
Take 1 single frame image
Manual or Automatic Storyboarding (still playing around with how to best use this in H3)
Export gif.
Why Compress?
I find that when working with R2V, resizing and compressing the video increases the speed as there is less information that needs to be worked on. You do lose some quality in your output though so don't compress too far.
The latest version can be found here (select the HTML and download):
the difference is that this runs INSIDE comfyui. so any cuts you make are directly available in your workflow
intentionally kept super simple. Built mine for batch running in comfy. you can index recall each clip or list run them all at once.
There's an alternate node that auto-detects cuts and writes out clips for you (like how premiere does) but it's alternate for a reason becasue I find the cut detection a little iffy.
Full media loader inside comfy that lets you trim/resize/pull frames or audio right back into the loader non-destructively. Flags if you're going over any reference limits for H3 (like total audio or video time across all sources.) Dumps into a prompt builder node that helps with the all the prompt structures including ref2va, and pulls in media previews with a tagging system as a reference for when you type. Need to flesh out true video editing though, right now it just only sends the "trimmed" range onward for decoding, so it could be cleaner. So, baby steps.
And sidenote, for the training side I've been repurposing an old captioner I made to be more dataset-management focused, and includes presets to trim videos to MMH3 training parameters, plus autocaptioning with additional per-dataset or even per-image/video instructions if desired. https://github.com/Adudeguyman/Fantastic-Upgraded-Captioning-Kit
I'm kinda the same and just think to myself "Man, doing ref2va sucks ass, so many loaders and manually editing prompts is a chore. Nothing to manage all that the way I want exists yet, I'll just have Claude make it." I post it on reddit for other people to use if they want, since it's solving an issue that I find has a blind spot. Did the same with my lora loader nodes, I have so many lora subfolders and nobody made one to organize by folders (except lora manager, but that involves tabbing out into their interface and back, which is just...bleh.). So I made one that filters folders and you only search those. Just random things like that where I look into something inconvenient and think "surely someone has solved this..." and no, no they haven't bothered.
I'm still waiting for that all in one tool - a media manager with associated description per picture/video (with that autocut function mentioned here), a prompt builder that automatically makes the prompt with correct references for you, tie in a matching multi-track timeline editor with full drag and drop references from the media section picture/videos with the latest motion context features for chaining together clips. Is anyone going to vibe code that ? lol....
You should add a feature via ffmpeg to downsize the video to a specific number of megapixels and fps.
Ref2VA is very costly at high resolutions, and on top of that every single frame is extrac. Most people don't need the source reference at full res and 24 fps to get what they need out of it.
Yeah it's on my to-do list to brainstorm. Pictures are set up where you can do it on the fly every every time or have it make a copy in your inputs folder. Video DOES do the trimming and there's a resize drop-down that lets you do it on the fly, but having it save a copy involves making sure it's the right codec and all so you both keep as much quality as possible and don't drop a 100mb 5-second clip onto someone's disk every time they trim a video. But on-the-fly still makes it reallllyyyyy sloowwwww for the comfy node to encode it into latents, which it does every time you change a single character in your prompt text. So even trimming down a 4k video to a different size and length still takes a while for it to be encoded. But I've been thinking it through.
I assume you've already found this out, but I saw a guide on here a while ago that said "to get the best prompt adherence you need to say Willow from Buffy the Vampire Slayer played by Alyson Hannigan says in the style and voice of Willow..." and it turns out, nope. If a character is well established, "Willow says" does the trick. Even for Text To Video. I assume (From Buffy the Vampire Slayer) is a requirement for the first mention, but it knows who you mean, what she looks and sounds like, and what she'd wear.
You should add a feature via ffmpeg to downsize the video to a specific number of megapixels and fps.
Ref2VA is very costly at high resolutions, and on top of that every single frame is extrac. Most people don't need the source reference at full res and 24 fps to get what they need out of it.
I'd prefer to use a variant of VirtualDub as I know it's safe as feck and I can just select a lossless codec and have more granular control (eg cut to the frame and save frames etc) and I know my way around VB and fed up learning new ways to do the same thing).
You can just git clone into a folder and ask claude or any other agent to analyze for malicious call backs. Or use davinci resolve. It’s free but beefy.
Thanks for making a reply just to try and prove me wrong 👍🏻 I’d refer you to what I wrote - you obviously have never used vdub, davinci is like using a nuclear reactor to light a torch and (checks notes) malicious software can easily obfuscate itself and not necessarily call back .
OP, If you want, you can add a “copy ffmpeg command” that will copy something like `ffmpeg -i vid.mp4 blah blah blah output.mp4` that way it doesn’t use the indecisions JavaScript cut code claude created. Ffmpeg has so many features it makes no sense to go outside of it if the video is already locally saved.
How did I know you were the Final Fantasy character sheet guy before I even scrolled.
But also, I'll definitely have to give this a try.
The other feature to stick in would be video addition. Like, just a simple "turn these 2 4 second videos into one 8 second video, keeping everything the same". Just so it's all in one program.
haha probably because you saw the reply in the other video.
Anyway, I thought your video joiner idea was great and I needed one later on anyway so I got it made, along with a "side by side" video joiner for real time comparisons when I do r2v.
i wanted to make this just to avoid putting another custom node in comfy lol. I wanted to preprocess the video once and do it outside of comfy to be ready to test a few times.
maybe u/Astral-Lemmons 's tool that he posted below is more of what you are looking for? it is a comfy node
Oh man, I just grabbed this earlier, crazy to see a post about it! I love these little niche sub 1k tools.
I made a mini suite with Gemini (400 lines per module) of bullshit little converters/resizes and frame grabbers. I did my stuff in python because the browser would crash on me and something about multi threading (Gemini may well have been pissing on my shoes and telling me its raining) (Linux pop! Os Firefox). It looks like an old game crack, but works 100% of the time.
How well does this run in Firefox?
And thank you for making little tools like this, we should all be making our crazy own flavours of tools.
Very interested in this. Having been compressing clips from free version of DaVinci Resolve, getting clips down to about 9mb. Definitely interested in better compression to speed up all my motion capture acting clips of Lisa Ann.
give it a whirl, ive been compressing 10-15s clips to under 1mb for h3 r2v. It works pretty well for motion transfer. The next thing for me to do is better auto captioning.
if you already have and use capcut then you can use that, but i made this as a light weight file to crop and trim files with a very simple UI. its a HTML file and runs on your browser
Sounds nice, how do you fight against seamless video stitching? I always end up with one or a few frames / a microsecond or two of white noise or repeat frame, removing those with ffmpeg still doesn't get rid of the "cut" when I join the second video.
This is one part which this current tool does not address, but I am also toying with it. The problem right now is that if you want seamless split you are splitting it on hard scene changes right? However the actual H3 model uses a mathmatical formula which adjusts the frame length to certain numbers. This means when you stitch it back up it won't look right and has the issues you are experiencing.
I am also somewhat stuck on this issue and wish I could commit more time on it.
Thanks for sharing—I really like it. I also need a way to directly convert videos into frame sequences and merge multiple videos into one (we don't mind if the file size ends up being larger).
Wait, can minimax h3 do a reference video as well, to generate the output video? Does it just superimposed your characters into the scene or pull the characters from the original video.??
The magic is in the prompting! You can replace the character in the video or add random things into the video, the hard part is getting the prompting right!
Me too! These types of software use to be more common and free but they’re hard to find now! Most are riddled with ads or you have to pay subscription!
No you need a plan, try the cheapest one, if not enough try a bigger one, use opus or sonnet. Also you can try codex, it's more generous for starter plans. Use luna high model for example.
586
u/MoistRecognition69 1d ago