embed mp4 or flv videos in 2.7

embed mp4 or flv videos in 2.7

by Steven A -
Number of replies: 23
I've got a couple of videos in mp4 format that I want to embed in a course in 2.7.

When I drag-and-drop them into a course, they show up nicely on mobile devices but not computers (without the Quicktime plugin - a workaround that I don't really like and that Moodle recommends against).  If I convert the videos to flv, of course the opposite is true: the videos play nicely on computers in the Flowplayer but not on mobile devices without Flash.

So what's the best way to cover all bases?  Ideally, Flowplayer would play the mp4 files on computers, but it seems Moodle is coded to disallow that.  Is it possible to have two files - mp4 and flv - in one page so that the video will play nicely regardless of platform?

I should also mention that I'd like to accomplish this with the standard Moodle package (no additional plugins) and without hacks to core code.
Average of ratings: -
In reply to Steven A

Re: embed mp4 or flv videos in 2.7

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

If you want to do this without plugins or changes to code, it gets a bit tricky. 

But if you rely on html5 playback on both mobile and desktop, it will work for you. 

However it might not on all desktop browsers. But its worth a try.

Over at site admin->appearance->media embedding

turn html video on, and turn quicktime off.

As in the screenshot ...

Attachment PLD__Administration__Appearance__Media_embedding.png
In reply to Justin Hunt

Re: embed mp4 or flv videos in 2.7

by Steven A -

Justin, thanks for the suggestion.  I've tried all (I think) configurations, and the one you mention is the one to do to get the platform to play mp4's.  After testing on a number of platforms, there's just too much variation.  Headache city.

Is there a way to force Moodle's Flowplayer to play mp4 files - maybe some creative embed code?  I suppose I should experiment a bit.

In reply to Steven A

Re: embed mp4 or flv videos in 2.7

by Juliana Hernández -

Actually, Steven, there is a workaround rather silly. Simply rename your .mp4 s to .flv.

As you may know, both formats are implementations of the part 23 of the MPEG4 standard, so, a video flawlessly encoded in H.264 mp@ml, 5 Mbps VBR, for instance, will work perfectly if renamed to .flv. Same thing if you rename it as .mpg

Turns out that the extension of the file does not determine the content, but the engine on which it will have to be processed. The format is what it is. In fact, you can rename it to .mov if you will send it to someone with an Apple device, and it'll work exactly the same; in this case, the player is set to process MPG4 files declared as  .flv and .f4v, but it also indicates that it has the ability to process MPEG4 video, therefore, if you have anything that you happen to know that it is MPEG4 (.mp4, .mts, .m2ts, .m4v, .m4a, .m4p, .mov, .avi or whatever), just rename it so you don't have to reprogram the handling of files, and the video renderer of JW will act nicely.


Hope it helps.


Average of ratings: Useful (3)
In reply to Juliana Hernández

Re: embed mp4 or flv videos in 2.7

by Anna Krassa -

Many many thanks Juliana for the trick!

Works perfectly! WOW!

In reply to Steven A

Re: embed mp4 or flv videos in 2.7

by Usman Asar -
Picture of Plugin developers Picture of Testers

Steven,


Have a look at this website (www.itlive.pk), open any course and click on video to play (its just that video that I want you to test if working on both devices), if it worked, let me know I'll tell you how to use JWPlayer (its auto switch into HTML & Flash).

In reply to Usman Asar

Re: embed mp4 or flv videos in 2.7

by Steven A -

Usman, thanks for your input.  I'm familiar with the awesomeness of JWPlayer.  I've tried it and can get it to play an mp4 everywhere.  It's a direction I might eventually go, but not yet.  I'd like to keep things as simple as possible, which means just the standard Moodle package for now.

In reply to Steven A

Re: embed mp4 or flv videos in 2.7

by Guillermo Madero -
In reply to Guillermo Madero

Re: embed mp4 or flv videos in 2.7

by Derek Chirnside -

@Guillermo What devices take videos in Ogv or WebM format?

Just curious.

Here is my life yesterday (below)

Old style tape machines, Flip video (Why did CISCO kill the flip?), and latest Go Pro.  Plus the device in my hand, which records video in a propriety format that Moodle can't manage nicely OR quick.  

I want the simplest device > Moodle pathway.  That won't break the bank.  Of course I can get it with over $1200 gadgets.

-Derek

Attachment Video Work.jpg
In reply to Derek Chirnside

Re: embed mp4 or flv videos in 2.7

by Steven A -

Derek, nice collection of gadgets! I'll take the GoPro, please. big grin

In reply to Derek Chirnside

Re: embed mp4 or flv videos in 2.7

by Guillermo Madero -

Grrr! When will I learn to copy the post before saving... not the first time a post goes to error-land.

In reply to Derek Chirnside

Re: embed mp4 or flv videos in 2.7

by Guillermo Madero -

Hi Derek,

I wouldn't really know much about that as I'm not into hardware, gadgets, etc., I don't even use a cell smile

But, you could use a video converter. While there are many GUI-based, and even online services like:

http://video.online-convert.com/convert-to-ogg

if you're comfortable with command line, you could use ffmpeg or ffmpeg2theora.

--- other external references:

http://theora.org

https://trac.ffmpeg.org/wiki/TheoraVorbisEncodingGuide

In reply to Guillermo Madero

Re: embed mp4 or flv videos in 2.7

by Derek Chirnside -

@Guillermo

Thank you.  

I'm not into gadgets either, at least not for gadgets sake.  I want a camera to just record stuff (audio, images and video) and upload it to Moodle.  I don't want to have to do a format change on the way.  I don't want to have to do this via a repository, unless someone can point me to a repository that is not clunky.  I also want to do it simply and speedily - I will continue to keep an eye out for a device that records direct to a decent format, but at the moment, I think I am stuck with MP4

No cell phone.  Hmm.  I wonder why?  http://www.theminimalists.com/frustration/  I have one.  But I don't care about missing calls, texts etc.  It's my tool, not my slavemaster.  I think (on balance) it is better than not having it by a few metrics.

No-one 'NEEDS' anything technologically.  But I do have some wants.  Why is uploading and embedding a video clip such a mission?  Are they plotting out there to make my life a misery?

-Derek


In reply to Derek Chirnside

Re: embed mp4 or flv videos in 2.7

by Guillermo Madero -

Yes, I get the idea, and I agree that it is not a pretty picture, but one actually needs to create and upload at least two different formats in order to cover almost any possible case.

Given that I have worked all my life in a technological area and that at times I've been surrounded by people that love having the latest and most sofisticated of anything, it is quite ironic, actually, that I don't like having that kind of things, I guess it feels more like a burden than anything else, but hey! you are definitely one of the few lucky ones that have managed to be masters of their cell-phone instead of having it the other way round! Congrats!! Yes

In reply to Guillermo Madero

Re: embed mp4 or flv videos in 2.7

by Steven A -

Hi Guillermo.   I did give ogg and webm a shot just for fun, but neither work on IE as far as I can tell, and in Firefox - if I remember correctly - I've tired a number of configurations and video types the past few days - the player is in a whole new screen, like their built-in PDF viewer.

In reply to Steven A

Re: embed mp4 or flv videos in 2.7

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Is the reason behind the requirement not to use a plugin,  that you aren't able to have plugins? Then I think the best option is to use html5 video playback, or use flv, and say sorry to all your mobile users.

Otherwise, just bite the bullet and install PoodLL. That will play mp4 on desktops and fall back to html5 on mobile.

Hmmm ..  a backdoor approach would be to store all your vids on youtube, and then just embed them in Moodle. Then it will always work, as long as you are not in China or North Korea or ... somewhere like that.  

You could use the JW Player in combination with Generico or something like that to make it easy to do all the embedding ... but then you are back at having to install a plugin.

Derek: Perhaps you could sell off some of those devices to help Guillermo buy a iPhone 6?

In reply to Justin Hunt

Re: embed mp4 or flv videos in 2.7

by Steven A -

Hi Justin.  Thanks for your continued suggestions.  They're very much appreciated.  YouTube, Vimeo, JWPlayer, or just using FLV are all options that I will consider.  Do you have any experience with these ones:

http://www.videojs.com/
http://sublimevideo.net/

At the risk of going well off topic... Although I'm not strictly required to use just the standard Moodle package (i.e. I can use plugins), I want to see what Moodle can do on its own.  I want Moodle to work for me, not the other way around.  Some of us are teachers without an IT team.  Video in education is huge (and getting bigger by the day), and it shouldn't be this difficult to have things just work.  Of course there are options, good ones, but why should we go through major fiddling just to get things up and running?  I got JWPlayer to do exactly what I wanted (i.e. play everywhere) in 10 minutes.  So what's up with Moodle? The ATTO editor is here, now let's have the ATTO video player!  smile

Anyway, back in the here and now, I think my search for the next-easiest-option-for-video-cross-compatibility should begin in earnest.  Drag-and-drop was a bomb.  Haha..

In reply to Steven A

Re: embed mp4 or flv videos in 2.7

by Usman Asar -
Picture of Plugin developers Picture of Testers

Steve, videojs is HTML player, so anyone can right-click and download the video, unless you want users to do that, its  fine, else think of something else.

Sublimevideo has same working methodology like JWPlayer, means you are giving reference to script in head tag, and then use embed code of videos, there are few things I liked about it as being FREE, easy customization of player, and once you mention domain, it wont run on any other URL, and you can hide logo even in free version. I have yet to test it with Moodle and will update you its working, so far I am pretty impressed with it. (Thanks for mentioning it, else I wouldn't have known about it).

In reply to Steven A

Re: embed mp4 or flv videos in 2.7

by Usman Asar -
Picture of Plugin developers Picture of Testers

Just manage to finish off testing the SublimePlayer, and I have started changing the JWPlayer embed in my sites. It meets or exceeds the small issues that I was facing with JWPlayer. So rather thank you for mentioning it to me.

In one word, Sublime is the "BEST" video player I have experienced so far.

Average of ratings: Useful (1)
In reply to Usman Asar

Re: embed mp4 or flv videos in 2.7

by Guillermo Madero -

Hi Usman,

Interesting to hear that! Yes Worth taking a look at it then smile

In reply to Guillermo Madero

Re: embed mp4 or flv videos in 2.7

by Usman Asar -
Picture of Plugin developers Picture of Testers

Sure Do Guillermo, before  they change the "FREE" structure into Paid one, better get access, as they keep on changes with time, like those who signed up before 30th January, are given free access to video analytic plug-in that comes with player, and now its not available anymore. Hopefully they keep the player free as though its being bought by DailyMotion cloud.

And best thing about this player is, adaptive size, it expands and reduces itself in size where embedded, and this is I never experienced or seen in any other player, Hoping other services/players will be bringing the feature in their players as well soon.

In reply to Justin Hunt

Re: embed mp4 or flv videos in 2.7

by Guillermo Madero -

LOL! big grin

An iPhone 6? WHoa! I cannot imagine myself with such a monster! I barely use the hard-line! wide eyes

In reply to Justin Hunt

Re: embed mp4 or flv videos in 2.7

by Derek Chirnside -

cool

I'm not sure I'd wish an iPhone6 on anyone yet.

But more to the point, sadly, tape video machines have no value.   I may be able to buy a case for an iPhone.

I've just arranged to buy another instance of 2.7 and I'll start some experiments.  PooDLL will be first up.

-Derek


In reply to Derek Chirnside

Re: embed mp4 or flv videos in 2.7

by Colin Fraser -
Picture of Documentation writers Picture of Testers

<Completely off topic>

Well Derek, you really must take consolation in the fact that you are just not into disposable consumerism, a fellow traveller I am thinking. My only technology vices are my desktop and my ultra-super-dooper (soon to be replaced with a vastly improved and really expensive because I have had this one for nearly 10 years) digital camera. I still have a video tape cleaner if you would like it... might have trouble getting the cleaning fluid but the cleaner should work fine..smile You can have it for shipping costs.

</completely off topic>

Agreed, Poodll looks to be the best available option so far..