# Synchronizing timestamps for compositor inputs

**URL:** <https://discourse.gstreamer.org/t/synchronizing-timestamps-for-compositor-inputs/4213>\
**Category:** Newcomers\
**Created:** [March 2, 2025, 5:01pm UTC](https://discourse.gstreamer.org/t/synchronizing-timestamps-for-compositor-inputs/4213 "2025-03-02T17:01:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hassanamin994](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/hassanamin994/32/1039_2.png) [@hassanamin994](https://discourse.gstreamer.org/u/hassanamin994)\
**Post date:** [March 2, 2025, 5:01pm UTC](https://discourse.gstreamer.org/t/synchronizing-timestamps-for-compositor-inputs/4213/1 "2025-03-02T17:01:53Z")

</div>

Hello. I have a pipeline where there’s a compositor element running from the beginning. After some time (let’s say, 5 minutes) I want to overlay a video on top of the compositor content.  
The problem I’m facing is that the new loaded video gets fast forwarded for the duration of the pipeline (aka, it starts from the 5 minutes mark not from the beginning).  
Is there some pre-processing I should do to the raw video frames before it enters the compositor request pad?

---

<div class="post-metadata">

**Author:** ![tpm](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@tpm](https://discourse.gstreamer.org/u/tpm)\
**Post date:** [March 3, 2025, 12:05am UTC](https://discourse.gstreamer.org/t/synchronizing-timestamps-for-compositor-inputs/4213/2 "2025-03-03T00:05:36Z")

</div>

You can query the current position of the compositor and use `gst_pad_set_offset()` on a source pad in the `compositor` input branch to offset the 0-based timestamps (if you have a non-live input such as from file).

---

<div class="post-metadata">

**Author:** ![hassanamin994](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/hassanamin994/32/1039_2.png) [@hassanamin994](https://discourse.gstreamer.org/u/hassanamin994)\
**Post date:** [March 3, 2025, 1:38am UTC](https://discourse.gstreamer.org/t/synchronizing-timestamps-for-compositor-inputs/4213/3 "2025-03-03T01:38:29Z")

</div>

Thank you! setting the offset on the compositor sink pad solved the problem.
