[FFmpeg-user] Question about libopus encoding.
Ferdi Scholten
ferdi at sttc-nlp.nl
Mon Dec 4 19:26:10 EET 2023
On 04-12-2023 18:04, Aditya Dandavate wrote:
> On Mon, 4 Dec, 2023, 10:27 pm Ferdi Scholten, <ferdi at sttc-nlp.nl> wrote:
>
>> *cap_soundcommand* "ffmpeg -f s16le -ar %s -ac 2 -i - -c:a libopus -vbr on
>>> -compression_level 0 -application lowdelay -b:a 128k -y temp_a.nut"
>>>
>>> Is this VBR encoding, is `-b:a 128k` the average bitrate or
>> maximum/minimum
>>> allowed bitrate ?
>>> _______________________________________________
>> It is vbr recording with an average bitrate of 128k
>>
>> You further restrict the encoder optimizations (with -application
>> lowdelay, which tries to eliminate the lowest quality encoding modes)
>> which might (or not) also lead to lesser quality and almost certainly to
>> bigger then needed encodes. (The opus api documentation specifically
>> states to use it with caution...)
>>
>> You can omit -vbr on as it is the default setting.
>>
> Okay. I will change to `application audio` as it is better (faithfulness to
> the audio).
>
> I need realtime encoding so I put -compression_level 0 to enable fast
> encoding speed.
>
> Thanks.
>
With my 5 year old laptop (kaby lake based intel i7-8650U 1.9 GHz base,
low power quadcore), opus encoding with ffmpeg at highest quality
settings (-compression_level 10) has no problems encoding stereo input
in realtime. I suggest to try different quality levels and use the best
your hardware supports while keeping up with realtime encoding.
More information about the ffmpeg-user
mailing list