Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st February 2015, 18:07   #721  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Thanks, Stainless. Will keep this on file for possible future use. But for now the loop0 method of chopping out things is working perfectly. I generate it by hand, with a bit of copy/paste help in conjunction with Vdub's ctrl-g feature. So while I didn't type any numbers, I picked the start and end chop points manually in Vdub. It's working perfectly, and audio is fine.

The only thing that remained outstanding for me in this thread (at least right now) was to get into SubJunk's hands the bug report about FrameDouble's presence causing the script to bomb.
TCmullet is offline   Reply With Quote
Old 21st February 2015, 21:21   #722  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
@TCMullet thanks for the bug report, but I don't think it's a bug in InterFrame. It may be a bug in Vdub.
FrameDouble only does one simple thing and that is toggle the framedoubling functionality in SVP, which InterFrame already uses by default for some content like PAL.

Do you get the error if you use a 25FPS input clip and don't use FrameDouble?
SubJunk is offline   Reply With Quote
Old 21st February 2015, 21:29   #723  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Quote:
Originally Posted by StainlessS
The post limit is 16KB in user forum and 20KB in developer.
Thanks for the numbers. But I only meant "too long" in the sense of having it full of stuff so that the small item at the end of it about FrameDouble might not have been noticed.
TCmullet is offline   Reply With Quote
Old 21st February 2015, 21:36   #724  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Quote:
Originally Posted by SubJunk View Post
@TCMullet thanks for the bug report, but I don't think it's a bug in InterFrame. It may be a bug in Vdub.
FrameDouble only does one simple thing and that is toggle the framedoubling functionality in SVP, which InterFrame already uses by default for some content like PAL.

Do you get the error if you use a 25FPS input clip and don't use FrameDouble?
I don't have any 25fps clips. But if you meant 'what happens if you don't use FrameDouble', I thought i answered that by saying that if you swap the '#' between these two lines, to choose which one will execute, the one without FrameDouble works and the one WITH it does not.

Code:
InterFrame(Cores=2,Tuning="Film")
#InterFrame(Cores=2,Tuning="Film",FrameDouble=true)
That is, I'm showing you both versions of the code. (I often keep code fragments around in comments.) The fact that taking FrameDouble out made it work, tells me that it's presence is a bug. I don't see how VDub could have any bearing. Oh, if it's not obvious, I DO realize it's usage was superflous as the default under the circumstances would be to convert from 29.97 to 59.94 anyway. I merely had preferred to include "FrameDouble=true" in the code so it would be more self-documenting.
TCmullet is offline   Reply With Quote
Old 21st February 2015, 23:15   #725  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
Quote:
Originally Posted by TCmullet View Post
I don't have any 25fps clips. But if you meant 'what happens if you don't use FrameDouble', I thought i answered that by saying that if you swap the '#' between these two lines, to choose which one will execute, the one without FrameDouble works and the one WITH it does not.

Code:
InterFrame(Cores=2,Tuning="Film")
#InterFrame(Cores=2,Tuning="Film",FrameDouble=true)
That is, I'm showing you both versions of the code. (I often keep code fragments around in comments.) The fact that taking FrameDouble out made it work, tells me that it's presence is a bug. I don't see how VDub could have any bearing. Oh, if it's not obvious, I DO realize it's usage was superflous as the default under the circumstances would be to convert from 29.97 to 59.94 anyway. I merely had preferred to include "FrameDouble=true" in the code so it would be more self-documenting.
I understand you were showing both versions of the code. Using FrameDouble triggers a different part of the InterFrame code than not using it, if your input file is 29.97FPS, but it will use the same part of the code if your input file is 25FPS. So while you're right that your use of FrameDouble was superfluous, since it should result in the same FPS in the output, it does not use the same part of InterFrame and therefore does not pass the SVP DLLs the same instructions.

I can make a 25FPS test clip so we can narrow down the issue some more if you want.
SubJunk is offline   Reply With Quote
Old 21st February 2015, 23:26   #726  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 161
Can it work for single core too?
Stormborec is offline   Reply With Quote
Old 21st February 2015, 23:35   #727  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
@Stormborec I think it can work for single core, just use Cores=1.

@TCMullet that reminds me, I think your script should use the same amount of cores for SVP and SetMTMode. It's probably not related to this issue but might make things more stable.
SubJunk is offline   Reply With Quote
Old 22nd February 2015, 03:46   #728  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Quote:
Originally Posted by SubJunk View Post
@TCMullet that reminds me, I think your script should use the same amount of cores for SVP and SetMTMode. It's probably not related to this issue but might make things more stable.
I'm very green at SetMTmode, and am using only because I was told to. Here's that tail code, plus I have another question somewhat related.

Code:
ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=2,Tuning="Film")
SR(1280,720,2)
As you can see, I had already set cores equal as you suggested (after the fact). What I'm asking about now relates to SR in addition.

I had set InterFrame cores to 1 and SR to 2, think that SR (SuperRes 2.0, which you're probably familiar with) needs more (a lot more) cpu than InterFrame. But if I set both to 2 and I only have a 4-core system (and no hyperthreads), would I then be choking out the OS (Windows 7)?? Seems to me that Windows would be choked off and the whole system would bogg down, knowing that the OS DOES need cpu cycles.

I'd like your thoughts. In the meantime, I did some tests, and I surprisingly (but maybe not to you) found that 2 and 2 ran a okay and maybe even a little better than 1 and 2. A possible explanation might be that (if true) all application tasks have lower priority than any OS task, and therefore the OS never gets short-changed.

So what is the general formula for when you have 2 multi-threading apps running on a 4-core system? (Do I need to give a core to the system?)
TCmullet is offline   Reply With Quote
Old 22nd February 2015, 04:37   #729  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
In general I'd say to let every program/app/script use max cores. As long as everything is normal and healthy on the computer (like it's not being overclocked too much) it should be fine. Like you said, process priorities make a difference.

I hadn't heard of SuperRes but I'll give it a go now, I have an upscaling toolchain I regularly use so I might be able to add it to that. Actually I got the Blu-ray for a movie the other day and compared it to a DVD upscale I did of the same movie, and my upscale was better quality, which is a real shame.
SubJunk is offline   Reply With Quote
Old 22nd February 2015, 04:42   #730  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Quote:
Originally Posted by SubJunk View Post
In general I'd say to let every program/app/script use max cores.
Please explain what you mean by "max cores", using my example of a 4-core system (no hyperthreads).

How many threads should be allocated to InterFrame and how many to SuperRes, given that they are both in the same script? If you answer that, I'll know which way to interpret your comment.
TCmullet is offline   Reply With Quote
Old 22nd February 2015, 06:44   #731  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
AviSynth isn't great at multithreading so it's impossible to tell what will work best here, but I would try 4 for everything at first and see how it goes. A lot of times multithreading in AviSynth is a process of trial and error and gives different, unpredictable results for different computers, along with SetMemoryMax.
SubJunk is offline   Reply With Quote
Old 22nd February 2015, 23:07   #732  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Quote:
Originally Posted by SubJunk View Post
AviSynth isn't great at multithreading so it's impossible to tell what will work best here, but I would try 4 for everything at first and see how it goes. A lot of times multithreading in AviSynth is a process of trial and error and gives different, unpredictable results for different computers, along with SetMemoryMax.
Oh so 2+2 is not valid logic. Okay. At present, I'm 16 hrs into a 21 hr run, then another VDub job kicks in for probably 17 hrs more. Then I can try 4+4 for the next task. However, I have a Cpu usage icon that continually shows bar graph for all 4 cores. All 4 are floating near the top, so I feel I'm doin pretty good w/2+2.

But then in task mgr, it adds up to a total, which fluctuates from 85-94%, adding the unused portions of individual cores' usage together. So maybe with 4+4 the total will get closer to 100%, not a trivial jump.

Your prior ambiguity caused me to think. AviSynth is so amazing to me and it boggles my mind to even try to think about how it can even work. I've been assuming that InterFrame and SR are concurrent processes, that is, both running "at the same time". In a 1-core system, obviously the def. of concurrency helps us to see that time slicing lets both run but only one at a time. Knowing now that I have 4 cores, I was thinking of the need to allocate them out. But maybe InterFrame can use 4 cores for a bit (to create the new frame), then SR can use 4 cores for doing ITS task on that frame, and so each step takes it's turn using all resources while its up to bat.

Hey, I'm using the unknown (to me) SetMTmodes. My statements are:
SetMTMode(3,4)
SetMTMode(2)

If I try your idea of 4+4, what would I set those 3 mode values to?
TCmullet is offline   Reply With Quote
Old 22nd February 2015, 23:16   #733  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
With those values, you're already using 4 cores; the second argument in SetMTMode is the number of cores to use.
SubJunk is offline   Reply With Quote
Old 22nd February 2015, 23:23   #734  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Then you're saying to leave the SetMTs alone. Great.
TCmullet is offline   Reply With Quote
Old 23rd February 2015, 01:30   #735  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Quote:
Originally Posted by Atak_Snajpera View Post
Does anybody know how to increase motion search range or precision in order to eliminate "double leg effect"?

BTW. Source is 1080@25fps. I'm trying to achieve nice looking slow motion effect.
I skimmed pages 16 (in 2012) to the present (p. 37) again to look for any responses to Atak's question, and if the answer or even any significant discussion was there, I missed it.

Either it can be done (and what settings would accomplish it) or it cannot be done (and we need to be told that explicity or we--some of us--will be eternally wondering "what am I missing").

His photo doesn't show the problem as explicitly as does a current short clip of mine. Here's a link to a 21 frame Lag. file: (It was too big to attach here, so I'm hosting it at my own server.)
http://www.tomsgoodfiles.com/Tom's-t...97.2015-02.avi

Here's a script:
Code:
SetMemoryMax(512)
SetMTMode(3,4)
AviSource("D:/Video-Work/Tom's-test-clip2997.2015-02.avi"   )
ConvertToYV12()
SetMTMode(2)
InterFrame(Cores=2)
Clip is 21 frames long, and after running the script, frame 11 is probably the best one to show the problem. 10 and 12 show the original leg motion, with 11 being interpolated.

Subjunk will you please download my video and run this script (fudging path as needed), look at those 3 frames (10-12) and please explain whether InterFrame can be user-tweaked to prevent frame 11 (the leg portion) from looking like a blending of frames 10 and 12? And if not, could you please say so and (hopefully) explain why InterFrame can do "ball-left + ball-right ==> ball-middle" but cannot do "leg-left + leg-right ==> leg-middle"?

And if not, can you please theorize "out loud" what would have to be done to make it accomplish this?

(I may post the 3 stills involved, later if I can.)
TCmullet is offline   Reply With Quote
Old 23rd February 2015, 01:51   #736  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Here are frames 10, 11, and 12 in .jpg. 11 is the interpolation between frames 10 and 12.

(3 pics are worth at least a few dozens words, eh?)
Attached Images
   
TCmullet is offline   Reply With Quote
Old 23rd February 2015, 09:09   #737  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
Using GPU=true increases the quality significantly, including with that clip.
SubJunk is offline   Reply With Quote
Old 23rd February 2015, 14:12   #738  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Quote:
Originally Posted by SubJunk View Post
Using GPU=true increases the quality significantly, including with that clip.
But that doesn't make sense. I thought GPU was there only as a means to get extra cpu power in addition to the cores in the main computer, so as to speed up the conversion a bit (like having one additional core). Why would borrowing the processor in the graphics card have anything to do with the logic of Interframe beyond that? And why should it?? (Seems to me it should NOT.)

Any way, I tried:
InterFrame(Cores=2,GPU=true)

and it bombs immediately with a VirtualDub message:
Avisynth open failure:
SVSmoothFps: unable to load library given in 'compose' [c:\program files (x86)\AviSynth 2.5\plugins\svpflow_gpu.dll]
(InterFrame2.avsi, line 156)
(InterFrame2.avsi, line 58)

(then line 6 in my script)

So at the moment I'm not able to see what "great improvement" you are alleging.
TCmullet is offline   Reply With Quote
Old 23rd February 2015, 14:29   #739  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,422
SVPFlow_GPU.dll requires OpenCL.dll, perhaps you dont have it. (I think it comes with graphics card, so perhaps yours [like mine] is incompatible).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 23rd February 2015 at 14:33.
StainlessS is offline   Reply With Quote
Old 23rd February 2015, 15:09   #740  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 328
Quote:
Originally Posted by StainlessS View Post
SVPFlow_GPU.dll requires OpenCL.dll, perhaps you dont have it. (I think it comes with graphics card, so perhaps yours [like mine] is incompatible).
My system has an OpenCL.dll file in the folder, C:\Program Files (x86)\SVP\ even though I don't have a separate graphics card beyond the builtin Intel adapter.

I await SubJunk's full analysis of all this. I am "disappointedly" eager to scrap days of processing I've already done, and start over correctly.
TCmullet is offline   Reply With Quote
Reply

Tags
48fps, 60fps, framedoubling, interframe, smooth motion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.