[FFmpeg-devel] [PATCH 5/6] avformat/mpegtsenc: fix PCR generation intervals

Marton Balint cus at passwd.hu
Sat Aug 10 23:25:28 EEST 2019



On Fri, 9 Aug 2019, Andreas Håkon wrote:

> Hi Marton,
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Thursday, 8 de August de 2019 23:27, Marton Balint <cus at passwd.hu> wrote:
>
>> PCR generation was based on counting packets for both CBR and VBR streams.
>> Couting packets might have worked for CBR streams (when muxrate was specified)
>> but it only took into account the packets of a service (or the packets of the
>> PCR stream lately), so even that was problematic for multi program streams.
>>
>> The new code works on actual PCR for CBR and packet DTS values for VBR streams,
>> so the default 20ms PCR retransmission time is now respected for both CBR and
>> VBR.
>>
>> The accuracy of PCR packets for CBR streams was greatly improved by preemtively
>> sending them at PCR intervals even if sending the payload of another stream
>> is in progress.
>>
>> Signed-off-by: Marton Balint cus at passwd.hu
>
> [...]
>
> This new version LGTM.

Thanks. I did a slight change for VBR streams and tried to mimic the old 
behaviour when selecting a PCR interval. Will post an updated version, but 
that should only affect VBR.

Regards,
Marton


More information about the ffmpeg-devel mailing list