Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect decoding of subtitles embedded in manifest #5882

Closed
pkosmala opened this issue Mar 21, 2019 · 4 comments
Closed

Incorrect decoding of subtitles embedded in manifest #5882

pkosmala opened this issue Mar 21, 2019 · 4 comments

Comments

@pkosmala
Copy link

Description

Special characters in subtitles are not displayed correctly resulting in å being shown as Ã¥.

Steps to reproduce

  1. Load up video src with a manifest that has embedded subtitles. Example contents can be found below:

#EXTM3U
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Dansk",DEFAULT=NO,AUTOSELECT=NO,FORCED=NO,URI="https://domain.com/mu/subtitles/playlist/urn:dr:mu:manifest:5b5d29c66187a5106075a3f1?segmentsizeinms=60000&subtitleType=HardOfHearing",LANGUAGE="da"
#EXT-X-STREAM-INF:SUBTITLES="subs",PROGRAM-ID=1,BANDWIDTH=278000,RESOLUTION=640x360,CODECS="avc1.66.30, mp4a.40.2"
https://domain.com/i/all/clear/streaming/f1/5b5d29c66187a5106075a3f1/U--1-8-_04abf6ac510945d580a5253de8a3af5b_,281,434,714,1550,2215,.mp4.csmil/index_0_av.m3u8?null=0

  1. Player follows the link to load a list of subtitle chunks:

#EXTM3U
#EXT-X-TARGETDURATION:60
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:60,
https://domain.com/mu/subtitles/segment/urn:dr:mu:manifest:5b5d29c66187a5106075a3f1?segmentsizeinms=60000&index=0&subtitleType=HardOfHearing
#EXTINF:60,
https://domain.com/mu/subtitles/segment/urn:dr:mu:manifest:5b5d29c66187a5106075a3f1?segmentsizeinms=60000&index=1&subtitleType=HardOfHearing

  1. And then it loads a specific WEBVTT chunk:

WEBVTT
X-TIMESTAMP-MAP=MPEGTS:900000,LOCAL:00:00:00.000
00:00:03.880 --> 00:00:08.520
I storbyerne står køberne i kø.
Det væltede ind med folk.
00:00:08.640 --> 00:00:12.720
Ejendomsmæglerne har det godt.
Syv dage, så var den løst.

Results

Expected

Subtitles are displayed without any changes like so:
Ejendomsmæglerne har det godt.
Syv dage, så var den løst.

Actual

Special characters are not shown correctly:
Ejendomsmæglerne har det godt.
Syv dage, så var den løst.

Additional Information

versions

videojs

6.9.0

browsers

IE11+

OSes

Windows

@welcome
Copy link

welcome bot commented Mar 21, 2019

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@elsassph
Copy link

Extra notes: server is serving chunks with mimetype text/plain; charset=utf-8.

@mister-ben
Copy link
Contributor

This was fixed a while back (see #5070), but you're using an older version of Video.js. The fix is in http-streaming as of Video.js 7.2.

@pkosmala
Copy link
Author

Upgrading to Video.js 7.2 has fixed the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants