[Feature] Video Export Support with Source Image Embedding#975
[Feature] Video Export Support with Source Image Embedding#975deepbeepmeep merged 0 commit intodeepbeepmeep:mainfrom
Conversation
|
What's the purpose of including an image extractor for mvk specifically? I'd much rather add mkv support to mutagen than use ffmpeg via command line and externally move metadata between temp file locations tbh. There's already a PR for it about a year ago, it just wasn't accepted yet. If there's anything left to do, that seems like a job where AI could really help. |
|
Thanks for the comment. I will check out the other PR. I removed the terminal stuff. I saw ffmpeg is a dependency anyways (it's in requirements.txt) so i figured I'd use that. P.S.: I can't seem to find the PR you are referring to. Can you point me to it? |
9a9e8dc to
9aa99b7
Compare
I used mutagen for the mp4 metadata reading/writing. It's right above where you do the ffmpeg commands. Went through a ton of libraries and that was the best by far. No mkv support though, so I'll see if I can add it |
8edf0af to
de8cfff
Compare
I switched to mutagen for embedding images into mp4 now. Thank you for that suggestion. I disabled mkv support. I am keeping the back-end code for mkv support however but do not expose it to the GUI frontend for now. |
|
I've added mkv support to mutagen. There wasn't much to use in that PR so I just built a new one from scratch. |
|
I got why you were adding mkv support, but I don't understand the point of the embedding images into the mp4. Unless I'm missing something? |
As you know you can apply the generation settings from a previously generated video by dragging it to the UI. With this feature it is now possible to repeat/tweak a previous generation for i2v as well, because the image can be stored with the video and not only the settings metadata. So when you now drag a video to the UI not only will the settings and seed of the previous video be restored but also the image(s) used for the i2v generation. |
Thank you! I think I will wait until this PR gets accepted/merged and then do a separate PR enabling mkv support. |
Oh that's actually pretty useful. I was trying to do something like that a while back but dismissed doing it in metadata because I assumed cover art would be pretty low res and base64 would take up space |
yea turns out there is no quality loss and i tried attaching up to 16kx16kx images and even that works |
|
Thanx, this is a useful feature ! As few obsevations:
|
I was thinking about this the other day. Since we've split tabs into their own functions, we could always have them in separate modules. It would've been a bit annoying before, but at >500kb, that would probably just be more manageable. I've dumped a lot of random functions in there for the queue too, we can make those utility modules or something. It's much easier to do that and not trip something with the html-based queue. |
Yes, I have realized that wgp.py needs a refactor ;) I will refactor out my portion no problem. |
|
refactor done, ready to merge |
|
Many thanks for your work. I havent merged it directly as it seems the AI created a couple useless stuff (and missed some bugs) but it is now the v9 branch ! Congrats |
All code and this PR description was generated by AI.
🎯 Key Benefit
Enable Complete i2v Generation Repeatability: This feature allows users to fully reproduce previous image-to-video (i2v) generations by storing source images alongside video files. When you drag a previously generated video back to the UI, not only will the generation settings and seed be restored, but also the original source image(s) used for i2v generation - enabling perfect reproduction and tweaking of previous generations.
🚀 Overview
This PR adds support for embedding source images into MP4 video files using the mutagen library, solving the challenge of preserving source images for i2v workflow repeatability.
✨ New Feature
MP4 Image Embedding
🔧 Implementation
🎯 Benefits
📋 Usage
This feature provides a modern, widely-compatible way to store source images alongside generated videos, enabling complete reproducibility of i2v generations.