[FFmpeg-devel] [PATCH] Fix first_pcr initial update
Maksym Veremeyenko
verem at m1stereo.tv
Wed Nov 3 12:50:16 EET 2021
On 03.11.2021 11:19, lance.lmwang at gmail.com wrote:
> On Tue, Nov 02, 2021 at 05:36:37PM +0200, Maksym Veremeyenko wrote:
>> On 02.11.2021 16:59, lance.lmwang at gmail.com wrote:
>> [...]
>>>> + if (!ts->first_dts_checked && dts != AV_NOPTS_VALUE) {
>>>> + ts->first_pcr += dts * 300;
>>>> + ts->first_dts_checked = 1;
>>>> + }
>>>> +
>>>
>>> I think it's not same as the old code, the first_pcr will add extra delay if copyts is
>>> 0.
[...]
>
> try with below command:
> ./ffmpeg -y -copyts -i http://samples.ffmpeg.org/MPEG2/foxksaz.ts -c:v libx264 -x264opts nal-hrd=cbr:force-cfr=1 \
> -b:v 3500k -minrate 3500k -maxrate 3500k -bufsize 1000k -c:a mp2 -f mpegts \
> -mpegts_copyts 0 -muxrate 4500k -vframes 1000 test.ts
>
> You'll get some "dts < pcr, TS is invalid" message.
>
>
yes, you are correct, in my tests s->max_delay was always 0 so i did not
payed attention on order.
--
Maksym Veremeyenko
More information about the ffmpeg-devel
mailing list