# How to inject metadata into HLS live stream at a specific time?

**URL:** https://community.wowza.com/t/how-to-inject-metadata-into-hls-live-stream-at-a-specific-time/44768
**Category:** Wowza Streaming Engine
**Created:** [July 6, 2015, 10:04am UTC](https://community.wowza.com/t/how-to-inject-metadata-into-hls-live-stream-at-a-specific-time/44768 "2015-07-06T10:04:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Yuxiang\_Shen](https://avatars.discourse-cdn.com/v4/letter/y/278dde/32.png) [@Yuxiang\_Shen](https://community.wowza.com/u/Yuxiang_Shen)
#### Post date: [July 6, 2015, 10:04am UTC](https://community.wowza.com/t/how-to-inject-metadata-into-hls-live-stream-at-a-specific-time/44768/1 "2015-07-06T10:04:24Z")

</div>

Hi there,

I need to insert metadata into HLS live stream at a specific time, like “10.5s after the beginning”. Now I know how to insert ID3 tags into it, but I cannot control the time. Is there any way to do this in Wowza?

Thanks!

Yorick

---

<div class="post-metadata">

### Author: ![Yuxiang\_Shen](https://avatars.discourse-cdn.com/v4/letter/y/278dde/32.png) [@Yuxiang\_Shen](https://community.wowza.com/u/Yuxiang_Shen)
#### Post date: [July 6, 2015, 3:16pm UTC](https://community.wowza.com/t/how-to-inject-metadata-into-hls-live-stream-at-a-specific-time/44768/2 "2015-07-06T15:16:03Z")

</div>

Found an expedient way to achieve this: IMediaStream.timeCode. (and IMediaStream.videoTimeCode). This method returns the time relative to the beginning of this stream. For example, if I wanna insert metadata at 10.5s, I can call new Timer().schedule(metadataInjector(…), 10.5 \* 1000 - currentStream.videoTimeCode()). I checked the output stream with DVBInspector and found the metadata was inserted roughly around 10.5s (with about 500ms’ deviation).

I’d appreciate it if someone could propose a more accurate way.

---

<div class="post-metadata">

### Author: ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)
#### Post date: [July 15, 2015, 7:08am UTC](https://community.wowza.com/t/how-to-inject-metadata-into-hls-live-stream-at-a-specific-time/44768/3 "2015-07-15T07:08:55Z")

</div>

Yorick, you might have a read through this [forum post](http://community.wowza.com/t/-/43622) for an answer

Salvadore
