youtube subtitles in interactive video

Hello!

Is there any option to activate subtitles in youtube video using interactive video?

 

Thanks

otacke's picture

Not yet, but a solution can be seen on the horizon.

Hello Oliver,

great to hear. Can you tell anything about when this will be propably available?

Thx
Andreas

otacke's picture

It has already been around for quite some time now :-) Just get the latest updates and enjoy.

Can you explain how to enable captions on youtube videos? I am using InteractiveVideo version 1.17.5 and I don't see a way to display captions on YouTube videos.

otacke's picture

Hi Dirk!

You'll have to add the captions on YouTube.

Best,

Oliver

Hi all, 

Is there any evolution in this? It would be great to use the subtitles of vimeo or youtube video's with in the player for multiple languages.

Thanks for your feedback!

Glenn

otacke's picture

Hi Glenn!

You digged up a post from years ago. You have been able to use subtitles from YouTube for quite some while now.

Best,

Oliver

The youtube video does have captions - here's a screencast showing the H5P interactive video widget (note lack of caption option), followed by viewing the video directly in YouTube, which then does have the CC closed caption option. I don't see a method to enable captions via H5P.

https://youtu.be/gp79qSBdwTE

otacke's picture

Hi Dirk!

Unfortunately, YouTube does not serve the automatically created captions to external players. You'll have to manually create the captions for the specific language on YouTube -- which will be filled with the automatic transcript by default AFAIR. Done in 2 minutes.

Best,
Oliver

Thank you, that works. Is this documented some place? I would like to update our production notes to include this.

I'm assuming that there isn't a  way to automate the generation of the "manually created" captions.

BV52's picture

Hi Dirk,

I'm afraid there isn't a documentation for this. We try to create as much documentation as we can although there is a challenge in keeping them up to date.

You are correct it is not possible to automate the creation of the captions.

-BV52

I wrote a small python program that downloads all the SRT captions from videos in a specified playlist and captures them to files with a directory structure reflecting the video names (see attached). It also generates a script that uses the "captions.py" program from the sample youtube API scripts ( https://github.com/youtube/api-samples ) to upload modified SRT captions. Just doing the download and then uploading provides a caption file other than the automatically generated version and that version will appear in H5P. This might be useful for others in a similar boat.

However, working on this begs the question - the auto-generated version does appear in the caption API. Their "isCC" property is False (indicating not closed caption) which is why I suspect they don't appear in the captions list. However, their "trackKind" property is ASR (automatic speach recoginition). It may be a useful addition to use the ASR track if there are no others

I looked at the h5p-interactive-video plugin code but am not that familar with js or h5p source, so didn't see if this was an obvious/easy change or not.

Actually, we use 3play captioning service and as part of the process, they apply the captions to our YouTube videos for us. So yes it can be automated but it may be an expensive option if your not paying for a captioning service

profbird's picture

I'm trying to solve the same problem. I have YouTube videos with captions and I can download a transcript file, but when I create an H5P interactive video, I am not able to upload the transcript (.vtt) file since the upload dialog for Text Tracks says "unsupported for YouTube videos". Could you explain in a little more detail what you mean by "manually create the captions" and how they will be "filled with the automatic transcript"?

Thanks

BV52's picture

Hi profbird,

Please check my answer here.

-BV52

otacke's picture

Hi Dirk!

Thanks for your hints, but the YouTube Data API is not the same as the YouTube (Player) IFrame API. The latter does not offer a way to retrieve the auto generated subtitles.

Best,
Oliver

profbird's picture

Yes, I am able to add captions to my YouTube video, but when I embed my YouTube video in the H5P Interactive Viedo activity, the captions are disabled.

I've attached two screen-shots. The first one shows my video on the YouTube page with the cc button visible and the captions being displayed. The second one shows my video embedded in H5P in a Moodle activity and as you can see there are no captions and the cc button is not visible. Is there a way to change the behavior of H5P so that the YouTube captions are enabled?

 

BV52's picture

Hi profbird,

I tried checking this in my Moodle as well and the CC is working. Would you mind checking if you have any errors in the browser console?

-BV52

profbird's picture

Our Moodle system administrator found a solution: The H5P video player can currently only detect if subtitles exist if YouTube subtitles are turned on by default. In other words, h5p can’t trigger youtube to display the captions if youtube doesn’t first indicate that captions are available (chicken and egg problem).

Thankfully, there is an easy solution. You need to add a special tag to each one of your YouTube videos you plan on using with H5P. Go to YouTube and edit your video. In the “Tags” area, add the following:"yt:cc=on” (entered with no quotes). <— This now makes ‘CC turned on by default. It can always be turned off by the user. 
BV52's picture

Hi profbird,

I'm glad this is now working and thank you for getting back to us with your solution.

-BV52

Hi all,

I'm checking on the status of captions added to a YouTube video still not displaying on H5P interactive video? I saw a post that said this was to be completed in 2017, but it still does not appear to be working. Please advise.

Thanks!

otacke's picture

Hi meltonml!

The feature is in fact working since 2017. Maybe you could elaborate on what you are trying to achieve how? Otherwise I can just advise you to add captions to a YouTube video (in addition to automated transcription) and check them out inside H5P.

Best,

Oliver

Hi Oliver!

Thank you for the quick reply! I have a YouTube video that has automated captions used for an Interacive Video activity. I tried adding the SRT file for captions in addition to the automated ones in YouTube, as well as adding the tag for defaulting captions to on in YouTube, and captions still do not appear in the video in the Interactive Video. An example is here: https://h5p.org/node/853385.

Can you please let me know exactly what needs to be configured for the captions to display? Thank you!

Hi again Oliver,

Please disregard, it must have just taken a moment for the SRT file to load. The captions are displaying now. Thank you!