VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Hi all , i need to delay audio in order to sync it with video but when i did it with ffmpeg or mkvtoolnix the video will start from the delay means when i delay audio in 20 sec the video starts from 20 and before that video is broken with glitch , how can i fix it? thanks
    Quote Quote  
  2. 20 seconds positive or negative audio delay? What audio format are you using? If your player can't handle 20 seconds positive audio delay it might be best to extract the audio, prepend 20 seconds of silence to it and then mux without delay.
    Quote Quote  
  3. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    What is your FFmpeg command line?
    Quote Quote  
  4. Originally Posted by sneaker View Post
    20 seconds positive or negative audio delay? What audio format are you using? If your player can't handle 20 seconds positive audio delay it might be best to extract the audio, prepend 20 seconds of silence to it and then mux without delay.
    actully it dosent matter , both positive and negative result is like this Image
    [Attachment 46663 - Click to enlarge]

    how can i prepend 20 seconds of silence?
    Quote Quote  
  5. Originally Posted by JVRaines View Post
    What is your FFmpeg command line?
    ffmpeg version N-90313-gb173e03536 Copyright (c) 2000-2018 the FFmpeg developers
    Quote Quote  
  6. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    No, not version. What FFmpeg command line are you executing?
    Quote Quote  
  7. If that 20 seconds of video is "broken with glitch", why don't you cut off that 20 seconds of video
    Quote Quote  
  8. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Don't you apply delay to video track in mkvtoolnix?
    Weird, I think it shouldn't have impact to video, messing with audiotrack.


    Bernix
    Quote Quote  
  9. Originally Posted by poisondeathray View Post
    If that 20 seconds of video is "broken with glitch", why don't you cut off that 20 seconds of video
    because the video will be Incomplete , actully at this time the video doesnt need audio and if i add a 20 second of silent audio it will be ok
    Quote Quote  
  10. Originally Posted by Bernix View Post
    Don't you apply delay to video track in mkvtoolnix?
    Weird, I think it shouldn't have impact to video, messing with audiotrack.


    Bernix
    it's the same, the video will start from 20 sec and before that is broken
    Quote Quote  
  11. Originally Posted by JVRaines View Post
    No, not version. What FFmpeg command line are you executing?
    oh yes,
    Code:
    ffmpeg.exe -i "movie.mp4" -itsoffset 3.84 -i "movie.mp4" -map 1:v -map 0:a -c copy "movie-video-delayed.mp4"
    Code:
    ffmpeg.exe -i "movie.mp4" -itsoffset 3.84 -i "movie.mp4" -map 0:v -map 1:a -c copy "movie-audio-delayed.mp4"
    something like this
    Quote Quote  
  12. Add "-report" to the ffmpeg command line and upload the complete, unaltered log file that is created. Are you really inputting the very same file ("movie.mp4") twice or you supplying 2 different files? Cutting away video can be dangerous because of the keyframe/non-keyframe GOP structure video typically has. Shouldn't have such problems with audio (second example).
    Last edited by sneaker; 2nd Sep 2018 at 06:54.
    Quote Quote  
  13. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    It's necessary to input the same file twice because the itsoffset option cannot be applied per-stream. The map options select appropriate streams for remuxing.

    For audio delay, you can use the adelay filter and it will pad silence.
    Quote Quote  



Similar Threads

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