I have a great copy of an old movie, that is encumbered with both English and Chinese subs, hard-coded in the bottom 15% of frame. I also have a fairish copy of the same movie, but without the HC subs. My 'bright' idea was to replace/overlay the bottom 15% of the great version, with the bottom 15% of the fairish version to enhance my visual pleasure. Of course, I've no idea what software I could use to achieve that, and am daunted by the task of manually combining each frame, so I'm turning to you kind souls for suggestions. Anything (free?) out there?
+ Reply to Thread
Results 1 to 9 of 9
-
-
Here's a precise command to accomplish this:
Command ExplanationCode:ffmpeg -i "great_version.mp4" -i "fair_version.mp4" -filter_complex \ "[1:v]crop=iw:ih*0.15:0:ih*0.85[bottom_crop],[0:v][bottom_crop]overlay=0:h*0.85:enable='between(t,0,99999)'" \ -c:a copy output_clean_video.mp4
- `-i "great_version.mp4"`: First input video (the great version with hardcoded subs)
- `-i "fair_version.mp4"`: Second input video (the fair version without subs)
- `-filter_complex`: Allows complex video filtering
Filtering Breakdown
- `[1:v]crop=iw:ih*0.15:0:ih*0.85[bottom_crop]`:
- Crops the bottom 15% of the fair version video
- `iw` (input width), `ih*0.15` (15% of input height)
- `0:ih*0.85` starts the crop from 85% of the height
- `[0:v][bottom_crop]overlay=0:h*0.85:enable='between(t,0,99999)'`:
- Overlays the cropped bottom section onto the great version
- `0:h*0.85` positions the overlay at the bottom 15%
- `enable='between(t,0,99999)'` ensures overlay for entire video duration
- `-c:a copy`: Copies audio without re-encoding
Important Note:
- Ensure both input videos have identical resolution and aspect ratio [DAR]. -
Good heavens, what an excellent reply. As soon as I can match those preconditions, and align the starting points (and maybe adjust contrast and brightness for good measure) I'll give it a whirl!
Now, where's that upvote button? Taking your lead: Happy Holidays ... Merry Christmas too!
)
-
Replace just subtitles. Can be done with Avisynth.
Last edited by VoodooFX; 19th Dec 2025 at 02:42.
-
We'll see if I encounter that obstacle; color probably not an issue on b&w movies.
In the meantime, VideoAI's post makes an excellent tutorial on things I'd never imagined that ffmpeg could do!
Since I've some experience with ffmpeg, and none with AVISynth, perhaps you could help an old feller out with a pertinent code snippet.
Confession: having tweaked the Contrast and brightness (by adding a filter in HandBrake) and running the result through my new TV's 'AI' processor, my duly impressed septuagenarian eyes might just skip the next steps until after the holidays. Though I did adjust frame size and frame rate, my ventures into trimming usually bolix up the first second or two; something to do with creating a reference frame at the start, I'm guessing!
-
-
In the simplest case:
The bot clip is likely to need framing and brightness/contrast adjustments before the overlay.Code:top = WhateverSource("filename1.ext") bot = WhateverSource("filename2.ext") bot = bot.Crop(0, some_vertical_offset, -0, -0) # remove the top part of the bottom clip Overlay(top, bot, y=some_vertical_offset) # Overlay the bot clip over the bottom of the top clip
As was pointed out by VoodooFX it might be possible (depending on the nature of the subs, for example, yellow subs on a black and white movie) to build a mask of the subtitles and automatically overlay only those areas when the subs are present. Some samples would help. I've done this in the past with AviSynth. -
I've done this a few times. It is MUCH easier to do using your NLE rather than some sort of hard-coded script. Multiple reasons. First, the two will never align so you will have to enlarge/shrink one of them, and also probably move it around until it matches. Second, it is a lot easier to make a mask for the portions of the lesser-quality video that you want to overlay if you can see it on the screen. Third, you will probably want to only do the overlay at certain points in the video. Finally, you will find that the two versions are cut differently. When I've done this, I found that one of the two copies was actually missing a few scenes.
Similar Threads
-
Movie with ghosting every 4 and 5 frame.
By dopethrone in forum RestorationReplies: 4Last Post: 7th Jun 2024, 22:22 -
Mp4Box - Output is generated without frame Width, frame height & frame rate
By Saptarshi in forum Newbie / General discussionsReplies: 0Last Post: 25th Nov 2022, 09:27 -
Which SBS format is the same as a Frame Packed movie?
By ebruce in forum Newbie / General discussionsReplies: 3Last Post: 2nd Oct 2021, 09:23 -
Combine Same parts of Videos with Better parts
By kucing in forum Newbie / General discussionsReplies: 15Last Post: 4th Sep 2021, 12:35 -
copying parts from the previous frame to the current one?
By romeo in forum RestorationReplies: 13Last Post: 30th May 2021, 13:57


Quote
