Hello Dear forum users. I have a question. Is it possible to find marks on the video. I know that there are marks in several places on the video with the length of one frame of the video. I know how the mark looks like, it is a set of a few numbers and I know them. Is it possible to find them, any program or script.
+ Reply to Thread
Results 1 to 18 of 18
Do they ever change location ?
Do they ever change appearance /color ? Opaque or semi-transparent ?
How large ?
It's best if you provide some sample videos. Or at least images.
The label can be in any place, the color can also be any color. The video marks 0:02:36.05
AviSynth's RemoveDirt() or RemoveDirtMC() can remove that particular mark. Here's the same frame after RemoveDirt(5,false)
[Attachment 68684 - Click to enlarge]
If you're only looking at finding them (for example printing a list of frames that have a mark) one can do that too. It may not be 100 percent accurate though (some false positives and some false negatives). And it may not work if the mark appears right over a moving part of the picture (the man's hands, for example).
Last edited by jagabo; 14th Jan 2023 at 12:56.
I need a way to find these tags . Here is the tags I was looking for looking at each frame to show which tags I need to find.
Last edited by bosyk; 15th Jan 2023 at 07:05.
Here's an AviSynth+ script that finds the frame in the sample video:
source = LSMASHVideoSource("tags.mp4") # mark on frame 4685 source = source.Blur(1.0) RemoveDirtMC(source, 10, false) mt_lutxy(source, last, mt_polish("abs(x-y)"), chroma="-128") ColorYUV(gain_y=1000, off_y=-100) WriteFileIf(last, "match.txt", "AverageLuma>0.010", "current_frame", """ " : " """, "AverageLuma", append=false) ScriptClip(last, "Subtitle(String(AverageLuma))") prefetch(4)
102 : 0.014081 4685 : 0.037033 17445 : 0.010202
You can run the script by opening it in VirtualDub (File -> Open Video File) and selecting File -> Run Video Analysis Pass. Or drag/drop it onto a batch file that uses ffmpeg to read every frame:
time /T ffmpeg -loglevel fatal -i %1 -c copy -f null - time /T pause
Thank you very much. It's a bit complicated for me, but we'll study and figure it out.
I couldn't figure it out. Can you show in more detail, step by step, the steps to find and remove tags.
Thank you in advance.
How far did you get?
Installed all programs. The problem was writing a script to process AviSynth correctly.
Last edited by bosyk; 23rd Sep 2023 at 15:08.
As I understand it, you used this script knowing the location of one mark:
source = LSMASHVideoSource("tags.mp4") # mark on frame 4685
source = source.Blur(1.0)
What if the location is not known?
When I tried to paste this code I got an error:
Avisynth open failure:
Script error: There is no fundion named
(C:\Users\bosyk\0esktop\dir.avs, line 1)
AviSynth where the mark is. I put it there so I would remember where the mark is to verify the script is working properly.
Put LSMASHSource.dll from the x86 folder in AviSynth+'s plugins+ folder. Put LSMASHSource.dll from the x64 folder in AviSynth+'s plugins64+ folder.
You will also need the MaskTools2 package:
Like with LSMASH, put the dll files in their respective folders.
And you will need the RemoveDirtMC() function. There are many variations of this filter. The one I used is attached. Unzip the .avsi file and put a copy in each of the two plugins folders. It was derived from this post:
In turn, RemoveDirtMC requires several other third party filters. You will get similar error messages. Find, download, and install them as above. Yes, getting all this set up is a pain.
Sorry to bother you, but now a new error is popping up. I insert any script
AVI Import Filter errorUnknown)(80040154)
I forgot to write, I have Win7 64bit.
Avisynth then re-installing it fixed the issue. Did you install 64 bit AviSynth+? Or 32 bit AviSynth+? Or an older version of AviSynth (not plus). I recommend using 64 bit AviSynth+.
Also, try running Avs Info Tool to check your installation. Note any warnings or errors that it gives.