Kaltura Player Plugin

941 views
Skip to first unread message

njenney

unread,
Jan 3, 2012, 12:01:00 PM1/3/12
to resour...@googlegroups.com
I may be jumping the gun here but I am getting this error when attempting to activate the plugin. Running latest. Thanks.
Sorry, an error has occurred.

Please go back and try something else.

You can check your installation configuration.


/home/site/public_html/rs/include/db.php line 193: Cannot modify header information - headers already sent by (output started at /home/site/public_html/rs/plugins/kalturaplayer/hooks/all.php:64)


Fatal error: Call to undefined function send_mail() in /home/site/public_html/rs/include/db.php on line 44

Tom Gleason

unread,
Jan 3, 2012, 12:56:33 PM1/3/12
to resour...@googlegroups.com
Hi Neal,

The kalturaplayer plugin simply uses the kaltura html5/flash fallback player instead of the standard 'flv' player, and this is our first open-source venture into supporting html5 video with multiple sources in the base code. 

This player falls back to flash if necessary (on Opera I see this happens), and otherwise uses html5 video tags for previews of mp4 or webm. There are some advantages but also some disadvantages based on kaltura player's (or HTML5) limitations. But, since this development has been generously open-sourced by Capgemini, I think we'll soon be learning a lot more about how to better support html5 players with the help and experimentation of the community. 

try 3137, please. This contains the kaltura plugin and the base code modifications to support multiple preview video types.
The way to make this work is to set the standard ffmpeg_preview_extension to mp4, like so:

$ffmpeg_preview=true; 
$ffmpeg_preview_extension="mp4";
$ffmpeg_preview_options=" -vpre libx264-ipod320 -acodec libfaac -ab 128k -ar 48000 -ac 1 -threads 0  -vf setsar=1 "; 
// this can be improved, probably, but must be encoding into x264

You will need to recreate previews to produce these files. Mp4's will play in both the kaltura player and the standard 'flv' player.

For the webm, you'll set up an ffmpeg_alternatives entry where the ['alt_preview'] index == true. This will store the name of the webm file in the resource table, so that it can be retrieved without additional queries (for example in x-large Search previews). The kalturaplayer plugin will then supply both mp4 and webm sources, and the correct file will play depending on the browser. The embedvideo plugin has also been modified to include the multiple sources and kaltura player.

 $ffmpeg_alternatives[0]["filename"]="WebM";
 $ffmpeg_alternatives[0]["name"]="WebM";
 $ffmpeg_alternatives[0]["extension"]="webm";
 $ffmpeg_alternatives[0]["params"]=" -threads 8 -vpre libvpx-360p -acodec libvorbis -aq 2 -f webm -y ";  // this also may be improved. I've found webm encoding to be particularly slow and the filesize is larger than I'd like still. 
 $ffmpeg_alternatives[0]["lines_min"]=1;
 $ffmpeg_alternatives[0]["alt_preview"]=true;

So, please test that and let me know if you have any problems. You may run in to several. First, I had to compile ffmpeg according to this:
or otherwise add the encoders needed. Second, I've removed the source-switching, embed options (handled by the videoembed plugin), and fullscreen from the kaltura player. I removed the source-switching because this should be automatic, but also offers the ability to select the wrong file type for a browser, and once switched, didn't seem to update the video type label accordingly. I removed the fullscreen option because since it is not supported correctly on all browsers (details in the links below). But, for browsers that do support fullscreen well (like Firefox), a right-click->Full Screen and ESC to exit does the trick. 

I had to include the source code of the kaltura player and comment items out manually to accomplish the omissions, unfortunately, since these don't seem to be options in the CDN version (which would have been preferable, since it would be automatically updated).  

A couple of the kaltura.org threads I've started to investigate issues encountered:


--
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To view this discussion on the web visit https://groups.google.com/d/msg/resourcespace/-/BQtF4zTobNoJ.
To post to this group, send email to resour...@googlegroups.com.
To unsubscribe from this group, send email to resourcespac...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/resourcespace?hl=en.



--
Tom Gleason
Vice President, Engineering
Colorhythm LLC
http://www.colorhythm.com

Main Office:  +1 415-399-9921
Fax: +1 253-399-9928
Mobile:  +1 347-537-8465

tgle...@colorhythm.com

njenney

unread,
Jan 3, 2012, 1:18:20 PM1/3/12
to resour...@googlegroups.com
Thanks for the detailed explanation Tom. I am going to give it a whirl and report back my results.

njenney

unread,
Jan 3, 2012, 1:42:05 PM1/3/12
to resour...@googlegroups.com
3137 resolved my error thanks. I activated the plugin and uploaded a new mp4. When I view the resource I see the player and preview looks good with the play button. However when I click play the player goes blank and the status reads 'seeking' but nothing happens. I may need to recompile like you said.

Tom Gleason

unread,
Jan 3, 2012, 2:00:21 PM1/3/12
to resour...@googlegroups.com
Yes, it's likely that you don't have the encoders. 
Add an echo of the ffmpeg command so that you can run it on the command line and debug. 

around lines 125 (for the standard preview) and 193(for alternative previews) in ffmpeg_processing.php :

+ echo $shell_exec_cmd;
$output=run_command($shell_exec_cmd);

On Tue, Jan 3, 2012 at 1:42 PM, njenney <nje...@gmail.com> wrote:
3137 resolved my error thanks. I activated the plugin and uploaded a new mp4. When I view the resource I see the player and preview looks good with the play button. However when I click play the player goes blank and the status reads 'seeking' but nothing happens. I may need to recompile like you said.

--
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To view this discussion on the web visit https://groups.google.com/d/msg/resourcespace/-/8PN01tQNcsAJ.

To post to this group, send email to resour...@googlegroups.com.
To unsubscribe from this group, send email to resourcespac...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/resourcespace?hl=en.

Andy Wodfer

unread,
Mar 7, 2012, 7:25:05 AM3/7/12
to resour...@googlegroups.com
Where do I find the Kalturaplayer plugin?

/Andy

Tom Gleason

unread,
Mar 7, 2012, 12:45:32 PM3/7/12
to resour...@googlegroups.com
That player has a lot of issues, and we're using VideoJS instead.

it's in http://svn.montala.net/websvn/listing.php?repname=ResourceSpace+Plugins
you can check it out by doing:
cd to your plugins directory
svn co http://svn.montala.net/svn/resourcespace-plugins/videojs

There is a wiki page about how to set it up:
http://wiki.resourcespace.org/index.php/Videojs

Tom

Andy Wodfer

unread,
Mar 8, 2012, 4:55:03 AM3/8/12
to resour...@googlegroups.com
Thanks for your reply Tom. Much appreciated work you're doing. I tried the VideoJS, but I can't get it to work. 

I use the latest SVN from both RS and VideoJS. I even copied and pasted the config.php ffmpeg settings needed (from the Wiki), the file I upload gets encoded MP4 and WEBM (all is fine with the files), but I don't get any new player, just an empty frame without anything.


# Create a preview video for ffmpeg compatible files? A FLV (Flash Video) file will automatically be produced for supported file types (most video types - AVI, MOV, MPEG etc.)

$ffmpeg_preview=true;
$ffmpeg_preview_seconds=180; # how many seconds to preview
$ffmpeg_preview_extension="mp4";
$ffmpeg_preview_min_width=32;
$ffmpeg_preview_min_height=18;
$ffmpeg_preview_max_width=480;
$ffmpeg_preview_max_height=270;

$ffmpeg_alternatives[0]["filename"]="WebM";
$ffmpeg_alternatives[0]["name"]="WebM";
$ffmpeg_alternatives[0]["extension"]="webm";
$ffmpeg_alternatives[0]["params"]=" -threads 8 -vpre libvpx-360p -acodec libvorbis -aq 6 -f webm -y ";
$ffmpeg_alternatives[0]["lines_min"]=21;
$ffmpeg_alternatives[0]["alt_preview"]=true;

$ffmpeg_alternatives[1]["filename"]="mp4";
$ffmpeg_alternatives[1]["name"]="mp4";
$ffmpeg_alternatives[1]["extension"]="mp4";
$ffmpeg_alternatives[1]["params"]=" -vpre libx264-ipod640 -acodec libfaac -ab 128k -ar 48000 -ac 1 -threads 0  -vf setsar=1 ";
$ffmpeg_alternatives[1]["lines_min"]=21;
$ffmpeg_alternatives[1]["alt_preview"]=true;
k -ab 32 -ac 1";
$ffmpeg_preview_options="-vpre libx264-ipod640 -acodec libfaac -ab 128k -ar 48000 -ac 1 -threads 0 -vf setsar=1 ";
# If uploaded file is FLV, should we transcode it anyway?
$ffmpeg_preview_force=false;

# Encode preview asynchronous?
$ffmpeg_preview_async=false;

# Find out and obey the Pixel Aspect Ratio
$ffmpeg_get_par=true;

Any idea?

/Andy

Andy Wodfer

unread,
Mar 8, 2012, 5:58:36 AM3/8/12
to resour...@googlegroups.com
And WEBM encoding takes forever ... crunching @ 3fps :-)

Btw, Prores encoding/decoding works fine. I'm running ffmpeg 0.10 here.

/Andy

Tom Gleason

unread,
Mar 8, 2012, 4:39:11 PM3/8/12
to resour...@googlegroups.com
This stuff is really complicated, now that we have browsers that only
support certain formats, certain specifications of these formats, etc,
and don't support the plugins like Flash which used to make this very
simple.
My current recommendation would be to switch to mp4 instead of flv,
and that's one solid step forward because it can play in the few
browsers that do not support flash.

Most video-centric sites still prefer flash and fall forward to html5
only when necessary, because HTML5 video is still problematic. These
player libraries are very forward thinking, knowing that Flash support
is ending and that they will have to really get HTML5 support right.
but I'm starting to think that we need to continue looking for a good
open source fall-forward solution for now.

Yes, Webm encoding with ffmpeg is especially slow in my experience too.

Also, the whole point of ffmpeg alternative preview files was to use
webm when mp4 doesnt work, but for some reason the mp4 is playing in
all my tests (even in Chrome where it's not supposed to be supported,
but apparently still is). Kaltura player did force webm in chrome, I
believe, but there were all kinds of fullscreening issues. And some
fullscreening issues still exist with VideoJS because of our frame
setup. Flash, of course, doesn't have the fullscreening issues of
HTML5.

Another note:
$ffmpeg_preview_force=true; is a better option if any of your source
movies are mp4.
None of the transcoding is done if the source is the
$ffmpeg_preview_extension type.
But, if the source is mp4, you can end up with two mp4 transcodes, and
the original. Since IOS only accepts a certain spec (i think), I think
we do have to transcode mp4s, but the base code still needs to check
that it's not building a second one in this case.

I just added a config to allow you to switch whether to test with the
CDN or with the included library. Using the CDN is problematic for me
since it's not SSL, so browsers complain about insecure content.

But anyway, the point is there are about 20 curveballs here, and flash
is still very hard to beat. I wonder if we got back to basics, avoided
a heavy library and just tried to fall forward for IOS, maybe there
would be more efficient progress.

Tom Gleason

unread,
Mar 8, 2012, 4:43:32 PM3/8/12
to resour...@googlegroups.com
Oh, but back to my original thought...
I'm not sure why the plugin isn't working for you. It does work well
on ipad, and on all browsers (with some fullscreening issues on the
frontend for some browsers, and some transcoding efficiency issues on
the backend).

Andy Wodfer

unread,
Mar 13, 2012, 9:38:39 AM3/13/12
to resour...@googlegroups.com
Sorry for my late reply..

How about using Flowplayer like the Collective Access project does? It works on iOS devices and can be upgraded to a pro version if the user (admin) wants more functionality than the open source version offers.

Best,
Andy

Sendt fra min iPad

Jeff Harmon

unread,
Mar 13, 2012, 4:58:49 PM3/13/12
to resour...@googlegroups.com
Prismpoint Portal, our commercial DAM based on ResourceSpace, uses Flowplayer, and we'd open source it with funding.  Perhaps if enough folks are interested, we could reach the critical mass needed.

Best,
Jeff

--
Jeff Harmon
Chief Executive Officer

Colorhythm LLC
http://www.colorhythm.com

Main Office:  +1 415-399-9921
Fax: +1 253-399-9928
Mobile:  +1 510-710-9590

jha...@colorhythm.com

mrpatulski

unread,
Mar 14, 2012, 9:34:06 AM3/14/12
to resour...@googlegroups.com
Hello everyone, 
Thanks for the interest in an HTML5 video solution. Capgemini hired Tom to develop an encoding and playback solution for this purpose. Initially we considered Kaltura since we are using elsewhere in our internal workflow, Kaltura as a very robust solution that is truly open source with a commercial service component to support it. It was not the right fit for ResourceSpace. I have asked Tom to remove the Plugin from the repository to avoid any further confusion.

We decided to replace it with VideoJS, another well supported GPL player that is being developed with open standards in mind. It's well regarded as a solution

You can see a great comparison of other solutions here:

VideoJS is not perfect but then HTML5 is fully mature either. See this article form Ars Technica from yesterday:

All that said, this batch of work from Tom gets Capgemini where it needs to go with our needs and allows us to contribute back to the ResourceSpace community with developer dollars and open source code. Because of Tom's work on this project, RS can now produce the video formats for HTML5 browsers, tablet and mobile with code for videoJS to sniff them out. Conceivably anyone can bring another player to the table based on this work as a plugin.

Today or tomorrow I will start a videoJS plugin thread--looking forward to feedback form the community.

CHeers,
Matthew Patulski
Capgemini/ Group Marketing eTeam

Reply all
Reply to author
Forward
0 new messages