VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Hello,

    Please can you help me?
    I'm trying to mux a video with two ac3 audio tracks using mkvtoolnix. One track is from another source. I was able to determine using Adobe's Audition that for the two tracks to be in sync I'll have to apply a 850ms negative delay to one (-850ms). I entered this value into mkvtoolmix's delay box, but the muxed mkv is out-of-sync. Mediainfo reports a positive delay by 14ms (-850÷32ms per frame = 26.5, so 27 frames x 32ms = 854ms-850ms=14ms).

    How do I solve my out-of-sync problem? Any help would be greatly appreciated.
    V
    Quote Quote  
  2. Originally Posted by vangeliis View Post
    I was able to determine using Adobe's Audition that for the two tracks to be in sync I'll have to apply a 850ms negative delay to one (-850ms).
    How? Seems like this is not correct.

    Is the delay constant throughout the movie or does it get progressively worse? Are the cuts of the movie the same (cinema, director's cut, (un)censored, ..)?
    Quote Quote  
  3. Hi sneaker,

    one track is from another source (foreign audio) but I'm positive the waveforms match when I apply a precise -850ms delay. Any clues?
    Thanks,
    V
    Quote Quote  
  4. Does MediaInfo show any delay for your original file? Is the original file actually in sync? How do you open your files in Audition? I think MKV is not natively supported by Audition. Are you extracting the AC3 tracks using e.g. mkvextract first?
    Quote Quote  
  5. No delay in the original file. I extract the first few minutes with ffmpeg into a container that Audition understands. Then I sync the waveforms and that gives me the delay. When the delay is positive it works very well, but when the delay is negative -as it happens in some cases, the muxed file is out-of-sync. Weird.
    Quote Quote  
  6. try with -1714 ms delay
    Quote Quote  
  7. Is the original file mkv or something else? Mkvtoolnix might work a bit differently depending on whether the input files are mkv, mp4 or ac3. Is the resulting file sync at the exact point where you "matched" the waveforms? As I said sync may get progressively worse over the course of a file. If you only look at the first few minutes you might not see it.

    Originally Posted by vangeliis View Post
    I extract the first few minutes with ffmpeg into a container that Audition understands.
    Try just to wav, i.e. like:
    Code:
    ffmpeg -i "original.mkv" -to 300 "original.wav"
    ffmpeg -i "other_file.mkv" -to 300 "other_file.wav"
    (-to 300 means only 300 seconds)
    Quote Quote  
  8. Originally Posted by ProWo View Post
    try with -1714 ms delay
    Please could you explain how you worked this out as I have other files with various delays to mux.
    Thanks.
    Quote Quote  
  9. @vangeliis can load the audio into 'UsEac3to' and apply the delay .. and we get the audio ready for remux ..

    In Output format->

    with ac3: %_.ac3 -864ms

    or

    with ac3-ffm: stdout.w64 -864ms | ffmpeg -i - -c:a ac3 -b:a 640k -center_mixlev 0.707 %_.ac3



    Image
    [Attachment 51991 - Click to enlarge]
    Last edited by sekininsha; 12th Feb 2020 at 19:25.
    責任者-MDX
    Quote Quote  
  10. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    You can load the file into mpc-hc and use a time shift and see which value gives you the right sync,doing it this way requires no editing and you use the correct value mpc-hc gives you in your editor.
    I think,therefore i am a hamster.
    Quote Quote  
  11. Thank you all for the very useful tips. I should have said I am on a Mac so most of these tools don't work. However I used IINA player to mux video and audio on the fly and to my surprise I had to apply a positive delay to the foreign track to get it in sync. So I went back in Audition and double checked whether I had mixed the tracks up, but I did not.

    How peculiar this is. Any clues as to why this is?
    Quote Quote  
  12. Originally Posted by vangeliis View Post
    Originally Posted by ProWo View Post
    try with -1714 ms delay
    Please could you explain how you worked this out as I have other files with various delays to mux.
    Thanks.
    Did it work?
    You said that -850ms delay gave a result of +14ms delay.
    So -850ms-14ms-850ms (desired) = -1714ms
    Quote Quote  
  13. Originally Posted by ProWo View Post
    Originally Posted by vangeliis View Post
    Originally Posted by ProWo View Post
    try with -1714 ms delay
    Please could you explain how you worked this out as I have other files with various delays to mux.
    Thanks.
    Did it work?
    You said that -850ms delay gave a result of +14ms delay.
    So -850ms-14ms-850ms (desired) = -1714ms
    Hi ProWo,

    It didn't. As it turned out I had to put in a positive delay to get the tracks in-sync. I don't understand why that is but there you go.
    Quote Quote  
  14. Originally Posted by vangeliis
    Hi ProWo,

    It didn't. As it turned out I had to put in a positive delay to get the tracks in-sync. I don't understand why that is but there you go.
    mkvtoolnix does not add negative delay, so for this the program 'remove' audio frames
    in your case 864ms (27x32) and then apply a positive delay of 14 ms.
    責任者-MDX
    Quote Quote  
  15. Originally Posted by sekininsha View Post
    Originally Posted by vangeliis
    Hi ProWo,

    It didn't. As it turned out I had to put in a positive delay to get the tracks in-sync. I don't understand why that is but there you go.
    mkvtoolnix does not add negative delay, so for this the program 'remove' audio frames
    in your case 864ms (27x32) and then apply a positive delay of 14 ms.
    You can remux the video to mkv with negatice delay with my smart FFmpeg gui
    https://forum.videohelp.com/threads/395425-New-small-GUI-for-FFmpeg
    Last edited by ProWo; 29th Feb 2020 at 04:54.
    Quote Quote  



Similar Threads

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