Difference between revisions of "Audio"

Jump to: navigation, search
(Turning on multimedia filters)
m (removing new features template and broken links)
 
(61 intermediate revisions by 12 users not shown)
Line 1: Line 1:
This document explains two different methods to share audio files via Moodle. They are referred to as 'Simple' and 'Advanced' as the latter requires slightly more preparation but allows for more flexibility. We would suggest following the Advanced Method for any audio you are creating for Moodle. But if the audio has already been created then the Simple Method will be fine in most cases. Instructions are also given for converting existing audio if it is felt necessary.
+
{{Working with media}}
 +
''Note:'' This page covers  audio (sound files) which are added to a course by the teacher for students to listen to. See '''[[Speech tools |Speech tools]]''' if you are looking for ways to allow your students or teachers to record directly into Moodle or engage in audio conferencing.
  
=== Simple method ===
+
Audio is a very powerful tool to use in a Moodle course, allowing students, for example to catch up on lectures they missed, learn from podcasts, or improve their language skills by listening to native speakers interact. To use audio in Moodle to best effect,  the [[Multimedia plugins filter]] must be enabled. For hints on creating your own audio files, see the [https://docs.moodle.org/32/en/Advanced_Audio Advanced Audio] page.
  
The following formats are widely used and if not already present on a computer, easy to use software can be easily downloaded and installed at no cost.
+
==Types of audio (sound) files==
 +
*Moodle's default [[VideoJS player]] will play the following audio files: mp3, .aac, .flac, .m4a, .oga, .ogg, .wav
  
* .mp3
+
==Ways of displaying audio==
* .aac
 
* .wma (Windows Media Audio)
 
* .ra (Real Media)
 
  
If you have a choice in the matter we would suggest choosing MP3. It is the most widely used format and is likely to be playable on any modern computer, internet connected device or portable player. If you are creating audio files, or having them created for you we suggest some specific settings for your MP3 in the next section.
+
===Linking to a sound file online elsewhere===
 +
*If your audio file is hosted elsewhere online you can simply link to the relevant page by choosing [[URL]] from 'Add an activity or resource' and pasting in the relevant link given you by the site.
 +
*Note that, in an establishment where certain sharing sites might be banned, your students might not be able to access your sound file through Moodle.
  
=== Turning on multimedia filters ===
+
===Uploading audio ===
  
Moodle has a facility called [[Multimedia plugins]] that can make the presentation of some kinds of downloaded audio and video files more streamlined. Turning this on is recommended, and is a job for your Moodle administrator. It can however, in some rare cases cause your MP3 files to sound faster and higher pitched, making normal speech sound like Minnie Mouse, or slower and lower pitched. If this is the case then you may need to follow the Advanced Method outlined below to prepare your audio files for use within Moodle. Alternatively, you can try to ensure that the media filter doesn't attempt to process the problematic file.
+
*If your browser allows resources to be dragged and dropped, then you can turn on the editing and drag the audio file directly onto the course page.
 +
*A box will then appear for you to decide whether you want the audio embedded in a label, or added as a clickable file resource:
 +
[[File:33dragdropmp3.png]]
 +
*Alternatively, you can upload the audio file by turning the editing on and choosing ''Add an activity or  resource>[[File|File]]''
  
=== Advanced method ===
+
===Embedding a sound file in its own player===
 +
*Moodle includes a built-in audio player. If the relevant [[Multimedia plugins filter]] is enabled by the administrator and within the course, sound files embedded into the text editor will play inline.
 +
*Anywhere that Moodle's text editor is available, it is possible to embed a sound file, for example in a [[Label|label]] or a [[Page|page]], a course topic summary, a [[Description_question_type| quiz description]] or a [[Lesson|lesson]]. The next section explains how:
  
The Media Filters in Moodle use Flash to playback audio in the browser. Flash requires the audio to be in a fairly specific format and this happens to also ensure the widest possible compatibility in other situations e.g. playing on an iPod. The short version follows, it is explained in greater depth below:
+
====Using the Moodle media icon====
  
* MP3 format
+
*With your editing turned on, click into the HTML editor where you wish to embed your sound file. (It needs to be mp3.)
* with a sample rate of 11.025, 22.05 or 44.1 kHz
+
*Click the Moodle media icon as in the following screenshot:
* Constant Bit Rate (CBR) rather than Variable Bit Rate (VBR)
+
[[File:Addmedia.png]]
* Joint-Stereo, rather than Mono or Full Stereo
+
*If your sound file is online, paste its URL in the Source URL box in the Link tab
 +
*If you want to upload an audio file, click the Audio tab.
 +
[[File:DocsVideoInsertMedia.png]]
 +
*Click the Browse repositories button to locate and upload your audio file from the repository where it is stored. (What you see depends on what the admin has enabled.) If you have it in more than one file type, then you can upload an alternative video by clicking 'Add alternative source'. This helps make your sound file play on more browsers and devices.
 +
*'''Advanced settings''' allows you to decide how the file will play
 +
*'''Subtitles and captions''' allows you to add subtitle files (VTT) in different languages and/or caption files, with descriptions, chapters and metadata. Subtitles, captions, chapters and descriptions can be added to videos and audios using WebVTT file format. These files can be created using caption making software or just plain text editor. Find out more about WebVTT format here (https://w3c.github.io/webvtt/)
 +
*Click the Insert media button when you are ready.
 +
*Your sound file will appear but not yet play:
 +
[[File:NewSoundFileDisplay.png]]
 +
*Onced saved, your file will display in its own player:
 +
[[File:NewSoundFilePlay.png]]
  
Note that 'sample rate' or frequency, measured in kiloHertz (kHz), is not the same as 'bit rate', measured in kilobits per second (kbps). The latter is a measure of filesize and download time and also a rough measure of quality. Somewhere between 32 and 96 kbps is appropriate with diminishing returns beyond 128kbps.
+
====Using a hyperlink====
 +
(Note - this method has no advantage over using the  media icon, but was popular in older versions of Moodle)
 +
*With your editing turned on, click into the HTML editor where you wish to embed your mp3 file.
 +
*Type some blank spaces and select them.
 +
*Click the hyperlink icon as in the following screenshot.(The icon will only be clickable if you have selected text or spaces)
 +
[[File:Hyperlinkicon.png]]
 +
*Click "Browse repositories":
 +
[[File:Linkurl.png]]
 +
*This takes you to the file picker. Follow the instructions for uploading/selecting your sound file as for using the Moodle media icon.
 +
*When your file is chosen, it will appear in the link URL box as below. Click ''Create link"
 +
[[File:Insertvideo.png]]
 +
*'''''Don't panic!''''' You will now only get a blue line in the HTML editor:
 +
[[File:Audiopreview2.png]]
 +
*When you click ''save changes'' to return to the main course page, your mp3 file will display.
  
Sample rate is the number of times per second that the sound is digitally recorded. Due to something called the Nyquist Theorem you need twice the frequency of the sounds you wish to record. 44.1kHz should be enough to encode all sounds audible to people with good ears. Lower sample rates will cause the higher frequencies to be lost, though this will not often be a problem for recording speech. You might sometimes find MP3 audio files at 16, 32 and 48 kHz but these can cause problems with Moodle and ideally should be re-encoded following the instructions below.
+
====Using embed code to display online audio====
 +
*Some sites provide embed code/widgets that will enable you to play their mp3 files on your Moodle. First - go to your chosen site and copy this code of the mp3 file you wish to use.
 +
*With your editing turned on, click into the HTML editor where you wish to embed the file.
 +
*Click the HTML code icon as in the following screenshot:
 +
[[File:AttoEmbedCode.png]]
 +
*Paste your embed code into the box:
 +
*Scroll down and click "update".
 +
*The mp3 file will be previewed in the HTML editor. Click ''save changes'' for it to display on the page
  
Variable Bit Rate files are commonly used to get the best audio quality by 'saving up' bit on easily encoded sections such as silence or simple audio and then using them for difficult to encode noises such as applause, harpsichords or hi-hats. Constant Bit Rate mp3s can be seen therefore as wasteful as they use the same amount of bits for silence as they do for a full orchestra crescendo but are more compatible and easier to stream. If audio files report that they are much longer or shorter than they really are then VBR incompatibility is a likely cause. If audio sound faster or slower than it should, an you have ruled out the sample rate as a cause then VBR may be the culprit.
+
==See also==
 +
*[[Media FAQ]]
 +
*[[Speech tools]]
  
Mono files theoretically save bandwidth when the location of the audio is irrelevant (e.g. a single person talking), but joint-stereo mp3s can encode most stereo info with minimal quality loss and are smart enough to deal with primarily mono audio without wasting bits and unnecessarily increasing filesize and download time. Full or Real stereo is only necessary for the very highest quality of recording where stereo separation is regarded as important. Mono files are another potential cause for audio to playback at twice the expected speed.
+
[[Category:Audio]]
  
 
+
[[de:Audio]]
=== Pros and cons of the advanced method ===
+
[[es:Audio]]
 
 
==== Pros ====
 
 
 
* Ideal for shorter sound clips which can be flexibly embedded into a document, forums, quizzes, lessons etc.
 
* Allows longer audio files to play instantly in the browser as they download in the background.
 
* Widest possible compatibility (both software and hardware)
 
* consistent user experience across platforms (Mac, PC, Linux) as it plays in the browser
 
 
 
==== Cons ====
 
 
 
* Can require more preparation
 
* The Media Filters can have issues with some mp3 audio files produced by third parties, that would play fine if downloaded
 
 
 
=== Conversion to compatible MP3 ===
 
 
 
If you have audio in one of the other formats listed above but would prefer it in the widely compatible MP3 format detailed above then most can be easily be converted. The following instructions are for iTunes which is freely and easily available for both Mac and PC.
 
 
 
To change the settings used to create or convert audio files, open the iTunes option screen, then select:
 
 
 
Options -> Advanced -> Importing, then select MP3 Encoder then from Settings: select Custom...
 
 
 
* Stereo Bit Rate: your choice. You can experiment but anything over 128 kbps is probably a waste, as is anything higher than the bitrate you start with.
 
* Don't tick "Use Variable Rate Encoding"
 
* Sample Rate: only choose either 44.100, 22.050, or 11.025 kHz (lower sample rate as you lower bitrate)
 
* Channels: Stereo
 
* Stereo Mode: Joint Stereo
 
* Don't Tick "Smart Encoding Adjustments" (this doesn't have any effect unless you have left some settings at 'auto')
 
* Tick "Filter frequencies Below 10 Hz" (this generally doesn't have any effect but doesn't really hurt and can increase quality)
 
 
 
If you have played the file in iTunes you should be able to find it in your library. After selecting the file you should find an option in the Advanced menu, called Convert Selection to MP3. If you have several files to convert you can select them all at the same time.
 

Latest revision as of 13:52, 25 October 2017

Note: This page covers audio (sound files) which are added to a course by the teacher for students to listen to. See Speech tools if you are looking for ways to allow your students or teachers to record directly into Moodle or engage in audio conferencing.

Audio is a very powerful tool to use in a Moodle course, allowing students, for example to catch up on lectures they missed, learn from podcasts, or improve their language skills by listening to native speakers interact. To use audio in Moodle to best effect, the Multimedia plugins filter must be enabled. For hints on creating your own audio files, see the Advanced Audio page.

Types of audio (sound) files

  • Moodle's default VideoJS player will play the following audio files: mp3, .aac, .flac, .m4a, .oga, .ogg, .wav

Ways of displaying audio

Linking to a sound file online elsewhere

  • If your audio file is hosted elsewhere online you can simply link to the relevant page by choosing URL from 'Add an activity or resource' and pasting in the relevant link given you by the site.
  • Note that, in an establishment where certain sharing sites might be banned, your students might not be able to access your sound file through Moodle.

Uploading audio

  • If your browser allows resources to be dragged and dropped, then you can turn on the editing and drag the audio file directly onto the course page.
  • A box will then appear for you to decide whether you want the audio embedded in a label, or added as a clickable file resource:

33dragdropmp3.png

  • Alternatively, you can upload the audio file by turning the editing on and choosing Add an activity or resource>File

Embedding a sound file in its own player

  • Moodle includes a built-in audio player. If the relevant Multimedia plugins filter is enabled by the administrator and within the course, sound files embedded into the text editor will play inline.
  • Anywhere that Moodle's text editor is available, it is possible to embed a sound file, for example in a label or a page, a course topic summary, a quiz description or a lesson. The next section explains how:

Using the Moodle media icon

  • With your editing turned on, click into the HTML editor where you wish to embed your sound file. (It needs to be mp3.)
  • Click the Moodle media icon as in the following screenshot:

Addmedia.png

  • If your sound file is online, paste its URL in the Source URL box in the Link tab
  • If you want to upload an audio file, click the Audio tab.

DocsVideoInsertMedia.png

  • Click the Browse repositories button to locate and upload your audio file from the repository where it is stored. (What you see depends on what the admin has enabled.) If you have it in more than one file type, then you can upload an alternative video by clicking 'Add alternative source'. This helps make your sound file play on more browsers and devices.
  • Advanced settings allows you to decide how the file will play
  • Subtitles and captions allows you to add subtitle files (VTT) in different languages and/or caption files, with descriptions, chapters and metadata. Subtitles, captions, chapters and descriptions can be added to videos and audios using WebVTT file format. These files can be created using caption making software or just plain text editor. Find out more about WebVTT format here (https://w3c.github.io/webvtt/)
  • Click the Insert media button when you are ready.
  • Your sound file will appear but not yet play:

NewSoundFileDisplay.png

  • Onced saved, your file will display in its own player:

NewSoundFilePlay.png

Using a hyperlink

(Note - this method has no advantage over using the media icon, but was popular in older versions of Moodle)

  • With your editing turned on, click into the HTML editor where you wish to embed your mp3 file.
  • Type some blank spaces and select them.
  • Click the hyperlink icon as in the following screenshot.(The icon will only be clickable if you have selected text or spaces)

Hyperlinkicon.png

  • Click "Browse repositories":

Linkurl.png

  • This takes you to the file picker. Follow the instructions for uploading/selecting your sound file as for using the Moodle media icon.
  • When your file is chosen, it will appear in the link URL box as below. Click Create link"

Insertvideo.png

  • Don't panic! You will now only get a blue line in the HTML editor:

Audiopreview2.png

  • When you click save changes to return to the main course page, your mp3 file will display.

Using embed code to display online audio

  • Some sites provide embed code/widgets that will enable you to play their mp3 files on your Moodle. First - go to your chosen site and copy this code of the mp3 file you wish to use.
  • With your editing turned on, click into the HTML editor where you wish to embed the file.
  • Click the HTML code icon as in the following screenshot:

AttoEmbedCode.png

  • Paste your embed code into the box:
  • Scroll down and click "update".
  • The mp3 file will be previewed in the HTML editor. Click save changes for it to display on the page

See also