Corran wrote:BasharOfTheAges wrote:
It seems just for simple directshowsource transcoding with nothing else i don't get any speed increase (24:15 [mm:ss] of footage 1024x68 h264 in MKV to HuffYUV in AVI took around 11.5 minutes both with and without MT).
Multithreading the source filter probably isn't going to help if decoding a video where keyframes are spread out such as H.264 as you need to rebuild the frames sequentially.
Leak from the Doom9 forums wrote:Well, I suppose it could open the same file several times in different threads and fetch several frames at once, but I'm honestly not sure if that's going to work too well, at least when you have a codec where frames depend on each other.
It could work if you start a thread at every keyframe (although I'm not sure how to get that information from a source filter) or with keyframe-only formats like HuffYUV or MJPEG, but probably not too well with MPEG4 ASP or H.264 with several hundred frames of max keyframe distance...
There isn't any way around that though? Like DGAVCIndex or FFmpegSource (to be honest FFmpegSource wins that contest for right now since it actually supports reading from the containers and isn't limited to just H.264), for example - both write index files which get read in place of the straight video, and depend on libavcodec to do their decoding. I could see how DirectShowSource would be deficient, but with ones that write indexes it'd be vastly simpler to implement multithreaded decoding, as it'd be more up to the development of libavcodec to achieve that, or so I would think.
Whether AviSynth MT supports either one is something someone else will have to test, I don't have a computer that uses multithreading.