FLV files now aded to mediaplugin filter

FLV files now aded to mediaplugin filter

by Julian Ridden -
Number of replies: 29
I have now added a flash player to allow for the embedding and playing of Flash Video Files (.flv). With the release of Flas h 8 this video type is being used more and more due to it's low file size.

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

Attachment screencap2.jpg
Average of ratings: -
In reply to Julian Ridden

Re: FLV files now aded to mediaplugin filter

by Julian Ridden -
Sorry, file was too large to attatch. Download by clicking here
In reply to Julian Ridden

Congrats; Question about open source distributions

by Jamie Pratt -
Hi,

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

In reply to Jamie Pratt

Re: Congrats; Question about open source distributions

by Jamie Pratt -
Just so as not to confuse anyone thinking of using this : I'm not suggesting there is any problem using these on your site! even though it may not be released under a GPL.

I just wonder about how or if we can include things like this in Moodle.


In reply to Jamie Pratt

Re: Congrats; Question about open source distributions

by Martin Dougiamas -
Immàgine de Core developers Immàgine de Documentation writers Immàgine de Moodle HQ Immàgine de Particularly helpful Moodlers Immàgine de Plugin developers Immàgine de Testers
An hour ago I sent a mail to the original developer asking him for permission to distribute his code in Moodle under the GPL, as I do for other components that we include.

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 smile but we'll have to find an alternative if he says no.
In reply to Martin Dougiamas

Re: Congrats; Question about open source distributions

by Julian Ridden -

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.

Average of ratings:Useful (1)
In reply to Martin Dougiamas

Re: Congrats; Question about open source distributions

by Jamie Pratt -
Basically everything in Moodle has to be under a Open Source license to be included

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.
In reply to Jamie Pratt

Re: Congrats; Question about open source distributions

by Timothy Takemoto -

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

In reply to Timothy Takemoto

Re: Congrats; Question about open source distributions

by Jamie Pratt -
Hi Tim,

Of course for content you don't have to worry about GPL compatibility.

Jamie
In reply to Martin Dougiamas

Re: Congrats; Question about open source distributions

by Julian Ridden -

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 smile . 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?

In reply to Martin Dougiamas

Re: Congrats; Question about open source distributions

by Martin Dougiamas -
Immàgine de Core developers Immàgine de Documentation writers Immàgine de Moodle HQ Immàgine de Particularly helpful Moodlers Immàgine de Plugin developers Immàgine de Testers
Good news, Jeroen said we can include it in Moodle under a GPL license.  Told you he sounded like a nice guy!  big grin

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
In reply to Julian Ridden

Re: FLV files now aded to mediaplugin filter

by marcelo vazquez -
I keep getting a error Module "FLV_filter" is not readable - check permissions  I have 777 permission for the entire folder.  Do you have any suggestions?
In reply to Julian Ridden

Re: FLV files now aded to mediaplugin filter

by Patrick Jeitler -

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

Attachment flvplugin.jpg
In reply to Patrick Jeitler

Re: FLV files now aded to mediaplugin filter

by Jacques Thielens -
With this code , work fine for me ( change width, height and bgcolor if you want...)


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);
}
In reply to Patrick Jeitler

Re: FLV files now aded to mediaplugin filter

by Ian Sheeler -
I can't offer any help with this I'm afraid, but I'm desperate to find a solution too.  My swf with an embedded flv file works as long as I don't put it the swf in an html page.  This only happens on moodle and with both IE6 and Firefox.  Has anyone found any solution that lets you keep the swf in an html page (in my case as part of a SCORM package)?

Thanks
In reply to Ian Sheeler

Re: FLV files now aded to mediaplugin filter

by mike cockburn -
Hi Ian,
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
In reply to mike cockburn

Re: FLV files now aded to mediaplugin filter

by Ian Sheeler -
Hi 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
In reply to Julian Ridden

Re: FLV files now aded to mediaplugin filter

by Mark Schultz -
I've downloaded the zip file and am unable to make this work. What are these files for?

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.
In reply to Mark Schultz

Re: FLV files now aded to mediaplugin filter

by Mark Schultz -
oops I found a version of the filter in the downlaods that works. I am having trouble keeping it from autoplaying however. any ideas?

I added a param to the filter thus

    if ($CFG->filter_mediaplugin_enable_flv) {
        $search = '/<a(.*?)href=\"([^<]+)\.flv\"([^>]*)>(.*?)<\/a>/is';
           
        $replace  = '\\0&nbsp;<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>&nbsp;';
   
        $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';

In reply to Julian Ridden

Re: FLV files now aded to mediaplugin filter - can't upload flv

by Uwe Klemm -
Hi there,

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
In reply to Uwe Klemm

Re: FLV files now aded to mediaplugin filter - can't upload flv

by Uwe Klemm -
Oops -

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
In reply to Uwe Klemm

Re: FLV files now aded to mediaplugin filter - can't upload flv

by Julian Ridden -
My immediate response is "Something else" . I too use Riva to create my FLV's and have had no issues.

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.
In reply to Julian Ridden

Re: FLV files now aded to mediaplugin filter - can't upload flv

by Uwe Klemm -
Hi Julian-

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
In reply to Uwe Klemm

Can't Play FLV Files

by daniel rose -
Hi

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
In reply to daniel rose

Re: Can't Play FLV Files

by Will Taylor -
I'm having the same difficulty as Daniel, above - a Moodle 1.6.1 installation, with most recent mediaplugin filter, does include the flvplayer.swf file.  Properly installed & configured to accept all file types, including .flv, in the filter settings dialog.

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
In reply to Will Taylor

Re: Can't Play FLV Files

by Will Taylor -
To myself in the past ;^)
- & 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.
Average of ratings:Useful (1)
In reply to Will Taylor

Re: Can't Play FLV Files

by Mat Cannings -
The above post seems to be the way to embed flv's.

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.
In reply to Mat Cannings

Re: Can't Play FLV Files

by Will Taylor -
This will do it;
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.
In reply to Will Taylor

Re: Can't Play FLV Files

by Simon Sproat -

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

Attachment FLVpic.png