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

New subtitle support #49

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ferishili
Copy link
Contributor

This PR fixes #48

Description

In Opencast 15, captions (subtitles) are provided with different format as for their flavors: captions/delivery ... etc. and every other data including language code etc. is included in the tags.

Solution

  • This patch covers the new subtitles format while it maintain the old ones.
  • The get_caption function now cover attachments and media and for media also looks for old and new subtitles.

To TEST

  • You would need to have Opencast 15.
  • You would need to have auto generated captions as well as manually uploaded caption via block_opencast plugin (or any other way) in order to test all cases.
  • Try to watch the event via this plugin or in filter plugin
  • All captions must be accessible in the paella player!

@mwuttke
Copy link

mwuttke commented Mar 26, 2024

Hello @ferishili,
I tested videos with subtitles created by amberscript in english & in german with in the mod plugin, embedded in a page and embedded in a book page. And I tested videos with subtitles created by whisper and by whipsercpp in english & in german with in the mod plugin, embedded in a page and in a book page. In all scenarios the subtitles where shown.
So the patch works for me. ;-)

We used for the test scenarios Opencast Version 15.3 and Moodle Version 4.1.9+.

@mwuttke
Copy link

mwuttke commented Jun 21, 2024

@NinaHerrmann & @justusdieckmann, what do you think speaks against reviewing and releasing this PR?

@NinaHerrmann
Copy link
Contributor

We do not have the capacity to review it.

Copy link
Collaborator

@justusdieckmann justusdieckmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ferishili,

thank you very much for the pull request!

If I understand correctly, in all cases where the strpos is checked, the search-string should be at the start of the full string, right? So maybe strpos(...) === 0 would be better in those cases. Also, instead of str_replace('prefix', '', $tag), maybe you could use substr($tag, strlen('prefix')), because that will also work correctly in the (very unlikely) case, that 'prefix' is contained later in the string again.

Do you have any pointers to workflows or documentation regarding how to best setup the automatic captions to have an video to test with? I have found a talk about it, and the ts-api repo, but no instructions how to integrate it in opencast.

Thank you!
Justus

@ferishili
Copy link
Contributor Author

Hi @justusdieckmann,
The changes are applied.

Unfortunately, I have very little knowledge about automatic captions, but I would guess these docs could help!

https://docs.opencast.org/r/15.x/admin/#configuration/transcription.configuration/whisper/
https://docs.opencast.org/r/15.x/admin/#configuration/transcription.configuration/vosk/

@bluetom bluetom added the 4.5.1 label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.5.1 enhancement New feature or request
Projects
5 participants