VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Hi,
    I'm trying to sync a bd with a dvd as usual with avspmod stackvertical command,
    using AssumeFPS(25) for the BD file so it matches the dvd audio speed.
    but this time I am having a problem I had never encountered before.

    Once I choose a common frame, the two videos slowly go out of sync.

    So looking more closely at the DVD I notice that there is something strange,
    it seems to be interlaced in some way that I cannot understand.

    It looks like there are 13 progressive frames then other 12 interlaced or something like that.

    I compared them by counting the frames and seconds of a certain scene and they are both different,
    so I was wondering if it was possible to sync the untouched audio of the dvd with the video of the bd or not.

    here's a dvd short sample:
    https://www.dropbox.com/s/77vbfhol3004v8y/sc%20dvd%20sample.mkv?dl=0

    The BD is a normal 24000/1001 fps file.
    How do I treat the dvd in order to match the bd frames?
    Last edited by maudit; 17th Jun 2022 at 08:46.
    Quote Quote  
  2. The DVD uses 2:2:2:2:2:2:2:2:2:2:2:2:3 pulldown -- creating 25 frames from 24. This maintains the running time but creates two little jerks every second. You can restore the original 24p with:

    Code:
    TFM()
    TDecimate(Cycle=25, CycleR=1)
    Then add AssumeFPS(24000, 1001) to get 23.976 fps.
    Quote Quote  
  3. ok, wait a second, I've added these lines


    Code:
    TFM().TDecimate(Cycle=25, CycleR=1)
    AssumeFPS(24000, 1001)
    but still I can't sync the two videos,
    I usually change the BD FR to 25, so I can use the untouched DVD audio.
    I mean I have to mux the dvd audio with the bd video.
    but in this case I still don't understand how I do that..
    Last edited by maudit; 17th Jun 2022 at 14:27.
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Mux the audio and video in MKVtoolnix and create an
    Mkv file
    Quote Quote  
  5. Originally Posted by davexnet View Post
    Mux the audio and video in MKVtoolnix and create an
    Mkv file
    well, sure I'll do that.
    as soon as I figure out how to sync this damn dvd.

    just see this example scene.
    https://www.dropbox.com/s/uf9x0ad8zhcy5sg/StackVertical.mkv?dl=0

    is all ok until the dvd frame number 926 that is doubled...
    again the number 1447 is doubled, then the 2683 is doubled.. and so on the entire movie.
    the desync is slowly increasing.
    Last edited by maudit; 17th Jun 2022 at 15:58.
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    The operation given by jagabo above cleans up the judder from the frame-converted DVD video,
    but does alter the sound at all. If the audio is late as advances further with your attempt to multiplex it with the
    Blu-ray, you either slow down the video or speed up the audio ...
    How far out is it at the end of the movie?
    Quote Quote  
  7. Originally Posted by davexnet View Post
    The operation given by jagabo above cleans up the judder from the frame-converted DVD video,
    but does alter the sound at all. If the audio is late as advances further with your attempt to multiplex it with the
    Blu-ray, you either slow down the video or speed up the audio ...
    How far out is it at the end of the movie?
    the audio must be untouched, but I have to know the appropriate starting delay, and eventually adding/removing BD's frames if needed.
    how can I if the dvd has doubled frames?

    the bd script
    Code:
    FFVideoSource("C:\_track1_[und].mkv", fpsnum=24000, fpsden=1001, threads=1)
    AssumeFPS(25)
    the dvd script:
    Code:
    FFVideoSource("C:\_track1_[eng].mkv", fpsnum=25, fpsden=1, threads=1)
    TFM().TDecimate(Cycle=25, CycleR=1)
    AssumeFPS(25)
    Loop(306,0,0) #this to compensate the extra BD CRITERION intro

    this is the final frame, at the end the difference is 250 frames.
    https://www.dropbox.com/s/uwg5kldej43mw41/StackVertical2final%20frame.png?dl=0
    Last edited by maudit; 17th Jun 2022 at 17:23.
    Quote Quote  
  8. It looks like the difference between 24 and 23.976 fps. Try adding TDecimate(Cycle=1001, CycleR=1) and AssumeFPS(24).
    Quote Quote  
  9. Originally Posted by jagabo View Post
    It looks like the difference between 24 and 23.976 fps. Try adding TDecimate(Cycle=1001, CycleR=1) and AssumeFPS(24).
    Code:
    TFM().TDecimate(Cycle=1001, CycleR=1)
    AssumeFPS(24)
    Loop(298,0,0)
    noway, this is worst than before and all the scripts became unusable cause of very slow every time I change frame.
    I've also a dvdrip made by someone else but I don't know what commands have been used, it has 1 doubled frame every 24.
    Quote Quote  
  10. Code:
    TFM().TDecimate(Cycle=25, CycleR=1)
    TDecimate(Cycle=1001, CycleR=1)
    AssumeFPS(24)
    this is much better, only few frames of difference, but is almost impossible to add or remove bd frames,
    it's all too much slow. it plays at 1 fps and get stuck for 10 sec everytime I jump to another frame.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I don't understand what you're so doing. Are you trying to reencode the
    Blu-ray video to match the DVD audio?
    Why not change the frame rate to 24 in MKVtoolnix and see how close that is
    Quote Quote  
  12. Originally Posted by davexnet View Post
    I don't understand what you're so doing. Are you trying to reencode the
    Blu-ray video to match the DVD audio?
    Why not change the frame rate to 24 in MKVtoolnix and see how close that is
    correct, I want to sync(find the initial delay), and editing the bd(if necessary), in order to have the bd video equal to the dvd video,
    so I can mux the bd with the dvd untouched audio.

    change the bd to 24? ok I can try but the dvd audio is running at 25. isn't it?
    Quote Quote  
  13. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Yes but it's not sped up to 25 as jagobo said earlier, it's achieve by repeating frames as he also mentioned...
    Quote Quote  
  14. [QUOTE=maudit;2660233]
    Code:
    TFM().TDecimate(Cycle=25, CycleR=1)
    TDecimate(Cycle=1001, CycleR=1)
    AssumeFPS(24)
    this is much better, only few frames of difference, [/QWUOTE]
    Yes, that's what I meant -- ADD the second TDecimate().

    Originally Posted by maudit View Post
    but is almost impossible to add or remove bd frames,
    it's all too much slow. it plays at 1 fps and get stuck for 10 sec everytime I jump to another frame.
    I originally wrote that it would be glacially slow but I guess I removed it before posting. If you can't live with that try ChangeFPS(24000,1001) and AssumeFPS(24). ChangeFPS() will remove a "random" frame rather than a duplicate. But it will be much faster.
    Quote Quote  
  15. basically i do not care about the fps the bd will be encoded, but 25 isn't correct, as the dvd audio is at 25?
    anyway that command
    ChangeFPS(24000,1001)
    seems very fast and also it match the bd frames, no all, like a complete scene is in sync, the following is 1 frame out of sync.

    I'm too tired now, I appreciate your help guys, but I really have to go sleep.
    see ya tomorrow.
    I have to do this. god damn.
    Last edited by maudit; 18th Jun 2022 at 04:18.
    Quote Quote  
  16. Originally Posted by maudit View Post
    anyway that command
    ChangeFPS(24000,1001)
    seems very fast and also it match the bd frames, no all, like a complete scene is in sync, the following is 1 frame out of sync.
    As I said, it will delete a "random" frame. It's not truly random but by a simple nearest neighbor algorithm based on timing, not picture content. Even TDecimate() with such large cycles will make mistakes. It may not be able to tell the difference between a true duplicate and say a series of all black frames, or nearly identical frames in a still shot.

    Does it really matter if the video is off by a frame here and there? You won't really notice much at normal speed playback. Maybe you'll see a jerk here and there (from a duplicate or missing frame). But given that it's fast to scrub through with ChangeFPS() you and easily fix the errors manually -- remove duplicates with Loop(0,N,N), insert missing frames with something like InsertFramesMC(N).
    Quote Quote  
  17. Originally Posted by jagabo View Post
    As I said, it will delete a "random" frame. It's not truly random but by a simple nearest neighbor algorithm based on timing, not picture content. Even TDecimate() with such large cycles will make mistakes. It may not be able to tell the difference between a true duplicate and say a series of all black frames, or nearly identical frames in a still shot.

    Does it really matter if the video is off by a frame here and there? You won't really notice much at normal speed playback. Maybe you'll see a jerk here and there (from a duplicate or missing frame). But given that it's fast to scrub through with ChangeFPS() you and easily fix the errors manually -- remove duplicates with Loop(0,N,N), insert missing frames with something like InsertFramesMC(N).

    ok I got it, and no is not really a problem if the audio sync is off here and here.
    now about to fix missing dvd frames it becomes pretty complicated, is not just using Loop to add or remove frames where is needed.
    ie. is very complicated when on a scene change there's an interlaced frame.
    I can't really determine if to fix this scene or the following one.
    thx for all the hints, you're the man, but I'm gonna temporarily park the folder and will retry in the future.
    this is gonna make me mad.
    Quote Quote  
  18. Can you please describe me what are you trying to accomplish
    Quote Quote  
  19. Originally Posted by s-mp View Post
    Can you please describe me what are you trying to accomplish
    synthetically, I have an english audio bd and an eng/ita audio dvd.
    I've to encode the bd and mux it with the dvd audio, but first I have to
    sync the beginning of the two video sources,
    add and/or remove frames on the BD if necessary in order to make it the same as the dvd.

    but since the dvd has the "issue" mentioned above, basically it's interlaced and has some doubled frames,
    it becomes quite hard to identify where to add or remove unwanted bd frames.
    Quote Quote  



Similar Threads

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