Learn Moodle 3.7 Basics / Week 3: Making the Grade (24 - 30 June) / Any questions about week 3? / Drat! Audio files: codecs and containers -- incongruities
Dear fellow Moodlers,
here I go again, fighting a battle of wills with iOS @ iPad and Learn Moodle app. (I've even analysed why: because it's summer now in the northern hemisphere and it's hot (> 30°C) and I cannot bear to add my laptop's heat output to the overall heat that surrounds me, so I sit in the shade with the iPad in my lap, for better or worse.)
The crux of this post is that it's rather incongruent to teach us (in the Optional quiz on mobile learning and Moodle) that, for audio, it's best to use mp3 while having the Atto's sound recorder serve Opus-encoded audio in a matroska container...
How do I know? Well, again, I was browsing using Learn Moodle on iOS (because it was hot). I had enrolled a practice course and there was an ugly black rectangle where the audio player should have been (I started a chat with the course creator and found that out; later I logged in from Chromium @ Debian linux).
app: Learn Moodle, OS: iOS 12.3.1, HW: iPad
(should I bother
saying it does not play?)
The same goes when viewing from:
- Dolphin web browser @ iPad:
- Chrome web browser @ iPad:
Now I'm curious enough to try the Moodle app (official app for mobile), iOS @ iPad:
Aha! An improvement! But alas: it does not play
Now I'm even more curious:
- Learn Moodle app @ android 6.0 (HTC Desire)
plays just fine - Moodle (official app) @ android 6.0 (HTC Desire)
also plays - ... and, last, but not least: Chromium web browser @ Debian 9 (laptop)
also plays
In the chat I'm having with the course creator, I find out that he had used Atto's sound recording feature (on Kubuntu, in Chrome? or in Dolphin?) and he sent me the part of his HTML code:
<div class="mediaplugin mediaplugin_videojs"><div style="max-width:400px;"><audio controls="" data-setup-lazy="{"language": "en", "fluid": true, "controlBar": {"fullscreenToggle": false}, "aspectRatio": "1:0"}" id="id_videojs_5d12f320a6177_1" class="video-js" title="561288155658151-audio.ogg"><source src="https://learn.moodle.net/pluginfile.php/438159/mod_label/intro/561288155658151-audio.ogg" type="audio/ogg" /><a href="https://learn.moodle.net/pluginfile.php/438159/mod_label/intro/561288155658151-audio.ogg" class="_blanktarget">https://learn.moodle.net/pluginfile.php/438159/mod_label/intro/561288155658151-audio.ogg</a></audio></div></div>
During this chat, when he copy/pastes the HTML code, surprisingly, the HTML is interpreted and an audio player pops out right there, in the middle of our chat:
(Chat screenshot: Learn Moodle @ iOS, iPad)
So, it's an ogg file. Further analysis reveals that it contains Opus-encoded audio stream in WebM (matroska) container:
ffmpeg
Input #0, matroska,webm, from '561288155658151-audio.ogg':
Metadata:
encoder : Chrome
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
mediainfo
General
Complete name : 561288155658151-audio.ogg
Format : WebM
Format version : Version 4 / Version 2
File size : 284 KiB
Writing application : Chrome
Writing library : Chrome
IsTruncated : Yes
Audio
ID : 1
Format : Opus
Codec ID : A_OPUS
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 48.0 kHz
Bit depth : 32 bits
Compression mode : Lossy
Language : English
Default : Yes
Forced : No
The doc "Audio" reads:
Types of audio (sound) files
- Moodle's default VideoJS player will play the following audio files: mp3, .aac, .flac, .m4a, .oga, .ogg, .wav
... and then further down:
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.)
The doc "Media embedding" reads:
The Multimedia plugins filter must be enabled and then specific players may be enabled or disabled from 'Manage media players' in Site administration.
The default player, VideoJS player supports
- (video) mov, .mp4, .m4v, .mpeg, .mpe, .mpg, .ogv, .webm, .flv, .f4v
- (audio) .mp3, .aac, .flac, .m4a, .oga, .ogg, .wav
Now what?
Regards,
Darki
Well, I've been asked to post here and that's what I'm doing.
Best,
Darki