# Expecting to render VTT files with timestamps beginning at 01:..., indicating a 1-hour offset, which will be globally nullified so that subtitle text lines get actually shown at at 00:

**URL:** <https://community.bitmovin.com/t/expecting-to-render-vtt-files-with-timestamps-beginning-at-01-indicating-a-1-hour-offset-which-will-be-globally-nullified-so-that-subtitle-text-lines-get-actually-shown-at-at-00/2402>\
**Category:** Support\
**Created:** [October 31, 2023, 6:30pm UTC](https://community.bitmovin.com/t/expecting-to-render-vtt-files-with-timestamps-beginning-at-01-indicating-a-1-hour-offset-which-will-be-globally-nullified-so-that-subtitle-text-lines-get-actually-shown-at-at-00/2402 "2023-10-31T18:30:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugo.machefer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/hugo.machefer/32/837_2.png) [@hugo.machefer](https://community.bitmovin.com/u/hugo.machefer)\
**Post date:** [October 31, 2023, 6:30pm UTC](https://community.bitmovin.com/t/expecting-to-render-vtt-files-with-timestamps-beginning-at-01-indicating-a-1-hour-offset-which-will-be-globally-nullified-so-that-subtitle-text-lines-get-actually-shown-at-at-00/2402/1 "2023-10-31T18:30:40Z")

</div>

We are encountering an issue with rendering specific VTT files in the Bitmovin player. The distinctive feature of these files is that their timestamps begin with **01:…** , indicating a 1-hour offset. Here’s a snapshot of the VTT content:

```auto
01:00:24.658 --> 01:00:26.426 align:center line:0
[Chuckles]
01:00:34.501 --> 01:00:35.769 align:center line:-1
[Slurps]
...

```

Our aim is for Bitmovin to display these subtitles starting from 00:…, effectively reducing the one-hour offset without us having to alter the original VTT content. Ideally, it would display as:

```auto
00:00:24.658 --> 00:00:26.426 align:center line:0
[Chuckles]
00:00:34.501 --> 00:00:35.769 align:center line:-1
[Slurps]
...

```

While the Bitmovin developer documentation suggests appending the following to the beginning of each VTT file:

```auto
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

```

This solution does not seem to work. Subtitles like [Chuckles] and [Slurps], expected to appear after 24 and 34 seconds respectively, are not displayed, even with the recommended adjustment.

I replicated the issue using Bitmovin’s example from the official web site **https : / / github . com / bitmovin/bitmovin-player-web-samples/tree/main/subtitles** , and added four subtitles. That way:

```auto
    var player = new bitmovin.player.Player(document.getElementById('player'), conf);

    player.load(source).then(function () {
        var playerContainer = player.getContainer();
        subtitleDisplay = new CustomSubtitleDisplay(playerContainer);
...

        player.subtitles.add({
                id: String(1),
                url: 'https://d29imlmrejcjlu.cloudfront.net/difuzego/FearTheWalkingDead_TimeStampZero1.vtt',
                kind: 'caption',
                label: 'fullSyntax1',
                lang: 'fullSyntax1'
            });
            player.subtitles.add({
                id: String(2),
                url: 'https://d29imlmrejcjlu.cloudfront.net/difuzego/FearTheWalkingDead_TimeStampZero2.vtt',
                kind: 'caption',
                label: 'fullSyntax2',
                lang: 'fullSyntax2'
            });
...              
    }, function () {
        console.log('Error while loading source');
    });

```

I published the reference file [here](http://hugo.machefer.free.fr/bitmovin/subtitles/customSubtitleDisplay.html) as an online example. All VTT files load correctly in Bitmovin, but only the last one with 00:… timestamps renders the subtitles properly. To offer a clearer perspective, I’ve even posted a video [witnessing-record](http://hugo.machefer.free.fr/bitmovin/subtitles/2023-10-30%2023-19-51.mp4) illustrating the problem.

Therefore would you mind providing guidance on applying the instructions from **developer . bitmovin . com /playback/docs/why-are-my-webvtt-subtitle-tracks-not-in-sync-with-the-video** effectively and successfully ?

---

<div class="post-metadata">

**Author:** ![ludovic.michaud](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/ludovic.michaud/32/811_2.png) [@ludovic.michaud](https://community.bitmovin.com/u/ludovic.michaud)\
**Post date:** [October 31, 2023, 10:19pm UTC](https://community.bitmovin.com/t/expecting-to-render-vtt-files-with-timestamps-beginning-at-01-indicating-a-1-hour-offset-which-will-be-globally-nullified-so-that-subtitle-text-lines-get-actually-shown-at-at-00/2402/2 "2023-10-31T22:19:28Z")

</div>

Hi,  
you could correct your subtitles through the Network API the following way :

```javascript
            conf.network = {
                preprocessHttpResponse: function(type, data) {
                    if (type === bitmovin.player.HttpRequestType.MEDIA_SUBTITLES) {
                        data.body = data.body.replace(/(?<!:)(01)(?=:)/g, "00")
                    }
                    return data;
                }
            }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/1ab86334145095b0af9c5b924fa3ae6d920b6482.png) [@system](https://community.bitmovin.com/u/system)\
**Post date:** [October 31, 2023, 11:19pm UTC](https://community.bitmovin.com/t/expecting-to-render-vtt-files-with-timestamps-beginning-at-01-indicating-a-1-hour-offset-which-will-be-globally-nullified-so-that-subtitle-text-lines-get-actually-shown-at-at-00/2402/3 "2023-10-31T23:19:44Z")

</div>

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.
