VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Hello, I'm quite the newbie in all the encoding business.
    I'm trying to trim the audio from the beginning, to reset the audio delay. Let's say the delay is -1164ms, I want to trim the audio from 00:00:00.000 to 00:00:01.164.
    Is something like that possible? I tried messing around with the profiles and script, but can't get it to work, it's just using the Audio source it demuxed when I loaded the file.
    Quote Quote  
  2. Member stax76's Avatar
    Join Date
    Nov 2009
    Location
    On thin ice
    Search PM
    Normally the delay is handled automatically, what format is the source?
    Quote Quote  
  3. AviSynth's DelayAudio() can accept negative delays. But like stax76 said it's normally handled automatically by his software so be careful not to apply the delay twice.
    Quote Quote  
  4. Originally Posted by stax76 View Post
    Normally the delay is handled automatically, what format is the source?
    The source is a .mkv file, I'm using FFVideoSource.
    And yes, the delay is taken care of automatically, it's just encoding the audio, with a duration of the video duration minus the delay. Meaning, the audio ends before the video.

    For example:
    - Audio delay is: 1162ms
    - Video duration (after encoding) is: 4162ms
    - Audio duration (after encoding) is: 3000ms (4162-1162)
    Quote Quote  
  5. Is this a problem for you? It's common for video and audio to NOT be exactly the same length.
    Quote Quote  
  6. Originally Posted by sneaker View Post
    Is this a problem for you? It's common for video and audio to NOT be exactly the same length.
    It is when I do multiple cuts within the same video (ad cuts).
    When I do that, if a delay is -1000ms, I will hear one second from the audio before the cut starting position (starting from the 2nd cut).
    Quote Quote  
  7. In AviSynth you can add Trim(0,0) to make audio the same length as the video. Note that after encoding the lengths can still be slightly different because most often video and audio formats use different frame lengths (e.g. 25 fps video = 40ms, 48 kHz AC3 = 32ms, i.e. they only align every 160ms). If possible do editing in AviSynth before encoding instead of re-encoding to multiple files that you append afterwards. Also because of encoder delay and padding.
    Quote Quote  
  8. Originally Posted by sneaker View Post
    In AviSynth you can add Trim(0,0) to make audio the same length as the video. Note that after encoding the lengths can still be slightly different because most often video and audio formats use different frame lengths (e.g. 25 fps video = 40ms, 48 kHz AC3 = 32ms, i.e. they only align every 160ms). If possible do editing in AviSynth before encoding instead re-encoding to multiple files that you append afterwards.
    I do cut with AviSynth Trim. I use StaxRip's Preview to mark the frames I wanna cut and it applies the Trim.
    Quote Quote  



Similar Threads

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