Audio/video file info save in Database

Re: Audio/video file info save in Database

by Justin Hunt -
Number of replies: 5
Picture of Particularly helpful Moodlers Picture of Plugin developers

If you look at poodllfilelib.php in function filter_poodll_instance_remotedownload (or something like that .. if you are on an earlier version) the file is copied back from Red5 to Moodle. When you use tokyo.poodll.com Red5 server, it makes the recorded files web accessible so they can be picked up. Because there is a PoodLL webapp running on the Red5 server. That webapp is not compatible with recent versions of Red5, and if you set up Red5 ok, you can probably get by without it. But I have never tried that.

 Have you read the attached doc? Maybe its useful

In reply to Justin Hunt

Re: Audio/video file info save in Database

by Mohammad kabir -

Hi Justin,

Red5 version: 1.0.7

Poodll tinymce version: 1.0.6

filter_poodll : 2.7.6

I got file  filter->poodllfilelib.php .  There are    

1.  function instance_remotedownload 

2. function uploadfile 

where I can write code to save data about file info. For example: 

insert into table1( id, Username, teacher/student, filepath, filename, category, course name, time )  

am I right?

How can I debug the code  and see?

Thanks for help smile





In reply to Mohammad kabir

Re: Audio/video file info save in Database

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Its a bit hard to answer that without knowing what you are trying to do, and basically teaching how to general concepts of Moodle development. Its too much for a forum post reply  is what  I mean. My advice is : 

i) look around at other Moodle code

ii) read the documentation when you need to, at : https://docs.moodle.org/dev/Main_Page

iii) start coding and ask more specific questions here in the forums

In reply to Justin Hunt

Re: Audio/video file info save in Database

by Mohammad kabir -

Thank you for your valuable time justin. Finally  I manage to save files in our own server, and put data(file info)  in database.

q1: I saw audio/video files are copying from server to moodle, then files are running from moodle, not from our server, Why poodll need to put  file first  in separate server? Can't possible direct put to moodle?

q2. Delete file from server, do you have any function for that? or you suggest for cron job.

Thank you


In reply to Mohammad kabir

Re: Audio/video file info save in Database

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

For Red5 , flash streams the file as it is recorded to Red5. 

After that you need to:

i) convert the recorded file to mp3 or mp4 (it is flv by default)

ii) move the file into Moodle.

You can convert then move, but I think its best to move and then convert. Poodll works with FFMPEG so you can use that. Do you have that document? Its here on this forum somwhere.


I delete files from Red5 with cron every 60 minutes or so. So thats what I suggest you do too.


In reply to Justin Hunt

Re: Audio/video file info save in Database

by Mohammad kabir -

Hi Justing,

The things you mentioned i) and ii) is already done by poodll. I do not need to do anything. I am just finding out how easily I can get audio/video files from moodle. Because it's not easy.

Thank you.