Text editors

problems with links to mp4 files

 
My picture
problems with links to mp4 files
 

Hi,

I recently upgraded Moodle from 2.3 to 2.8. in 2.3 I had a page with a list of respiratory sounds that students could hear by just clicking at the link. but now I can't do this in 2.8.

Initially, instead of the link, the image of the video player appeared with all playing at the same time. I clicked on the button "prevent automatic linking", but now in Chrome it doesn't show it and in Firefox, after a longtime, it aborts de video.

The multimedia filter is activated.

Please advice me on how to solve this.

Thanks

Luis

 
Average of ratings: -
Picture of Daniel Thies
Re: problems with links to mp4 files
Core developersParticularly helpful MoodlersPlugin developersTesters

Hello Luis,

Have you checked options in Site administration / ► Appearance / ► Media embedding to see if something has changed from the old site. You may try enabling or disabling the legacy Quicktime player.

Daniel

 
Average of ratings: -
My picture
Re: problems with links to mp4 files
 

Hi Daniel,

thank you very much for your response.

I am kind of puzzled with the behavior of the links. I finally (working with the html code) managed to have the links as before, but now the problem is the following:

In the computer of my University (where the server is connected) the links work fine with Chrome. A java windows pops up and the video works nice.

But at home, in my laptop, when I click the link, a windows pops up but the video never shows up  using Chrome. I shifted to Firefox and only works for the first link I click, in the rest, it takes a long time just to see in the pop up window a message telling that the connection was reset. Interestingly, if I close Firefox and reopen it, then I see the same behavior, but now the link clicked in the prior attempt (before closing Firefox) works fine. This means that after closing and opening Firefox ten times, then I can see the ten videos. 

I followed your advice, but it didn't work. Any more ideas? Something with the configuration of the server?

Thanks in advance

Luis


 
Average of ratings: -
Picture of Justin Hunt
Re: problems with links to mp4 files
Particularly helpful MoodlersPlugin developers

Luis

Several things can cause your videos to stop playing. One of the most common is when two different filters clash trying to process the same piece of text. Another is that your browser may not have what it requires to play the video.

Recently some browsers have stopped supporting Flash. And quicktime, while it can play mp4, is not installed on all  machines.

To see if it is a filter clash, try disabling all filters one by one until just the multimedia plugins filter is left enabled. If it all starts working, then you will know the most recently disabled filter was causing the problem.

If it is a browser issue, you would usually see some notification that a plugin was missing.  Most modern desktop browsers are capable of playing back mp4 without any plugins. Mobile devices can be more fussy. On your Moodle try configuring the multi media plugins filter as in the attached screenshot. This is done at:
 site administration -> appearance -> media embedding

This instructs Moodle to use HTML5 to play back mp4 and mp3, rather than use a plugin of some sort. Does it help? 

(N.B. This may not be the best configuration if your students access from mobile devices or old browsers.)


 
Average of ratings: -
My picture
Re: problems with links to mp4 files
 

Hi Justin,

thank you very much for your response.

I followed your instructions  but it didn´t work. There is something i would like to tell you, that perhaps can help. I checked in a minilap the behavior of this links when connected to the Internet of the University, and worked pretty nice. I took home the minilap without any change in the configuration, and  I couldn´t see the .mp4 videos. Moodle is running under  Linux version 3.11.10-29-desktop (geeko@buildhost) (gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux) ) #1 SMP PREEMPT Thu Mar 5 16:24:00 UTC 2015 (338c513)

Hope you can help me. The course is going one and I don't know what to do.

Thanks

Luis


 
Average of ratings: -
Picture of Justin Hunt
Re: problems with links to mp4 files
Particularly helpful MoodlersPlugin developers

How big are the mp4 files? If they are really big, they may be taking ages to load.

Have you considered hosting the video files on YouTube?

 
Average of ratings: -
My picture
Re: problems with links to mp4 files
 

They are less than 500 Kb. No, I haven´t thought about hosting the videos on YouTube. If I can´t solve the problem, then I gess I will have to consider this option.

Thanks

Luis

 
Average of ratings: -
Picture of Justin Hunt
Re: problems with links to mp4 files
Particularly helpful MoodlersPlugin developers

I don't know if using YouTube will solve the problem or not. That is because I still am not clear what the cause of the problem is. 500kb is very small for a video, so the load time is not likely to be a problem but it might be. 

I wonder how you embedded the videos in the first place. If turning off autolinking stopped them loading, then it sounds like you didn't upload them to Moodle, but are linking to them from elsewhere. 

The normal way to embed is to upload the videos using the Moodle Media button on the editor. Alternatively you can put the video title in the text area and then select it and use the link icon on the editor to link it to the video file. In either of these ways, the multimedia plugins filter should notice it and turn it into a player. Try uploading, or linking to, a video file and see if that works.

If you have a Moodle admin you could call on, I think that would be a great thing to do. 


 
Average of ratings: -
My picture
Re: problems with links to mp4 files
 

Hi Justin,

Thank you very much for your response. 

I embedded the videos using the second way you mention:


 The url is:

148.228.217.100/moodle/draftfile.php/9/user/draft/391292228/tracheal%20sound.mp4

As I pointed out before, inside the university, I can see de videos, but when the internet of the University is not used, then the videos won't show up. I still have the server where the previous version was (Moodle, 2.3), and the videos are seen adequately everywhere. So, i think there is something with the configuration of the current server (config.php?, something with Linux?)

What do you think?

Luis

 
Average of ratings: -
Picture of Rick Jerz
Re: problems with links to mp4 files
Particularly helpful Moodlers

I wonder if the space character in the video name might be a problem (tracheal sound.mp4).  Try removing the space, such as "tracheal_sound.mp4.)  Just an idea for you.

 
Average of ratings: -
Picture of Justin Hunt
Re: problems with links to mp4 files
Particularly helpful MoodlersPlugin developers

Luis, I think we are getting a little closer.

As Rick notes, spaces in URLs and file names are a bit unreliable. Try to name any files or directories you use without using spaces.

That may not be the problem however. Draft files are temporary files that are only really accessible by a particular user. They only really exist when you are editing a particular text area. When the text area is saved, the file becomes a nice permanent one, and the temporary file will be deleted. A permanent file's url likely includes "pluginfile.php," but certainly won't include draftfile.php. The url that you are linking to is a draft file url. So it is wrong. It will only work under certain conditions, and this situation is not one of them. So you need to get the actual URL of the mp4 file, as it appears after the host text area has been saved. Thats the first problem.

The second problem is that Moodle is clever about how it serves up files. If the mp4 files are part of a course or site that the user does not have access to (eg because they are not logged into the site that hosts the file), Moodle won't return the file. So the question then comes, where are those mp4 files actually hosted. If they are on a page in ABC course, does the user who accesses your page have access to that page in ABC course? 

Finally the url that you are linking to contains an ip address in place of a domain name. If that ip address is only available within your university's network, but not outside it, then your files will also be inaccessible.

As complicated as that all sounds, the solution is very easy. Don't link to files in this way unless you really have some need to. Download those files, and then upload them into the text area for your quiz using the Moodle media icon on the text editor. Then if the page is accessible, so too will be the files. And you need not worry about clutter and space, 500kb is nothing, and Moodle will only store the same file once even if you use it in different places. (it's pretty clever like that.)


 
Average of ratings: -
My picture
Re: problems with links to mp4 files
 

Thanks so much for your response.

I'm positively sure that the files are in the server. What puzzles me is why Moodle is creating a temporary file,  Here is what I do:

  • write the text for the link
  • Select the text
  • click on the button "select/edit link" and the window to select the link appears
  • click on the icon "browse" 
  • click on the menu option "upload file"
  • select the file from my computer
  • click on the button "upload this file"

And then the url appears in the "insert/edit link" window:

148.228.217.100/moodle/draftfile.php/9/user/draft/588097139/Stridor.mp4

(if I include http:// in the url I wrote in the previous line, then I can see in this very  message the Stridor.mp4 file. Isn't this ironic? You can try it in your computer and see if this also happens).

Unfortunately,  in the previous message I sent an example with the only file in the activity  that has a space in its name. None of the rest have it. 

If I click on the button "manage embedded files" I can see all the files embedded in the activity. Unluckily, I can't see the path to the files. When I right click on any of them I see this window:


By the way, when uploading this image, I noticed that the Moodle we are using for this forum, also creates a draft file url:

moodle.org/draftfile.php/404823/user/draft/992183083/image4.jpg. 

Is it going to change after closing the editor?

My site never has had a domain name. I need to make an annoing paperwork in my University, so the students have to use the ip address,, and can be accessed from everywhere (check it in your browser). But if you think assignining a domain name can help, I will do it.

I can check in the server where  the files are located, just tell me the name of the folder where Moodle keeps all the embedded files. Also, can you  tell me what I need to do to have the url to the permanent file?

Thank you so much for your patience and hope we can solve the problem. 

Luis


 
Average of ratings: -
Picture of Justin Hunt
Re: problems with links to mp4 files
Particularly helpful MoodlersPlugin developers

The temporary file thing is because Moodle accepts your file upload before you save the page. After you have saved the page it moves the temporary file into a permanent location. If you were to cancel however it would just throw that temporary file away.

So yes after you save the Moodle forum post , or the page on your server, when you right click the image you will see it has a permanent (not a draftfiles) url.

Actually what you are doing doesn't sound too bad. I hope we are not barking up the wrong tree. The usual way to do this, is to use the moodlemedia icon for the upload, not to link to text. Please try that, and if the problem persists  lets move on.

Since these are sounds, I wonder why you are using MP4 files? And I wonder how you managed to get them to display inside audio players. If it works its fine, but I don't know how it would if you were using the multimedia plugins filter.

If videos are ok, and you are in a hurry to get this sorted out, uploading the videos to YouTube would probably do it.


 
Average of ratings: -
Picture of Rick Jerz
Re: problems with links to mp4 files
Particularly helpful Moodlers

Luis,

"(if I include http:// in the url I wrote in the previous line, then I can see in this very  message the Stridor.mp4 file. Isn't this ironic? You can try it in your computer and see if this also happens)."

First, I cannot test this because I cannot log into your Moodle. (Actually, right now I don't even see your Moodle.)

Second, I am not exactly sure what you are saying.  If you fully qualify the URL,

, does this work?  If so, consider always including the fully qualified URL.  Some parsers are not as smart as we think.

I gave a presentation at MoodleMoot15 about how I use videos.  I think that if you are interested, you should be able to create an account and see my presentation.

https://mootus.moodlemoot.org/course/view.php?id=29 might get your there.  If not, look for "RSS" and "Videos."

 
Average of ratings: -
My picture
Re: problems with links to mp4 files
 

Hi Rick and Justin,

thank you very much for your response. 

I was logged to my Moodle, perhaps that is why I was able to see the video in the message. I don't know why you could not access to the page. it is:

148.228.217.100/moodle (may be you have to write it on the browser).

I have been able to work outside Mexico with my Moodle (Canada and USA). I don't know about other countries.

I am sorry that we have missed the point. I have been working with Moodle since version 1.9 , adding small media files to exercises (cough sounds, crackles , small videos of altered breath patterns...) and used to work fine (with some problems that I usually overcame). I am and end user who just follow the instructions to embedd a small video or sound from the text editor to the corresponding activities.

The point is that everything works fine when the the students (and I)  work using the internet of the University (where the server is connected). The problem arises when they are at home. I start to receive tons of messages telling me the problems opening  the media files.  I checked at home and I noticed the behavior that I tried to describe in previous messages.

Ijust  would like opinions of possible reasons of why this is  happening, so I can solve it.

But if I can't work it out, I greatly appreciate the alternatives you are giving me. I will check thoroughly the course of how to embedd videous using RSS, and also the possibility to use YouTube.

Thanks 

Luis

 
Average of ratings: -
Picture of Rick Jerz
Re: problems with links to mp4 files
Particularly helpful Moodlers

Hmmm, are you suggesting that Mexico might be blocking your videos?  At your university, you might not be going out over the Internet when everything is on campus.

Have you considered switching to a domain name and using it instead of the IP address?  I am just taking some guesses and am no where near an expert on these matters.  Just brainstorming.

 
Average of ratings: -
My picture
Re: problems with links to mp4 files
 

I don't think so. As I pointed out in a previous message, I also have the course in  Moodle 2.3.3 (www.facmed.buap.mx/) . The server is connected to the internet of the University and the videos can be seen adequately everywhere. That is why I think there is something with the configuration of the computer where Moodle 2.8 is running (148.228.217.100/moodle). Can you advice me which forum could be the best to post this problem?

Thanks

Luis

 
Average of ratings: -
My picture
Re: problems with links to mp4 files
 

I finally solved the problem. The University blocks selectively certain protocols, and without notice, they blocked the HTML5 protocol in my site, and that is why the videos could only be seen inside the University.

Thanks very much for your feedback, it helped me a lot, the last question encouraged me to go to the department in charge of this issues in my University.

Hope this experience can help others.

Luis

 
Average of ratings: -
Picture of Rick Jerz
Re: problems with links to mp4 files
Particularly helpful Moodlers

Troubleshooting problems like these can always be difficult.  Glad you solved the problem.

 
Average of ratings: -
Picture of Justin Hunt
Re: problems with links to mp4 files
Particularly helpful MoodlersPlugin developers

Oh that's good news 

Thanks for posting about it

 
Average of ratings: -