Two video filters I would really like to see

Started by Who, December 05, 2021, 04:04:22 PM

Previous topic - Next topic

Who

I may have asked about these before in the distant past, but if so they have fallen through the cracks, and they are still things that would be really useful to me.  I am not a coder, so there is no way I could make anything like these, but I have to think they should not be that difficult.  Note that I would want the to operate on video only, and not touch the original audio at all:

Proposed video filter #1:  Frame by frame replacement

Let's say there are series of frames in your original video that are not so great, and you'd like to replace them.  If you want to replace them with a still image from a png, jpeg, etc. Avidemux can do that.  But what if you want to replace it with a short section of video that has the same geometry as the video being edited?  No way to do that currently.  What I would propose is a filter that lets you specify a starting point and an optional ending point, and for that duration replaces the video frames with frames from a different video file (what I will refer to as the replacement video file), starting with the first frame in the replacement video file and ending with the last frame in the replacement video file, or when the specified ending point is reached, whichever comes first.  Any audio in the replacement video file would be ignored (if I wanted the audio I could just concatenate the videos and then remove the parts I don't want).  For bonus points you could allow skipping the first n frames in the replacement video file but that is not strictly necessary since you can edit that file down to exactly the frames you need in a separate operation (it would make the filter more convenient to use in some situations though).

Proposed video filter #2:  Vertical scroll through static image

For this one you would have a static image (in png, jpeg, etc. format) that is larger in size vertically than the geometry of the video, for example if the video was 1920x1080 the image might be 1920x10000.  You'd specify the start and end times (or maybe start time and duration if that is easier), and during that period it would start by taking the top 1920x1080 of the image, then progressively moving downward until at the end the last frame would be the bottom 1920x1080 of the image.  The most obvious use would be creating a credits scroll or fixing issues in an existing one (such as you misspelled something), but there could be other uses for special effects. Again, this would only replace the video for the specified duration, but would not touch the original audio.

The common thing here is that rather than replace a section of video with a single static image, you could replace a section of video with something that has motion to it.  As far as I know, neither of these things are currently possible in Avidemux.  Please don't suggest anything that involves separating the audio and video tracks, editing just the video, and then re-joining the audio and video, because every time I have ever tried that the end result was that the audio and video were slightly but noticeably out of sync, and it made the whole thing unusable.  And even if that worked, it would be a much more difficult and error-prone operation.

szlldm

The first one could be achived with the "Add logo" filter, if we make it capable to handle image sequences. In this case the replacement video segment should be saved from a selection with "Save Selection as JPEG".
I think it's doable.

The second one is problematic, i fear it can not load that large image.

Who

#2
Quote from: szlldm on December 05, 2021, 06:30:35 PMThe first one could be achived with the "Add logo" filter, if we make it capable to handle image sequences. In this case the replacement video segment should be saved from a selection with "Save Selection as JPEG".
I think it's doable.

Great, that'd good to hear.  Just out of curiosity would you be limited to JPEG, or could you use PNG also?  I only ask because you tend to see compression artifacts in JPEG much more than in PNG, although I do realize that the tradeoff is that PNG files tend to be larger. If there is a reason to limit it to JPEG that's fine, I'd just hope that the minimum amount of compression is applied (that will produce image file sizes that aren't totally outrageous).

Quote from: szlldm on December 05, 2021, 06:30:35 PMThe second one is problematic, i fear it can not load that large image.

That's okay, if that's too large than really any size greater than the current vertical dimension would be helpful in some cases.  For example if you could only use a 1920x2160 (2160 = 2X1080) image that would be enough to scroll through two complete screens, and if necessary I could create a second image for additional scrolling.  I had only mentioned that 10000 dimension as an example, but it would be very rare that I'd actually need to use an image that large. Naturally the larger you could go the more situations in which this might be useful, but if 1920x2160 is doable that would probably be sufficient for 99% of my use cases.

szlldm

I think the credit scroll could be achived with the "SSA/ASS/SRT" subtitle filter, using a prepared ASS subtitle file.
Example:

Who

Quote from: szlldm on December 06, 2021, 01:30:26 AMI think the credit scroll could be achived with the "SSA/ASS/SRT" subtitle filter, using a prepared ASS subtitle file.
Unfortunately, for what I am wanting to do that would not work at all, because that would only allow scrolling text, also even if I were wanting to generate credits from typed-in text it seems like it would be really hard to control the font size, color, position, and scrolling speed using that method. None of the examples in the video came even remotely close to what I had in mind. What I would really like is to be able to scroll vertically through an image that may in some cases contain images or graphics, not just text.  I only used the idea of scrolling credits as a common example of how this filter could be useful, and didn't mean to imply that generating credits from text was the ultimate end goal.  Sorry if that example misled you.

alexstorm

After Effects from Adobe, even the old versions, can easily handle the tracking over a larger image and almost any type of scrolling titles or title animation - transition effects.  You can choose to output to any format including sequential jpg images.

Similar full editing software can also do it, but I think After Effects has the most flexability.  The downside is it's a steep learning curve, but just tracking over images is not so tricky.  When I do match move images layering for production, like a opening TV titel sequence,  I just use After effect and delivery the results in uncompressed tifs.  The client can insert that into any video they want with video editor software.

To add to a file you are working on with AVIDemux, you would just first convert the uncompresssed video or image sequence to match exactly the codec and size of the video you want to insert the clip.

It's also a good idea to get the highest quality master of the main video that you are adding to, so when you convert your image tracking title sequence + the long media content together, they are encoded together to your end goal codec compression and you shouldn't have an edit glitches.

Wow, I hope that makes sense and applies to what you are trying to do.