2017-03-22, 10:16 PM
Studing a good way to improve speed with avisynth, I tested some different path...
I tried this path in the latest days; I didn't dare to try it with my poor old dual core, dual threaded CPU, but with the new quad core, eight treaded one, I wanted to give it a try... and, oh boys, it works, very well!
How it works?
Well, just take your script, and "cut" it in several pieces - it seems that four pieces works well here, they run the CPU at around 80%, leaving some breath for surfing and other little things; probably it could work with more pieces, but your mileage can vary.
Before
project1.avs
After
project1_part1.avs
project1_part2.avs
project1_part3.avs
project1_part4.avs
project1_final.avs
Encode them at the same time; speed improvement: from 250% up to 400%, depending on how "heavy" are the filters/plugins...
You know, instead of waiting, let's say, two days, it's better to wait "just" 12 hours, don't you think?
Hope this would be of some help.
- New CPU: obvious... but take in account the complete cpubenchmark score, not only the single thread - if, for example, your old dual core CPU has a single thread score of 500 and complete score of 1000, and the new quad core has a single thread score of 1000 and complete score of 4000, it will go four time faster, more or less!
- Faster HDD (or better SSD): haven't tried an SSD yet, but I'm pretty sure this will not improve the overall speed.
- Avisynth 64bit: could indeed improve speed, but it has quite few compatible plugins...
- MT version and other multithread plugins: could work, but sometimes MT crashes, and other plugins didn't work - probably my fault
- Parallel encoding: it works well! Follow me...
I tried this path in the latest days; I didn't dare to try it with my poor old dual core, dual threaded CPU, but with the new quad core, eight treaded one, I wanted to give it a try... and, oh boys, it works, very well!
How it works?
Well, just take your script, and "cut" it in several pieces - it seems that four pieces works well here, they run the CPU at around 80%, leaving some breath for surfing and other little things; probably it could work with more pieces, but your mileage can vary.
Before
project1.avs
Code:
avisource("your source.avi")
filter1
filter2
filter3
After
project1_part1.avs
Code:
avisource("your source.avi")
filter1
filter2
filter3
trim(000000,040020)
project1_part2.avs
Code:
avisource("your source.avi")
filter1
filter2
filter3
trim(040000,080020)
project1_part3.avs
Code:
avisource("your source.avi")
filter1
filter2
filter3
trim(080000,120020)
project1_part4.avs
Code:
avisource("your source.avi")
filter1
filter2
filter3
trim(120000,000000)
project1_final.avs
Code:
a=avisource("project1_part1.avi").trim(000000,039999)
b=avisource("project1_part2.avi").trim(000000,039999)
c=avisource("project1_part3.avi").trim(000000,039999)
d=avisource("project1_part4.avi")
a+b+c+d
Encode them at the same time; speed improvement: from 250% up to 400%, depending on how "heavy" are the filters/plugins...
You know, instead of waiting, let's say, two days, it's better to wait "just" 12 hours, don't you think?
Hope this would be of some help.