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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th March 2021, 10:40   #1  |  Link
Roemer
Registered User
 
Join Date: Oct 2020
Posts: 20
Avisynth+ MT and broken Frame Order

Hello

I am using Avisynth+ for some enhancements. In this particular case I am using TemporalDegrain2 for degraining. As this is fairly slow, I am using multithreading to speed things up.
In my first try, I just added SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) which leads to a lot of frames being out of order (but only for larger sources, smaller ones seem to work fine).
Then I found the mtmodes.avsi which should set the correct modes per filter and import this.
Now it is much better bit I still found very few frames that were out of order. Is there a way to prevent them completely and still using MT?
My script is fairly simple, all it does is:

Code:
src2 = FFmpegSource2("00004.m2ts", atrack=1, fpsnum=24000, fpsden=1001).Crop(220, 0, -220, 0)
src2 = src2.ConvertAudioToFloat().TimeStretch(tempo=100.0*25.0/(24000.0/1001.0)).TemporalDegrain2(degrainTR=3, postFFT=1, postSigma=4, postDither=-1)
AudioDub(src2, src2)
AssumeFPS(25)
PreFetch(10)
I tried various PreFetch and this one seems to use the most CPU and is the fastest (although I only have 4 cores and 8 threads).

Any help would be really appreciated.

Last edited by Roemer; 9th March 2021 at 11:05.
Roemer is offline   Reply With Quote
Old 9th March 2021, 11:10   #2  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
There are few options:
1) demux streams from m2ts and load them separately;
2) use LWLibavVideoSource+LWLibavAudioSource.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 9th March 2021, 13:43   #3  |  Link
Roemer
Registered User
 
Join Date: Oct 2020
Posts: 20
Is LSMASHSource preferred over FFMS2?
I remuxed the m2ts into an mkv and that also seems to have solved the problem!

Last edited by Roemer; 9th March 2021 at 13:43. Reason: typo
Roemer is offline   Reply With Quote
Old 9th March 2021, 13:46   #4  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
FFMS2 is just bad at handling m2ts.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Reply


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 17:49.


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