Log in

View Full Version : SelectEven() not functioning properly with 60fps material?


Waddles
28th June 2013, 01:44
Hi,

I've got a 60fps television capture. (720p) For some reason, when I encode it, the final result is 29fps as I want it to be, but there is still a duplicate frame every other even though that's what I want removed in the first. I have SelectEven in my script and even tried SelectOdd, yet I do not have any success with it. Just to see I tried encoding it with Handbrake, setting the fps to 29.97, and sure enough that did the trick.

Here is the script I am working with.

LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ColorMatrix.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RemoveGrain.dll")

DGDecode_mpeg2source("C:\Videos\Indexing\video.d2v", info=3)

ChangeFPS(last,last,true) # out of order protection
Selecteven()
ColorMatrix(hints=false, threads=0)
Spline36Resize(1280,720)
removegrain(mode=2)

If it matters I'm running 64bit avisynth. I've tried a script with just Selecteven and that yielded no results either. When I did selectodd I just got green frames. I also tried decimate(cycle=2) but that also gave me green frames continuously.

manono
28th June 2013, 07:59
For some reason, when I encode it, the final result is 29fps as I want it to be...
Then SelectEven is working as it should and the claim made in your thread title is incorrect. The video length remains the same too, doesn't it? And the framecount is halved? If the answer to either of those questions is 'no', then something else you're doing, maybe in your encoder, is the cause.

Is this a movie, by chance, or something else shot on film? Have you considered that the framerate should be 23.976fps and you should remove the remaining duplicate frames using 'TDecimate' (from TIVTC) or 'Decimate' (from Decomb)?
Just to see I tried encoding it with Handbrake, setting the fps to 29.97, and sure enough that did the trick.
Does Handbrake accept AviSynth scripts as input?

Waddles
28th June 2013, 16:12
The video length is the same when I encode it yes. The 720p source is a television recording. It's recorded at 60fps with a duplicate frame every other. When I run selecteven() though the duplicate frames are still there, the only way I managed to fully remove them was by bringing it all the way down to 14.98 fps (half of 29.97) which I do not want to do, I want to make it 29.97 with no duplicates.

I've tried tdecimate. What TIVTC does on this video (as well as selectodd) is it just turns half the frames to nothing but green. With making it 23.976 fps I get a pattern of the actual video frame, a green frame, a video frame, a green frame, and so on. Sometimes it's two green in a row. Here's the result when done:

http://www.filedropper.com/test_21

WARNING: WHEN PLAYED, DUE TO A RAPID PATTERN OF VIDEO AND 100% GREEN FRAMES FOR SOME REASON, IT FLASHES VERY QUICKLY. I DON'T KNOW IF IT CAN TRIGGER SEIZURES IN THOSE WITH EPILEPSY BUT I FIGURED IT WOULD BE BEST TO MAKE NOTE OF THAT

And no, Handbrake does not accept Avisynth.

Guest
28th June 2013, 16:55
Post a link to a sample of the unprocessed video.

Waddles
28th June 2013, 16:58
INTERESTING: I think it's some sort of 64bit Avisynth compatibility issue. I used the same exact script on a 32bit machine (with 32bit Avisynth of course) and all was fine. Selecteven() removed the duplicate frames as it should.

The raw video:

http://www.filedropper.com/sex

(It's National Geographic's "Sex: How It works" which is why the URL is what it is)