Avisynth Handling of strange fps (120fps) and Avi Dropped Frames
Go to first unread postLast Thread Next Thread
Author Thread
bill_baroud
Member
Registered: Feb 2002
Location:
Posts: 80
Avisynth Handling of strange fps (120fps) and Avi Dropped Frames
Hi
The problem i encounter is quite unusual and complex to explain so i'll do my best,
although i have already reported something like that some times ago.
Material :
- avi file, 120fps (119.880) Xvid captured from japanese satellite (i suppose)
- vbr mp3 (-_-)
if you open file in vdub, images sequence is :
K DDD P DDD P DDD P DDD P ..... K
where
- K stand for K-Frame
- D for Dropped Frame (as Cyrius explained it to me)
- P for P-frame
image change only on P & K
i'm using Avisynth 2.07 and Vdub 1.5.1
Problem :
Avisynth seems to have hard time to deal with Dropped Frames
or with the unusual frame rate, it's output garbage.
I was suspected something from xvid but Vdub and DirectShowSource with ffdshow are fine
(that's why i posted here, feel free to move the post where it's belong).
avisynth :
http://breizhbill.baroud.free.fr/image posts/GITS_garbage.JPG
virtual dub :
http://breizhbill.baroud.free.fr/image posts/GITS_normal.JPG
what's i'm actually doing, it's open the 120fps file in VirtualDub,
then frameserve it, open the .vdr in Avisynth, Decimate(4) it -to have 30fps output-,
and encode it in huffyuv in another vdub.
DShowSource with decimate gave me 30fps output,
but only 2 "real" images per second.
(just tested 2.51 and it's the same)
Here are my questions :
- First, is it a bug from Xvid decoding (i'm using Koepi Stable one)
or from Avisynth dropped frames handling ?
Or am i really dumb and i'm doing it completly wrong ?
- And second, can someone very advanced with capturing and
interlacing explain me, why there is some japanese guys (no offense to them !)
who encode with such a strange fps (it's not the first time i got files like that).
I somehow suspect Hybrid material (Ghost in the shell TV has a lot of CG scenes -like opening- )
and perhaps broken capture devices ?
But 120 fps is really cpu intensive to decode in real time with vobsub subtitle
(on my XP1600+)
Thanks you for reading me till here and perhaps enlight me on this case
cheers.
Report this post to a moderator | IP: Logged
25th March 2003 21:37
mf
MCF, xvid & vdubmod team
Registered: Jan 2002
Location:
Posts: 122
Looking at the artifacts, it seems as if AVIsynth is feeding XviD the dropped frames as P-frames, where the P-frame is repeated 3 times causing it to repeat the difference on the previous frame 3 times.
In math, it would be like this:
K = 1
P = + 1
D = + 0
So vdub decodes this:
1
2
2
2
2
1
But AviSynth treats it as this:
K = 1
P = + 1
D = P
Causing it to decode this:
1
2
3
4
5
1
I hope this makes sense ^_^'
__________________
mf
"Keep your detail close.. But keep your noise closer."
Fear the wrath of the muttering encoders!
Report this post to a moderator | IP: Logged
25th March 2003 21:48
bill_baroud
Member
Registered: Feb 2002
Location:
Posts: 80
thanks mf, so it's look like there is a problem in Avisynth :/
now i have to understand why they double fps 2 times.
Aristobule send me the culprit ^^; :
http://breizhbill.baroud.free.fr/avi60_07.zip hope you like the japanese
Report this post to a moderator | IP: Logged
25th March 2003 22:04
Aiorus
Junior Member
Registered: Oct 2001
Location:
Posts: 2
I had the same problem, a Raw file for an Anime, I fixed it with AviUtil, doing 2/5 and 1/2 frames conversions. I hope that helps.
Report this post to a moderator | IP: Logged
25th March 2003 22:33
neuron2
Moderator
Registered: Jan 2002
Location: Chicago, Illinois, USA
Posts: 1735
A point on Decimate(): If you are using Decimate() from the Decomb package, then to go from 120fps pattern to 30fps, you need:
Decimate(4).Decimate(3).Decimate(2)
Using just Decimate(4) will give you 90fps.
Decimate(2).Decimate(2) might also work.
__________________
Donald Graft
Filters for Avisynth and VirtualDub
http://shelob.mordor.net/dgraft/Last edited by neuron2 on 25th March 2003 at 22:54
Report this post to a moderator | IP: Logged
25th March 2003 22:45
bill_baroud
Member
Registered: Feb 2002
Location:
Posts: 80
thx Neuron, i was doing Decimate(2).Decimate(2)
but if i remember well, Decimate(4) give me the same output ???
how could i know if i use your Decimate or the Internal one (with the plugins autoloading)
seems like the internal has priority
Report this post to a moderator | IP: Logged
25th March 2003 23:05
neuron2
Moderator
Registered: Jan 2002
Location: Chicago, Illinois, USA
Posts: 1735
There isn't an internal one to my knowledge.
To see if mine is running, put show=true as a parameter to Decimate(). If you then see my copyright message on the output, then it is mine.
Decimate(4) will delete one frame out of every 4.
__________________
Donald Graft
Filters for Avisynth and VirtualDub
http://shelob.mordor.net/dgraft/Report this post to a moderator | IP: Logged
25th March 2003 23:40
ErMaC
Lurker in Training
Registered: Apr 2002
Location: Halfway Between The Gutter And The Stars
Posts: 136
You do not need to use Decimate in this circumstance, in fact I think it might be a bad thing since you're decoding all the dropped frames. I dealt with this back in the first raws that exibited this drop frame thingy. Use SelectEvery(x,y,z) where X is the # of frames in a sequence, and y and z are the frames to take. For your example you would use:
SelectEvery(4,0)
__________________
Justin "ErMaC" Emerson
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." -H2G2
Report this post to a moderator | IP: Logged
26th March 2003 01:29