PTS Offset to Add Artificial Delay Not Working

Michiel Konstapel michiel at aanmelder.nl
Thu May 19 09:04:34 UTC 2022


I think I've seen (or heard) this happen as wel, but I have no idea why 
:-/ Hopefully someone more knowledgeable will chip in. Do you have an 
example pipeline that produces this effect?

Michiel


On 19-05-2022 06:57, Abrar Shahriar via gstreamer-devel wrote:
> I've run into another issue with this.
>
> If I increase the PTS offset, it works, but if I then decrease the 
> offset afterwards (to the original offset of 0), the audio quality 
> greatly degrades.
>
>
>
> ーーーーーーーーー
>
> アブラル・ザヒン・シャハリアル(Abrar Zahin Shahriar)
>
> ハイパーダイン株式会社
> 〒108-0014 東京都港区芝5丁目9-12 3階
>
> ------------------------------------------------------------------------
> *From:* Abrar Shahriar <abrar.shahriar at hiperdyne.com>
> *Sent:* Wednesday, May 18, 2022 1:26 PM
> *To:* Michiel Konstapel <michiel at aanmelder.nl>; Discussion of the 
> development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
> *Subject:* Re: PTS Offset to Add Artificial Delay Not Working
> Update: It did work when I set the audio sink "sync" to TRUE.
>
> ーーーーーーーーー
>
> アブラル・ザヒン・シャハリアル(Abrar Zahin Shahriar)
>
> ハイパーダイン株式会社
> 〒108-0014 東京都港区芝5丁目9-12 3階
>
> ------------------------------------------------------------------------
> *From:* Abrar Shahriar <abrar.shahriar at hiperdyne.com>
> *Sent:* Wednesday, May 18, 2022 1:00 PM
> *To:* Michiel Konstapel <michiel at aanmelder.nl>; Discussion of the 
> development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
> *Subject:* Re: PTS Offset to Add Artificial Delay Not Working
> Tried it, unfortunately it did not work.
>
>
> ーーーーーーーーー
>
> アブラル・ザヒン・シャハリアル(Abrar Zahin Shahriar)
>
> ハイパーダイン株式会社
> 〒108-0014 東京都港区芝5丁目9-12 3階
>
> ------------------------------------------------------------------------
> *From:* Michiel Konstapel <michiel at aanmelder.nl>
> *Sent:* Tuesday, May 17, 2022 10:12 PM
> *To:* Abrar Shahriar <abrar.shahriar at hiperdyne.com>; Discussion of the 
> development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
> *Subject:* Re: PTS Offset to Add Artificial Delay Not Working
>
> Yes, by default the queue is limited to 200 buffers, 1 MB, or 1 second 
> of data - whichever limit is hit first. You can check the default 
> values in the docs: 
> https://gstreamer.freedesktop.org/documentation/coreelements/queue.html?gi-language=c#properties 
> <https://gstreamer.freedesktop.org/documentation/coreelements/queue.html?gi-language=c#properties>
>
>
> So for a 5 second queue, you can set max-size-buffers and 
> max-size-bytes to zero (no limit) and max-size-time to 5000000000.
>
>
> On 17-05-2022 09:49, Abrar Shahriar wrote:
>> I tried adding Queue plugins both before and after, still no success. 
>> Do I need to set some params of the Queue elements?
>>
>>
>> ーーーーーーーーー
>>
>> アブラル・ザヒン・シャハリアル(Abrar Zahin Shahriar)
>>
>> ハイパーダイン株式会社
>> 〒108-0014 東京都港区芝5丁目9-12 3階
>>
>> ------------------------------------------------------------------------
>> *From:* Michiel Konstapel <michiel at aanmelder.nl> 
>> <mailto:michiel at aanmelder.nl>
>> *Sent:* Monday, May 16, 2022 6:11 PM
>> *To:* Discussion of the development of and with GStreamer 
>> <gstreamer-devel at lists.freedesktop.org> 
>> <mailto:gstreamer-devel at lists.freedesktop.org>
>> *Cc:* Abrar Shahriar <abrar.shahriar at hiperdyne.com> 
>> <mailto:abrar.shahriar at hiperdyne.com>
>> *Subject:* Re: PTS Offset to Add Artificial Delay Not Working
>>
>> You may need to ensure that you have at least 5 seconds of queue 
>> capacity, because the buffers will have to be held somewhere before 
>> they can be processed at the later PTS. I don't know if this needs to 
>> be before the probed pad, or before the downstream element that cares 
>> about the PTS (sink, muxer, mixer, encoder, ..?)
>> Kind regards,
>> Michiel
>>
>>
>> On 16-05-2022 11:05, Abrar Shahriar via gstreamer-devel wrote:
>>> Hi,
>>>
>>> I tried to add 5 seconds (in ns) to the PTS values on the incoming 
>>> buffers in a probe, but I see no delay. I tried it for both audio 
>>> and video streams.
>>>
>>> What could be the reason for it not working? I thought PTS could be 
>>> used to adjust delay?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220519/bb1ab915/attachment-0001.htm>


More information about the gstreamer-devel mailing list