Quote:
Avisynth assumes per default BFF even 95% of all inputs are TFF. Example: My capture card defenitely outputs TFF but Avsiynth reports BFF. Now ... If I just do switch the fieldorder like above avs reports TFF ok, but the final display on TV will be messed up ? |
Just try it on interlaced sources :wink:
I just did on a DV clip (DV is always BFF as you probably know) and it does work. The field order is truly TFF after the script. |
Yep, on BFF DV Sources this works as you switch the fieldorder and therefore finally when encoding to mpeg2 i.E. using a TFF flag in the encoder is no problem or better said its a must.
But as said, (just imho) if you use a common DVD source or a capture mostly these do come as TFF and the "fieldorder switch" above (imho) forces the user to check the "encode as BFF" in the encoder Quote:
Quote:
;) |
That is naturally true. For any interlaced DVD stuff, AssumeTFF().SeparateFields().SelectEvery(4,0,3).We ave() is the way to go. In any case, you need to know the original field order - and know what you are doing :)
Let's just say that I didn't want to confuse Blubear any more :lol: |
Today Momonster gave me a new update of a script I requested for the new coming version of PARanoia:
Code:
Function Interlacing2Reader(clip clp, float "mthresh", int "end", int "start", int "every", int "inf", string "file") It should detect if a source IS interlaced or Progressive and if its interlaced then also if that interlaced source is real-interlaced, fieldshifted and of course if its TFF or BFF. "mthresh" = motionthreshod "start" & "end" = the trimmed rage of the source in frames "every" = SelectEvery... you should leave it at default (17) cause of pattern reasons "inf" = 1 = Output stats to screen, 2= Output stats to file "file" = if inf = 2 then here the Path+Name of the stats file to be written to |
If it can do the coffee, I prefer it with two sugars. Thanks. :flowers:
|
I wonder if that's similar to the algorithm that MeGUI uses? In any case, looks like a killer function for newbies to use :D
|
Berrinam uses a diff. approach: A combination of the two scripts shown in this page: http://www.avisynth.org/mediawiki/wi...lace_detection
But if you feed his Tool (where those routines are also implementated in MeGUI) http://forum.doom9.org/showthread.ph...642#post758642 with a simply fieldshifted source the tool claims about that the source is hybrid which actually isn't the case as NO deinterlacing but phasecorrection would be needed ;) .. Momonsters tool is capable of detecting such a phaseshifted state :) Momonsters one is different. And as he already gave so much efforts into my request I dont think its a good behaviour asking him if he could add a NTSC Pulldown detection also. :oops: :) |
Quote:
|
Quote:
BTW, Inc, an idea on how to use momonsters' function ? I tried to understand the code but... :oops: |
I added (as you already recognised) the parameter usage below the script code. What do you dont understand?
|
In which way this function is supposed to be called (that's the part you answered) and its result used. It's not so evident when you read it.
|
I did fix some things in the function as Momonster took my approach of the subtitle info displaying which I applied to his first version but he forgot to copy the string globals and so it resulted incomplete.
A significant speed improvement I archieved by changing at the end return(c2.selectevery(deci,0)) to return(c2.selectrangeevery(deci,1)) it should result in the same as no offset is applied and the pattern should be kept. Also I did apply an amount-factor to set the amount of frames of the "whole" movie range which will be scanned. The whole detection routine is done by "Momonster" @ the German doom9/Gleitz board, ... just to avoid confusings ;) Code:
# The "TIVTC.dll" from Triticals "TIVTC" Package to be found at http://www.avisynth.org/warpenterprises/ Code:
xxxSource("X:\MyPathToMySource.xx") I added some options: Code:
Interlacing2Reader(lowprec=true) Code:
Interlacing2Reader(FontSize=18) Code:
Interlacing2Reader(amount=10) ... and here for shure Momonsters parameters: Code:
Interlacing2Reader(mthresh=3.0) Code:
Interlacing2Reader(inf=x) ... x = 2 lets the routine output the stats to a file where the path will be set by the string "file" parameter in the functions arguments. ... x = 0 no info Code:
Interlacing2Reader(every=17) How to interprete the results: At the very top you can see the "current frame number" of the clip which is beeing processed. If "interlacing" is detected, then here you can see how many of the moving frames are detected as interlaced. Same for "progressive" as this shows if a progressive frame is detected. Now ... "fieldshifted" means it could be a simple Phaseshift which can be easely restored to archive the real progressive contend of the source, or it means that the source could be Pulldowned. In this case just try to ivtc the source and see if an ivtc was needed. Real interlaced speaks for itself ;) And last but not least ... if fieldbased thenhere you can see if its a TFF or a BFF stream. All Values are outputtet as numbers so you can see on the size of each outputtet numbercount what the source could be made of. |
What a pain in the ass to find where the carriadge returns have to be :evil:
If someone can upload the avsi file somewhere on the net, I'll be glad. I must be too tired because I do not manage to find the correct indentation :? (note for people trying to use the function dit given by Inc : you will have an evaluate error, and that's normal). |
Quote:
Quote:
|
Quote:
"\" isn't it ? But it is actually put after the "out==1 ?" :!: Whatever the texteditor I use :( Quote:
Can you upload the function Inc ? Else I will put manually the CR when my eyes will be correctly opened :lol: |
a "\" in an avisynth script means NO CR.
Thats why avisynth will interpret .. Code:
c99= out==0 ? scriptclip(source, "source") : ( out==1 ? Code:
c99= out==0 ? scriptclip(source, "source") : ( out==1 ? scriptclip(source, ..... So as you get the "Evaluate : == and != operators must be comparable (line 162)" thats not the fault of wrong CRs but something else which I cant duplicate now in my office, so Ill have to check that this night. Yesterday it worked without problems Heres the downloadlink of an avsi textfile: Interlacing2reader.avsi |
Quote:
And then : Code:
c99= out==0 ? scriptclip(source, "source") : ( out==1 ? <CR> Code:
c99= out==0 ? scriptclip(source, "source") : ( out==1 ? scriptclip(source, ..... Code:
c99= out==0 ? scriptclip(source, "source") : ( out==1 ? <CR> Quote:
You see... all was a matter of CR badly placed ;) Thanks a lot :bowdown: |
Avisynth is in this case diff. then C++ etc.
Code:
c = dfsdffksjhjshjfhsjhkfshkjfshkfskdf : \ Code:
c = dfsdffksjhjshjfhsjhkfshkjfshkfskdf : in my cases IS interpreted as Code:
c = dfsdffksjhjshjfhsjhkfshkjfshkfskdf : sdsdsdsdsdsdsdsdsdssd Its not like in C++ where \\ also would mean a remark. I never understood why this was not taken over to avisynth in the same logic/manner but using a "#" instead Edit: Quote:
I never had any problems when copying such "\" including scripts at doom9 out of a code marked section within a post. |
Quote:
Quote:
Code:
aaaa <CR> Code:
aaaa bbbb<CR> The problem happened to some people with the MA script (that also use scriptclip; and where you can find "\" in the middle of the line also for the cosmetic reason you mentionned). That is why I immediatly knew that my evaluate problem was due to that. But that's a solved one now :). Thanks again. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.