VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Hi, I'm editing a bluray in order to match the sync with a dvd.
    I had to cut some scenes, and arrived at a certain frame near the end,
    the dvd-r has been edited in a slow-mo way.
    I've tried to start the sync by using

    Loop(2,0,0)
    Loop(2,3,3)
    Loop(2,6,6)
    etc..

    and it works until a certain point, but then it become long and complicated due to frames are very similar and
    the slow-mo is not constant, it increases progressively.

    so before to replace the BD scene with the DVD upscaled one, which i think is a bad idea, also cause different colors..
    I'm wondering if I can act to the bd frames with some simple commands that automatically duplicate the frames in order to reach the lenght of the DVD scene, maintaining a certain sync, not necessarily perfect.

    any suggestions?


    here below the link of the stakcvertical script encode in which the upsided image is the dvd.
    https://www.dropbox.com/s/m5ok7phbsuupzku/StackVertical.mkv?dl=0
    Last edited by maudit; 6th Nov 2022 at 07:46.
    Quote Quote  
  2. Assuming the top half is the full shot from the BD and the bottom half is the full shot with extra frames at the end:

    Code:
    LWLibavVideoSource("StackVertical.mkv") 
    src = last
    
    Crop(0,0,-0,height/2) # top half of frame (BD)
    # 166 frames from the BD need to be reduced to 58 frames from the DVD
    # so 25 fps needs to be reduced to 25 * 58 / 166 = ~8.735 fps
    # use SRestore() to preferentially remove blended frames
    SRestore(frate=8.735).AssumeFPS(25)
    Overlay(src, last) # so we can see the new BD clip above the original DVD clip
    
    Trim(0,57)
    Quote Quote  
  3. is the contrary, or i don't have understand..
    I have to edit the BD, adding frames, in order to match the DVD lenght that has more frames as it ìs in slomo.
    the stackvertical video top half is the DVD, i have to edit the bottom half part.


    my BD script

    Code:
    LoadPlugin("C:\util\MeGUI-2913-64\tools\lsmash\LSMASHSource.dll")
    V=LWLibavVideoSource("C:\_ - 2 - h264, 1080p24.mkv")
    
    V=V.AssumeFPS(25) # original 24p
    
    V=V.Loop(0,183495,183550)
    V=V.Loop(0,183525,185294)
    V=V.Loop(0,183540,183546)
    V=V.Loop(0,183553,183760)
    V=V.Loop(0,183568,183569)
    
    A=Trim(V,0,183567)
    SLOMO=Trim(V,183568,183625)
    B=Trim(V,183626,0)
    
    #SLOMO=SLOMO."WHAT HERE?"
    
    
    V=A++SLOMO++B
    
    V=V.crop(0, 20, 0, -20)
    V=V.Spline36Resize(720,388)
    #bbmod(0,0,0,0,128,8)
    
    Return V
    
    Prefetch(7)

    the dvd scene is from 183568 and 183733 = 166 frames
    the BD scene is from 183568 and 183625 = 58 frames
    difference 108 frames.
    the 58 frames BD scene must become long 166 frames.

    so what i write here?
    SLOMO=SLOMO."WHAT HERE?"

    something like..
    .DuplicateEachFrameByX or
    .SlomoByX idk..

    maybe?
    SLOMO=SLOMO.AssumeFPS(num?,den?).ChangeFPS(25)

    this last line seems to work well with a value around 9, i'm still trying to figure out which num and den to use...

    ...oh ok you were right..THX!
    SLOMO=SLOMO.AssumeFPS(1450, 166).ChangeFPS(25)

    using your fraction it works, (58*25/166)
    thx jagabo.
    Last edited by maudit; 6th Nov 2022 at 09:39.
    Quote Quote  
  4. Originally Posted by maudit View Post
    the dvd scene is from 183568 and 183733 = 166 frames
    the BD scene is from 183568 and 183625 = 57 frames
    difference 109 frames.
    the BD scene must become long 166 frames.
    That's even simpler. ChangeFPS(25.0*166.0/57.0).AssumeFPS(25). If you prefer frame blending use ConvertFPS instead of ChangeFPS. Or for smooth motion use your favorite motion compensated frame rate changer. For example, InterFrame(NewNum=int(25.0*166.0/57.0*1000.0), NewDen=1000, cores=4).AssumeFPS(25). Sample of the last option attached.
    Image Attached Files
    Quote Quote  
  5. I've edited the previous message many times, so i would write this as confirmation.

    AssumeFPS(1450, 166).ChangeFPS(25)
    it appears perfect to me. I continue this way.

    thanks for the hint.
    Quote Quote  
  6. ok, i'm sorry, we had write the comment in the same time, i've read it now,

    bd frames are 58 not 57, anyway..
    now without using other stuffs which I have to understand yet, like InterFrame..
    I've tried to use both

    #SLOMO=SLOMO.AssumeFPS(1450, 166).ChangeFPS(25)
    #SLOMO=SLOMO.AssumeFPS(1450, 166).ConvertFPS(25)

    using ConvertFPS the result is more similar to the DVD, anyway I prefer to use ChangeFPS. it's good enough.

    thanks again jag.

    edit: oh! you added a sample, now i see.. it looks fine. i suppose it's InterFrame..
    Last edited by maudit; 6th Nov 2022 at 10:11.
    Quote Quote  
  7. Yes, the sample was InterFrame()
    Quote Quote  



Similar Threads

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