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

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th January 2004, 04:28   #1  |  Link
Dark-Cracker
Registered User
 
Dark-Cracker's Avatar
 
Join Date: Feb 2002
Posts: 1,195
D2V Analyzer tool !

Hi,

i have made a quick and crap tool to get some informations on a .d2v file. i have use the .avs file used in autoGK (so all the greet for the script go to len0x ).

this tool give u the fps, nbr of frame, FILM and VIDEO percent, combed percent.

URL :
-----
http://dark.pluridis.org/~darkangel/D2vAnalyze.zip

HOW TO USE :
------------
select the .d2v file.
select if it's a NTSC or PAL material.
enter the percent of movie to analyse (by default 10%).
Click on the analyse button.

how to interpret the result :

if u have a percent of FILM around 90 percent u can use decomb with guide=0 (same than force film).
if u have a combed percent around 40% (=~ 2 frames on 5 are combed => telecined material) more than 40% => NTSC interlaced material.

i have not yet finish to calculate the right threshold to detect NTSC hybrid or Hybrid FILM so if u have some value feel free to post them

Special Greets : Neuron2 for the decomb & parsed2v tool

Bye.
__________________

AutoDub v1.8 : Divx3/4/5 & Xvid Video codec and .OGG/.MP3/.AC3/.WMA audio codec.
AutoRV10 v1.0 : Use RealVideo 10 Codec and support 2 Audio Streams and Subtitles.

Dark-Cracker is offline   Reply With Quote
Old 4th January 2004, 16:52   #2  |  Link
kitsaros2000
Registered User
 
Join Date: Apr 2002
Posts: 61
hey Dark-Cracker thats the idea that i had ! I Will check out the tool right now ! THX !

Later : I have an Interlaced pal film and the result was : 16,13 % is it right ?

Last edited by kitsaros2000; 4th January 2004 at 16:59.
kitsaros2000 is offline   Reply With Quote
Old 4th January 2004, 18:03   #3  |  Link
Dark-Cracker
Registered User
 
Dark-Cracker's Avatar
 
Join Date: Feb 2002
Posts: 1,195
yes for pal if u have more than 1% of combed frame => interlaced dvd

i will continu more tests to get right threshold.

PS: if u test on a short sample think to increase the % of movie analyzed.

Bye.
__________________

AutoDub v1.8 : Divx3/4/5 & Xvid Video codec and .OGG/.MP3/.AC3/.WMA audio codec.
AutoRV10 v1.0 : Use RealVideo 10 Codec and support 2 Audio Streams and Subtitles.

Dark-Cracker is offline   Reply With Quote
Old 4th January 2004, 20:39   #4  |  Link
kitsaros2000
Registered User
 
Join Date: Apr 2002
Posts: 61
ok !!!
Dark-Cracker i think that making an silly table with all the cases would be usefull ! Thx

Also in that table propose the assosciated filter with the best settings second your opinion of course ..

Last edited by kitsaros2000; 4th January 2004 at 20:46.
kitsaros2000 is offline   Reply With Quote
Old 4th January 2004, 22:24   #5  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Re: D2V Analyzer tool !

Quote:
if u have a percent of FILM around 90 percent u can use decomb with guide=0 (same than force film).
Force Film = Telecide(post=2).Decimate(guide=1)
Quote:
if u have a combed percent around 40% (=~ 2 frames on 5 are combed => telecined material) more than 40% => NTSC interlaced material.
The 40% combed applies to each 5 frame cycle. len0x made this sort of analisys to deal with hard-telecined sources (hardware telecine process with no MPEG-2 repeat flags in the D2V, instead of 0123 or 2301 everything is 0000 or 2222). But since a Telecined source is like this:

ABBCD
ABCDD

only 2 in every 5 frames look combed, in this case frames 3 and 4.
You may already know this stuff, but I had to say it because after testing on neuron2's Star Trek hybrid clip (100% analisys) I got:

FILM percent:22,98
VIDEO percent:77,02

Frames:1136
FPS: 29,97 (NTSC)

Frames Analysed:440
Frames combed:86
Percent:19,55

The FILM/VIDEO percent is correct, because MPEG-2 RFF flags are specified and you were able to get it through ParseD2V. But not the latter percent analisys, because you can't just divide combed over moving. It's not that simple.


IsCombed().IsMoving() in FILM part
=======================================
false.true
false.true
false.true
true.true
true.true
false.true
false.true
false.true
true.true
true.true
false.true
false.true


IsCombed().IsMoving() in Video part
=======================================
false.true
false.true
false.true
true.true
false.true
false.true
false.true
false.true
true.true
false.true
false.false


You'll notice that a pattern like this is what makes it FILM:

false.true
false.true
false.true
true.true
true.true

So you can't just count combed over all the moving parts and calculate if it gets a 40% percentage. Hybrid movies have moving VIDEO parts that would screw the percentage.

So in my opinion you should:
1) Rely on ParseD2V when it's possible to call it FILM based on its results, no need for analisys in this case;

2) Analyse the D2V with len0x method and consider

false.true
false.true
false.true
true.true
true.true

as 5 frames with a Telecine pattern, and calculate FILM percent based on this;


BTW, could you make a command line version?


EDIT: No need for a NTSC/PAL parameter, you could parse the D2V file for this:
Frame_Rate=23976 (NTSC with Force FILM)
Frame_Rate=29970 (NTSC)
Frame_Rate=25000 (PAL)


Best regards,
Bilu

Last edited by bilu; 4th January 2004 at 22:31.
bilu is offline   Reply With Quote
Old 4th January 2004, 22:33   #6  |  Link
mf
·
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
I'm wondering if MPEG2Dec3 can output frame properties (like decomb does for combing and decimation hinting), which Telecide and Decimate could be made to read out. I'd like to be able to use Force Film without immediately decimating the framerate. Also, sometimes, force film manages to catch small combing that Telecide ignores. A FILM hint for such frames could make it alot easier on Telecide.
mf is offline   Reply With Quote
Old 5th January 2004, 01:04   #7  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Quote:
Originally posted by mf
I'm wondering if MPEG2Dec3 can output frame properties (like decomb does for combing and decimation hinting), which Telecide and Decimate could be made to read out. I'd like to be able to use Force Film without immediately decimating the framerate. Also, sometimes, force film manages to catch small combing that Telecide ignores. A FILM hint for such frames could make it alot easier on Telecide.
This is the second idea I see today for an MPEG2DEC3 extension, the other is this one:

How to determine, whether a frame is I P or B for Conditionalfilter?
http://forum.doom9.org/showthread.php?s=&threadid=68096

He's looking for a way to do it over MPEG-2 DVB streams.

Made a compiled thread for this new requests:
http://forum.doom9.org/showthread.php?s=&threadid=68100

Bilu

Last edited by bilu; 5th January 2004 at 01:14.
bilu is offline   Reply With Quote
Old 5th January 2004, 11:34   #8  |  Link
Dark-Cracker
Registered User
 
Dark-Cracker's Avatar
 
Join Date: Feb 2002
Posts: 1,195
@kitsaros2000
yes once the detection will be accurate i will put a more understandable result

@bilu

oups i wanted to say decimate=0 not guide.

yes i have not yet implement telecine patterns, because i have not found hybrid clip so my first idear was to get the % of combed frame on all movie.
i will add the % of telecine/interlaced patter
i hope this will give more accurate analyze

i am still a beginer with the NTSC material all comment are welcome (even if my english not let me to fully understand sentenses ).

Ps: why not a command line ^^
Ps: i know u can use the framerate to detect ntsc or pal material but for avoid programming issues i have add a manual parameter i will try to solve this later

@all
does someone have field-blended PAL sample ?

Bye.
__________________

AutoDub v1.8 : Divx3/4/5 & Xvid Video codec and .OGG/.MP3/.AC3/.WMA audio codec.
AutoRV10 v1.0 : Use RealVideo 10 Codec and support 2 Audio Streams and Subtitles.

Dark-Cracker is offline   Reply With Quote
Old 5th January 2004, 11:38   #9  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
@D-C

Have you catched the "smilitis" disease?

About field-blended: I don't have such samples but I'm curious about what do you want to do with them


Bilu
bilu is offline   Reply With Quote
Old 5th January 2004, 11:43   #10  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
Quote:
Originally posted by bilu

About field-blended: I don't have such samples but I'm curious about what do you want to do with them
me too
They will be recognised as interlaced source...
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 5th January 2004, 18:48   #11  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
it's easy enough to make a field blended PAL if you have an MPEG-2 coder available...

just grab an ntsc (hybrid 24 30?) clip and run it though:

bob(height=576,0,1)
converttoyuy2(interlaced=[true/false depending on source])
convertfps(50)
separatefields()
selectevery(4,0,3)
weave()

run that through CCE or whatever (encode non-interlaced if you want an example of EXTREMELY crappy PAL conversion... i've encountered such DVDs and it took me quite a while to wipe the puke off my teev) and then make a d2v for the resulting m2v file.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 5th January 2004, 19:47   #12  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Mug Funky:

No, it's not that easy. At least not if you want to simulate the job that converter boxes are usually doing.

Scharfis_brain once posted a similar script to simulate a converter box, and got my veto.
Due to the fact you're converting a telecined stream, the result of bobbing+ConvertFPS delivers a) too much blending and b) even wrong blending: you get a lot of blends of fields (n + [n+2]), and that's evil. Converter boxes always deliver blends of fields (n + [n+1]), to my experience. Somehow, those boxes (at least the good ones) manage to reckognize the telecine pattern and to adapt their blending scheme accordingly. In fact, converter boxes often do a pretty smart job (I hate to say that ).

[crap]I'd like to link to a corresponding thread on neuron2's forum, but there seems to be some problem - cannot open anything but the main page: connection lifetime expired.[/crap]

[edit] Fooled by my own firewall
Here is above function of Mug Funky, invented by Scharfis_brain in September '03. (Way down, almost bottom of page *) )
Here is my reply to Scharfis_brain (beginning of post).
Nothing new in there, though.

*) After half an hour of fighting, I gave up.
HOW IS THE BL**DY FU**ING DAMN URL-SYNTAX TO LINK TO A SPECIFIC POST ON DOOM9's FORUM??? AAAARGH!!
[/edit]


- Didée
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 6th January 2004 at 05:29.
Didée is offline   Reply With Quote
Old 5th January 2004, 22:29   #13  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally posted by Didée
I'd like to link to a corresponding thread on neuron2's forum, but there seems to be some problem - cannot open anything but the main page: connection lifetime expired.
Well, neuron2.net's forum works for me at this time of the evening.

Try again.

np: Sole - Famous Last Words (Bottle Of Humans)
Leak is offline   Reply With Quote
Old 6th January 2004, 11:25   #14  |  Link
kitsaros2000
Registered User
 
Join Date: Apr 2002
Posts: 61
Dark-Cracker since im not an expert with the interlation stuff and i already making a dvd player i will wait till your programm matures . It will be a very usefull program keep progging
kitsaros2000 is offline   Reply With Quote
Old 6th January 2004, 11:42   #15  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
From what I've heard so far about DVD players it seems that NTSC players can also do the Telecine process themselves over FILM (23,976 fps). Still don't know if this is true for most players, but if it is then this sort of analisys is also good to some extent for NTSC movies, saving 20% bitrate!

Bilu
bilu is offline   Reply With Quote
Old 18th February 2004, 22:19   #16  |  Link
Dark-Cracker
Registered User
 
Dark-Cracker's Avatar
 
Join Date: Feb 2002
Posts: 1,195
hi,

just a quick update
now it use a better pattern.

how to understand results :

1) NTSC Material :

a) if it say u FILM percent > 90 %
=> u nedd use force film :
Telecide(post=2).Decimate(guide=1)

[ if FILM % was under 90% don't take care of it ]

b) if u have Telecined % > 80 %
=> telecined material , need to ivtc :
Telecide(guide=1).Decimate(cycle=5)

c) if u have Telecine % < 80 % it's surely hybrid clip
- if Telecine % > Interlaced % + Progressive % => Hybrid Mostly FILM. do :
Telecide(guide=1,post=2).Decimate(mode=3,threshold=1.0)

- else it's an hybrid mostly NTSC , do :
Telecide(guide=1,post=2).Decimate(mode=1,threshold=1.0)

PS : or perhaps a ",gthresh=30" in the telecine instead of post=2 (not sure).

2) PAL Material
a) if u have Interlaced % > 10 % it's an interlaced matrial do a simple deinterlace filter.


It's the first time a play with NTSC material and i hope i don't have made mistake else feel free to post a msg to explain me where i am wrong and which value is better .

Ps : and i suppose bilu will be the first to do this

Bye.
__________________

AutoDub v1.8 : Divx3/4/5 & Xvid Video codec and .OGG/.MP3/.AC3/.WMA audio codec.
AutoRV10 v1.0 : Use RealVideo 10 Codec and support 2 Audio Streams and Subtitles.


Last edited by Dark-Cracker; 18th February 2004 at 22:22.
Dark-Cracker is offline   Reply With Quote
Old 18th February 2004, 22:27   #17  |  Link
Dreassica
Registered User
 
Join Date: May 2002
Posts: 384
If u still need that fieldblended pal sample, i can up a sample vob of a madman pal anime dvd. :P
Dreassica is offline   Reply With Quote
Old 18th February 2004, 23:10   #18  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Indeed
Quote:
a) if it say u FILM percent > 90 %
=> u nedd use force film :
Telecide(post=2).Decimate(guide=1)
Force Film decimates already, no need for Decimate(guide=1).

The rest is correct
Quote:
PS : or perhaps a ",gthresh=30" in the telecine instead of post=2 (not sure).
post=2 is fine, believe me


Bilu

PS: I've changed my focus from MPEG-4 on Windows to MPEG-2 on Linux/FreeBSD. Still in the learning phase at kvcd.net

So I'll be here at doom9.org less often than before: there's not much talk about mencoder/ffmpeg/ffvfw for MPEG-2 around here

Last edited by bilu; 18th February 2004 at 23:12.
bilu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


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