Hello everyone.
I'm dealing with a video that has a lot of duplicate frames, thanks to that I need to use "DeleteFrame" and "InsertFrameMC" to correct it, because I already tried several automatic filters and none worked well.
The question is, me and a friend do not understand the language of avs to create the function, in vs it works, but it does not have some necessary filters for post-processing the video.
I'm trying to create a function that when inserting a certain frame, it will be deleted and interpolate the next one, without the need to repeat the filter over and over again.
For example:
The function would work as:Code:FFVideoSource(\\video.mkv) DeleteFrame(100) InsertFrameMC(101) DeleteFrame(123) InsertFrameMC(124) DeleteFrame(132) InsertFrameMC(133) DeleteFrame(147) InsertFrameMC(148)
In this example, frames 100, 123, 132 and 147 would be deleted and those listed above would be added with "InsertFrameMC".Code:FunctionAnyName(100, 123, 132, 147)
I appreciate the help.
Sorry for the explanation if it is confused.
+ Reply to Thread
Results 1 to 5 of 5
-
Last edited by Kuronoe; 23rd Jan 2021 at 08:32.
-
I think what you want has already been done. The function FillDrops takes duplicate frames and replaces them with frames interpolated from the frames on either side.
function filldrops (clip c)
{
super=MSuper(c,pel=2)
vfe=manalyse(super,truemotion=true,isb=false,delta =1)
vbe=manalyse(super,truemotion=true,isb=true,delta= 1)
filldrops = mflowinter(c,super,vbe,vfe,time=50)
fixed = ConditionalFilter(c, filldrops, c, "YDifferenceFromPrevious()", "lessthan", "0.5")
return fixed
}
It only needs MVTools2. -
Man, it worked really well in the video I'm working on here, I can't believe it, I usually did it manually.
I need to test on the other videos that I have this problem, it is usually NTSC> PAL conversion that causes this problem that I am seeing from the video making several jumps.
I tried Dedup, Dup and several others and nothing, this one did very well, I hope it works on the ones I left out.
Thank you very much. -
To do it manually (ie, in cases where filldrops() doesn't work -- like multiple duplicates in a row) use ReplaceFramesMC(), not DeleteFrame() and InsertFrameMC().
-
I remembered the problem I had with "filldrops" in the past. This filter blurs some scenes, especially non-panoramic scenes. This filter worked well in the panoramic scenes that I have, I am thinking of using it only in some sequences of frames with a map or trim() (I don't know if it will work, I need to test it), something like:
Code:FilterMap="[481 2049] [8007 9221]" #panoramic scenes FilterLine=Filldrops() ReplaceFramesSimple(FilterLine, mappings=FilterMap)
Thank for help, guys.
Similar Threads
-
Interpolate duplicates in hybrid video?
By embis2003 in forum RestorationReplies: 5Last Post: 22nd Mar 2020, 11:39 -
Patch encoder to force P-Frames to only reference I-Frames
By zombiitv in forum ProgrammingReplies: 1Last Post: 9th Sep 2019, 21:51 -
Add logo from X frames to X Frames
By sulkiyan in forum EditingReplies: 3Last Post: 5th May 2018, 00:26 -
Can I force ffmpeg to transcode 59.94 frames to display at 25 frames per se
By oduodui in forum EditingReplies: 4Last Post: 28th Apr 2018, 09:24 -
Replace random duplicate frames with black frames (AVISYNTH)
By benzio in forum EditingReplies: 7Last Post: 31st Jan 2018, 16:43