PDA

View Full Version : Video clips in eE?


usva
19th of April 2005 (Tue), 06:56
I assume it is not possible to use eE for setting up an exhibition of video clips?

-juha.

Pekka
20th of April 2005 (Wed), 05:31
Everything is possible. Here's one scenario:

Because video files can not be resized by ImageMagick, you should upload an demo still image normally (for thumbs creation and database insertion), and then upload video files with same filenames (different extension) to size path, manually. Animated gif will work with EE, so that is one way to do "live" thumbnails.

So, you have video files in EE database stored with filename that ends with .jpg or .gif.

Next step is to make a viewerstyle which displays the video (changes filename extension to e.g. .mov and shows it).

To use the custom viewestyle: In photo php, you'll need a method which detects that this photo is a video and based on that in load the aforementioned viewerstyle. The method to deterimine if it is video or not could be

- by exhibition id: if exhibition id is X then load the specific viewerstyle (easy hack). E.g. in photo.php after


if ($s_flash_view == "1") {
if ($type_found == "0") $viewertype = "flash"; $type_found = "1";
}

add

if ($exhibition == "45") {
$viewertype = "quicktime";
}

and later there add into switch conditional:

case "quicktime":
include($toroot . "viewerstyles/VIEWERSTYLE_quicktime.php");
break
$viewermessage = "Quicktime viewer. Download latest QT plugin from here.";

Other way is by adding a new row (ee_photo_media_type) to photo table which tells media type, read it in photo page and determine viewerstyle from that. This will most likely be the method which will be coded into EE some day. In theory MIME type handling is the "right way" to do it but reading MIME type is not foolproof yet in php.

Making the viewerstyle itself needs some research. Do you have a specific video format in mind?

usva
21st of April 2005 (Thu), 01:23
Thanks for a quick reply Pekka. It seems one has to be careful about asking wild things here, as you are likely to answer the questions, and spend your precious time on topics like this ;)

Anyway, at this point I am only playing with an idea of a video gallery. This would bring various interesting implementation possibilities. I was thinking about this mainly from the perspective of my own equestrian galleries (for those interested see www.rosetail.com/gallery (http://www.rosetail.com/gallery)), but I can think of many other areas where this could be used.
I don't have any video formats in mind, but ideally the solution would allow viewing of clips through an embedded solution, ie without launching a "visible" Windows Media Player or QuickTime. So just like the photoexhibitions, with the only difference that the photo would be a clip. Perhaps there would be some basic controls, but even a solution with "auto-play when opened" would do. For my application the clips would most likely be 5-30 sec long. I'm a total beginner regarding the video formats, so I have no glue about what's possible.

Pekka, I'm definitely not planning to do this in the near future, so don't loose your sleep over this, and don't spend your time on finding solutions. But perhaps one day... :)

Pekka
21st of April 2005 (Thu), 04:03
Embedded video is of course how it will be done - Windows Media player and Quicktime both support embedding. One could also use iFrames (like messages in editor) for formats which do not support embedding.

I did some serious thinking about the custom viewerstyle issue, and what we will have in EE is that you may choose a different viewestyle for EACH selected size path for EACH photo. Size paths will have a "default viewerstyle" selection in path editor. So you could for example have for photo 999 a Java panorama view as size selection X and video clip of the location as Quicktime as size selection Y and same in Mpeg format as size Z.

ArtM
23rd of April 2005 (Sat), 01:35
My camera (Fuji 602Z) takes video clips in AVI;
and I would L-O-V-E to see this feature added to EE.

I think triggering a user selectable viewer from the file extension makes the most sense. I have Irfan Viewer with its Plugins set to play AVI files on my PC; as its small, innocuous & effective.

By the way, my camera ALSO records Audio Clips - in WAV format - which can be 'attached' to pictures. That is they have the same file name as the picture with a WAV extension. Again being able to specify a player for such a file extension is desirable.

So if one had a gallery with all the extension types within it, it would be nice to have a 'Default Player' for each file extension - user specified.

I think EE also must allow a different file name - than the main 'Picture/Video/Audio' - for the Thumbs & Microthumbs somehow.

- Art

jwoo
12th of June 2005 (Sun), 05:07
I would like to filter my video files using a group of exhibition that i called "Video", i think there is a way to get the ID of this group and then test the file, if it belongs to an exhibition from the Video group then i set $viewertype = "quicktime" , etc... as you explained earlier.
I don't think ee_exhibition_group_id or _name are used in photo.php and i don't feel like writing my own query to get it. Do you have an idea ?
Thanks

Julien
15th of February 2006 (Wed), 12:57
[UP]

I've reinstalled my linux server box, and as EE 2 is going to be released i prefer to wait for it instead of installing again EE 1.54.
During the server install process, i forgot to backup me video gallery main page.
Before doing it again, i would like to know if EE 2 will be able to accept video in galleries.
Please tell me yes :)

Pekka
15th of February 2006 (Wed), 13:22
[UP]

I've reinstalled my linux server box, and as EE 2 is going to be released i prefer to wait for it instead of installing again EE 1.54.
During the server install process, i forgot to backup me video gallery main page.
Before doing it again, i would like to know if EE 2 will be able to accept video in galleries.
Please tell me yes :)

Yes. The 2.0 viewerstyle system supports any known embedded media type with custom variables for each photo if needed. See http://photography-on-the.net/forum/showpost.php?p=619685&postcount=14 for editor example.

Video thumbnailing/upload is not there yet, so you basically add a photo using a thumbnail source image and when the gallery has the item, you upload the video with same filename (different extension) to correct size path. I'll try to provide an extra uploader form to photo editor for release version.

How to make new viewerstyles? Two steps: Add a new viewerstyle in editor, and make a template for the viewerstyle.

To make a template, first you need the html code which embeds the media. Then you replace all variables in it, that you want to alter in EE, with php variables of your choice (naming is free). With Windows Media File a viewerstyle template could be like


<?php
// EE WINDOWS MEDIA VIEWER
if (isset($photo)) {
?><object id="mediaPlayer"
width="<?php print $VAR_player_width; ?>"
height="<?php print $VAR_player_height; ?>"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject"
>
<param name="FileName" value="<?php print $url; ?>">
<param name="AnimationatStart" value="<?php print $VAR_animationatStart; ?>">
<param name="TransparentatStart" value="<?php print $VAR_transparentatStart; ?>">
<param name="AutoStart" value="<?php print $VAR_autoStart; ?>">
<param name="ShowControls" value="<?php print $VAR_showControls; ?>">
<param name="Loop" value="<?php print $VAR_loop; ?>">
<param name="ClickToPlay" value="<?php print $VAR_clicktoplay; ?>">
<param name="AutoRewind" value="<?php print $VAR_autorewind; ?>">
<param name="PlayCount" value="<?php print $VAR_playcount; ?>">
<embed
type="application/x-mplayer2"
pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
id="<?php print $VAR_id; ?>"
name="<?php print $VAR_name; ?>"
DisplaySize="<?php print $VAR_displaysize; ?>"
AutoSize="<?php print $VAR_autosize; ?>"
Bgcolor="<?php print $VAR_bgcolor; ?>"
ShowControls="<?php print $VAR_showControls; ?>"
ShowTracker="<?php print $VAR_showtracker; ?>"
ShowDisplay="<?php print $VAR_showdisplay; ?>"
ShowStatusbar="<?php print $VAR_showstatusbar; ?>"
Videoborder3d="<?php print $VAR_videoborder3d; ?>"
width="<?php print $VAR_player_width; ?>"
height="<?php print $VAR_player_height; ?>"
Autostart="<?php print $VAR_autoStart; ?>"
Loop="<?php print $VAR_loop; ?>"
PlayCount="<?php print $VAR_playcount; ?>"
AutoRewind="<?php print $VAR_autorewind; ?>"
src="<?php print $url; ?>"
>
</embed>
</object><?php
}
?>

After you have set the template up you know what the variable names are you want to use, so you add them to respective viewerstyle. That's it. Now you can set up default values, and alter any individual photo's variables if needed.

Julien
16th of February 2006 (Thu), 12:13
Great!!
So i think i'm going to just wait for EE 2. Moreover i saw that i would be able to import my EE 1.5 database, what more could i ask ;)