VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 45 of 45
  1. Originally Posted by sneaker View Post

    Originally Posted by poisondeathray View Post
    Everytime you encode with lossy encoder, some padding is added. It might only be a few ms for some (or up to 40ms for neroaac which is baaad), but it adds up. If it gets sent to youtube, another 20-40ms is added when it re-encodes.
    You say "padding" but I assume you are talking about encoder delay. We actually have both an encoder delay at the beginning and also padding at the end because of fixed frame sizes. For NeroAacEnc LC-AAC it is 2624 samples delay (at 48 kHz that's ~55ms) plus up to 1023 samples of padding at the end.
    I actually wasn't, but thanks for the precise correction


    -----



    I tested a random free mp3 from an archive.org concert, and the eac3to slowdown result matched the expected to the ms .
    (For some reason it won't let me upload it here, but you can try it out yourself)
    https://www.mediafire.com/?4b5f4yldtjwdm0g

    Expected result from slowdown
    709.799 * 25/(24000/1001) = 740.1133322917

    eac3to slowdown result as wav
    740.113



    So I think it's specific to your particular scenario / source

    Check the log file to see if eac3to is doing any other manipulations




    do you recommend always shaving off 55 ms of any source audio?
    No, because it varies by encoder, by Hz , by encoder profile (e.g. HE-AAC vs. LC-AAC) .

    But nero is noted for it's exceptionally large values. QAAC has more options to control this (--no-delay )
    Quote Quote  
  2. Originally Posted by TheLastOfThem View Post
    EAC3To always gives me "delay relative to video 10ms" after a final mux with MKVMerge - is that .....accounted for??? or do I NEED to do -10 ms on the mkvtoolnix? It's .M4A from EAC3To...
    That probably means mkvtoolnix has read the metadata and delayed the audio accordingly. At 48 kHz with 2624 samples delay and a frame length of 2624 it will delete the first three frames 3 * 1024 = 3072 (first number divisible by 1024 and greater than 2624). That leaves 448 samples of positive delay. 448 / 48 kHz = 9.333.. ms. So roughly 10ms (timecodes may be not 100% accurate - that's normal in mkv).

    Originally Posted by TheLastOfThem View Post
    Is QAAC usable on EAC3To?
    Not directly. But you can pipe.
    eac3to "input.wav" "stdout.wav" -slowdown | qaac --no-delay --adts - -o "output.aac"

    Or you can extract raw aac from nero m4a. Then metadata is lost.
    Quote Quote  
  3. I'm sorry so is the Delay relative to the video 10 ms .....why would it ADD more if the issue is the encoder is ADDING a delay already? Shouldn't it be -10?
    Quote Quote  
  4. Like I explained: Mkvmerge deletes 3072 samples. Since the delay of Nero was +2624 samples you now have -448 samples delay. Well, would have. You don't because mkvmerge counters it by letting the first frame (actually fourth frame) of the aac audio start at +448 samples (~= +10ms at 48 kHz). So then MediaInfo will report a positive delay.
    Quote Quote  
  5. So basically the encoder delay gets "taken care of" by MKVMerge/ToolNix then?

    I don't have to do much? So the 10ms delay relative to the video is just proper? Not a real delay necessarily that would make the audio go out of sync? In which case is it worth doing --no-delay on qaac?
    Quote Quote  
  6. Originally Posted by TheLastOfThem View Post
    So basically the encoder delay gets "taken care of" by MKVMerge/ToolNix then?
    Yes.

    Originally Posted by TheLastOfThem View Post
    So the 10ms delay relative to the video is just proper?
    Correct.

    Originally Posted by TheLastOfThem View Post
    Not a real delay necessarily that would make the audio go out of sync?
    Yeah, quite the opposite: the delay as reported by MediaInfo is actually there to ensure correct sync.
    MediaInfo doesn't check actual lip sync. It only compares video to audio start times as they are stored in the file.

    Originally Posted by TheLastOfThem View Post
    In which case is it worth doing --no-delay on qaac?
    Debatable.
    Quote Quote  
  7. https://www.amazon.com/clouddrive/share/qJWsfUc1tjPZ7RCylZEoDNKEs1nsa84sKXZvDhjmIuU?re...hare_link_copy

    ^ Above is the WAVPCM file that is not coming out correctly via slowdown on EAC3To. Perhaps you can take a look at it.

    And thank you for your insightful answers. I have a lot to consider now...
    Quote Quote  
  8. One thing - any idea what the delay values are for different types of encoders, good sir? Like LIBAV AAC (FFmpeg Audacity) ??? etc or where I may find these? I found a thing on Hydrogen audio stating various samples of delays...but no real ...database of solid numbers in terms of milliseconds...and I don't understand the "sample size" entirely.
    Quote Quote  
  9. I don't have the delay value for the current ffmpeg aac encoder. You can try to measure it if you view source wav and output aac in Audacity and find a spot that sticks out and simply calculate the delta. Or maybe it also writes delay metadata. I haven't tested.
    Quote Quote  
  10. Originally Posted by sneaker View Post
    I don't have the delay value for the current ffmpeg aac encoder. You can try to measure it if you view source wav and output aac in Audacity and find a spot that sticks out and simply calculate the delta. Or maybe it also writes delay metadata. I haven't tested.
    Thank you so much.

    I will see on this.

    Also Madshi just figured it out. It's not an EAC3To problem as much as it's the libSsrc library problem which does not resample 44.1 KHz correctly but instead works off of integers - make a 44.1 KHz file 44 KHz...on processing. Hence the difference in the WAV output...
    Quote Quote  
  11. Originally Posted by sneaker View Post
    Like I explained: Mkvmerge deletes 3072 samples. Since the delay of Nero was +2624 samples you now have -448 samples delay. Well, would have. You don't because mkvmerge counters it by letting the first frame (actually fourth frame) of the aac audio start at +448 samples (~= +10ms at 48 kHz). So then MediaInfo will report a positive delay.
    Sorry is 448 still 10ms at 44.1 KHz as my audio actually is? 448 /44.1 = 10.15 = close enough?
    Quote Quote  
  12. 448 / 44.1 ~= 10.2

    So: yes.
    Quote Quote  
  13. Originally Posted by sneaker View Post
    448 / 44.1 ~= 10.2

    So: yes.
    So I guess I shouldn't put a lot of stock to MediaInfo delay #'s unless it's a significant amount like 50ms + ?

    Also - then is there any point in necessarily using an encoder with a LESSER initialization delay?
    Last edited by TheLastOfThem; 13th Jul 2017 at 17:26.
    Quote Quote  
  14. I'm not sure you should ever need to worry about encoder padding, at least in theory. If audio includes padding and it's written to the file correctly (gapless playback info), it should be decoded without it, and I'd imagine that'd include importing into Audacity, although I don't use Audacity myself. You should be able to transcode from MP3 to AAC to wave to AAC to wave and still end up with the same number of samples because the padding with be ignored each time (I know I can do so with foobar2000 and if I check each version of the audio, foobar2000 would show the same number of samples).

    The only time it'd be a problem is when muxing, if video players don't skip the padding, although chances are the info is lost when muxing, but for AAC MKVToolNix compensates.

    I used Nero for years although I mostly use QAAC these days. QAAC has a zero delay option, which is nice if you like seeing a zero delay with MediaInfo, although not important, but it also has a built in peak normalizing function I find handy on occasion.

    I do most of my audio encoding with foobar2000 (or sometimes MeGUI) as extracting and importing and time-stretching and transcoding seems a bit hard when you can create a preset, load the audio and do it all with a few clicks. There's a DSP for foobar2000 that lets it open Avisynth scripts, so you can create a script to torture the audio however you prefer, open it in foobar2000 and convert.

    Or you could configure ffmpeg as the encoder. Here's the command lines from two foobar2000/ffmpeg encoder presets I use now and then:

    NTSC to PAL speedup with ffmpeg, wave file output:
    Code:
    -i - -ignore_length true -af "rubberband=tempo='1001/960':pitch='1001/960'" -c:a pcm_s24le %d
    Speed up with ffmpeg and pipe directly to QAAC. You'd need to specify cmd.exe as the encoder in the converter setup rather than ffmpeg.exe, and maybe adjust it as required for file locations or Windows versions that aren't XP.
    Code:
     /d /c c:\progra~1\foobar2000\encoders\ffmpeg.exe -i - -ignore_length true -af "rubberband=tempo='1001/960':pitch='1001/960'" -c:a pcm_f32le - | c:\progra~1\foobar2000\encoders\QAAC\qaac.exe --ignorelength -s --no-optimize --no-delay -V 91 -o %d -
    If you're not a fan of foobar2000, AnotherGUI can make life with ffmpeg a little easier. I have a collection of presets simply to use ffmpeg for remuxing from one container to another, amongst other things.
    Last edited by hello_hello; 13th Jul 2017 at 21:13.
    Quote Quote  



Similar Threads

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