VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Mar 2013
    Location
    Argentina
    Search Comp PM
    I have a video downloaded and it plays perfectly, but the problem is when I try to convert video file or use it in a video editor the audio and video desyncs



    I tried lot of software, but it seems that the audio has "keys" or "times" to sync the video when playing (because, as you will see, audio has the "duration" linked to the "source duration") I don't know what to do.

    The audio is AAC LC SBR ( Advanced Audio Codec Low Complexity with Spectral Band Replication) and the video is AVC. FPS are the same when re-encode, there was not a speed up or down.

    Here is the full original audio details:
    Audio
    ID : 1
    Format : AAC LC SBR
    Format/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication
    Commercial name : HE-AAC
    Format settings : Implicit
    Codec ID : mp4a-40-2
    Duration : 3 h 4 min
    Source duration : 3 h 30 min
    Bit rate mode : Variable
    Bit rate : 111 kb/s
    Nominal bit rate : 127 kb/s
    Maximum bit rate : 194 kb/s
    Channel(s) : 2 channels
    Channel layout : L R
    Sampling rate : 48.0 kHz
    Frame rate : 23.438 FPS (2048 SPF)
    Compression mode : Lossy
    Stream size : 146 MiB (1%)
    Source stream size : 167 MiB (2%)
    mdhd_Duration : 11059712
    Here the video that is untouched:

    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom (isom/iso2/avc1/mp41)
    File size : 9.81 GiB
    Duration : 3 h 30 min
    Overall bit rate mode : Variable
    Overall bit rate : 6 678 kb/s

    Video
    ID : 2
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L3.1
    Format settings : CABAC / 2 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference : 2 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 3 h 30 min
    Source duration : 3 h 30 min
    Bit rate : 6 557 kb/s
    Nominal bit rate : 3 060 kb/s
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Variable
    Frame rate : 52.493 FPS
    Minimum frame rate : 0.009 FPS
    Maximum frame rate : 90 000.000 FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.136
    Stream size : 9.63 GiB (98%)
    Source stream size : 9.63 GiB (98%)
    Writing library : x264 core 148 r2579M 73ae2d1
    Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=4 / lookahead_threads=1 / sliced_threads=0 / nr=250 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=0 / weightp=1 / keyint=62 / keyint_min=6 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=2pass / mbtree=1 / bitrate=3060 / ratetol=1.0 / qcomp=0.60 / qpmin=5 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=6120 / vbv_bufsize=3060 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Color range : Limited
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709
    mdhd_Duration : 12620990
    Codec configuration box : avcC
    The resulting encoded video has the same lenght, but the audio as you could see is too short. Maybe the original files has "keys" to control the audio, I don't know. Is the same if the video ends short (this is better because removes the partes were the audio already has cut when editing or rendered) or the audio short, I was the file re-encoded but synced.

    Re-encode file:
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom (isom/avc1)
    File size : 5.27 GiB
    Duration : 3 h 30 min
    Overall bit rate mode : Variable
    Overall bit rate : 3 586 kb/s
    Encoded date : UTC 2020-04-15 22:24:32
    Tagged date : UTC 2020-04-15 22:24:32

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4
    Format settings : CABAC / 8 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference : 8 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 3 h 30 min
    Bit rate : 3 412 kb/s
    Maximum bit rate : 8 571 kb/s
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 52.493 FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.071
    Stream size : 5.01 GiB (95%)
    Writing library : x264 core 157 r2969 d4099dd
    Encoding settings : cabac=1 / ref=8 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / 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=22 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=525 / keyint_min=52 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Encoded date : UTC 2020-04-15 22:24:32
    Tagged date : UTC 2020-04-15 22:26:19
    Codec configuration box : avcC

    Audio
    ID : 2
    Format : AAC LC
    Format/Info : Advanced Audio Codec Low Complexity
    Codec ID : mp4a-40-2
    Duration : 3 h 4 min
    Bit rate mode : Variable
    Bit rate : 192 kb/s
    Maximum bit rate : 197 kb/s
    Channel(s) : 2 channels
    Channel layout : L R
    Sampling rate : 48.0 kHz
    Frame rate : 46.875 FPS (1024 SPF)
    Compression mode : Lossy
    Stream size : 253 MiB (5%)
    Language : new
    Encoded date : UTC 2020-04-15 19:37:32
    Tagged date : UTC 2020-04-15 22:26:19
    This is a video downloaded with DownloadHelper.

    PD: I put the .mp4 in MKV Toolnix and the resulting MKV was synced audio with video. But I want to convert the file to another format and reduce size.
    Last edited by Jorchking; 16th Apr 2020 at 23:55. Reason: Clarify
    Quote Quote  
  2. Isn't ESPN 59.940 fps? Your file has variable frame rate (52.493 fps) so maybe that's the problem. What is the duration of your remuxed mkv file?

    If the remuxed mkv has good audio/video sync, use that file to re-encode and not your original vfr mp4.
    Quote Quote  
  3. Member
    Join Date
    Mar 2013
    Location
    Argentina
    Search Comp PM
    Originally Posted by badyu17 View Post
    Isn't ESPN 59.940 fps? Your file has variable frame rate (52.493 fps) so maybe that's the problem. What is the duration of your remuxed mkv file?

    If the remuxed mkv has good audio/video sync, use that file to re-encode and not your original vfr mp4.
    Yeah, I already did that and the desync persists. I tried lot of ways.
    But I guess the issue is in the "source duration" and "duration" of the audio, is like the audio inside recognizes when it should be paused and be played. I don't know any program that recognizes that and time it perfectly to the video or viceversa. I don't want to, but I think the last method I have is to record the file playing from a video player (incredible).
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Have you tried opening the audio in Audacity (or some other audio editor)
    What do you see ?
    Quote Quote  
  5. Member
    Join Date
    Mar 2013
    Location
    Argentina
    Search Comp PM
    Originally Posted by davexnet View Post
    Have you tried opening the audio in Audacity (or some other audio editor)
    What do you see ?
    Audacity fails because doesn't support AAC, I will try with soundforge.

    Edit: Is the same.
    Last edited by Jorchking; 16th Apr 2020 at 19:53.
    Quote Quote  
  6. Dude, just install ffmpeg plugin for Audacity, every format works when you do that. I know because I did a LOT of audio synchronizations in Audacity for many years. You also didn't post media info for your remuxed mkv and you didn't say what editors and converters you are using. When you say "I tried a lot of ways" that's kinda vague and means nothing on this forum.
    Quote Quote  
  7. Member
    Join Date
    Mar 2013
    Location
    Argentina
    Search Comp PM
    Originally Posted by badyu17 View Post
    Dude, just install ffmpeg plugin for Audacity, every format works when you do that. I know because I did a LOT of audio synchronizations in Audacity for many years. You also didn't post media info for your remuxed mkv and you didn't say what editors and converters you are using. When you say "I tried a lot of ways" that's kinda vague and means nothing on this forum.
    the mediainfo is similar to the original .mp4 except there is no more the "source duration":

    Format : Matroska
    Format version : Version 4
    File size : 9.80 GiB
    Duration : 3 h 30 min
    Overall bit rate : 6 670 kb/s
    Encoded date : UTC 2020-04-16 22:48:25
    Writing application : mkvmerge v35.0.0 ('All The Love In The World') 64-bit
    Writing library : libebml v1.3.9 + libmatroska v1.5.2

    Video
    ID : 2
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L3.1
    Format settings : CABAC / 2 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference : 2 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 3 h 30 min
    Bit rate : 6 555 kb/s
    Nominal bit rate : 3 060 kb/s
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Variable
    Frame rate : 52.493 FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.135
    Stream size : 9.63 GiB (98%)
    Writing library : x264 core 148 r2579M 73ae2d1
    Encoding settings : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=4 / lookahead_threads=1 / sliced_threads=0 / nr=250 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=0 / weightp=1 / keyint=62 / keyint_min=6 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=2pass / mbtree=1 / bitrate=3060 / ratetol=1.0 / qcomp=0.60 / qpmin=5 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=6120 / vbv_bufsize=3060 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Default : Yes
    Forced : No
    Color range : Limited
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 1
    Format : AAC LC SBR
    Format/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication
    Commercial name : HE-AAC
    Format settings : Implicit
    Codec ID : A_AAC-2
    Duration : 3 h 30 min
    Bit rate : 111 kb/s
    Channel(s) : 2 channels
    Channel layout : L R
    Sampling rate : 48.0 kHz
    Frame rate : 23.438 FPS (2048 SPF)
    Compression mode : Lossy
    Stream size : 167 MiB (2%)
    Default : Yes
    Forced : No
    but the result is the same when dropping in an audio editor, also I tried on Audition.

    Video: 3:30 audio 3:04. Synced when playing, but out of sync when editing or rendering.
    Last edited by Jorchking; 16th Apr 2020 at 21:41.
    Quote Quote  
  8. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    [QUOTE=Jorchking;2579658]
    Originally Posted by davexnet View Post
    Have you tried opening the audio in Audacity (or some other audio editor)
    What do you see ?
    Never mind I see you got FFmpeg working
    Quote Quote  
  9. Member
    Join Date
    Mar 2013
    Location
    Argentina
    Search Comp PM
    [QUOTE=davexnet;2579664]
    Originally Posted by Jorchking View Post
    Originally Posted by davexnet View Post
    Have you tried opening the audio in Audacity (or some other audio editor)
    What do you see ?
    Never mind I see you got FFmpeg working
    yes, I could, as the it shows in the screenshot but I still have the same issue about the desync.
    Quote Quote  
  10. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    There are some discussion on the net about this, here's one with the author of mediainfo:
    https://sourceforge.net/p/mediainfo/bugs/366/

    The problem has to do with the length reported in the mdhd atom
    You can see from the mediainfo above : audio mdhd_Duration : 11059712 (11059 seconds)
    and: video mdhd_Duration : 12620990

    Perhaps you can create an Avisynth script using Lsmashsource.dll
    as the source filter and see what you get
    when you open it in Virtualdub2

    Is this file a movie ? What is the length supposed to be?
    Quote Quote  
  11. Member
    Join Date
    Mar 2013
    Location
    Argentina
    Search Comp PM
    Originally Posted by davexnet View Post
    There are some discussion on the net about this, here's one with the author of mediainfo:
    https://sourceforge.net/p/mediainfo/bugs/366/

    The problem has to do with the length reported in the mdhd atom
    You can see from the mediainfo above : audio mdhd_Duration : 11059712 (11059 seconds)
    and: video mdhd_Duration : 12620990

    Perhaps you can create an Avisynth script using Lsmashsource.dll
    as the source filter and see what you get
    when you open it in Virtualdub2

    Is this file a movie ? What is the length supposed to be?

    Thanks!! Is a sport video downloaded with DownloadHelper. I don't know exactly how long it should be, because the commercials were removed from the audio and in the video, but in the video the commercial space is there but frozen. But the audio lenght is 3h4m "linked" with the "source duration" of the video 3h30m. When I put the video in MKVtoolnix to be in a .mkv container both audio and video duration are the same, but I'm still unable to edit or render in a audio/video editor because this issue.
    I will try out what you said.
    Quote Quote  
  12. Member
    Join Date
    Mar 2013
    Location
    Argentina
    Search Comp PM
    Originally Posted by davexnet View Post
    There are some discussion on the net about this, here's one with the author of mediainfo:
    https://sourceforge.net/p/mediainfo/bugs/366/

    The problem has to do with the length reported in the mdhd atom
    You can see from the mediainfo above : audio mdhd_Duration : 11059712 (11059 seconds)
    and: video mdhd_Duration : 12620990

    Perhaps you can create an Avisynth script using Lsmashsource.dll
    as the source filter and see what you get
    when you open it in Virtualdub2

    Is this file a movie ? What is the length supposed to be?
    Do you mean this?
    (it was automatically detected by Megui but yesterday I remove that line and changed to directshowsource, now I know I shouldn't have done that)
    because it worked, the audio kept in 3h4m but the video now is 3h4m. The .mp4 original file should be put it in a .mkv container before to properly get converted.
    The audio went a little out and got desyncronized
    but after removing the firsts seconds of the video (anyway is an introduction) the audio fits perfectly with the video in all the timeline (you can also add audio delay in Megui, in my case was -6607):
    the resulting video test info with the following lines (automatically detected by MeGui)
    LoadPlugin("C:\Megui\tools\lsmash\LSMASHSource.dll ")
    LWLibavVideoSource("T:\Descargas\DwHelper\Guillerm o Coria vs. Rafael Nadal.mkv")
    is:
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom (isom/avc1)
    File size : 4.56 GiB
    Duration : 3 h 4 min
    Overall bit rate mode : Variable
    Overall bit rate : 3 542 kb/s
    Encoded date : UTC 2020-04-17 05:51:03
    Tagged date : UTC 2020-04-17 05:51:03

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Baseline@L3.2
    Format settings : 1 Ref Frames
    Format settings, CABAC : No
    Format settings, Reference : 1 frame
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 3 h 4 min
    Bit rate : 3 380 kb/s
    Maximum bit rate : 7 131 kb/s
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 59.940 (60000/1001) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.061
    Stream size : 4.35 GiB (95%)
    Writing library : x264 core 157 r2969 d4099dd
    Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=22 / lookahead_threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=599 / keyint_min=59 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=29.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0
    Encoded date : UTC 2020-04-17 05:51:03
    Tagged date : UTC 2020-04-17 05:53:16
    Codec configuration box : avcC

    Audio
    ID : 2
    Format : AAC LC
    Format/Info : Advanced Audio Codec Low Complexity
    Codec ID : mp4a-40-2
    Duration : 3 h 4 min
    Bit rate mode : Variable
    Bit rate : 160 kb/s
    Maximum bit rate : 164 kb/s
    Channel(s) : 2 channels
    Channel layout : L R
    Sampling rate : 48.0 kHz
    Frame rate : 46.875 FPS (1024 SPF)
    Compression mode : Lossy
    Stream size : 211 MiB (5%)
    Language : English
    Encoded date : UTC 2020-04-17 05:18:29
    Tagged date : UTC 2020-04-17 05:53:16
    Hope this helps to someone in the future.

    Thanks you so much to everybody for the help.
    Last edited by Jorchking; 17th Apr 2020 at 03:49. Reason: adding a tip for sync
    Quote Quote  
  13. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    hey great news - thanks for reporting your findings
    Quote Quote  



Similar Threads