General help

 
 
Picture of Gerald B O'Leary
iPad does not play .mp4 files from quiz
 

Good day to you all.

I'm in need of help!

I am setting up a new quiz site using Moodle 2.4.3 (Build 20130318) and I want to play out videos coded in .mp4. They play OK on PCs and Mac Books but not an iPad, very frustrating.

The files were coded using Adobe Premier Pro CS5
H.264/.mp4
PAL DV widescreen
25 frames per second
16:9 aspect ratio
Level 3 coding
0.7 bit rate
1.0 max bit rate

I have another site (not Moodle) and files coded using the same spec play on all three types of devices. The player on the site is JW Player.

Apple would have you believe that the above spec would not work but I have a working example, so it looks like a Moodle thing!

Does anyone have any suggestions as to fixes fo ensure the iPad plays the .mp4 files? I would prefer not to have to hack code or use third party software to convert the .mp4 files.

Many thaks in advance,

Gerald B

 
Average of ratings: -
Picture of Richard Bakos
Re: iPad does not play .mp4 files from quiz
 

You may be interested in this article: http://www.longtailvideo.com/support/forums/jw-player/setup-issues-and-embedding/25646/jw-player-not-working-on-ipad-iphone/

I don't understand why you would use a player though... Why not just use the HTML5 <video> tag with multiple source formats (mp4, ogv, webm) and then use a Flash fallback for IE and other legacy browsers?: http://dev.opera.com/articles/view/simple-html5-video-flash-fallback-custom-controls/

 
Average of ratings: -
Mary Cooch
Re: iPad does not play .mp4 files from quiz
Group Documentation writersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup TestersGroup Translators

So  just to clarifyGerry -  you are saying that an mp4 video inserted using the Moodle media icon won't play on an ipad but it will play on a pc? The Moodle in question doesn't have a non-standard player; it just relies on Moodle doing the job? Does the ipad have Quicktime installed? (Sorry if that is a daft question; I don't own an ipad and am not likely to for some time!)

 
Average of ratings: -
Picture of Gerald B O'Leary
Re: iPad does not play .mp4 files from quiz
 

Hi Richard,

 

Thanks for the link, a lot of reading to digest but I saw some interesting points that I will explore.

 

Hi Mary,

I don't see a dedicated QuickTime player on the home screen and I'm assuming that the player, or some compatible player, is within Safari which I use to view web pages.

I have tried Opera and it does not play the files either.

Best wishes,

Gerald B

 
Average of ratings: -
Picture of Rob Johnson
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

There is a way to force mp4 files to be played with Flowplayer instead of Quicktime.  This way they use Flash on desktop browsers, and fall back to HTML5 in tablets.  My school district Moodle uses this setup.  Try searching the forums for the file to change.

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

Gerald

The iPad has a fairly narrow range of specifications for the MP4 files it supports. (To be precise it is really "mobile Safari on iPad." Other apps and browsers can do all sorts of things.) Also some MP4s might not work over 3G.

Some regular flash players like JW Player and Flowplayer have HTML5 support, but really they are just adding fancy controls to the underlying browser's HTML5 audio/video support.

The upshot of this, is that if the MP4 file doesn't play back you will need to convert or re-generate it into an iPad compatible MP4.

Info on MP4 specifications and media for iOS is here, but I am not sure how helpful it really is to talk in codecs. There should be an option in premiere to do this. If not, I suggest using the free, and generally rock solid "Handbrake" software  to do the conversion,

 
Average of ratings:Useful (1)
Picture of Lawrence Furnival
Re: iPad does not play .mp4 files from quiz
 

We have similar problem - but file encoding is known to be CORRECT. If you upload a file made on iPad, it will not playback. Mime.type is correct. (video/quicktime for .mov; video/mp4 for .mp4) Content-Length is correct (header shows 405539, quicktime inspector shows 406K) -Easily reproducible - go to upload to private files on an iPad/iPhone click on "add'/'Upload a file'/'Browse'/'Take Photo or Video'/ I.e. Make & upload a video on the spot. Resulting video is not playable on iOS from Moodle. Change the filename to test.mp4, still not playable, check mimetypes in header (firebug) - they are correct. Plays only on desktop. [ Moodle 2.5 ]

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

This is quite a rabbit hole, but it needs to be talked about ...

There can also be problems with the configuration of the server that affect html5 audio and video playback. Some possible problems regarding audio specifically are discussed here :

http://www.schillmania.com/projects/soundmanager2/doc/technotes/#serving-audio

Some issues

i) mime types: Your server needs to have support for the audio and video mime types explicitly declared. I have never seen this in the wild, but it seems to be a factor. More info here:

http://voice.firefallpro.com/2012/03/html5-audio-video-mime-types.html 

ii) gzip/mod-deflate: If your server is compressing binary files, then the iPad and friends take it pretty badly. If gzipping make sure only text based files are being compressed.

iii) SSL Certificates: HTML5 audio and video will work over HTTPS. But if the certificate is self signed or not generally recognized (ie causes those scary  "this looks bad. We suggest you don't use this site" ssl warnings to show up) then the chances are good android/ios won't play it. Thats even if you do accept the certificate. 

So the problem is likely not Moodle, but the server config.

Can you post back on if any of this applies to your site. It is one of those areas that probably needs more highlighting as HTML5 gets more and more important for media playback

 

 

 
Average of ratings:Useful (1)
Picture of Lawrence Furnival
Re: iPad does not play .mp4 files from quiz
 

Thanks Justin - it is not i or iii. i) I am looking at the headers in firebug and the mime types are correct. iii) Certs are right on our production moodle 2.3 and that behaves the same way as 2.5 on dev. 

GZip is a good call. I know we are using it. Checking now on how to exclude binary files. 

Larry

 
Average of ratings: -
Picture of Dan Marsden
Re: iPad does not play .mp4 files from quiz
Group DevelopersGroup Moodle Course Creator Certificate holdersGroup Particularly helpful MoodlersGroup Translators

I've also seen issues with mem_cache - try disabling any form of caching plugins in your server architecture to see if that helps.

 
Average of ratings: -
Picture of Doug Moody
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

For the most part, I have had success with my HTML5, and WebM, FLV, MP4, and OGG playing, using a code that combines everything in a way tha ensures almost all platforms will play the video.

But, this is a hassle, as I have to make different versions of the video file and use fallback code to use one or the other, depending on the user's choice of platform.

So, I was wondering if those of you who have been successful in HTML5 deployment have any advice about the best way to do it in Moodle.

Currently, I have only been putting the code in places that the TinyMCE editor uses (forums, quizzes, HTML page, etc.) But is there a simpler way to just insert these file types without writing custom HTML5 code? If so, how? And, could you give us a samle workflow?

Thanks

 
Average of ratings: -
Picture of Rick Jerz
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

Doug, you probably know that I do my videos a little differently.  I podcast them as mp4 files, which seems to cover most of my needs.  I created my own Flash player that even reads these RSS feeds and presents them to views.  So I use a Flash player, iTunes, Moodle's RSS feed block, and some browsers (Firefox, for example) to present and play these videos.  It is always the same mp4 video, in all cases.  I too used to make two different formats (FLV and M4V), but I don't do this anymore.

I just gave a presentation the other day at West Coast Moodlemoot about my technique.  Here is a link to some stuff on my presentation resource webpage that might help you.  It contains some examples.

I haven't tried to create an HTML5 video player.  Maybe in theory, it can be done, but for now, I have just about every device covered and its easy for me to manage all my videos (I now have around 120 for all of my courses).

 
Average of ratings: -
Picture of Doug Moody
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

Rick,

You have a nice workflow, but for me, it wouldn't work.

Basically, I run a blended learning classroom. I teach through moodle, meaning I don't spend lots of time on lectures. I tell the students where each day to access the day's lesson that I had already prepared and adapted to moodle. Many times its video.

But I want students to watch videos before coming to class (flipped instruction) so they are prepared to do the hands on work when they arrive. Anyway, its important that they are able to watch these videos on whatever device they may possess. That's why I needed the iphone and ipad playback capability, as well as android.

I read your page. You obviously are a very creative teacher and the students must love it. But I am not sure how you use moodle in the classroom. You must use it as an ancillary tool. I use mine exclusively. ALL info is in moodle. From what I gather, you like to make videos on the fly from wherever you are, and then insert them outside moodle, but you use moodle as one additional source for students to access the material, instead of making it exclusive, right?

 
Average of ratings: -
Picture of Rick Jerz
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

I run all of my classes as blended or online, and everything that I do is in Moodle.  Moodle is my major tool, but not my only tool.  Whether a tools is or is not "in Moodle" is often as simple as making a URL link to it in Moodle.  I use both forms of videos, carefully prepared lecture videos and on-the-fly video responses.

From within Moodle, students have access to my Flash player, my "Videos" webpage, and the Moodle RSS fed videos.  Obviously, if they choose to use iTunes this is "outside" of my Moodle.  (I do provide a link to iTunes where students can click it, and be taken right into iTunes and my podcast.)

My videos are probably my major way of instruction, which is why redundancy is very important to me.  My students can get to them from a PC or Mac, from any browser, and from nearly any portable device.

Maybe one difference for me is that I do not create "webpages" in Moodle, I do this outside of Moodle using Dreamweaver, then link to these.  I find that this method helps me manage all of my content more effectively.

 

 
Average of ratings: -
Picture of Jonas Nockert
Re: iPad does not play .mp4 files from quiz
 

Doug, I too was trying to figure out a good answer to this question during this spring. We needed something for video which was html5-based with flash fallback that was simple enough for use by our many instructors.

Finally, I kind of gave up and created a video.js-based plugin for Moodle: https://github.com/lemonad/moodle-videofile (it's still waiting for approval so it's not visible in the plugins section yet).

I've only tested it for Moodle 2.5 and up but perhaps that is what you are running. Please take a look and see if it might be something of use.

 
Average of ratings: -
Picture of Nathan Byler
Re: iPad does not play .mp4 files from quiz
 

For what it is worth, for me it turned out to be option iii.  Even with a proper certificate (from entrust) the audio files do not play in iOS.  They show up with a "cannot play audio file" error in the browser or the player shows up but is not clickable.  When I go directly to "http" without SSL then the audio player works perfectly.  I am not sure what to change to make it work with SSL.

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

That is really curious. I wonder what it could be?

Did you install the certificate yourself? 

I don't know the answer to this problem, but I would first check that the path to the audio file really was correct and that it played on desktops.

I would check that the certificate had been installed ok. As per the support docs on entrust:

http://www.entrust.net/ssl-technical/index.htm

And I would check that the root certificate you need for entrust is indeed available on your version of iOS / mobile safari

http://support.apple.com/kb/ht5012

 http://www.entrust.net/ssl-technical/browsers/index.cfm

If it is possible, perhaps the easiest solution is to somehow serve audio without using SSL ..?

 

Justin

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

Lawrence, 

I just re read your post. To take it back a step ..., are you sure that Moodle is serving up an html5 player? Or is it serving up a flash player that obviously iOS can't handle. 

Check site admin -> appearance -> media embedding

The simplest cause of the problem could be that the .mov file is not being served in html video tags. I think that probably Moodle doesn't load mov in  html5 tags.  And just changing the extension to mp4 doesn't make it an mp4, so it probably wont play that way anyway. 

 

Also try the same thing, shooting and uploading a mov file from iOS over at my demo site. http://demo.poodll.com (login details are on the right hand side) . That uses the PoodLL filter to handle .mov files. And that does load mov in html5 tags. That should work.

 

Justin

 
Average of ratings: -
Picture of Lawrence Furnival
Re: iPad does not play .mp4 files from quiz
 

Hi Justin! Thanks for your help! - I used to live in Tokyo so we should compare notes sometime. The problem - I can confirm there is no mod-deflate or gzip on binary files. HTML5 player is enabled. I disabled the legacy quicktime player to check and it didn't help. I went to your site and got exactly the same thing.

sad

 
Average of ratings: -
Picture of Andrew Hu
Re: iPad does not play .mp4 files from quiz
 

Hi Lawrence et al, 

I'm experiencing the same problem. I can make the mp4 display by linking to them from a repository (I used a google drive connection) so there is nothing wrong with the encoding and browser selection makes no difference (chrome). It does work on Android (Nexus 7 tablet) however so it looks like a specific call that IOS can't digest.

Turning on safari developer tools on the ipad it looks like it's stopping at 

YUI(M.yui.loader).use('node', function(Y) {
M.util.load_flowplayer();

But I'm not an expert in this. Is it possible to specify another media player to fix this?

Should it be logged as a bug?

Thanks

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

Well it works every time I do it on that site. So I guess we are doing something differently.

I go the site on ipad. As admin I create a page resource. In the content area I click moodle media and from the PoodLL video recording repository I record a video using the ipad. That is inserted into the content area and when I save the page it displays.

Auto conversion to mp4 is turned off by default on the demo site, but if turned on it does its best to convert the mov to mp4.

Can you tell me what you are doing?

 
Average of ratings: -
Picture of Lawrence Furnival
Re: iPad does not play .mp4 files from quiz
 

On Flowplayer problems with iOS I found this on a word press help site - seems similar:

Apparently iOS requires byte-range support for audio and video. Serving a static .mp4 file to an iOS from Apache works fine, but serving the same file from a WordPress MS 3.01 installation fails. This is because the file URL is rewritten to use ms-files.php. The PHP file does a readfile($file) on the file to serve it. This is incompatible with iOS devices and will fail.”

Essentially, if I were to use a direct link from Apache there would be no issues. However, that’s annoying, right? Constantly changing the URL to the direct link in blogs.dir/”blog”/files/”etc” when I should just be able to use a plugin like JWPlayer to insert it with a simple button. The problem here is that WordPress will attempt to deal with the URLs and create it’s own fun version and when it attempts to handle the request, an iOS device will go, “Give me the first 2 bytes!” to which WordPress will respond <grimace>...

http://www.technowut.com/2012/05/14/how-to-stream-videos-to-ios-devices-with-multisite-wordpress/

On how I am creating the video - I am going to file upload and iOS has the property that at any upload file dialog box you can create a video or photo on the spot instead of uploading a pre-existing file. I am add-a-resource/file/upload and then I create a video on the fly for the upload.

 
Average of ratings: -
Picture of Rick Jerz
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

Lawrence, you might be on to something.

I had read about Apple requiring "byte-range support" from my video server for my podcasts on the iTunes store.  I really have no clue what this is, but it seems that you know something about this.  Quite honestly, I have never had any problems with my methods, but my methods might be unique.

My feed is on an Apache server, but I am not sure about my videos since they are on a university server.  

I also don't do anything with Wordpress.

 

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

I don't think we have eliminated the simple stuff. The byte-range support thing, is a possibility. But I  think there are other things to look at first.

I regularly play back .mov/.mp3/.mp4 recorded from iOS devices on iOS devices using html5. I do this on Moodle (see http://demo.poodll.com) and on wordpress (see http://recordmp3online.com )

To be honest, I think Lawrence something you are doing is muffing it. At least on http://demo.poodll.com . Even when I use your workflow to insert a mov file into an html content area it works. 

Previously you said you were renaming mov to mp4 . That won't work, are you still doing that? 

 

 
Average of ratings: -
Picture of Toni Soto
Re: iPad does not play .mp4 files from quiz
 

I tried to record my voice online from both sides you mentioned using a nexus7 (android) tablet and I couldn't. The only option is to record in advance and then choose the audio file to be uploaded. sad

Toni Soto 

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

After you tap  "Record or Choose a File" you should have the option to use your Nexus's native audio recorder to record, or to choose a file. I don't have a nexus 7, so I can't test that. But that is how it works on the android devices I have been able to test.

 
Average of ratings: -
Picture of Toni Soto
Re: iPad does not play .mp4 files from quiz
 

It's a weird issue Justin. I also have a nexus4 (smartphone) and I can do what you say. I mean, it works as expected but, when I try to do the same with nexus7 for audio I can't. Both my nexus are running the last, recently released, android version: 4.3 

This morning I asked a colleague to try it with his nexus7 and he reported that he couldn't do it for audio either. 

But, what's the problem with nexus7? When I click on the button to select a file or recording my voice, chrome displays a pop-up menu with applications for choosing a file (Drive, Dropbox,..)  but there's no options for recording audio. I do have at least two apps for recording in my nexus7 tablet but for some unknown reason the are not selected. For recording video a launcher for nexus7 camera is presented so that's why I said it's a weird issue! 

If I try the same with nexus4 all works as expected both for video and audio. 

It would be nice if anyone else could report about this issue. I'm completely lost about it! 

Toni 

 
Average of ratings: -
Picture of Christian Herman
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

Firefox has the same issue, although it does give you the option of accessing the camera and camcorder, but doesn't send the recording to the website.  It's something with the Nexus 7.  Since the device has a fully functional camera but Google didn't include an app to access it, my guess is that some bridges are simply disabled or missing for the media input channels.

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

I did a little Googling and found that some people had reported this problem with the Nexus 7

http://forums.androidcentral.com/google-nexus-7-tablet-2012/251600-no-microphone-file-upload.html

But really there is not much talk about this.  I wondered if the mic dialog can be "activated" somehow. Possibly a setting, or by plugging in a set of headphones with a mic on them...? Does swapping browsers on the device make any difference?

Sorry I don't have the tablet myself, so I might just cycle down to the electric store and play with one.

 

 

 
Average of ratings: -
Picture of Justin Hunt
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

I did go down to the electric store and played with an Asus Nexus 7. And sure enough there was no audio recorder option from the file upload dialog. I tried 3 or 4 other android tablets and all of them showed the audio recorder. So for whatever reason the nexus 7 is an exception.

It will work using the same dodge as the ipad though. By recording a video and then letting PoodLL convert the video to mp3 on the server. I will make the changes to PoodLL and on my sites to get that working out of the box.

 
Average of ratings: -
Picture of Zeid Fanous
Re: iPad does not play .mp4 files from quiz
 

Hi guys, i have been dealing with this for the past 2 days and i really appreciate all the fruitful discussions for this hackle. 

i am using moodle 2.4. what i finally did was to encode the video to Apple for ipad mp4 video with "any video converter" . removed quicktime from media embedding... now it works on pc & ipad (streaming)..its working smile ...but i am a bit skeptical... is this right .??

the problem is that i tried converting vids to regular mp4 and they wouldnt play on ipad until i used the "apple for ipad video".

your feedback is highly appreciated .

 
Average of ratings: -
Picture of alva christeen
Re: iPad does not play .mp4 files from quiz
 

Many Apple products fails to recognize MP4 file format thus they are unsupportable on iPod, iPhone, iPad device. Some MP4 files are encoded in such a way that they are difficult to recognize. In order to play those file on your Apple device you need a converter. MP4 to MOV converter can easily convert MP4 to Mov file format or other formats. 

 
Average of ratings: -
Jon
Re: iPad does not play .mp4 files from quiz
Group Particularly helpful Moodlers

One of the things I've done to try and make things work for all users is to upload the video to Google Drive, set it so that anyone with the link may view and then click on File-->embed. Use that embed code like you would from YouTube. Then you don't have to worry about file conversions or various types of players. Seems to have worked pretty well so far.

 
Average of ratings: -