ndunand / moodle-filter_html5avtomp4

Moodle HTML5 audio/video to MP4 filter
https://moodle.org/plugins/filter_html5avtomp4
GNU General Public License v3.0
3 stars 8 forks source link

What happens to the original files after converting? #3

Closed Tottebee closed 3 years ago

Tottebee commented 4 years ago

Hi there, I'm just testing this filter and it works well - thanks! We have a lot of video files on our servers and it would be really helpful to know what happens with the ogg or Webm Files after converting them to mp3/mp4. do they still remain in moodledata or will they replaced by the new files? Thanks Thorsten

ndunand commented 4 years ago

Hi Thorsten, Thanks for your feedback. The original files are left untouched, the mp4 files are only added as an alternate source for the video/audio element.

Tottebee commented 4 years ago

Hi, thanks for your quick answer. The redundancy of the files is a big problem because videos are normally the biggest files. Is there a possibilitiy for you to program a cleaning function in the filter to delete the old files? Another question: When there are already videos in the course. Are they also converted? Or do the filter just search for new ones? Thanks in advance Thorsten

Tottebee commented 4 years ago

Hello, back to my former question. I'm working for the State of Baden Wuerttemberg in Germany.So if you need to payed for the development, please make an offer for your work. It would be really helpful to have the delete function included for proper data keeping. regards Thorsten

ndunand commented 4 years ago

Hello Thorsten,

Sorry for not replying earlier. Money is not the issue, but we're short on time and staff.

However I consider this an interesting feature, so if you would find someone to code it I would gladly consider a code contribution implementing this.

To get somebody started on, this, off the top of my hat here's what could be done:

  1. add something like $inputfile->delete() after https://github.com/ndunand/moodle-filter_html5avtomp4/blob/master/locallib.php#L174
  2. review the logic in https://github.com/ndunand/moodle-filter_html5avtomp4/blob/master/filter.php#L142 , as filtering would break if the original input file is not found.

Cheers, Nicolas

ndunand commented 3 years ago

merging and about to release new version including this feature, see #5