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 10th June 2004, 13:09   #1  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Decimate Gurus I need your help

i have an interesting 59.94 progressive HDTV stream


the problem is there is no static pattern for dupe frames.
Normally i would use selecteven() or selectodd() to get down
to 29.97 then a Decimate(5) to get to 23.976 and all would be
good to go. But this stream is wacko. There is a single
frame randomly placed in it every 10 to 40 frames with NO dupe
frame. Now what is more wacko still is this single frame does
not happen the whole way through. minutes can go by with no
single non duped frame then all of the sudden they start up
again.

if i use selecteven() or selectodd() then 50% of these are cut
and i get a jump which of course looks bad.

if i use decimate (2) then the 2 frames will NEVER be dupes
since the one is always the only one so 50% of the time it
gets deleted there too since it is randomly placed.

the basic pattern normally is AAABBCCCDD the whole way but
this stream is

AAABCC or AAABCCC or AABCCC (it randomly changes as it goes)



suggestions?
Zep is offline   Reply With Quote
Old 10th June 2004, 15:15   #2  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,607
please count the unique frames of 240 HDTV-Frames.
are there 100 unique Frames or only 96 Frames?

if there are 96 frames, the video contains 24p else if there are 100 frames it contains 25p.

I recommend using smartdecimte in this case:

for 24p :

x=last
x.separatefields()selectevery(4,0,3).weave()
smartdecimate(24,60,bob=x,weave=x)

for 25p :

x=last
x.separatefields()selectevery(4,0,3).weave()
smartdecimate(1250,2997,bob=x,weave=x)


does this thread refect your problem?
http://neuron2.net/ipw-web/bulletin/...=weird+pattern
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 11th June 2004, 02:57   #3  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally posted by scharfis_brain
please count the unique frames of 240 HDTV-Frames.
are there 100 unique Frames or only 96 Frames?

if there are 96 frames, the video contains 24p else if there are 100 frames it contains 25p.

I recommend using smartdecimte in this case:

for 24p :

x=last
x.separatefields()selectevery(4,0,3).weave()
smartdecimate(24,60,bob=x,weave=x)


does this thread refect your problem?
http://neuron2.net/ipw-web/bulletin/...=weird+pattern

it is 1280 x 720p at 59.94 FPS so it is a matter
of just pattern matching. to knock it down to 24(23.976)

yes that thread has some linkage What i have here
is more random though. The single non dupes frames
can be anywhere and there is no repeat pattern in
some areas of the clip. I have a feeling they just
appended scenes and didn't do a full compress on the whole
thing. it is like you get one pattern on the close up
of a face. Then cut to another scene and it all changes.

multidecimate did a good job and it kept the stills
i wanted. 60+ frames worth for each still photo
from a photo album on screen etc... so those can't
be fully cut out.


i will have to try smartdecimate next


thanks

Last edited by Zep; 11th June 2004 at 03:01.
Zep is offline   Reply With Quote
Old 12th June 2004, 13:04   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
I've discovered a great new arbitrary decimation algorithm. It has the following features:

* one-pass operation
* specify any decimated framerate
* one frame comparison per output frame (!)
* preferentially decimates duplicates over singletons
* maintains audio sync throughout

This should be a good fast solution to Zep's problem and I expect it will make Decimate() obsolete. I've already begun coding.

Last edited by Guest; 12th June 2004 at 14:37.
Guest is offline   Reply With Quote
Old 12th June 2004, 16:51   #5  |  Link
JuanC
Registered User
 
Join Date: May 2002
Posts: 220
Quote:
Originally posted by neuron2
... and I expect it will make Decimate() obsolete. I've already begun coding.
Out of curiosity: Would it be able to blend duplicated frames (or fields after beeing separated) and output the blended frames (or fields) instead of discarding them?

That would help me clean-up my hybrid analog TV captures and maintain the framerate.
JuanC is offline   Reply With Quote
Old 13th June 2004, 01:47   #6  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally posted by neuron2
I've discovered a great new arbitrary decimation algorithm. It has the following features:

* one-pass operation
* specify any decimated framerate
* one frame comparison per output frame (!)
* preferentially decimates duplicates over singletons
* maintains audio sync throughout

This should be a good fast solution to Zep's problem and I expect it will make Decimate() obsolete. I've already begun coding.
YEAH!!!!!

I need this BIG time cause I now have tried multidecimate
(which does fine but audio sync is hosed to a point I can't
fix unless i spend hours sliding around audio chunks)

smartdecimate same problem as normal decimate, i.e. the
rapid pattern changes confuse it and it too drops singletons
as well as AA pairs. (which shocks me that it would drop
2 good frames and cause a jump in motion. however the read me
did say if you do not have pattern it would fail so...)


This truly is a case where I can't help the function
by walking it and getting a pattern because there is none.
We truly have to have a super smart decimat to the point
where Decimate(23.976) is all that is needed.


DG I am very impressed you can pull that off with 1 pass.
i was almost certain it would take 2 passes.

this is great news!


Thanks

Last edited by Zep; 13th June 2004 at 01:52.
Zep is offline   Reply With Quote
Old 13th June 2004, 12:54   #7  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,190
Zep-

It sounds to me like you were using MultiDecimate in Global Mode. If you use Cycle Based, the audio should stay in synch.

And I agree that having Decimate(WhateverFPS), if that's what neuron2 has in mind, is very good news.
manono is offline   Reply With Quote
Old 13th June 2004, 13:27   #8  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,607
oh, sounds very good!

It would be really cool, If it could handle weird decimation ratios like 2997/6250 and pattern like those:

ABBBCDDDEFFGGHH ....
13131222
or

ABBBBCDEEEEFGHHHIIJJKKLL
14114113222


Dideé and me are pulling out our hairs on getting smartdecimte running in large scripts like restore24...
smartdecimate is like a small child:
one day everything works fine,
the other day nothing works, only crashes and weird behaviours...
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 13th June 2004, 15:10   #9  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
I have the filter done and now I want to write documentation and do a journal entry. Maybe by tonight I will release it. Don't expect perfection, because it cannot be achieved, as I will explain. But this will be a useful step forward. At least it won't crash or act weirdly.
Guest is offline   Reply With Quote
Old 13th June 2004, 16:23   #10  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally posted by neuron2
I have the filter done and now I want to write documentation and do a journal entry. Maybe by tonight I will release it. Don't expect perfection, because it cannot be achieved, as I will explain. But this will be a useful step forward. At least it won't crash or act weirdly.
Cool! I have 2 streams waiting for that filter so i can encode them


A dupe frame staying in here and there is ok but a singleton
being cut is BAD news because that is very noticeable. As long
as no singletons are cut i think it will good to go.
Zep is offline   Reply With Quote
Old 13th June 2004, 16:30   #11  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Quote:
Originally posted by manono
Zep-

It sounds to me like you were using MultiDecimate in Global Mode. If you use Cycle Based, the audio should stay in synch.

And I agree that having Decimate(WhateverFPS), if that's what neuron2 has in mind, is very good news.
Cycle Based wasn't even close to decimating correctly.
(of course I may have found better parms if I spent more
time but I moved on to Global: Protect static scenes)

Remove duplicates: Global: Protect static scenes worked
well (it did leave a few dupes but only very few) but didn't
cut any singletons and that was the main goal. (the secondary
was leave the static scenes alone. photos and NO motion for
60+ frames so 60+ dupes in a row etc...)



Last edited by Zep; 13th June 2004 at 16:36.
Zep is offline   Reply With Quote
Old 15th June 2004, 01:53   #12  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
FDecimate 1.0.0

I've made the first release of my new free decimator, FDecimate().

Please be sure to read the help file carefully to understand why free decimation cannot be perfect if you want to keep the audio and video in sync.

http://neuron2.net/fdecimate/fdecimate.html
Guest is offline   Reply With Quote
Old 15th June 2004, 04:07   #13  |  Link
Zep
Registered User
 
Join Date: Jul 2002
Posts: 587
Re: FDecimate 1.0.0

Quote:
Originally posted by neuron2
I've made the first release of my new free decimator, FDecimate().

Please be sure to read the help file carefully to understand why free decimation cannot be perfect if you want to keep the audio and video in sync.

http://neuron2.net/fdecimate/fdecimate.html
awesome gonna test it now
Zep is offline   Reply With Quote
Old 15th June 2004, 10:50   #14  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,400
Re: FDecimate 1.0.0

Quote:
Originally posted by neuron2
I've made the first release of my new free decimator, FDecimate().
Very cool!
Question: is metrics parameter enables debug info or I have to enable it explicitely ?
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 15th June 2004, 12:47   #15  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Re: Re: FDecimate 1.0.0

Quote:
Originally posted by len0x
Question: is metrics parameter enables debug info or I have to enable it explicitly?
Yes, metrics=true forces show=true and debug=true.
Guest is offline   Reply With Quote
Old 15th June 2004, 17:51   #16  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,400
Quote:
Please note that, while FDecimate() can be used for traditional 1-in-N decimation, it is probably preferable to stay with Decimate() for those applications, because it does not require the setting of a threshold for duplicate detection when used in mode=0.
Does this mean that when using telecide for normal IVTC before decimate its better to use old decimate? And what about mode 1 and 3 for hybrid sources - old one as well?
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 15th June 2004, 18:46   #17  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally posted by len0x
Does this mean that when using telecide for normal IVTC before decimate its better to use old decimate? And what about mode 1 and 3 for hybrid sources - old one as well?
Hmmm... Don mentions using FDecimate to bring 120FPS files containing both 24FPS and 30FPS segments down to a different frame rate - but if you're going for 30FPS you'll get studdering on the 24FPS parts due to missing frames and if you're going for 24FPS you'll get the same for the 30FPS parts (like telecine, but probably worse since it's a duplicated frame instead of 2 duplicated fields).

Still, if you're going for 24FPS, couldn't FDecimate detect there's not enough duplicates to throw out and do a blend decimation from 30 to 24 (or maybe directly from 120 to 24) a la mode 3 to get down to 24?

np: Giardini Di Miṛ - Dancemania (Hits For Broken Hearts And Asses)
Leak is offline   Reply With Quote
Old 15th June 2004, 19:21   #18  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,190
Hi-

...but if you're going for 30FPS you'll get studdering on the 24FPS parts due to missing frames...

You may or may not get noticeable stuttering during the 24fps parts, but if you do, it surely won't be because of missing frames, but because of the extra duplicate frames.
manono is offline   Reply With Quote
Old 15th June 2004, 20:16   #19  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Quote:
Originally posted by len0x
Does this mean that when using telecide for normal IVTC before decimate its better to use old decimate?
Yes, unless you are using mode=2 (which tries to handle multiple duplicates sanely), in which case FDecimate() may be more reliable.

Quote:
And what about mode 1 and 3 for hybrid sources - old one as well?
FDecimate() currently has no equivalents to these, so yes.

I was a little over-excited when I said it would obsolete Decimate().

Last edited by Guest; 15th June 2004 at 20:23.
Guest is offline   Reply With Quote
Old 15th June 2004, 20:22   #20  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Quote:
Originally posted by Leak
Still, if you're going for 24FPS, couldn't FDecimate detect there's not enough duplicates to throw out and do a blend decimation from 30 to 24 (or maybe directly from 120 to 24) a la mode 3 to get down to 24?
It's conceivable. I made FDecimate() quickly to investigate some issues with a few streams and thought I might as well release it as it helps in some circumstances. For example, manono had given me a silent clip The Cook and I was able to render it very well with one pass using FDecimate(), whereas before it required 2 passes using MultiDecimate and some complicated guesswork to get the cycles set right. Maybe I'll add some extra functionality to it, who knows?
Guest 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 11:25.


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