oohoo / moodle-mod_languagelab

OWLL (OOHOO Web-based Language Lab) is a Moodle plugin replicating all functions of a traditional language lab, with added features that stem from its being web-based. It allows for synchronous as well as asynchronous use, in a face-to-face as well as in a distance learning setting.
http://oohoo.biz/index.php/en/plug-ins/language-learning/owll-oohoo-web-based-language-lab/
6 stars 8 forks source link

FLV Conversion to MP3 not working #15

Open esemeniuc opened 10 years ago

esemeniuc commented 10 years ago

Hi,

I noticed a bug in the flv to mp3 conversion. The download button always provides .flv files, whether coming from the student view or from the instructor view. I've installed ffmpeg, as well as libavcodec-extra-53. I've also checked the paths for ffmpeg, and they line up with the config.php file.

Current setup: Ubuntu 13.10 Php 5.5.3 Apache 2.2 or Nginx 1.4

Rap test:

Your Apache/PHP server is working, now checking RAP configuration...
Congratulations, your RAP configuration is working!
Checking the ffmpeg availability...
Command "ffmpeg" founded and executable
--------------------------------------------------------------
Checking the version of the RAP files...
RAP files version OK.
--------------------------------------------------------------
The Red5 server looks running and available.
bretin commented 10 years ago

Hi cwaffles,

Could you check in the RTMP folder if the MP3 File has been created or not?

First lead: I noticed that FFMPEG can be really annoying sometimes, depending of your ubuntu version the package available via apt-get is not updated... So you have to compile it... If it is installed on your server, you can try changing in the config file ffmpeg by "avconv " Try to convert a flv in the RTMP server with the command ffmpeg -i yourflvfile.flv -ar 44100 -ab 64k -ac 2 yourresult.mp3 (Try with avconv instead of ffmpeg too)

Second lead: Could you check the owner on the flv files? In order to work It must be www-data (or the user that execute the php), if not, it means that the RTMP server is still runned by root, so you will have to change the user for the RTMP service to the same as the PHP. Don't forget to folders permissions on the RTMP folder too.

Keep me aware of your results!

Thank you

Nicolas

esemeniuc commented 10 years ago

Hi Nicolas,

I had no trouble running ffmpeg -i mdl13232231.flv -ar 44100 -ab 64k -ac 2 mdl13232231.mp3. Avconv works just as well (without the depreciated warnings), and the resulting filesize is just a bit bigger than the flv (ran as root). I then ran: chown -R www-data:www-data /usr/share/red5/webapps/oflaDemo/streams/moodle and chmod -R 775 /usr/share/red5/webapps/oflaDemo/streams/moodle after adding www-data to the _red5 group. I then restarted PHP-FPM, refreshed the page, and tried downloading the recording, but the end result was still an flv file. I also tried setting avconv as the converter to use in config.php, but it has the same result.

In my situation, I am using the Debian/Ubuntu default init script, which launches red5 as _red5. In addition, all of /usr/share/red5 is owned by _red5:_red5

Init script: https://gist.github.com/cwaffles/9789465