Note: You are currently viewing documentation for Moodle 3.6. Up-to-date documentation for the latest stable version of Moodle is likely available here: Media FAQ.

Media FAQ: Difference between revisions

From MoodleDocs
m (Adding extra info)
 
(12 intermediate revisions by 6 users not shown)
Line 2: Line 2:
==Should I put my video into a label or a page?==
==Should I put my video into a label or a page?==
While the embedding process is the same, adding a video to a label will mean it displays as soon as the user clicks on that course page. This can be beneficial if the video is, for example, an introduction to the course or an integral part of the whole course. However, if there are several videos in labels, they can slow the loading of the course down, especially if the videos are coming from an external site. Adding a video to a page in Moodle means that the user has to click a text link to reach the video, but it doesn't clutter up the main course page and it is a better choice if the course contains a large number of videos.
While the embedding process is the same, adding a video to a label will mean it displays as soon as the user clicks on that course page. This can be beneficial if the video is, for example, an introduction to the course or an integral part of the whole course. However, if there are several videos in labels, they can slow the loading of the course down, especially if the videos are coming from an external site. Adding a video to a page in Moodle means that the user has to click a text link to reach the video, but it doesn't clutter up the main course page and it is a better choice if the course contains a large number of videos.
==My embedded youTube video doesn't display different language subtitles/playlists==
This is an issue with the [[VideoJS player]] currently. A workaround is to disable the setting 'YouTube videos' in the VideoJS player settings of Site administration (ensuring the YouTube filter is enabled in Manage media players) Then copy and paste the YouTube URL directly into your editor.


==My embedded video is too big/small. How can I change its display size?==
==My embedded video is too big/small. How can I change its display size?==
Changing the size of an embedded video depends on whether you're using Moodle's [[Multimedia plugins filter]] or if you're either embedding a video from another source using something like an iframe (for example, embedding a video from YouTube using the embed code they provide).
Changing the size of an embedded video depends on whether you're using Moodle's [[Multimedia plugins filter]] or if you're either embedding a video from another source using something like an iframe (for example, embedding a video from YouTube using the embed code they provide).


====If you're using Moodle's Mulimedia plugins filter:====
====If you're using Moodle's Multimedia plugins filter:====
Your video will appear to you in the html editor as a hyperlink. Whether it's a video hosted elsewhere (ie Vimeo or Youtube) or a file you've uploaded yourself, it will still appear as a hyperlink. After you've saved this html, Moodle's Multimedia filter will turn that hyperlink into an embedded video. In order to change the video's size you need to:
*If you are not using it already, enable the [[Atto editor]] and click the Media icon.
#Open the HTML Source Editor by clicking the HTML code icon:<br>[[File:Htmlcodeicon.png]]
*Click the Video tab and then click Display options. You will be able to change its size there.
#Find the <a href...> code for the video you want to change. In the href="LINK" section of your code, place your cursor right before the last quotation mark.
#Type "?d=100x200" where you're replacing "100" with your desired width and "200" with your desired height. For example, if you want a video that's 600 x 325, you would type ?d=600x325."<br>[[File:Resizevideo.png]]
#Your <a> tag should now look something like the following:<br>If you're working with a file you've uploaded yourself: <a href="https://yourschool.edu/draftfile.php?file=/135/user/draft/617331337/Module%.mp4?d=425x234">. In this example, your uploaded video would be embedded at 425x234.<br>If you're working with an externally hosted file: <a href="https://www.youtube.com/watch?v=TubRpuaNVT4d?600x135">. In this example, the YouTube video would be embedded at 600x135.
#Click "update" in the HTML source editor screen, and save your changes.  
#Your video should now be the new size.


====If you're using an embed code, such as an iframe, it's a little easier:====
====If you're using embed code====
#Open the HTML Source Editor, as above
#Click the code/HTML source icon in your text editor
#Locate the <iframe> tag or equivalent.
#Locate the <iframe> tag or equivalent.
#Inside that iframe should be "width" and "height" variables, which you can adjust as needed.<br>[[File:Youtuberesize.png]]
#Inside that iframe should be "width" and "height" variables, which you can adjust as needed.<br>[[File:Youtuberesize.png]]
Line 22: Line 20:
#Your video should now be the new size.
#Your video should now be the new size.


==Why is the size and player for MP4 video clips hard coded?==
==Why won't my swf video play?==
*Not sureIf anyone from out there knows, so far they have not let on any reasons. See MDL-43385
The .swf format carries with it some security issues and so the filter that allows it to display is disabled by default. For you to be able to add .swf videos, your administrator needs to enable the filter in [[Multimedia_plugins|Multimedia plugins]], then to go to ''Site Administration>Security>Site policies'' and check the "enable trusted content" box. They then need to go to ''Site Administration>Users>Permissions>Define roles'' and allow Trust Submitted content ''moodle/site:trustcontent'' for your role. However; swf will still not display in all areas of Moodle, for example forum posts. See this discussion [http://moodle.org/mod/forum/discuss.php?d=183681#p800390| here]
*The code: https://moodle.org/mod/forum/discuss.php?d=266340#p1152013
 
The video is resized because the MP4 filter calls the Quicktime plugin with a predefined size of 400x315 px:
 
<object *** width="400" height="315">
<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />
<param name="src" value="http://localhost/moodle25/pluginfile.php/100/mod_resource/content/0/video.mp4" />


If you rename the file to an FLV extension before uploading, then the video will be processed by Flowplayer.
==Why won't my FLV video play?==


==Why won't my swf video play?==
FLV will only play if 'Use Flash fallback' is enabled in the 'VideoJS player' settings in the Site administration. It must also be supported by your browser and require plugins and permissions. Using Flash is not recommended for security reasons.
The .swf format carries with it some security issues and so the filter that allows it to display is disabled by default. For you to be able to add .swf videos, your administrator needs to enable the filter in [[Multimedia_plugins|Multimedia plugins]], then to go to ''Site Administration>Security>Site policies'' and check the "enable trusted content"  box. They then need to go to ''Site Administration>Users>Permissions>Define roles'' and allow Trust Submitted content ''moodle/site:trustcontent'' for your role. However; swf will still not display in all areas of Moodle, for example forum posts. See this discussion [http://moodle.org/mod/forum/discuss.php?d=183681#p800390| here]


==How can I convert my video file to an .FLV or other format?==
==How can I convert my video file to an .FLV or other format?==
Line 48: Line 38:
*Jodix Free WMA to MP3 converter [http://www.wma-mp3.org/] is just one example
*Jodix Free WMA to MP3 converter [http://www.wma-mp3.org/] is just one example


== I have an MP4 file.  How can I play it in Moodle's player? (ie Flowplayer)==
==Videos don't embed even though the filters are enabled==
This section is a little sparse, and if you can improve it, feel free.
You might need to change the order of your filters. See [[Filters]] and also the forum discussion [https://moodle.org/mod/forum/discuss.php?d=278993#p1198335 I can't embed YouTube videos]


It seems that the media filter is hard coded to NOT use Flowplayer for MP4. 
== How can I disable player embedding for one particular link? ==
*See the discussion here: https://moodle.org/mod/forum/discuss.php?d=208849#p914927.  Renaming an MP4 to an FLV seems to create a file that will play in Flowplayer.
Also: https://moodle.org/mod/forum/discuss.php?d=271199
*See the discussion here: https://docs.moodle.org/dev/Media_embedding
*See the discussion about [https://moodle.org/mod/forum/discuss.php?d=232296#p1048676 how to play mp4 videos in Moodle]
 
You can vote for a change here: MDL-43385
 
== What's the best way to manage/deploy MP4 files in Moodle? ==
And why bother about this?  MP4 is probably the most common format, and it will play on both Flash enabled and disabled devices.  It's a common question.
 
See above.  Until we find out more information, it's difficult to get MP4 files into Moodle simply AND playing nicely.  ie pick ONE.
#To play nicely: you need to do complex embedding etc.  So it's not simple.
#To get them in simply: you drag and drop.  But then they don' t play nicely, unless you want a small ugly looking product.
===The Videofile plugin option===
One option is the [[Videofile]] plugin.
*Download: https://docs.moodle.org/36/en/Videofile
*About: https://docs.moodle.org/36/en/Videofile
===The Re-naming option===
ie Don't use MP4's but rename to FLV
===The Youtube (etc) repository option===
Upload your file to Youtube and link to it.
==Can you stop Flowplayer from preloading a video?==
*See the discussion here: http://moodle.org/mod/forum/discuss.php?d=184081
==Videos don't embed even though the filters are enabled==
You might need to change the order of your filters. See the forum discussion [https://moodle.org/mod/forum/discuss.php?d=278993#p1198335 I can't embed YouTube videos]


If you want to prevent the embedded player and keep just the link to the video, add "nomediaplugin" class to the HTML anchor tag producing the link. For example:


<nowiki><a href="https://link.to/your/video" class="nomediaplugin">Link text</a></nowiki>


[[Category:FAQ]]
[[Category:FAQ]]
[[Category:Audio]]
[[Category:Video]]


[[de:Multimedia FAQ]]
[[de:Multimedia FAQ]]
[[es:Medios FAQ]]
[[es:Medios FAQ]]

Latest revision as of 10:38, 20 August 2018

Should I put my video into a label or a page?

While the embedding process is the same, adding a video to a label will mean it displays as soon as the user clicks on that course page. This can be beneficial if the video is, for example, an introduction to the course or an integral part of the whole course. However, if there are several videos in labels, they can slow the loading of the course down, especially if the videos are coming from an external site. Adding a video to a page in Moodle means that the user has to click a text link to reach the video, but it doesn't clutter up the main course page and it is a better choice if the course contains a large number of videos.

My embedded youTube video doesn't display different language subtitles/playlists

This is an issue with the VideoJS player currently. A workaround is to disable the setting 'YouTube videos' in the VideoJS player settings of Site administration (ensuring the YouTube filter is enabled in Manage media players) Then copy and paste the YouTube URL directly into your editor.

My embedded video is too big/small. How can I change its display size?

Changing the size of an embedded video depends on whether you're using Moodle's Multimedia plugins filter or if you're either embedding a video from another source using something like an iframe (for example, embedding a video from YouTube using the embed code they provide).

If you're using Moodle's Multimedia plugins filter:

  • If you are not using it already, enable the Atto editor and click the Media icon.
  • Click the Video tab and then click Display options. You will be able to change its size there.

If you're using embed code

  1. Click the code/HTML source icon in your text editor
  2. Locate the <iframe> tag or equivalent.
  3. Inside that iframe should be "width" and "height" variables, which you can adjust as needed.
    Youtuberesize.png
  4. Click "update" in the HTML source editor screen, and save your changes.
  5. Your video should now be the new size.

Why won't my swf video play?

The .swf format carries with it some security issues and so the filter that allows it to display is disabled by default. For you to be able to add .swf videos, your administrator needs to enable the filter in Multimedia plugins, then to go to Site Administration>Security>Site policies and check the "enable trusted content" box. They then need to go to Site Administration>Users>Permissions>Define roles and allow Trust Submitted content moodle/site:trustcontent for your role. However; swf will still not display in all areas of Moodle, for example forum posts. See this discussion here

Why won't my FLV video play?

FLV will only play if 'Use Flash fallback' is enabled in the 'VideoJS player' settings in the Site administration. It must also be supported by your browser and require plugins and permissions. Using Flash is not recommended for security reasons.

How can I convert my video file to an .FLV or other format?

  • There are many sites online that allow you to upload a file which will then be converted and sent to you via a link or email. Zamzar [1]or Youconvertit [2] are just two examples.
  • However, if it is a large video file or you want to do the conversion off line, then the free Any Video Converter [3] (a downloadable program) will convert most video formats to most others.
  • More and more full-featured MTS Video Converter [4]software free download a trial, to solve your problem more format conversions.
  • The free and open source video player, VLC has the ability to convert to and from many video formats. For more details and downloads visit their site.
  • If you are using Linux as your operating system either ffmpeg or avconv can both convert to FLV.

I have a .wma/wav file. How can I play it in Moodle's player?

  • There are various free programs available that will convert one type of sound file to another. If you convert your file to an mp3 then you will be able to use Moodle's built-in mp3 player.
  • Jodix Free WMA to MP3 converter [5] is just one example

Videos don't embed even though the filters are enabled

You might need to change the order of your filters. See Filters and also the forum discussion I can't embed YouTube videos

How can I disable player embedding for one particular link?

If you want to prevent the embedded player and keep just the link to the video, add "nomediaplugin" class to the HTML anchor tag producing the link. For example:

<a href="https://link.to/your/video" class="nomediaplugin">Link text</a>