The file included has been tested on 1.5.2+ and 1.6
It will overwrite your old mediplugin filter, so as always, a backup is recommended

Good to see someone has worked on this!
I have a couple of questions that I think are worth discussing and hopefully that someone with more legal knowledge than me can answer.
I notice you didn't include a .fla file for the .swf
I'm not sure exactly how GPL licensing works but if you don't include the .fla so someone can recompile this does this mean that it can't be distributed under the GPL as part of Moodle?
I was looking for the fla to see if you had used any Macromedia components or had developed your own UI without using MM components. I guess if we do this with MM components again we can't distribute this under the GPL??
Probably your intention for now is not to release anything under the GPL anyway.
Jamie
I just wonder about how or if we can include things like this in Moodle.
Re: Congrats; Question about open source distributions
Basically everything in Moodle has to be under a Open Source license to be included (and this component currently isn't, it's Creative Commons). The problem is that he allows non-commercial use only, and Moodle has no such restriction.
I've put it in HEAD for now (including fla source) on the assumption he'll say yes because he seems like a nice guy
Re: Congrats; Question about open source distributions
This code is suprisingly simple to replicate (in fact it is now a standard flash component). I have ordered Flash 8 and will have our own custom built version ready to post within the week.
Re: Congrats; Question about open source distributions
This page lists GNU GPL compatible licenses :
http://www.gnu.org/philosophy/license-list.html
It is my understanding that it is OK to combine GPL code with code licensed under a GPL compatible license. But it is a problem to combine code released under many other OS licenses, problematic licenses are also listed in the the page above.
Re: Congrats; Question about open source distributions
Thanks very much Jamie
I am having a look at some of thelicences for my textbook.
I rather like the look of the non-GPL approved
The reciprocal licence http://www.opensource.org/licenses/rpl.php
when it comes to text for the reasons I have outlined on the exchange.
Tim
Re: Congrats; Question about open source distributions
Of course for content you don't have to worry about GPL compatibility.
Jamie
Re: Congrats; Question about open source distributions
Did some searching on sourceforge and found this project.
http://sourceforge.net/projects/flowplayer
I really know nothing about legal standings in this area as I am a very new coder . So my understanding is that by listing on sourceforge we can use his code under the GPL license? The license he has on his site is just a copy of the apache license for some reason.
I have repackaged the download link above with the new code and the new player from this project. Not as swish looking, but that is easy to fix.
Is this assesment correct? Will this create less issues?
Re: Congrats; Question about open source distributions
Kris
Re: Congrats; Question about open source distributions
hi Martin,
thanks for the interest ! i''m ok with you using the flvplayer on the GPL terms for Moodle.
note that i will be releasing an update of the flvplayer when the Flash 8 Player penetration will be about 80%. new features will be a download file button and (maybe) a playlist ..
best wishes,
jeroen
I have installed the new plugin filter but I cannot play any flv files with it. It opens up like expected, but always stays on loading, see attached.
I have downlaoded flash player 8, but that did not fix the problem. What am I doing wrong?
Thanks,
Patrick

if ($CFG->filter_mediaplugin_enable_flv) {
$search = '/<a(.*?)href=\"([^<]+)\.flv\"([^>]*)>(.*?)<\/a>/is';
$replace = '\0<br /><br /><object class="mediaplugin flv" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
$replace .= ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
$replace .= ' width="320" height="240" id="flvplayer">';
$replace .= " <param name=\"movie\" value=\"$CFG->wwwroot/filter/mediaplugin/flvplayer.swf?file=\2.flv&autoStart=false&bufferLength=5\" ";
$replace .= ' <param name="quality" value="high" />';
$replace .= ' <param name="bgcolor" value="#FFFFFF" />';
$replace .= " <param name=\"flashvars\" value=\"\2.flv&autoPlay=true&bufferLength=5\" ";
$replace .= "\n<embed src=\"$CFG->wwwroot/filter/mediaplugin/flvplayer.swf?file=\2.flv&autoStart=false&bufferLength=5\" ";
$replace .= " quality=\"high\" bgcolor=\"#FFFFFF\" width=\"320\" height=\"240\" name=\"flvplayer\" ";
$replace .= ' type="application/x-shockwave-flash" ';
$replace .= '</embed>';
$replace .= '</object><br /><br />';
$text = preg_replace($search, $replace, $text);
}
Thanks
I'm using an SWF file with two linked FLV files using the Lesson Module.
The only thing I've found that works to date is using the <iframe> tag.
This is less than an ideal solution - but one that works.
If you found a solution outside of this forum, would you mind posting it?
Regards
Mike
I found that inserting the FLV directly into an html page with Dreamweaver worked (Insert > Media > Flash Video) this creates a 'FLVPlayer_Progressive.swf'
I never was able to insert a swf created by me that contained a flv and have it run successfully in an html page (the swf would run but not the embedded flv)
However I did get it to work if I packaged it as a SCORM using the Reload SCORM editor, but I did have to manually specify the dependency between the html, swf and flv. I didn't make any changes to the media plugin filters in moodle.
If you have Dreamweaver 8 try inserting the flv into a html page and putting that into your lesson. If you have an older version of Dreamweaver I believe you can download the FLV extension from the Macromedia/Adobe exchange.
Not sure if this will help you as I've not tried the lesson activity but may be worth a go.
All the best,
Ian
filterconfig.html
defaultsettings.php
I haven't found them anywhere in the moodle installation.
Has anyone who has made this work tell me what you did with these files and any mods you made to Julian's contribution? thanks.
BTW, I have studio 8 with flash 8 video encoder and it works well at making .flv files, but it doesn't allow .swf creation, nor does it compress video files as well as several other 3rd party products.
I added a param to the filter thus
if ($CFG->filter_mediaplugin_enable_flv) {
$search = '/<a(.*?)href=\"([^<]+)\.flv\"([^>]*)>(.*?)<\/a>/is';
$replace = '\\0 <object class="mediaplugin flv" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
$replace .= ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
$replace .= ' width="180" height="120" id="flvplayer">';
$replace .= " <param name=\"movie\" value=\"$CFG->wwwroot/filter/mediaplugin/flvplayer.swf?file=\\2.flv\" />";
$replace .= ' <param name="quality" value="high" />';
$replace .= ' <param name="bgcolor" value="#FFFFFF" />';
$replace .= ' <param name="flashvars" value="'.$c.'" />';
$replace .= ' <param name="autoPlay" value="false" />';
$replace .= " <embed src=\"$CFG->wwwroot/filter/mediaplugin/flvplayer.swf?file=\\2.flv\" ";
$replace .= " quality=\"high\" bgcolor=\"#FFFFFF\" width=\"180\" height=\"120\" name=\"flvplayer\" ";
$replace .= ' type="application/x-shockwave-flash" ';
$replace .= ' flashvars="'.$c.'" ';
$replace .= ' pluginspage="http://www.macromedia.com/go/getflashplayer">';
$replace .= '</embed>';
$replace .= '</object> ';
$text = preg_replace($search, $replace, $text);
}
and I added a parameter to the theme's config.sys
$THEME->resource_mp3player_colors =
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=no';
/// With this you can control the colours of the "big" MP3 player
/// that is used for MP3 resources.
$THEME->filter_mediaplugin_colors =
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
'waitForPlay=yes&autoPlay=no';
Re: FLV files now aded to mediaplugin filter - can't upload flv
I'm trying to use flv videos in Moodle, Therefore, I installed the new filter. But somehow I can't even upload my flv's... I converted avi to flv using the Riva encoder. The flv as such seems to be oK, at least I can look at it using Riva's own flv player. But whenever I try to upload the file into Moodle it says that the file doesn't contain data...
Does anyone have a clue what might be wrong here? Is it a problem of the filter or sth. else?
Thanks,
Uwe
Re: FLV files now aded to mediaplugin filter - can't upload flv
I've been able to upload the files now from home. The first attempts were made from work, perhaps some network settings, proxy etc prevented me from uploading the file there.
However, somehow I feel I haven't activated the filter correctly, because I can't get the flv played within Moodle.
What I did was just to ftp all the files into the filter /multimedia folder within Moodle, thus overwriting the old multimedia filter. The multimedia filter is activated in the configuration, of course.
I desperately tried anything that could help, and found a line in the file filter.php saying
to activate this filter, add a line like this to your list of filters in your Filter configuration: filter/mediaplugin/filter.php
Perhaps I'm just a bit thick here, but I can't find a way to do this. In the filter configuration I just can activate the multimedia filter - and that's about it. What can I do here? Any help is greatly appreciated.
Uwe
Re: FLV files now aded to mediaplugin filter - can't upload flv
Uploading is also fine here.
Have you re-encoded?
Is moodle uploading files fine? HAve you checked the file size before and after uploading?
I suppose we can tke it from there.
Re: FLV files now aded to mediaplugin filter - can't upload flv
thanks for the response. As I wrote in the last post, I've been able to upload the files. But now I just can't get them played inline. Whatever I do, Moodle just offers me a download and just won't play the video...
Could you perhaps have a look at the last post (the one that came immediately before your answer), maybe you can figure out what I've been going wrong? I'd just love to have this functionality. In my tests, flv is almost always half the size of swf, swf sometimes is even larger than avi.
Thanks,
Uwe
I'm having a problem with .flv files as well.
I upload them to moodle, add them as a resource on a course, but when they clicked on the .flv file isn't played - it asks to be downloaded to the host PC.
I've tried various flv files, and different versions of the mediaplugin but to no avail. Is there specific settings that they need to be created with to allow them to be played within moodle??
SWF and MP3 work fine!
Any help is greatfully received
Daniel
The Piggott School
I can upload an .flv file fine, but rather than streaming, I get a download dialog on attempting to open it.
Quicktime movies and .mp3's stream just fine in their players.
anyone able to help out w this?
thanks,
will
- & to others having this problem:
Don't link to the .flv file (as link to a file or web page) - rather, embed it in a page (web page, lesson, &c. - type a couple of spaces, highlight these, click the "link" icon in the text editor, and insert the URL of the .flv file - obtain the URL using a right-click "copy link location" of the uploaded file, from the page's file directory). It won't show up in the editor, but will display when saved.
Works like a charm.
& see this thread
http://moodle.org/mod/forum/discuss.php?d=63835
re customizing the .flv player.
I had a problem with the timeline not progressing and also being unable to jump to a particular section in the video. This was apparently a problem with the video not having "time metadata" embedded. I found the program FLV Metadata Injector http://www.buraks.com/flvmdi/ here that fixed the problem for me.
another way, is to do the conversion to .flv, VP6 (I author in QuickTime on the Mac, and convert to .flv), using On2 FLIX standard ($35 download; http://on2.com);
or for a hefty $200, you can get the On2 plugin to permit QuickTime Pro or other QuickTime compatible applications to export directly to .flv format, skipping the extra step of conversion.
This is my first time adding to the moodle forums, so I hope that this may help (if not already answered above?).
A very simple way of streaming an flv in a moodle page is to treat it as any other webpage and simply create a "href" tag into a HTML block that can be displayed on the moodle page itself.
Something this should to the job: (very simple HTML href further customisation, such as Quality, Dimensions should be easily added
A similar tag can be used to stream mp3's
