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

Hebrew subtitles #2

Closed
ghost opened this issue Jun 5, 2016 · 18 comments
Closed

Hebrew subtitles #2

ghost opened this issue Jun 5, 2016 · 18 comments

Comments

@ghost
Copy link

ghost commented Jun 5, 2016

Hi!
first of all, thank you for this awesome player.
I've got some issue: when I try to play Hebrew subtitles, It shows only "???" instead of text (for example: "טקסט לדוגמה" - translation from hebrew: "Example Text")
I tried to change the page charset to WINDOWS-1255 but still "???" and even tried to convert the hebrew into unicode and then it showed as &#[...];

How can I fix this? can you help me?

Thanks again, this is really awesome! 👍

@iandevlin
Copy link
Owner

Hmm, I would have thought that UTF-8 is the way to go, but I admit that I have never tried a language such as Hebrew. I will have a look.

@iandevlin
Copy link
Owner

iandevlin commented Jun 6, 2016

I did a quick test, and have a quick example working here: https://iandevlin.com/html5/track/index-hebrew-test.html
I saved the VTT file as UTF-8, same with the HTML file. I didn't do anything special.

I would love to add a Hebrew example, if you had the translated text?

@ghost
Copy link
Author

ghost commented Jun 6, 2016

I can translate it to hebrew, If that's what you mean (I can send a link to pastebin when i'll finish)
It seem to work only if you use Arial font (not with webfonts, and for me arial is really ugly for hebrew - i'm using "alef" instead. for me it worked with windows-1255 charset) and also, you can't add new line in hebrew with vtt, it probably turns second lines into comments for some reason and then not showing it at all, for example if you use:
"שורה ראשונה
שורה שנייה"
(Translation: first line, second line) then it shows only the first line. some web converters just remove the second line and leaving the first one, others encoding hebrew into gibbrish or ascii characters

by the way, please excuse my english because sometimes I have misspellings. feel free to fix me if I wrote something incorrect! p.s. I have to admit that I really try to write it right - I even checked it few times with hebrew-english dictionary (morfix) but if you still found anything incorrect with my spelling please let me know

thank you for answering and again, for this really great thing that you've made! =]

@ghost
Copy link
Author

ghost commented Jun 6, 2016

Hi, I've translated it (you can find it here / raw ("test" in hebrew is actually "בדיקה" but you can also say it as "ניסיון" like "try" - trying to see if it works, there's not much difference and hebrew speakers/readers will understand but you can change it to "בדיקה" if you want to. i usually write "ניסיון" instead of "בדיקה" - never really used it, but it's just me))
(note: If you'll try to convert it with this converter you'll get latin ascii characters instead of hebrew, if you'll try with this one some lines will be removed automatically)
feel free to download it, change it, do whatever you want =]
and if you will find any solution for the second line issue (line break issue) please let me know!

and, if you want to learn how to say those words I wrote in hebrew so, read it like this:
בדיקה = bdika
ניסיון = nisayon
שורה = shura(h)
ראשונה = rishona
שניה\שנייה = shniya
(ל)דוגמה = (Le)dugma

the (Le) \ (ל) is in brackets because its optional, you can say דוגמה = example or לדוגמה = for example

טקסט sounds exactly like text

@iandevlin
Copy link
Owner

Ok cool, thanks. I will have a look at it when I have a moment. I can imagine that the font does have some issues, I don't know the alef font, but I assume it is specifically for Hebrew? I have not looked into how WebVTT works with fonts, so that is something interesting. I have no idea why the line breaks are not working, that is also weird! I sense that I will be testing all this and writing an article!

Oh and your English is excellent, so please do not worry about that! :D

@ghost
Copy link
Author

ghost commented Jun 7, 2016

yes this font is specifically for hebrew, but there is also english letters. I tried to use this font through css (::cue - font-family after embedding @font-face), but it didn't work, when I changed it to "Arial" then it worked
about the line breaks - for some reason when there is only one break in the file it ruins the entire file and not showing captions at all

thank you again! =]

@iandevlin
Copy link
Owner

I suspect the line break in Hebrew might be adding some weird invalid character or something.
Yes, it doesn't surprise me that a font-face font wouldn't work with subtitles. I am not sure they implemented that, but it's a good question nonetheless and something to test.

@ghost ghost closed this as completed Jun 7, 2016
@iandevlin
Copy link
Owner

Hmm, what browser are you having difficulties in? I have just tried it with the Alef font (from Google fonts) and it works fine in Chrome. Line breaks are also not a problem.
Strange.

@ghost
Copy link
Author

ghost commented Jun 7, 2016

Firefox
can you show me what you do to make it work? maybe I did something wrong / changed something

thank you

@ghost ghost reopened this Jun 7, 2016
@iandevlin
Copy link
Owner

Will do, when I am at home.

@ghost
Copy link
Author

ghost commented Jun 8, 2016

Okay thank you again! =]

@iandevlin
Copy link
Owner

Apologies for the delay. It is online at https://iandevlin.com/html5/track/hebrew/.
But, Firefox ignores the Google Font, as it ignores the ::cue selector I believe, but it does display in Arial.

@ghost
Copy link
Author

ghost commented Jun 9, 2016

Hi! it's alright you don't need to apologize - everything is fine. I really appreciate this, thank you very much!
I didn't knew that the ::cue selector should be in the vtt. I tried it through the css file. I didn't knew also that it works in chrome better than in firefox. I'll try to do it as you did, I'll update here how it goes.

@iandevlin
Copy link
Owner

Apparently the styles can also be in the VTT file so I was trying both in case one worked in Firefox, but neither do sadly.

@ghost
Copy link
Author

ghost commented Jun 10, 2016

I was wrong, I didn't encoded the file to UTF-8 and also forgot to replace the comma in the time milliseconds to period. anyway you've helped a lot, thank you so much! =]

@ghost ghost closed this as completed Jun 10, 2016
@iandevlin
Copy link
Owner

No worries, happy to help! I would be interested to see what you are using it for!

@ghost
Copy link
Author

ghost commented Jun 10, 2016

I am actually using it to learn HTML5 and CSS3 (change stuff here and there to learn some basics or advanced things) and now I wanted to learn how can I make my own media player and I found yours in this mozilla website and I really loved it and it helps me learn how to use video tag for example (and the thing with the vtt that is really new to me cause I haven't learn about it before this)

It's currently on localhost because I don't have any website but if I will ever have one I'll share with you (and with the internet) the things I have learned including the web media player so you will be able to see it (I will also credit you and mozilla and thank you). but right now it's just for learning only and I don't think I will ever make my own site, maybe blog or something, I'll need an idea for that lol

again, thanks! =]

@iandevlin
Copy link
Owner

Ah cool, glad to hear it. Well I wish you all the best, and if you have any
questions you feel like asking, feel free to email me at ian@iandevlin.com

Good luck with it all!

Ian Devlin
iandevlin.com http://www.iandevlin.com
@iandevlin http://www.twitter.com/iandevlin

skype: idevlin

On 10 June 2016 at 18:17, natanelg97 notifications@github.com wrote:

I am actually using it to learn HTML5 and CSS3 (change stuff here and
there to learn some basics or advanced things) and now I wanted to learn
how can I make my own media player and I found yours in this mozilla
website and I really loved it and it helps me learn how to use video tag
for example

It's currently on localhost because I don't have any website but if I will
ever have one I'll share with you (and with the internet) the things I have
learned including the web media player so you will be able to see it (I
will also credit you and thank you). but right now it's just for learning
only and I don't think I will ever make my own site, maybe blog or
something, I'll need an idea for that lol

again, thanks! =]


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAh1VuoT31S6Q8pYXr22BN7cQQdNreVgks5qKY4ZgaJpZM4IuVEB
.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant