VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. I have a youtube video at 60FPS not interlaced and i want to convert to DVD (we'll see in the future if it's PAL or NTSC). The footage was re-encoded badly to 60fps and then uploaded, i don't know what it is in origin but i suppose 25 more likely. On the entire stream there are duplicated frames in this order:
    AABBCCCDDEEE
    and then the cycle starts again. It seems a 2:2:3:2:3 pulldown.

    Using Avisynth, how can I restore the original framerate? What would the original framerate have been?
    Quote Quote  
  2. My 2 cents on my way to bed: with 2:2:3:2:3 pulldown you have 6 video frames per repeat, and 5 film frames per repeat, so
    Code:
    TDecimate(cycle=6, cycleR=1)
    throwing out 1 in every 6 frame should do the job. (Maybe additionally try mode=1.)
    If you find cycle=6 is choosing the wrong frame regularly on your source, then try cycle=12,cycleR=2.
    If the pattern isn't fixed, try sRestore intead. (or mode 7 with a set fps,..)
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  3. In the meantime i tried SelectEvery(12,0,2,4,7,9) and doesn't work, but with SelectEvery(12,1,3,6,8,11) works perfectly for entire footage, i've checked frame by frame manually in virtualdub for about 2000 frames. Maybe it's me who doesn't understand the selectevery function.

    Having such a pattern
    AABBCCCDDEEE
    where step is 12 because there are 12 frames, and since you start counting from 0 and not from 1, i need frame[0] + frame[2] + frame[4] + frame[7] + frame[9]; hence SelectEvery(12,0,2,4,7,9). This should be equivalent for example SelectEvery(12,1,2,4,7,9) == SelectEvery(12,0,3,5,7,11).

    So why is it different in my case?
    Quote Quote  
  4. Originally Posted by bruraschi View Post
    In the meantime i tried SelectEvery(12,0,2,4,7,9) and doesn't work, but with SelectEvery(12,1,3,6,8,11) works perfectly for entire footage, i've checked frame by frame manually in virtualdub for about 2000 frames. Maybe it's me who doesn't understand the selectevery function.

    Having such a pattern
    AABBCCCDDEEE
    where step is 12 because there are 12 frames, and since you start counting from 0 and not from 1, i need frame[0] + frame[2] + frame[4] + frame[7] + frame[9]; hence SelectEvery(12,0,2,4,7,9). This should be equivalent for example SelectEvery(12,1,2,4,7,9) == SelectEvery(12,0,3,5,7,11).

    So why is it different in my case?
    Are you using a frame accurate source filter ?

    Double check your pattern

    SelectEvery(12,0,2,4,7,9) should work for AABBCCCDDEEE

    demo
    Code:
    blankclip(length=2500, fps=25)
    showframenumber()
    changefps(60)
    trim(8,0) #align to pattern AABBCCCDDEEE
    #SelectEvery(12,0,2,4,7,9)

    If the pattern is changes slightly - you will go off cycle and get the wrong frames. Adaptive options would be better choices in that case as selur suggested

    For example, in YT video if you have 59.94 FPS, not 60/1 FPS , you will get a bunp in the pattern every 1001 fraems
    Quote Quote  
  5. The AABBCCCDDEEE pattern didn't start at frame 0.
    Quote Quote  
  6. Oh damn, I figured out the problem: I had the Trim() in the wrong position. In the end the video turned out to be at 25FPS so it will become a dvd pal.

    The AABBCCCDDEEE pattern didn't start at frame 0.
    Indeed my script was like this
    Code:
    Avisource(X)
    Trim(159, end=Framecount)
    SelectEvery(12,1,3,6,8,11)
    and just by luck it throws out a correct pattern even if shifted: BCDEA

    But the correct way to do it was to correctly locate the beginning and trim there.

    By cutting at the real starting point (trim 156) the scheme 12,0,2,4,7,9 works as expected.

    (@poisondeathray: obviously it was an AviSource; I have previously converted and downsized the original mp4 into the avi format utvideo+pcm for editing & other stuff, the original mp4 is 60/1 FPS not 60000/1001)

    So in the end was my fault

    ( @Selur: no way, completely wrong, and even if you could get it to work with that plugin it's horribly slow. )
    Last edited by bruraschi; 29th Oct 2025 at 11:21.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!