[HELP] Hybrid introducing audio delay that is not present in source material - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: [HELP] Hybrid introducing audio delay that is not present in source material (/thread-2096.html) |
RE: Hybrid introducing audio delay that is not present in source material - Selur - 03.10.2021 Hurray, going to bed now. Cu Selur RE: Hybrid introducing audio delay that is not present in source material - 4i4oVi40 - 10.10.2021 (02.10.2021, 23:52)Selur Wrote: @protectron: Going to bed now, send you a new link, which hopefully now includes the correct version. Selur, I'm not sure should I start a new thread but I'm having exactly the same issue. I've just noticed that the last 2 videos I encoded have exactly the same delay of -43 ms. iId_3_aid_0_lang_fr_DELAY_-43ms_2021-10-10@22_55_44_2910_01.dts iId_8_aid_2_DELAY_-43ms_2021-10-10@23_19_45_4210_01.dts It's highly suspicious that both of them have exactly the same delay, which is the same one mentioned in this thread too. In fact, there is no such delay in the MediaInfo or ffprobe info. I see that you mentioned here that you have a development version version where this issue is resolved. Can I have this version too? Thanks. RE: Hybrid introducing audio delay that is not present in source material - protectron - 10.10.2021 (02.10.2021, 18:00)Selur Wrote: Problem is unless I see no indication of that delay somewhere in the meta data so there sadly isn't anything I can do about that. Here is what he said about the delay. Is your output file A/V out of sync? My situation only seems to stem from an amarectv recording with Lagarith and PCM. I've been doing other files like MPEG2 DVD to AVC and they're fine, although those also insert a -43ms delay. RE: Hybrid introducing audio delay that is not present in source material - 4i4oVi40 - 11.10.2021 (10.10.2021, 23:27)protectron Wrote: I've been doing other files like MPEG2 DVD to AVC and they're fine, although those also insert a -43ms delay. Well, doesn't it seem suspicious to you that totally unrelated video sources produce exactly the same delay of -43ms? This does seem like a bug to me. And I'd like to have solution or at least workaround. Preferably, inside Hybrid. RE: Hybrid introducing audio delay that is not present in source material - Selur - 11.10.2021 Does not seem suspicious to me. -43 and -41 ms delays are rather common,.. Quote:In fact, there is no such delay in the MediaInfo or ffprobe info.That seems odd, but without a DebugOutput of the loading/analysis of the source I can't say anything about that. RE: Hybrid introducing audio delay that is not present in source material - 4i4oVi40 - 11.10.2021 (11.10.2021, 05:07)Selur Wrote: Does not seem suspicious to me. -43 and -41 ms delays are rather common,.. Here I'm attaching the DebugOutput file. On line 7604: Adjusting audio delay from 0 by 43 to -43 due to encoder compensation. So why is the encoder adding this delay of -43ms? And why is it often (always?) -43ms? RE: Hybrid introducing audio delay that is not present in source material - Selur - 11.10.2021 Quote:Adjusting audio delay from 0 by 43 to -43 due to encoder compensation.This happens if you encode to aac. Quote:So why is the encoder adding this delay of -43ms? And why is it often (always?) -43ms?Different encoders use different sample lenght depending on the channel count, the aac profile and sample rate. Also deplay is differently compensated by different containers (mp4/mkv) and muxers. There should be a few discussions about the aac delay over at doom9s and gleitz (german) forum. I collected all the infos and wrote some code for it ~9 years ago. If you are interessted I can share the ~200 lines of code which Hybrid uses since then. I posted a simplified version 7 years ago over at videohelp: if (heaac) { //HE-AAC Side note: That code does not take into consideration that fdk and fhg use different sampleSizes depending on the channel count and how Hybrid would modify the result depending on the used muxer, but it shows the general complexity of the calculation. -> Since the channel count (usually 2 or 6), the sample rate (usually 48 000Hz) is often the same the delay modifier also often is the same. Cu Selur RE: Hybrid introducing audio delay that is not present in source material - 4i4oVi40 - 11.10.2021 [quote pid="13798" dateline="1633958768"] -> Since the channel count (usually 2 or 6), the sample rate (usually 48 000Hz) is often the same the delay modifier also often is the same. [/quote] OK, I see. So by default (for faac, fdk, etc.) 2048 Kbps are needed for DTS-HR. And if the SR is 48 kHz (almost always), your delay formula is: 2048/48 + 0.5 ≈ 43 ms. So this is not a bug but a feature :-) So if I have a DTS at 48 kHz sample rate converted to AAC, I'll always end up with 43 ms delay. I read your thread from 2013 https://forum.videohelp.com/threads/357644-Encoding-AC3-to-AAC-with-NeroAAC-Encoder Obviously, 43 ms is an offset of just 1 frame, so it's barely humanly possible to discern it. Nevertheless, it's useful to know where this minimal delay comes from and why it's always the same, if you use the same encoder and the same SR. Thanks for the info. RE: Hybrid introducing audio delay that is not present in source material - Selur - 11.10.2021 40ms is one frame with 25fps which some folks notice especially if they are singers and look at themself singing in a video. Happy the explaination helped to understand what's going on and yes, it's a feature (which like mentioned before can be disabled) not a bug. Cu Selur RE: Hybrid introducing audio delay that is not present in source material - 4i4oVi40 - 11.10.2021 (11.10.2021, 19:16)Selur Wrote: 40ms is one frame with 25fps which some folks notice especially if they are singers and look at themself singing in a video. I'm a filmmaker and a video editor, so I'm also quite obsessed with syncing video and audio to the frame. But I'm also aware that the "normal" people would not care for 1 frame offset |