Userfriendly way to upload a video with subtitle

Userfriendly way to upload a video with subtitle

von Alexander Lebeth -
Anzahl Antworten: 21

On our platform moodle v2.9 for students we are using JW Player for videos (implemented via plugin https://moodle.org/plugins/filter_jwplayer ). But how to provide a simple and fail-proof possibility for students to upload/publish a video and a corresponding subtitle file? This should be a common use case, does someone have suggestions?


Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von AL Rachels -
Nutzerbild von Core developers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers Nutzerbild von Testers

I haven't tried it, but you probably could build a preset using the Generico filter to handle both files.

I used to have my students make subtitle files using Aeisub. Then, using Any Video Convertor, we would render a final version of a video with the subtitles embedded. We used the pcast activity, (podcast) so they could reliably upload for a grade and to watch each others videos.

Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

It does depend on the subtitle file format. But this example how you might do this, with Flowplayer and VideoEasy. 

https://demo.poodll.com/mod/page/view.php?id=190

 You will need to be a bit familiar with VideoEasy.It uses the VideoEasy filter and a template for Flowplayer that looks for a subtitle file with file extension .vtt in the same directory as the video file. 

So if this was a forum you would:

i) make sure that for the forum activity the media filter was videoeasy
(you can enable and disable filters at the activity level in the settings block)

ii) Make sure the videoeasy flowplayer_subtitle template is handling the video file extension you use.

iii) have the student upload the video into the forum post and also upload the subtitle file into the same post. For the subtitle file you would upload using the link icon on the editor. 

iv) then the video player should find the subtitle file and everybody be happy.

Als Antwort auf Justin Hunt

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

Dear Justin,

thanks a lot for your assistance again. I tried to install videoeasy on our moodle 2.9.7 but when installing neither I was finally guided to the template page as you write in the installation guide nor there's a settings section in the admin filter menu as you can see on the screenshot:

Screenshot

I tried with the plugin version on github and the one moodle.org.


Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

Sorry to reply so late. I decided to make a tutorial because it seemed like something others would want.

But first lets deal with the "no settings link" issue. The page that you shared the screenshot on, is the "manage filters" page (..I think ..). This is where you turn the whole filter on and off. Just turn video easy on here.

Then Video Easy will appear in the list of filters under the: site administration -> plugins -> filters menu.

The tutorial is for PoodLL, but you can use everything there including the "bundles" with VideoEasy. (The settings page locations will be a little different.)

https://poodll.com/?p=2649




Als Antwort auf Justin Hunt

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

Thanks for your answer, Justin. I think I followed your steps of enabling the plugin correctly but I simply see no settings/templates of videoeasy. When you look at the attached screenshot, you see there is no "Settings" link (red marker) and on the right the plugin isn't listed at all! I installed generico filter too, and it is displayed and accessible with all its settings/templates. What's wrong here?




Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

Yes, thats odd. Possibly after installation/upgrade you did not visit the site administration -> notifications page and let Moodle do its install thing?

Failing that, something is broken.  If you can turn debug messages up to developer level,  and send them to the browser, we might see something interesting. 

site admin -> development -> debugging

Als Antwort auf Justin Hunt

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

I uninstalled and reinstalled the plugin, but the issue remains. The debug throws out the following line:

Warning:  Declaration of 
core\plugininfo\calendartype::load_settings(core\plugininfo\part_of_admin_tree
 $adminroot, $parentnodename, $hassiteconfig) should be compatible with 
core\plugininfo\base::load_settings(part_of_admin_tree $adminroot, 
$parentnodename, $hassiteconfig) in /var/www/html/moodle-dev/lib/classes/plugininfo/calendartype.php on line 0
Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

I do not know if that is a problem or not. But the error does not seem to be coming from VideoEasy.

I am sorry I do not know what is going on there.

Als Antwort auf Justin Hunt

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

Once the videoeasy plugin was installed on our site, but a year ago it was uninstalled. Maybe the issue directs in that direction? Maybe the uninstall process wasn't done properly. Should I search in the database for remaining entries – what entries should I look for?

Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

I suppose its possible that some old configs are causing problems, though I can't think how. 

There are no VideoEasy database tables, and everything is stored using moodle's plugin config settings. So you would search for old settings using this sql.

SELECT * 
FROM `mdl_config_plugins` 
WHERE plugin = 'filter_videoeasy'

There will likely be some settings there. 

Als Antwort auf Justin Hunt

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

Dear Justin, finally we succeeded to install video easy (there was a database error messing up all plugin installations).

I followed your link from the first post https://demo.poodll.com/mod/page/view.php?id=190 ,but I couldn't see and copy the video easy template because I needed admin rights. Is there another way to get the subtitle template? Best Regards, Alexander

Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

Indeed. I apologise. 

I took away the ability to log in as site admin. It never caused a problem, but it started to concern me. 

I have attached the subtitle template to this post. 

This tutorial on Poodll.com https://poodll.com/poodll-3-docs/subtitles-with-poodll/ goes into more detail and should work on VideoEasy as well as PoodLL. There is a download link there for all the files associated with the tutorial.


J


Als Antwort auf Justin Hunt

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

Dear Justin,

sorry for my late response, I just installed your flowplayersubtitle.txt and it works fine – thank you very much!

In the how-to you mentioned on your last post, there's said that the template code is picky when the subtitle file does not exist, and yes, if there's no file, then the video isn't played at all. I have no clue how to make the template more liberal in this case. What do I have to do in order to make the subtitle file optional, so the player shows the subtitles in case there is a file but otherwise just plays the video?


Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

The lack of subtitles should not actually collapse the player, but the Flowplayer subtitle example seems to do just that. There are a number of ways around it though. It depends on your situation really. 

i) Modify the flowplayer template to be less sensitive. A good thing to do, but probably a job for me really. 

ii) Use a different template on pages with subtitles, than on pages without subtitles. PoodLL/VideoEasy allow you to set the templates at the activity level using the filters menu. Or you can force different templates within an activity, by appending player=[templatekey] to the url of the video file like this: blahblah.mp4?player=flowplayer

iii) Use a subtitle/player template that is less sensitive. I attached a Video JS and a native video player template bundle that both work the same way as the flowplayer one, but that should survive the lack of a subtitle file. Try using one of these to handle mp4 in place of your flowplayersubtitle template and see how they work.

iv) Or check out Moodle 3.2 which has more options for this out of the box.

Check out this page for info on how to use different templates/players when you need to. Note VideoEasy and PoodLL are interchangeable with respect to templates and players, so even when it says "PoodLL" the same should apply to VideoEasy.

https://poodll.com/poodll-3-docs/choosing-a-player/


Als Antwort auf Justin Hunt

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

Thank you for outlining the alternatives. The templates you attached for native and video.js work, but in cases with no subtitles the option to chose a subtitle still exists which isn't that good. So I tried your suggestion concerning specifying a certain template (movie.mp4?player=flowplayer). This did not work in any case, always the default template kicked in, despite I set up the code correctly and cleared caches:

<p>Example (flowplayer):<a href="http://mydomain.com/draftfile.php/30/user/draft/224879634/2016-G3-Hobbies-mid.mp4?player=flowplayersubtitle">Hobbies-mid.mp4</a>
</p>

<p>Example (video.js):<a href="http://mydomain.com/draftfile.php/30/user/draft/224879634/2016-G3-Hobbies-mid.mp4?player=videojssubtitle">Hobbies-mid.mp4</a>
</p>
Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

Oh .... sorry. You are correct. I did not implement that in VideoEasy yet. Sorry. I will do that ASAP and republish it.


Justin

Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

Hi Alex, I have added support for the "player=xxx" parameter to the video URL.

Please get the latest version and try again.


J

Als Antwort auf Justin Hunt

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

Dear Justin, gladly installed your updated plugin. With simple templates the function works great, with subtitles I have issues in the moment – I will tell you more after having investigated deeper. Thanks!

Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Alexander Lebeth -

Hmm. Specifying the player by ?player=templatekey does not work for me, when I use a new added template. That's what I did: I exported the flowplayer "fff" template via the bundle button, chose a new empty template and dragged the fff.txt onto the bundle area to import the settings. Then I altered title and key, new key was "flowplayermanually". I did not make any other changes in the template. I can use the new template if I set it as default template, but as soon as I want to use it by suffixing "?player=flowplayermanually" the video isn't rendered anymore. I cleared caches, without success.


Als Antwort auf Alexander Lebeth

Re: Userfriendly way to upload a video with subtitle

von Justin Hunt -
Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers

Really ? I will have test it and see what needs  

Thanks for reporting it