Adding VTT captions as a track so that they can be cut together with the video.

45 views
Skip to first unread message

Raul Beltrán B.

unread,
Nov 10, 2022, 4:47:54 PM11/10/22
to Opencast Users
Hello everyone,

In this thread (from Lars Kiesow) I read that you could cut the subtitles along with the video if you uploaded the VTT file as a track.

I tried what Karen suggests there, but it doesn't work. And the label for uploading the VTT track appears as in the image below.


I can upload the subtitles as an Asset, but do you know if there is a possibility to manage the file as a Track?

Or how can I use this Asset to cut the subtitles with the video editor?


Regards,

Raul B.
Screenshot 2022-10-28 at 16.20.43.png

Dietmar Zenker

unread,
Nov 11, 2022, 3:17:18 AM11/11/22
to Opencast Users, rrb...@gmail.com
Hi Raul,

I don't think that this will ever work, but I've never tried this. (maybe someone else has already implemented this?)
 
How do you generate the VTT? Do you use some of the WOs provided by Opencast for that? (e.g. "speechtotext" for VOSK)
If so, you could use the attached workflow as a work-around that we use in our installation: this WF does not use the source file for generating the VTT with VOSK, but generates a trimmed work version of the video according to the current cutting information and uses the trimmed file for the speechtotext operation. The speechtotext WO could also be replaced by e.g. " microsoft-azure-start-transcription" or other, but the source-flavor has to be changed to that of the trimmed version.

May be that helps,

greetings,
Dietmar


speech-to-text-vosk.xml

Matthias Neugebauer

unread,
Nov 14, 2022, 11:03:44 AM11/14/22
to Opencast Users
Hi Raul,

This should work, the translation is just missing. You can provide a default text in this case. Also we configure this as UPLOAD_ASSET and not as SOURCE. This allows you to upload subtitle tracks later on, e.g.:

EVENTS.EVENTS.NEW.UPLOAD_ASSET.OPTION.CAPTIONS_DE={ "displayOrder": 11, "id": "track_captions_de", "type": "track", "flavorType": "captions", "flavorSubType": "source+de", "displayFallback": "Subtitles German", "multiple": false, "accept": ".vtt,.srt,.ass,.ssa“ }

EVENTS.EVENTS.NEW.UPLOAD_ASSET.OPTION.CAPTIONS_EN={ "displayOrder": 12, "id": "track_captions_en", "type": "track", "flavorType": "captions", "flavorSubType": "source+en", "displayFallback": "Subtitles English", "multiple": false, "accept": ".vtt,.srt,.ass,.ssa" }

– Matthias


educast.nrw / ZHLdigital (eLectures)
ERCIS - European Research Center for Information Systems

University of Münster
Leonardo-Campus 3 - Room 327
48149 Münster
Germany

Tel: +49 251 83-38268
Mail: matthias....@uni-muenster.de
> --
> To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.
> <Screenshot 2022-10-28 at 16.20.43.png>

signature.asc

Raul Beltrán B.

unread,
Nov 17, 2022, 12:49:43 PM11/17/22
to Opencast Users, dzenk...@online.de
Thank you Dietmar,

Yes, we actually upload the VTT subtitle file after making manual corrections. So it's not an option for us to generate the subtitles again after using the cutting tool.

But your example file gave me additional knowledge that I will use if we opt for another procedure!

Regards,

Raul B.

Raul Beltrán B.

unread,
Nov 17, 2022, 12:49:48 PM11/17/22
to Opencast Users, matthias....@uni-muenster.de
Thank you Matthias,

The solution you provided to me works better to attach the VTT file as a Track, before I was using EVENTS.EVENTS.NEW.UPLOAD_ASSET.OPTION.CAPTIONS_WEBVTT.

Now I can rename and copy the captions file together with the video, using the WOH. But sadly, the video editor does not affect the subtitles as Lasr expected.

Is there any way to use the SMIL file to do this externally?

Regards,

Raul B.

Matthias Neugebauer

unread,
Nov 20, 2022, 2:11:56 PM11/20/22
to "Raul Beltrán B.", Opencast Users
Hi Raul,

Since Opencast 12.4 you should be able to cut subtitle tracks. See https://github.com/opencast/opencast/pull/3606 for more information.

– Matthias


educast.nrw / ZHLdigital (eLectures)
ERCIS - European Research Center for Information Systems

University of Münster
Leonardo-Campus 3 - Room 327
48149 Münster
Germany

Tel: +49 251 83-38268
Mail: matthias....@uni-muenster.de

Reply all
Reply to author
Forward
0 new messages