By default Poodll uses services located in the cloud. This makes a lot of things possible, including transcoding, transcription and text to speech. By using cloud based services the cost and complexity of configuring and running such services locally is avoided. Poodll authentication via API user and secret also uses the cloud.


However it is possible to run most of Classic Poodll without any cloud services. You might need to do this if:

  • your server and users are unable to access the internet
  • you have particularly strict data processing restrictions. 
  • your server and users are located in mainland China.


If you do not use cloud services, by default your audio and video recordings will not be converted to MP3 and MP4. This is not great because you and your users will have issues playing back recordings on different devices. To solve this issue it is possible to configure FFMPEG on your Moodle server to handle file conversion. 

N.B. FFMPEG works fine with Poodll, but we can not offer support for it.


To set up FFMPEG for Poodll you will need to:

  1. Install FFMPEG on your server
  2. Test your FFMPEG from the command line
  3. Configure Poodll for FFMPEG
  4. Set your Poodll registration key [don't forget this]


Install FFMPEG on your server

First check if FFMPEG is installed on your server. From the command line type:

ffmpeg -version



If version information is then displayed, then FFMPEG is installed. If not you will need to install it.

Install with a package manager

On some OSs you can use a package manager to install FFMEG. 

On CENTOS try:

yum install ffmpeg


On Ubuntu try:

sudo apt-get install ffmpeg


Install with a static build


 If you are lucky a static compiled binary might work for you. In that case download the binary and place it in: [MOODLE]/filter/poodll 

Download links can be found here:
http://www.ffmpeg.org/download.html

After doing that, on Linux and Mac machines be sure to set the FFMPEG file executable:


chmod 755 ffmpeg

Then test it actually works on your machine

ffmpeg -version


Build and install FFMPEG on your server

One method of installing FFMPEG on an Ubuntu server is using the build script available here:
https://github.com/stvs/ffmpeg-static
This will download all the bits and pieces you need to static compile an FFMPEG executable.


Testing your FFMPEG from Command Line

Depending on how FFMPEG is built it may or may not have the ability to encode MP3 or MP4. If you use another media file and try to convert it to MP3 or MP4, you will be able to see if it has that ability.

For audio try this:

ffmpeg -i myfile.webm myfile.mp3


For video try this:

ffmpeg -i myfile.webm -strict -2 myfile.mp4


If you wish, you can use this webm file for testing. Right click to download.
zombie_problems.webm


If you are not able to encode MP3 files you will need to install additional codecs to allow you to do that. Thats not that hard, but beyond the scope of this document. In that case you should search for the correct commands to install those codecs.

 

Configuring Moodle for FFMPEG

First visit the Poodll filter general settings page:

Site administration -> Plugins -> Filters -> Poodll Filter -> General Settings


Uncheck "Remote conversion."


Then visit the Poodll filter advanced settings page:

Site administration -> Plugins -> Filters -> Poodll Filter -> Advanced Settings


In the Audio/Video File conversion settings check

  • Auto conv. to MP4
  • Auto conv. to MP3
  • Convert uploaded media with FFMPEG





You might need to tweak the actual command line call that Poodll makes to produce MP3 and MP4 files at a speed, size and format that you need. Test this on the command line first, as we did earlier.  The options that you set here will be inserted in between the input and output filenames.

ffmpeg -i something.flv  [CONV. OPTIONS HERE]  something.mp4



For video we recommend this set of conversion options:
-c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 -crf 28 -f mp4

Finally you will want to run the conversions in the background from Moodle’s cron. Make sure your Moodle cron job is set up. And check the two “Perform conversion in the background” options.


TROUBLESHOOTING TIPS:

  • Make sure the file permissions are correct for the user the web server runs as, to run the FFMPEG executable.
  • Make the FFMPEG executable file is either:
    i) in the root of the /filter/poodll folder
    (it needs to be the executable file, a folder called ‘ffmpeg’ with ffmpeg in it is not the same thing.)
    OR
    ii) on the system path. ie you can type “ffmpeg -v” on the command line from anywhere and it will work.
  • Setup debug logging in Poodll and the logs will report if the conversion task failed. This will indicate that Poodll could not successfully call FFmpeg. And the placeholder video will not be replaced. Its likely that ffmpeg is in the wrong place or has incorrect permissions.
  • If you get an unplayable file back from the conversion, then its likely that the options you set for MP3 or MP4 conversion are the problem.
  • If it does not try to convert at all, and you get WEBM and OGG and similar files instead of MP3 and MP4, then confirm that you turned on background conversions.
  • If conversions never even seem to start then check that your cron job is running, or try to run it from the Moodle web interface (admin/cron.php)
  • Longer(bigger) recordings can be rejected by your web server. This will appear as files that don’t finish uploading . When testing recordings that upload directly to your Moodle server, use small 5 second recordings. Later you will need to make sure that your server can accept big file uploads. Thats a whole other hassle, that sometimes involves apache mod_security or  the Suhosin extension. But it might be enough to just increase your post_max_size in php.ini.

Set your Poodll Registration Code

Your Moodle server usually authenticates against the Cloud Poodll server using your account's Poodll API user and secret. But if you are not using cloud services, this might not work. You can use the 4-5 line long registration code in the  Poodll filter advanced settings page:

Site administration -> Plugins -> Filters -> Poodll Filter -> Advanced Settings



You can get your registration code from your member page at Poodll.com: https://poodll.com/member

If you do not yet have a subscription, you can take a free trial subscription and this will give you a registration code too.