VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. I used mp4box to extract audio from .mp4 file:

    Code:
    mp4box -raw 2 audio.aac
    If I try to mux it to other video/container, there's a negative -100ms delay.

    I need to add the delay/offset to the aac sound file itself, like cut the first -100ms or something. I know I could just set delay muxed into the mkv container with mkvmerge or similar, but that's not the solution in my case.

    Best scenario would be if you could extract the audio with mp4box and set delay into the process, then you would get raw audio file with delay applied.
    Quote Quote  
  2. Marsia Mariner
    Guest
    I think MP3DirectCut or eac3to is what you need.
    But remember that the delay applied is normally different from the value chosen by the user, because the application deals only with integer multiples of an audio frame.

    Best scenario would be if you could extract the audio with mp4box and set delay into the process, then you would get raw audio file with delay applied.
    MP4Box is an MP4 muxer and demuxer, it's not a dedicated stream editor.
    Quote Quote  
  3. I have eac3to, but doesn't it reencode it like ffmpeg?
    Quote Quote  
  4. You're right. Eac3to fix it.

    Code:
    eac3to input.aac output.aac -100ms
    Quote Quote  
  5. Originally Posted by midts View Post
    I need to add the delay/offset to the aac sound file itself, like cut the first -100ms or something. I know I could just set delay muxed into the mkv container with mkvmerge or similar, but that's not the solution in my case.
    Why not? Negative delay using eac3to or mkvmerge will have the same result.
    Quote Quote  
  6. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    I've done this with Avidemux. Open the video file you want to put the audio file in. Tell it to use a separate file as the audio track and load that file. Set both video and audio to Copy and apply the delay. Save the file.
    Quote Quote  
  7. Originally Posted by midts View Post
    I need to add the delay/offset to the aac sound file itself, like cut the first -100ms or something. I know I could just set delay muxed into the mkv container with mkvmerge or similar, but that's not the solution in my case.
    Do you need to extract the audio? If not, just open the MP4 with MKVToolNix GUI and remux it as an MKV. The existing video/audio sync should be maintained. If you do need to extract the audio to modify it, maybe remux it as an MKV first, then extract it from the MKV with gMKVExtractGUI. Any audio delay will generally be positive and written to the extracted audio stream (unless on rare occasions there's also a video delay, which can effectively make the audio delay negative). As negative delays aren't permitted for MKV, if there was a -100ms delay in the source file, when remuxing MKVToolNix would delete as close to 100ms of the audio stream as is can from the beginning, and add a positive audio delay as required to make up the difference. You might end up with an MKV with an audio delay of 8ms, or 24ms.... whatever is required, but MKVToolNix knows what it's doing.

    Or as sneaker said, if you need to manually set a negative audio delay, the appropriate amount will be removed from the beginning by MKVToolNix when muxing in the same way I described above.

    For the record, if you extract audio from MKVs with eac3to it'll replace delays/gaps with silence. It doesn't re-encode the rest. I don't think it'll open MP4s but once again you can remux as MKV first.
    Quote Quote  



Similar Threads