VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Member kwanbis's Avatar
    Join Date
    May 2008
    Location
    Argentina
    Search Comp PM
    Hello everyone. It's been a while since I posted here. I have two video/audio files:

    Code:
    -------- OLD MP4 FILE WITH LOCAL LANGUAGE -------- 
    Complete name                            : OLD.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/avc1)
    File size                                : 48.3 MiB
    Duration                                 : 22 min 16 s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 303 kb/s
    Encoded date                             : UTC 2009-12-07 19:43:41
    Tagged date                              : UTC 2009-12-07 19:43:41
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L5.1
    Format settings                          : CABAC / 8 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 8 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 22 min 16 s
    Bit rate                                 : 268 kb/s
    Maximum bit rate                         : 985 kb/s
    Width                                    : 512 pixels
    Height                                   : 384 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Constant
    Frame rate                               : 29.970 (30000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.045
    Stream size                              : 42.7 MiB (88%)
    Writing library                          : x264 core 56 svn-680
    Encoding settings                        : cabac=1 / ref=5 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=6 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=5 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=268 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30
    Encoded date                             : UTC 2009-12-07 19:43:41
    Tagged date                              : UTC 2009-12-07 19:43:47
    Codec configuration box                  : avcC
    
    Audio
    ID                                       : 2
    Format                                   : AAC LC SBR PS
    Format/Info                              : Advanced Audio Codec Low Complexity with Spectral Band Replication and Parametric Stereo
    Commercial name                          : HE-AACv2
    Format settings                          : Implicit / NBC
    Codec ID                                 : mp4a-40-5
    Duration                                 : 22 min 16 s
    Bit rate mode                            : Variable
    Bit rate                                 : 32.0 kb/s
    Maximum bit rate                         : 35.7 kb/s
    Channel(s)                               : 2 channels
    Channel layout                           : C
    Sampling rate                            : 44.1 kHz
    Frame rate                               : 21.533 FPS (2048 SPF)
    Compression mode                         : Lossy
    Stream size                              : 5.10 MiB (11%)
    Encoded date                             : UTC 2009-12-07 19:43:47
    Tagged date                              : UTC 2009-12-07 19:43:47
    
    -------- NEW MKV FILE WITH BETTER VIDEO --------
    General
    Complete name                            : NEW.mkv
    Format                                   : Matroska
    Format version                           : Version 4
    File size                                : 394 MiB
    Duration                                 : 25 min 2 s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 2 200 kb/s
    Encoded date                             : UTC 2019-10-18 03:10:59
    Writing application                      : mkvmerge v10.0.0 ('To Drown In You') 32bit
    Writing library                          : libebml v1.3.4 + libmatroska v1.4.5
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4
    Format settings                          : CABAC / 5 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 5 frames
    Codec ID                                 : V_MPEG4/ISO/AVC
    Duration                                 : 25 min 2 s
    Bit rate                                 : 1 749 kb/s
    Width                                    : 1 440 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Constant
    Frame rate                               : 23.976 (24000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.047
    Stream size                              : 313 MiB (80%)
    Writing library                          : x264 core 152 r2851 ba24899
    Encoding settings                        : cabac=1 / ref=5 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=4 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=0 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Default                                  : Yes
    Forced                                   : No
    
    Audio
    ID                                       : 2
    Format                                   : FLAC
    Format/Info                              : Free Lossless Audio Codec
    Codec ID                                 : A_FLAC
    Duration                                 : 25 min 2 s
    Bit rate mode                            : Variable
    Bit rate                                 : 448 kb/s
    Channel(s)                               : 2 channels
    Channel layout                           : L R
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 11.719 FPS (4096 SPF)
    Bit depth                                : 16 bits
    Compression mode                         : Lossless
    Stream size                              : 80.3 MiB (20%)
    Title                                    : Main
    Writing library                          : libFLAC 1.3.2 (UTC 2017-01-01)
    Language                                 : Japanese
    Default                                  : Yes
    Forced                                   : No
    I want to remux the OLD audio track from the MP4 into the MKV file.

    Now, the old audio is delayed by 60 seconds, so I use 60.000 as the delay in MKVmerge and it works fine in the beginning, but then the audio gets de-synchronized with the video over time.

    I understand it is because of the difference in sample rate, so I was wondering how can I fix the old audio so that I can include it in the NEW MKV file.

    If it can be done with FFMPEG or some command-line tool, much better. I don't mind re-encoding the AAC.

    Any pointers, tips, or ideas? Thanks!

    EDIT: I keep looking around and it seems the problem is that the MP4 is 29.970fps and the MKV is 23.976fps, so I am currently searching for ways to make the AAC 23.976fps, although I am not sure that is the real problem.
    Last edited by kwanbis; 18th Feb 2021 at 15:40.
    Quote Quote  
  2. This can be done by my clever Ffmpeg-GUI.
    Quote Quote  
  3. Member kwanbis's Avatar
    Join Date
    May 2008
    Location
    Argentina
    Search Comp PM
    Originally Posted by ProWo View Post
    This can be done by my clever Ffmpeg-GUI.
    Hey ProWo.

    I tried but I couldn't make it work. The resulting file was in slow motion, so it lost sync right away.

    I would re-try tomorrow. It has two options, IIRC, for length and length & pitch, I used length by the way.

    Any other recommendation or tip? Thanks!
    Last edited by kwanbis; 18th Feb 2021 at 16:27.
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    It's more important to look at the run time of the videos. The first 22 minutes 16 seconds,
    while the second is 25 minutes 2 seconds.
    That's too much difference to account for the common 4% PAL/NTSC speedup/slowdown - so there
    must be some other differences in the two cuts - different scenes, commercials, some other speed difference, etc,etc
    Quote Quote  
  5. Member kwanbis's Avatar
    Join Date
    May 2008
    Location
    Argentina
    Search Comp PM
    Originally Posted by davexnet View Post
    It's more important to look at the run time of the videos. The first 22 minutes 16 seconds,
    while the second is 25 minutes 2 seconds.
    That's too much difference to account for the common 4% PAL/NTSC speedup/slowdown - so there
    must be some other differences in the two cuts - different scenes, commercials, some other speed difference, etc,etc
    Correct, the first one has an intro (the 60 seconds) and an outro (the difference). I don't care about both.

    I will double check tomorrow and respond.
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by kwanbis View Post
    Originally Posted by davexnet View Post
    It's more important to look at the run time of the videos. The first 22 minutes 16 seconds,
    while the second is 25 minutes 2 seconds.
    That's too much difference to account for the common 4% PAL/NTSC speedup/slowdown - so there
    must be some other differences in the two cuts - different scenes, commercials, some other speed difference, etc,etc
    Correct, the first one has an intro (the 60 seconds) and an outro (the difference). I don't care about both.

    I will double check tomorrow and respond.
    Account for the intro+outtro then compare the time difference
    Quote Quote  
  7. Originally Posted by kwanbis View Post
    Hey ProWo.

    I tried but I couldn't make it work. The resulting file was in slow motion, so it lost sync right away.
    You have to change the audiostream only and remux the new audiofile with the 60sec delay. So there can be no slow motion.
    Quote Quote  
  8. Member kwanbis's Avatar
    Join Date
    May 2008
    Location
    Argentina
    Search Comp PM
    Thanks, so apparently (and I am at work so I could only check in the morning briefly for 10 minutes during breakfast), the new version includes an additional frame here and there. So apparently, that is the problem. I need to do a more thorough check.

    In any case, assuming that the videos had the same length and exact same frames, shouldn't I still re-sync the audio because of the FPS difference on the videos?

    This is all totally new for me, so I am just wondering if before taking the time to edit the audio in Audacity or similar, don't I need to first re-sync to the new FPS or something like that?

    Also, what tool is good to sync audio/video manually? I am not sure I have the time or the skills to do it, but in case I want to give it a try?
    Last edited by kwanbis; 19th Feb 2021 at 05:46.
    Quote Quote  
  9. Originally Posted by kwanbis View Post
    In any case, assuming that the videos had the same length and exact same frames, shouldn't I still re-sync the audio because of the FPS difference on the videos?
    No. Audio has no frame rate, only a length. There are many ways you can change the frame rate of a video. Some change the running time, some don't. Don't be surprised if the two videos are different cuts of the movie, with added or deleted scenes. In cases like that just changing the length won't work.
    Quote Quote  
  10. Upload both movie anywhere, post the links here and i will adjust the audio for you.
    Quote Quote  



Similar Threads