fdkaac icon indicating copy to clipboard operation
fdkaac copied to clipboard

Add nodelay command to fdkaac

Open kedaitinh12 opened this issue 1 year ago • 7 comments

Hi, can you add nodelay to fdkaac? I'm always use karaoke subtitles so delay is important but fdkaac always delay compare to original audio although i'm not set delay

kedaitinh12 avatar Dec 04 '23 07:12 kedaitinh12

Maybe you could try this: https://superuser.com/questions/982342/in-ffmpeg-how-to-delay-only-the-audio-of-a-mp4-video-without-converting-the-au

nu774 avatar Dec 04 '23 08:12 nu774

I mean need add parameter nodelay like qaac cause fdkaac always delay audio (it's always slower bit compare to original audio) after encode audio although i'm not set delay

kedaitinh12 avatar Dec 04 '23 09:12 kedaitinh12

Yes, I'm aware of that, but why can't you just let muxer (ffmpeg) and container (mkv or mp4) do the job instead?

nu774 avatar Dec 04 '23 11:12 nu774

Cause i encode BD stream with 7.1, 5.1 lossless very big data, i need encode to small data enough for me

kedaitinh12 avatar Dec 04 '23 11:12 kedaitinh12

That's not what I'm asking.

The amount of delay you mention is already taken care of, and is written in the M4A container by fdkaac. That's why M4A file encoded by fdkaac can be played gaplessly.

fdkaac even provides a option to control how to write delay information in the container. In your case you will want --gapless-mode=1, in which case delay information is written in the edit list (edts) box. And then, ffmpeg will preserve the delay information in the edts for the audio track after multiplexing with video. You can change delay to arbitrary value with ffmpeg losslessly by -itsoffset option.

So, what is the exact reason why you want --no-delay?

nu774 avatar Dec 04 '23 11:12 nu774

Oh, i use Megui so can't add ffmpeg command like that and i use Megui for easy to use. It's only click some function and run auto. It's not hard like cli batch need add command. So i think i need nodelay command like qaac for easy to use

kedaitinh12 avatar Dec 04 '23 12:12 kedaitinh12

That's not what I'm asking.

The amount of delay you mention is already taken care of, and is written in the M4A container by fdkaac. That's why M4A file encoded by fdkaac can be played gaplessly.

fdkaac even provides a option to control how to write delay information in the container. In your case you will want --gapless-mode=1, in which case delay information is written in the edit list (edts) box. And then, ffmpeg will preserve the delay information in the edts for the audio track after multiplexing with video. You can change delay to arbitrary value with ffmpeg losslessly by -itsoffset option.

So, what is the exact reason why you want --no-delay?

We want to use the AAC audio stream in the HLS stream, and HLS only supports the ADTS container, so we also need the no-delay parameter

lizhenchun avatar Jul 17 '24 03:07 lizhenchun