nu774 / fdkaac

command line encoder frontend for libfdk-aac
Other
260 stars 58 forks source link

Add nodelay command to fdkaac #58

Open kedaitinh12 opened 9 months ago

kedaitinh12 commented 9 months ago

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

nu774 commented 9 months ago

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

kedaitinh12 commented 9 months ago

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

nu774 commented 9 months ago

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

kedaitinh12 commented 9 months ago

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

nu774 commented 9 months ago

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?

kedaitinh12 commented 9 months ago

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

lizhenchun commented 1 month ago

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