[FFmpeg-devel] [PATCH 1/1] avcodec/libopusdec: Enable FEC/PLC

Philip-Dylan Gleonec philip-dylan.gleonec at savoirfairelinux.com
Wed Feb 17 13:12:13 EET 2021


>> Am Di., 16. Feb. 2021 um 15:02 Uhr schrieb Philip-Dylan Gleonec
>> <philip-dylan.gleonec at savoirfairelinux.com>:
>>
>>>
>>> Adds FEC/PLC support to libopus. The lost packets are detected as a
>>> discontinuity in the audio stream. When a discontinuity is used, this
>>> patch tries to decode the FEC data. If FEC data is present in the
>>> packet, it is decoded, otherwise audio is re-created through PLC.
>>>
>>> This patch is based on Steinar H. Gunderson contribution, and corrects
>>> the pts computation: all pts are expressed in samples instead of time.
>>> This patch also adds an option "decode_fec" which enables or disables
>>> FEC decoding. This option is disabled by default to keep consistent
>>> behaviour with former versions.
>>>
>>
>> Could you elaborate?
>> I would have expected that the normal use case is not have a
>> lossy input and that the new feature is always useful if data
>> was lost.
>>
>> Or is there no way to distinguish between a stream with
>> unusual timestamps and a stream with packet loss?
>>
>
>Streams can switch between being FEC encoded and not on
>a per-frame basis. Opus streams can have odd timestamps
>since the frame size is somewhat variable. So no way to
>check purely on timestamps.

Is there a possibility of the packet duration varying ? I'm not sure
this patch can manage this case, though it could by comparing the pts
to the last pts + the new packet duration.

>I'd like to have the original patch author review this, could
>someone CC him?

I've added him to the CC list.


More information about the ffmpeg-devel mailing list