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. |
27th March 2015, 02:09 | #1 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
Decoding multiple threads?
Just wondering if it's possible to decode a video on more threads. I don't mean the hackish way MTMode etc.
Normally a decoder has support for multiple threads nowadays, but with Avisynth it's locked to 1. Why i want this is because it's the bottleneck when i am encoding, the decoding is slowest so i would like to make it faster. (Good thing is that i can waste more time on encoding quality i guess). I am talking about AviSynth 2.6.0 RC1. Many Thanks |
27th March 2015, 04:04 | #2 | Link |
Registered User
Join Date: Nov 2006
Posts: 773
|
decoding or encoding ?
for decoding there is DGDecNV (not free) see here: http://neuron2.net/dgdecnv/dgdecnv.html |
27th March 2015, 07:12 | #4 | Link |
Registered User
Join Date: Mar 2014
Posts: 308
|
Why would Avisynth have any control over how many threads a source filter wants to use?
Where do your lossless video files come from? Have you tried FFV1, UtVideo, lossless H.264, etc.?
__________________
Say no to AviSynth 2.5.8 and DirectShowSource! |
27th March 2015, 07:57 | #5 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
How did you determine Avisynth is "locked" to a single decoding thread? ffms2 doesn't specify a need for MT Avisynth to use more than one thread for decoding. At least no mention of it I could see.
https://ffmpegsource.googlecode.com/...-avisynth.html int threads = -1 The number of decoding threads to request from libavcodec. Setting it to less than or equal to zero means it defaults to the number of logical CPU's reported by Windows. Note that this setting might be completely ignored by libavcodec under a number of conditions; most commonly because a lot of decoders actually do not support multithreading. |
27th March 2015, 16:34 | #6 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
My only clue to single thread is using Avisource with a lossless codec (pretty sure i have tried UtVideo and had same results). And it's always 25% Max (4 cores).
So that's why my assumption is 1 thread. So it's probably the Avisource that's the culprit i guess? Haven't tried DirectShow, but had some bad experiences with it at times being non-frame-accurate etc. |
27th March 2015, 16:48 | #7 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff |
|
27th March 2015, 20:53 | #10 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
hmm wait it might be avs4x264 that's the bottleneck here.
(I am doing simple 2D encodings, so it's super fast, pixelated low res stuff). It's not super bottleneck, but yeah, it's fairly close on Medium. Last edited by zerowalker; 27th March 2015 at 21:05. |
27th March 2015, 21:06 | #11 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Quote:
I use XP so I can't test it myself, but if you uncheck the 64 bit x264 encoder setting in MeGUI's options I believe MeGUI will stop using avs4x264 (it's only needed for "32 bit Avisynth" -> "64 bit x264", the way I understand it). And I guess I just made an assumption you're actually using MeGUI..... sorry. I only let ffms2 use a single thread for decoding and it doesn't seem to slow things down much. CPU usage still sits between 90% and 100% most of the time (4 cores) unless I'm using slow Avisynth filters. |
|
27th March 2015, 22:42 | #12 | Link |
47.952fps@71.928Hz
Join Date: Mar 2011
Posts: 940
|
Taro_06 made an updated versoin of avs4x264, now avs4x26x (as it supports x265).
http://tmod.nmm-hd.org/avs4x26x/ If one wants to try that intead of old avs4x264.
__________________
Win10 (x64) build 19041 NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4) NTSC | DVD: R1 | BD: A AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
|
28th March 2015, 06:44 | #13 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
I am not using MeGUI but my own made "MeGUI", but it's basically the same just super simple, so it uses avs4x264 to pipe to x264 as i must have the 32bit version of Avisynth (which i could use 64bit, but sadly i need the new Avisource track support).
Tried the new version avs4x26x, same results. But it's not really a deal breaker. But i guess if it was possible to use 64bit it might go faster, as 64bit decoders tend to better. |
28th March 2015, 07:40 | #15 | Link | ||
Registered User
Join Date: Jul 2011
Posts: 1,121
|
Not really much of a script, but here it is.
Remember, it's not that it's Slow. It's that it's limited to 1 Thread that bothers me a bit. Quote:
Quote:
Last edited by zerowalker; 28th March 2015 at 07:49. |
||
28th March 2015, 09:04 | #16 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
How do you determine that?
I suggest the following: 1. Remove all audio processing from the script and run it through AVSMeter: Code:
Avisource("Z:\VisualBoyAdvance-M_2015_03_26_14_02_00_585.avi") Use the "-log" switch for AVSMeter and post the log files. If it's a very long clip you can limit the frame range with "-range=x,x".
__________________
Groucho's Avisynth Stuff |
28th March 2015, 22:13 | #18 | Link | |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
Seems to be superfast with only the Decoding (even if it doesn't seem to use 50%, it's at like 1000fps).
The HDD Didn't bottleneck, but at that speed i don't really care if it's 1 thread or not, so decoding isn't the issue i guess. Quote:
EDIT: Checked, and PointResize really does have quite a performance hit, didn't think it would be that great, that explains it. Last edited by zerowalker; 28th March 2015 at 22:16. |
|
28th March 2015, 22:44 | #19 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Really, pointresize? That should be very fast. What CPU is this running on?
__________________
Groucho's Avisynth Stuff |
28th March 2015, 23:38 | #20 | Link | |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
Quote:
That's with PointResize. I got i5 760 @4ghz Though this is easily solvable as i can just record in the resolution i resize to. I only used PointResize is i thought it would be faster compared to a higher resolution decoding. |
|
|
|