learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
457 stars 304 forks source link

Captions do not appear in Epiphany on a Raspberry Pi #5125

Closed richsegal closed 7 years ago

richsegal commented 8 years ago

Summary

Captions do not appear in Epiphany on a Raspberry Pi.

Branch or installer method

n/a

How to reproduce

  1. Boot Raspbian 2016-05-10
  2. Install ka-lite: sudo pip install ka-lite-static
  3. Start ka-lite: sudo kalite start
  4. Login to KA-Lite using the url http://localhost:8008/
  5. Download a language pack with captions (eg. french)
  6. Download a video with captions
  7. Run a video scan to get captions to be recognized
  8. Play the downloaded video
  9. Use the CC button on the bottom of the player to enable captions
  10. At this point captions should appear but do not

I reproduced the above using the video Science / Physics / One Dimensional Motion / Displacement, velocity, and Time / Intro to vectors & scalars

Screenshots

n/a

Real-life consequences (anything community should be aware, for instance how it affects your deployment)

We have reverted to KA-Lite 0.15.x for Powering Potential deployments as English language captions are critical for non-native English speakers. We cannot upgrade to the 0.16.x stream until this is fixed.

j-schwartz commented 8 years ago

@richsegal are you seeing captions on other browsers? I'm not getting English captions at all, despite the admin page saying they are downloaded.

richsegal commented 8 years ago

I am not seeing subtitles for English in the admin page when I follow the instructions above. For English I see the status listed as 100% translated, 0 subtitles. The KA-Lite UI does not allow you to easily download English subtitles. I can manually download English subtitles using the command:

sudo kalite manage retrievecontentpack download en

After I run the above command and do a video scan, the admin page lists the status of English as 0% translated and 5951 subtitles. I can then go and view a video with English subtitles from a remote computer and it works fine. I have verified that English subtitles work with the above procedure with both Safari and Firefox on OSX. However, as described above, subtitles cannot be viewed on the Raspberry Pi itself.

j-schwartz commented 8 years ago

@benjaoming - subtitle thread here. Thank you!

benjaoming commented 8 years ago

Thanks, self-assigning :D

j-schwartz commented 8 years ago

@benjaoming do you know where in a linux install the subtitles are stored? not seeing them on first glance here. They are .vtt not .srt now right?

Is it a clean assumption they are here: /root/.kalite/httpsrv/static/srt/en/subtitles

benjaoming commented 8 years ago

Hi @j-schwartz , I'll investigate tomorrow when I'm with my beloved test device again!

benjaoming commented 8 years ago

Don't worry about investigating this further, I'm sure it's a legit issue, just gotta sit in front of Epihany and all that and then I'll figure out what to do from there :)

benjaoming commented 8 years ago

Step 1: Confirmed! Above mentioned video http://127.0.0.1:8008/learn/khan/science/physics/one-dimensional-motion/displacement-velocity-time/introduction-to-vectors-and-scalars/ plays with subtitles in Firefox, but not in Epiphany on Raspbian Jessie.

benjaoming commented 8 years ago

Javascript error in Epiphany is the following:

** Message: console message: http://localhost:8008/static/js/distributed/bundles/bundle_video.js @19: TypeError: undefined is not a constructor (evaluating 'new(l.vttjs.VTTCue||l.window.VTTCue)(0,0,"")')

@rtibbles you can install Epiphany like this:

sudo apt-get install epiphany-browser epiphany-browser-dbg

The error is reproducable on Ubuntu 14.04. But it doesn't for some reason install into the launcher area, so launch it from the console.

EPHY_ENABLE_INSPECTOR=true epiphany

After that, right-click somewhere and choose "Inspect element" to start the inspector.

Could the solution be to switch to http://captionatorjs.com/ ?

benjaoming commented 8 years ago

Tried latest video.js, 5.10.4, same result.

JMNB commented 7 years ago

Today I managed to run KA Lite including subtitles on a RaspberryPI 2B.

NOOBS version: V2_0_0 KA Lite version: 0.16 Iceweasel/Firefox version: 45.4.0

benjaoming commented 7 years ago

Thanks for testing @JMNB - It's definitely the older version of Epiphany that's to blame, but I don't anyone is going to try to fix it... could happen by accident if we upgrade video.js and they have the problem sorted upstream.

benjaoming commented 7 years ago

Updates and of video.js and vtt.js have occurred in the latest release available via pip install ka-lite-static --pre. Please feel invited to test :)

JMNB commented 7 years ago

Dear Benjamin, good morning,

For testing I installed the new version of KA-Lite in a RaspberryPI and did the test with the languages and subtitles. It still does not work.

But I am not sure if I did the installation correct. Where is the location of those two files on the RaspberyPI so I check?

BY the way subtitles and CC is also functioning the Chromium webbrowser, which is included in Raspbian.

Kind regards,

Julia Nolles

Op 17 dec. 2016, om 01:40 heeft Benjamin Bach notifications@github.com het volgende geschreven:

Updates and of video.js and vtt.js have occurred in the latest release available via pip install ka-lite-static --pre. Please feel invited to test :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/learningequality/ka-lite/issues/5125#issuecomment-267729549, or mute the thread https://github.com/notifications/unsubscribe-auth/AQI0PT-QcRsKU2lKfMQMCw5DoUKoFYSnks5rIy-FgaJpZM4ImlTJ.

benjaoming commented 7 years ago

@JMNB thanks for testing! video.js and vtt.js aren't files - they are names of javascript libraries used to show subtitles.

Did you do a clean install or upgrade?

If you have upgraded an existing installation, you might have to do kalite manage setup, not sure if it's run automatically with the pip install method.

benjaoming commented 7 years ago

@JMNB oh, by the way yes, everything hopefully works in Chromium, it's the new default browser in the latest Raspbian.

benjaoming commented 7 years ago

I don't think we'll be able to troubleshoot this any further. Ultimately, it's a problem with vtt.js or Epiphany.

The solution for now, is to use a new version of Raspbian or install another browser (e.g. Firefox or Chromium) on the older Raspbian.

benjaoming commented 7 years ago

Btw thanks for reporting and please feel invited to report any other issues any other time :)