View Full Version : FPS bug in avisynth 2.55
Sergejack
8th July 2005, 17:22
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\deen.dll")
a=DirectShowSource("G:\bt\[l33t-raws]FullMetal_Panic_TSR_00_(704x396_AC3_WMV9).[50E166D8].avi")
b=a.ChangeFPS(FramerateNumerator(a),FramerateDenominator(a)*5)
b=b.BicubicResize(384,288)
d=b.KillAudio()
#e=d.Deen("a3d")
d
Using this script, a strange bug happens : the resulting has 5 times less frame than the source but the last 4/5 of them are blank and the first 1/5 of them are each 25th frame from the source.
So it's 5 time to fast then goes black since the duration is equal from the source.
Sergejack
10th July 2005, 03:41
I really need to have this solved.
Can you tell me at least, what's the latest avisynth version safe for use ?
nexx
10th July 2005, 04:20
Try specifying the frame rate
Example:
a=DirectShowSource("G:\bt\[l33t-raws]FullMetal_Panic_TSR_00_(704x396_AC3_WMV9).[50E166D8].avi", fps=25.0)
Sergejack
10th July 2005, 04:33
I'll try to explain more clearly.
source : 120fps 5 min
aimed result : 24fps 5 min
I obtain a buggy 24fps 5 min animation having 1/25 (=5²) frames from source then all blanck.
When I seek in the file using VDUB, it display the rigth frame, but as soon as I play frame per frame I see it's only 1/25 frame of source instead of 1/5.
Try specifying the frame rate
Example:
a=DirectShowSource("G:\bt\[l33t-raws]FullMetal_Panic_TSR_00_(704x396_AC3_WMV9).[50E166D8].avi", fps=25.0)
a=DirectShowSource("G:\bt\[l33t-raws]FullMetal_Panic_TSR_00_(704x396_AC3_WMV9).[50E166D8].avi", fps=119.88)
it doesn't help. :S
EDIT :
Ok, I figured it out, the DirectShowSource() doesn't support drop frames.
I read a recent VDUB could lower the framerate of a stream if it contained drop frames, so I could separate the different in framerate segment of the video then use AVS but since it would be a pain in the ass, I would really benefit from another workarround.
Wilbert
10th July 2005, 12:57
@Sergejack,
What do you see in VDub when using this script:
DirectShowSource("G:\bt\[l33t-raws]FullMetal_Panic_TSR_00_(704x396_AC3_WMV9).[50E166D8].avi", fps=119.88)
Are there still blank/black frames?
Sergejack
10th July 2005, 15:13
@Sergejack,
What do you see in VDub when using this script:
DirectShowSource("G:\bt\[l33t-raws]FullMetal_Panic_TSR_00_(704x396_AC3_WMV9).[50E166D8].avi", fps=119.88)
Are there still blank/black frames?
If I play it frame per frame : Yeah.
Wilbert
10th July 2005, 15:48
Could you upload a part of that clip? (say 200 frames without audio).
Sergejack
10th July 2005, 17:12
Here you are.
1 MB sample : http://250gb.nezumi.fr/entraide/sample.avi
Wilbert
10th July 2005, 17:21
Link doesn't work.
Sergejack
10th July 2005, 20:15
It does, but you may have to insist.
Wilbert
10th July 2005, 20:38
Well, it doesn't work for me. Just mail it to 'wilbertdijkhof at yahoo.com'.
Wilbert
11th July 2005, 20:48
Ok, i looked at your clip.
DirectShowSource("G:\bt\[l33t-raws]FullMetal_Panic_TSR_00_(704x396_AC3_WMV9).[50E166D8].avi", fps=119.88)
doesn't work because you have dropped frames. Those frames are not stored in your stream (as bond explained to you), so they are not there when opening the avi in some program.
Get avs v2.56b4 and use the following script
DirectShowSource("F:\TestStreams\Temp\Serge\sample.avi",fps=23.976,convertfps=true)
or
DirectShowSource("F:\TestStreams\Temp\Serge\sample.avi",fps=119.88,convertfps=true)
FDecimate(23.976)
The stream you sent me is always 23.976 fps, so the first script works fine. If the complete streams has 23.976 and 29.97 parts the second script is better.
adamhj
12th July 2005, 15:56
this is just because your video is a 120fps file which contains null frames. DirectShowSource()(in AviSynth 2.55) would drop these null frames when read your clip. So the result is that you get an clip with a head of real 120 fps video and then blank clip.
To deal with this, you can use some tools to take those null frames out, use avisynth to load the clip with no null frame, add filter, encode, then add those null frames back with some tool(and also with the null frames location infomation from former tool), this is the exact way to deal these fake vfr clips.
Another simpler way is to use avisource to read your video source, this requires vfw decoders for your video. In your situation, you must have wmv9vcm and ac3acm installed in your system. wmv9vcm can be found at Microsoft's website, ac3acm..eh..you can google it. But i prefer to use 'audio=false' parameter to disable the audio and deal with audio separately, as ac3 audio needs remix before encoding in most situation.
//Add:
In latter way, don't forget to use a changefps command(or selectevery, some of my friends prefer this as it caculate framenumbers more exactly) to change the FPS to 24 or 30, as long as you do not want to get a huge monster with real 120fps...avisource would duplicate the nearest non-null frame before null frames to take place of them. In fact these frames make no sence at all, except for they taking frame place and time.
Sergejack
13th July 2005, 13:10
Another simpler way is to use avisource to read your video source, this requires vfw decoders for your video. In your situation, you must have wmv9vcm and ac3acm installed in your system. wmv9vcm can be found at Microsoft's website, ac3acm..eh..you can google it. But i prefer to use 'audio=false' parameter to disable the audio and deal with audio separately, as ac3 audio needs remix before encoding in most situation.
Thx :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.