VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Hey everyone,

    I have a few files that were encoded in 24.000 fps but are actually 23.976.
    The pattern is as follows: 501, 1502, 2503, 3504, 4505, 5506 and so on are duplicate frames.
    So after the 500th frame it's the usual NTSC 1001 value but I can't for the life of me figure out how to remove those. I tried TDecimate & SelectRangeEvery to no avail due to the complicated pattern. I need a way to ignore the first 500 frames, discard the first frame and then remove 1 frame in every 1001 frames.

    I'm using StaxRip but I feel like I won't get far with it as my workflow right now isn't exactly ideal.
    My current "hacky" way of achieving what I need is:
    Code:
    SelectRangeEvery(9999999, 500)
    AssumeFPS(24000, 1001)
    This generates a roughly 20 seconds clip (the first 500 frames) with no audio that I will save as part1.mp4
    Then I'll do the same for the rest of the video, while ignoring the first 501 frames.
    Code:
    SelectRangeEvery(1001, 1000, 501)
    AssumeFPS(24000, 1001)
    This will be saved as part2.mp4 (without the audio of course)

    Then I simply just append part2.mp4 to part1.mp4 using mktvoolnix, mux the audio, subs & chapters from the original source file and that's pretty much it.
    I'm not sure if my script contains any errors (for example I'm not sure the 501 is correct in the 2nd script) but after examining both source file and the final output, there are no duplicate frames anymore.
    But I still feel like there is a better, more streamlined and automated way to achieve the same thing - without the manual work of muxing etc.

    Curious to hear what other people have to say. Isn't there a way to use SelectRangeEvery in reverse, so those selected frames get deleted while keeping the other ones?
    Quote Quote  
  2. Originally Posted by sebastiaaan View Post
    Hey everyone,

    I have a few files that were encoded in 24.000 fps but are actually 23.976.
    The pattern is as follows: 501, 1502, 2503, 3504, 4505, 5506 and so on are duplicate frames.
    So after the 500th frame it's the usual NTSC 1001 value but I can't for the life of me figure out how to remove those. I tried TDecimate & SelectRangeEvery to no avail due to the complicated pattern. I need a way to ignore the first 500 frames, discard the first frame and then remove 1 frame in every 1001 frames.

    I'm using StaxRip but I feel like I won't get far with it as my workflow right now isn't exactly ideal.
    My current "hacky" way of achieving what I need is:
    Code:
    SelectRangeEvery(9999999, 500)
    AssumeFPS(24000, 1001)
    This generates a roughly 20 seconds clip (the first 500 frames) with no audio that I will save as part1.mp4
    Then I'll do the same for the rest of the video, while ignoring the first 501 frames.
    Code:
    SelectRangeEvery(1001, 1000, 501)
    AssumeFPS(24000, 1001)
    This will be saved as part2.mp4 (without the audio of course)

    Then I simply just append part2.mp4 to part1.mp4 using mktvoolnix, mux the audio, subs & chapters from the original source file and that's pretty much it.
    I'm not sure if my script contains any errors (for example I'm not sure the 501 is correct in the 2nd script) but after examining both source file and the final output, there are no duplicate frames anymore.
    But I still feel like there is a better, more streamlined and automated way to achieve the same thing - without the manual work of muxing etc.

    Curious to hear what other people have to say. Isn't there a way to use SelectRangeEvery in reverse, so those selected frames get deleted while keeping the other ones?


    Another way is to process the 2 parts in the script

    if 500,501 are duplicates (with framenumbering starting at zero), trim the 1st section use assumefps(24000,1001) on it . Use SelectRangeEvery on the 2nd section then AssumeFPS

    Code:
    o=whateversource()
    
    ta=o.trim(0,499)
    tb=o.trim(500,0)
    
    ta.assumefps(24000,1001) + tb.selectrangeevery(1001,1000,1).assumefps(24000,1001)

    If you've reported the incorrect offset (eg. you started counting at "1" not zero), just adjust the values - you can preview scripts in avspmod or vdub2
    Quote Quote  



Similar Threads

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