FR: Target Specific Area
akeslo opened this issue · comments
Great Scripts! Is it at all possible to target a specific area of the frame for watermark removal? For example, if the video has 2 watermarks, one on top and one on the bottom of the frame and I want to remove only the one on the bottom?
Thanks!
Thanks, no it's not directly possible with this script. However if you don't need something super high quality, you could try something like:
- Extract the top watermark that you want to keep
- Process the full video
- Add back the watermark on the processed video
It would look like that with ffmpeg (not tested sorry):
# Get the top-right 200px (just a guess, adjust for your video)
ffmpeg -i input.mp4 -filter:v "crop=200:200:x=(iw-200):y=0" cropped_watermark.mp4
# Remove both watermarks
./remove_watermark.sh input.mp4 processed.mp4
# Add back the top one
ffmpeg -i processed.mp4 -i cropped_watermark.mp4 -filter_complex "overlay=W-w:H-h" output.mp4