Hi
please enter the cats only.
However
I would use
but interlacing is extremely slow. Is a specific plugin for avisynth that do interlace more fast? thanksCode:assumeFPS(50) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
+ Reply to Thread
Results 1 to 16 of 16
-
-
Add Prefetch to the very end of your script in this format:
Prefetch(x)
where X is the number of logical processors in your CPU -1 or 2.
“The Prefetch number should be set to 1 or 2 less than the number of "logical processors" in your system. To check what that is, go to Task Manager in Windows, select the Performance tab, then click on the CPU item. You'll see down below in the window an entry for the number of logical processors in your system. For some people, it will be the same as the number of physical cores, for others it might be double that if your CPU supports Hyperthreading. In my case, I have 12 logical processors, so I set Prefetch to 10.”
Quoted from here (and it works from personal experience; Prefetch on my system increased encoding speed by 250%):
http://macilatthefront.blogspot.com/
Number of Logical Processors:
[Attachment 72864 - Click to enlarge]Last edited by Alwyn; 2nd Aug 2023 at 20:01.
-
Did some encoding time tests on an AVI capture using QTGMC. 9:40 length.
Prefetch (I have 24 logical processors) set to
0: 6:20
5: 2:00
10: 1:26
15 and above: 1:25 -
Interlacing like that is very fast in AviSynth. Whether you use prefetch or not. Something else in or about your script is slow.
A 12 minute 40 second 1280x720, 50 fps video took about 11 seconds to process (VirtualDub2, Video -> Fast Recompress, File -> Run Video Analysis Pass, i7 9900K).
Code:ColorBarsHD() #width=1280, height=720, pixel_type="YV24") AssumeFPS(50) Trim(0, 28999) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
Last edited by jagabo; 2nd Aug 2023 at 23:40.
-
does exist an external plugin that do what the
Code:AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
-
-
oh my ***
this is the source
https://www.swisstransfer.com/d/6bffde22-b94f-4666-a353-c9bcce3aa38f
Code:LoadPlugin("V:\FFMS2_R1363_AGO2023\X64\ffms2.dll") Import("V:\FFMS2_AVSI_2023\FFMS2.AVSI") FFVideoSource("v:\concatHD.ts", fpsnum=50, fpsden=1).assumeFPS(50).converttoYV12(interlaced=false) emask = mt_convolution(vertical="-1 2 -1").ColorYUV(off_y=-64).ColorYUV(gain_y=128).mt_expand(chroma="-128").Blur(0.8) Overlay(last, Blur(0.5, 0.6), mask=emask) ConvertToYUY2(interlaced=false) assumeFPS(50) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() Prefetch(8)
or for example consider to get the output file using virtualdub and encode to uncompressed YUY2 avi file: if I encode the script where the interlacing is due to avisynth, the duration of the outputted .avi file seems to me similar to the source.
But, if the encoding is due by virtuald, and removing the "AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()" lines in the script, and using the "interlace" filter in virtualdub, seems to me that the outputted .avi file have 1 problematic frame missing to the end.
So I I would like not to use avisynth's interlacing, but it seems that: not using it, results in a bad final file of 1 missing frameLast edited by marcorocchini; 3rd Aug 2023 at 14:06.
-
Interlacing requires pairs of frames from the input -- one field comes from each of the two input frames. Your source has an odd number of frames (923) so the very last output frame cannot be interlaced properly. 923 source frames would become 461.5 output frames. You can't have half a frame so AviSynth uses two fields from the last input frame to build the last output frame, resulting in 462 frames. That is 1/50 second longer than your source. It sounds like VirtualDub just discards the orphaned field at the end, giving a results that's 1/50 second shorter than the source.
-
-
Yes, if X = # of 50p progressive frames, and is ODD #, and if Y = X / 2, then Y (interlaced frames) is never a Whole Number, requiring either loss of 1/2 frame, addition of dupe 1/2 frame, replacement/blend of 1 or 2 half frames, or error.
Scott -
ahh ok
however my question now is:
is there an alternative to the
Code:emask = mt_convolution(vertical="-1 2 -1").ColorYUV(off_y=-64).ColorYUV(gain_y=128).mt_expand(chroma="-128").Blur(0.8) Overlay(last, Blur(0.5, 0.6), mask=emask)
I know the the the emask works fine but in certain cases requires too much time, so is there a different way even if not as so good? -
Your source is oversharpened on both the vertical and horizontal. So you might as well blur all sharp edges. This runs much faster, about 5 seconds (no encoding) for the entire clip, on my computer:
Code:FFVideoSource("concatHD.ts", fpsnum=50, fpsden=1) emask = mt_edge(mode="hprewitt", thy1=200, thy2=200).mt_expand().Blur(1.0) Overlay(last, Blur(0.7), mask=emask) ConvertToYUY2(interlaced=false) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
And if you don't mind blurring everything this takes about 2 seconds:
Code:FFVideoSource("concatHD.ts", fpsnum=50, fpsden=1) Blur(0.7) ConvertToYUY2(interlaced=false) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
Last edited by jagabo; 4th Aug 2023 at 20:08.
-
mt_edge() can be used to detect horizontal edges only and is much faster than mt_convolution(). So if you want something like my original horizontal edge detection use this:
Code:FFVideoSource("concatHD.ts", fpsnum=50, fpsden=1)#.assumeFPS(50)#.converttoYV12(interlaced=false) emask = mt_edge("1 2 1 0 0 0 -1 -2 -1 1", thy1=250, thy2=250).mt_expand().Blur(1.0) # horizontal edges only Overlay(last, Blur(0.7), mask=emask) ConvertToYUY2(interlaced=false) AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
Similar Threads
-
AviSynth QTGMC to fix interlacing artifacts on progressive video.
By Sandfly in forum RestorationReplies: 22Last Post: 9th May 2023, 20:40 -
Avisynth - Slow motion
By maudit in forum EditingReplies: 6Last Post: 6th Nov 2022, 09:24 -
Dvd interlacing
By Johnnysh in forum DVD RippingReplies: 37Last Post: 6th Dec 2020, 14:34 -
What's Going On with the Interlacing Here?
By koberulz in forum Newbie / General discussionsReplies: 13Last Post: 12th Jan 2020, 17:10 -
StaxRip/AviSynth encoding really slow.
By Vitality in forum RestorationReplies: 9Last Post: 7th Mar 2019, 21:20