View Full Version : all purpose script needed
stax76
8th May 2003, 23:26
Hi everybody,
I'm looking for the ultimate all purpose script for the DVX standard profile. DVX will find the crop settings automatically by default using the AutoCrop plugin. My current script also detects the source type. The only thing missing is deintetlacing/IVTC. Has somebody some nice ideas for a script? How can I detect if the source is interlaced? Here is my current script
(FindStr("%source_file%",".avi") > 0) ? AviSource(%source_files_comma_separated%,false) : MPEG2Source("%source_file%")
Crop(%left%,%top%,-%right%,-%bottom%)
LanczosResize(%target_width%,%target_height%)
Limiter()
Hi Dolemite,
Go to my thread on R4R_ENC, I found a nice way to use ParseD2V to be able to correctly handle hybrid clips.
http://forum.doom9.org/showthread.php?s=&postid=306134#post306134
Best regards,
Bilu
stax76
9th May 2003, 19:40
I was hoping there is a way to make this with
AviSynth. Wouldn't it be a nice idea for a filter
to detect the most likely necessary operation
and perform it automatically
I agree that a filter could do the same job easily. Maybe neuron2 would be kind enough to make a ParseD2V-based filter ( would help Decomb, I think :) ) or trbarry could make an extension to MPEG2DEC3 that outputs the necessary statistics.
Or, since it's all there in the D2V file, someone else can grab it ( during encoding, would it be possible?) and make the analisys.
Best regards,
Bilu
Guest
10th May 2003, 00:56
It's not always "all there in the D2V file", because often the MPEG2 flags are abused, or used unconventionally. For example, a 'hard' 3:2 telecined content may be encoded as all interlaced (222222222...). And not all material is MPEG2 in any case.
I have several times contemplated writing a filter that analyzes a video clip and presents a diagnosis about its nature. I suppose it wouldn't be a large step to have it output a suggested script.
Prettz
10th May 2003, 15:55
Originally posted by neuron2
I have several times contemplated writing a filter that analyzes a video clip and presents a diagnosis about its nature.
That would be awesome, and extremely useful. Especially if the filter is able to identify any potentially useful info about how the clip is interlaced.
Originally posted by neuron2
It's not always "all there in the D2V file", because often the MPEG2 flags are abused, or used unconventionally. For example, a 'hard' 3:2 telecined content may be encoded as all interlaced (222222222...). And not all material is MPEG2 in any case.
I have several times contemplated writing a filter that analyzes a video clip and presents a diagnosis about its nature. I suppose it wouldn't be a large step to have it output a suggested script.
But do you think this sort of analisys would be possible to do?
The way I'm using Decomb in my tool is counting Video and Film events from ParseD2V output and then choose between Decimate(mode=1) or Decimate(mode=3) based on this statistics, for every clip with framerate above 25 fps. I'm hoping that Decimate has no problems knowing what is Video or Film and make the right decisions. D2V statistics are used as an influence on the decisions made, but the Decimate detection process is the same in both modes, I guess... :confused:
Can an automatic process be better than this?
Bilu
Guest
11th May 2003, 01:49
It *can* be. I just gave you the example of 3:2 telecining without any of the RFF/TFF flags set. So the .d2v file in such cases is useless; it tells you NOTHING.
Originally posted by neuron2
I have several times contemplated writing a filter that analyzes a video clip and presents a diagnosis about its nature. I suppose it wouldn't be a large step to have it output a suggested script.
Such a filter or utility would need to scan the whole stream before outputting results. Would it possible within current AVS 2.5 specifications, cache, etc.?
I'm not a developer, just asking for curiosity :)
Bilu
Guest
11th May 2003, 13:25
Originally posted by bilu
Such a filter or utility would need to scan the whole stream before outputting results. No it wouldn't. You might know enough after a few seconds. Then you could start writing results to a log file, or start overwriting it as text onto the frames.
How can you know if a film is a hybrid, mostly Video or mostly Film, after a few seconds ? :confused:
It seems you've been investigating on this subject for a while (which is pretty normal, coming from you :) and a good thing also ).
You don't really need to answer my question. My hope is that you share what is in your mind with us so that someone (if you're not available for some reason) could try to develop such a filter :)
Understandably (I don't know if this is a valid english word :D ) decombing is the biggest obstacle to encoding automation with any codec that doesn't behave as well as MPEG-2 does with combed frames :rolleyes:
Best regards,
Bilu
Guest
12th May 2003, 02:38
Well, I said you *might* know enough after a few seconds.
For example, if you detect a PAL video, you don't need to consider that it might be a 3:2-pulldown/video hybrid. :)
But sure, your point is well taken. In the worst case you may want to scan the entire video. Then you ask:
>Would it possible within current AVS 2.5 specifications,
>cache, etc.?
Is it possible to do a 2-pass algorithm? Of course. For example, my new MultiDecimate() filter is a 2-pass filter. In any case, what is wrong with waiting until the clip ends to output the information? You could overlay it onto the final frame, for example.
>decombing is the biggest obstacle to encoding automation with
>any codec that doesn't behave as well as MPEG-2 does with
>combed frames
Parsing failure! Huh?
Originally posted by neuron2
>decombing is the biggest obstacle to encoding automation with
>any codec that doesn't behave as well as MPEG-2 does with
>combed frames
Parsing failure! Huh?
No, I meant that because in MPEG-2 encoding you don't need to decomb, it supports interlaced :) never used XVID interlaced mode though...
Bilu
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.