new version of the embedded movie mod

floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2004-12-08 22:33

Update for 1.5.1: http://langleycom.com/gallery_download/1.5.1movie_mod.zip

New features in this mod will include:

    Support for Real (.ra) files. Quick time (.mov) Flash (.swf). mpg & mpeg files as well as others.
    Automatic resizing of the movie. PHP will atomically set the height and width of the file and propagate the fields in the <embed> and <object> tags. Your movies don't have to be the same size.
    Movie is centered in both IE and FireFox. Unlike the current version where FireFox does not center the movie properly.
    A link to the movie file is provided if the browser does not have the correct player/plugin.
    The thumbs and embedded movies now support frames.
Quote:
view_movie_properties.php -> similar to vew_photo_properties.php --shows the properties of the movie or audio file.
view_album.php -> replacement so that view_photo.php will be called for movies
view_photo.php -> replacement so that movies will include:
/layout/embedded_movie.inc -> detection of movie size, mime type and returning the correct <embed> on <object> tags for each movie type.
/layout/movie_properties.inc the file used to display the movie properties under the thumb (optional) or in the movie properties popup.
/html_wrap/inline_movie.frame.default -> the wrapping of the movie: Customize this for your requirements . Includes the [dowload movie], [movie properties] & [Launch in external player] links under the movie and frame.
/html_wrap/inline_moviethumb.frame.default -> the wrapping of the movie thumb in view_album.php to show the length of movie and file size (above thumb) and [movie properties] link under thumb. Customize this for your requirements.
/classes/getid3/getid3.php -> The php file that extracts the various properties of a file. Other files are required in this directory are required for extracting the info from various file types.
/classes/getid3/helperapps -> This directory should contain binaries of various helper applications that getID3() depends on to handle some file formats under Windows. (i don't have a windows server so can't make any comments)
download.php -> The file that alows movies to be downloaded and not played in internal/external player.

I will provide files for 1.5(soon to be released).

What features/improvements would you like to see in the embedded movie mod that are not conerd here?
Feel free to leave feedback on this forum or in the comments of my test site.

If you feel there is a movie format that I am missing or a size that you would like me to test send me the file and I will add it to the site and see if I can get it to work properly. I will try to address concerns you might have.

As usual, you can download the embedded movie mod

additional notes from development work:
If using real files; verify the the default size in /layout/embedded_movie.inc

   $video_width = 320; // default 
   $video_height = 250; // default

Now you can scale your movies if they are over a certain size. In /layout/embedded_movie.inc You will see

	// make movie smaller if bigger than 600 wide shrink the movie by 65%
	// set the 2 values below to your situation
		$video_width_resized = 600;
		$video_shrink = 0.65;
		if ($video_width > $video_width_resized) {
	        	$video_width = round($video_width * $video_shrink);
	        	$video_height = round($video_height * $video_shrink);
	        	$video_is_resized = true;
		}

If the movie is over 600px wide it will be scaled back 65%. These values can be adjusted to your site and design.
Example: If the original movie is 720 X 480 it will be embedded at 468 X 362 . . . 312movie height+50controller (dependent on mime type) = 362
If the movie is scaled then a note is added under the movie "This movie has been resized to fit screen" edit to your tastes.

Movie properties are in /layout/movie_properties.inc it can now be called from inline_moviethumb.frame.default but you must un-comment it to show under the thumbnail.

	// just remove the two slashes to have the movie propeties under the thumb
	// include (dirname(dirname(__FILE__)) . '/layout/movie_properties.inc');
	// format the table with the movie css class

Formatting of the table is done with a new css class .movie ,
Formatting of the movie parameters is done with a new css class movieP
Formatting of the movie data is done with a new css class movieD
So... you will have to add this to your css if you plan on using it on the thumbnail page. (remember the default for properties under the thumb is off) Example showing: properties under thumb.[/]

I have removed some of the posts that have either been fixed or not on topic. This thread was getting very long and most of it was a discussion on the early development of this mod.[/]

[/]

[/]

[/]

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2004-12-25 08:15

Ok i had some time to package the new mod. Embeded movie mod.
The forum has a 256K limit for attachments. :(
Extract the files and place on the server. Keep the directory structure. Keep a backup of view_albums.php and view_photo.php all the rest are new files.

Contents:
view_movie_properties.php -> similar to vew_photo_properties.php --shows the properties of the movie or audio file.
view_album.php -> replacement so that view_photo.php will be called for movies
view_photo.php -> replacement so that movies will include:
/layout/embedded_movie.inc -> detection of movie size, mime type and returning the correct <embed> on <object> tags for each movie type.
/html_wrap/inline_moviewrap.frame.default -> the wrapping of the movie customize this for your requirements.
/html_wrap/inline_moviethumb.frame.default -> the wrapping of the movie thumb in view_album.php to show the length of movie and filesize. customize this for your requirements.
/classes/getid3/getid3.php -> The php file that extracts the various properties of a file. Other files are required in this directory required for extracting the info from various file types.
/classes/getid3/helperapps -> This directory should contain binaries of various helper applications that getID3() depends on to handle some file formats under Windows.

Troubleshooting:
-----------
This is not for G2! try the G2 forum.
-----------
Not tested on a windows server :cry: and I have no access either so; if some one can verify it works let this thread know. You might need some 'helper applications' for windows as well.
-----------
If you don't get the correct size or properties for the movie....download the full version of getId3 and verify its functionality by browsing to /demo/demo.browse.php after you have downloaded the full version of getId3. Make sure you deletet the demo directory or passowrd protect it.
-----------------

ophidite wrote:
Erreur: Index demandé [0] hors limites [39]
Fatal error: Call to a member function on a non-object in /data/www/com/e/t/ophidite.com/www/htdocs/modules/gallery/classes/Album.php on line 1258 .....
NUKE Gallery in 1.4.4 can cause trouble with Sentinel 2.1.3

-------------------------
If you have trouble uploading large movies; FTP your movie to your sever and use the URL method of adding movies:
You FTP your movie to your server (outside gallery) and click add photo, click the URL tab, enter the path to where you added the movie.
--------------------------
On a different note; I understand that mp3 files can have a "cover art image" embedded in them. I would like a link or a copy of a mp3 that you know has this so I can see if I can create a thumb for a mp3 file.

My Chistmas present to you!
Dave

 
davidsnyder
davidsnyder's picture

Joined: 2004-12-13
Posts: 1
Posted: Fri, 2004-12-31 00:41

Is it possible to change the thumb nail of the movie to be played? I have over 600 videos that I am currently linking to from the gallery. I would definitely like to use this, but I really need to be able to change that thumbnail. Since I haven't installed it yet, that is why I am asking.

Thanks :D :D

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2004-12-31 00:54

The is embedded movie mod only. It does not do thumbnails.

For movie thumbnails see:
Changing Movie Thumbnails (Low-Tech, NOT ffmpeg)
G2 has the automatic thumbnail generation. using ffmpeg.

ffmpeg movie thumbnails (with time)

Dave

 
fabien

Joined: 2004-12-18
Posts: 18
Posted: Sun, 2005-01-02 23:25

Dave,

Thanks a lot for this new mod supporting frames :D .

Reminder for those running a windows server. The path to the helperapps folder should not contain any space. In case it does, use the 8dot3 rule to specify the path inside the getid3.php file around line 114.

Cheers! Fabien

 
whoisfrost

Joined: 2004-05-12
Posts: 3
Posted: Mon, 2005-01-03 15:48

I just recently upgraded my gallery and in the process lost your old embeded movie player i was using so i figured i'd give this one a try. The embeded movie player works great but some of my other albums are messed up. Any albums that contain only sub albums are now empty. It still shows that there are sub albums but the thumbs are gone. You can see what i mean here..

http://verrets.com/modules.php?op=modload&name=gallery&file=index

Family pictures has sub albums and a picture and is working fine but pets only has sub albums and as you can see it shows the sub albums are there but no thumbs.

Oh and btw thanks alot for the mod... it works great... :D

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2005-01-04 00:12

whoisfrost,
If you just upgraded why did you not upgrade to 1.4.4pl4 you have v1.4.4-pl2?
Before doing any mods verify the functionality of your upgrade, so that we are not chasing ghosts.
The files that I provided are for version 1.4.4pl4.

BTW for Embeded enviroments you must edit Gallery's index.php and add view_movie_properties.php to the $safe_to_include array.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2005-01-04 06:51
ebellah wrote:
I haven't seen all the messages in this thread, but are mp4 files suppored? I can see them fine, but above the thumbnail is an error message :
Warning: Division by zero in /sites/pix/gallery/classes/getid3/module.audio-video.quicktime.php on line 523

I got the movie from ebellah and ran some tests:

I see from this .mp4 file it has some errors. I don't understand any of this stuff but here is the errors that getID3 gives:
warnings:

Quote:
Unknown QuickTime atom type: "iods" at offset 140
Unknown QuickTime atom type: "nmhd" at offset 51994
Unknown QuickTime atom type: "nmhd" at offset 52399
Unknown QuickTime atom type: "mpod" at offset 52622
Unknown QuickTime atom type: "hint" at offset 52746
Unknown QuickTime atom type: "hmhd" at offset 52843
Unknown QuickTime atom type: "hnti" at offset 64543
Unknown QuickTime atom type: "hint" at offset 64904
Unknown QuickTime atom type: "hmhd" at offset 65001
Unknown QuickTime atom type: "hnti" at offset 81705
Unknown QuickTime atom type: "hnti" at offset 81945

&Errors

Quote:
This version (1.7.2) of getID3() does not fully support MPEG-4 audio/video streams
Atom at offset 82448 claims to go beyond end-of-file (length: 8285484 bytes)

I will post in the getID3 forum and see if the author has any insites.
I have some other .mp4 files. They work fine & give the same warnings but not the 'Atom at offset 82448 claims to go beyond end-of-file' error with your file.

I have made some changes to the getID3 files to fix this.

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2005-01-04 21:45
rogun wrote:
Update2: When playing video's in firefox, the video window is larger than it needs to be for avi's. When trying to play mpeg 1 files videos, I'm alerted to download the latest quicktime plug-in. After installing it, though, it reloads the page and still doesn't work. If these problems have previously been documented, I apologize.

P.S. I'm using Firefox/0.10.1

I don't know if this is related or not but there is a bug report for this: https://bugzilla.mozilla.org/show_bug.cgi?id=264442
Can you point me to a site that playes them correctly?

As for the movie being a bit bigger. The documentation for Quicktime says to add 15px to the height of the movie for the controller to be displayed. Perhaps this is not required in some environments, or different version(s) of the player.

Quote:
*note - be sure to add 15 pixels to the height of your movie to allow for the controls. Notice above the movie size is 320x240 but I've changed it to 320x255 to allow for the movie controls*

am I doing something wrong? Perhaps I don't need to add the 15px for FireFox? Perhaps the codebace in the <object> and <embed> tags need to be different for .mpg &.mpeg files.

 
rogun

Joined: 2004-01-05
Posts: 19
Posted: Wed, 2005-01-05 10:57

I don't know anything about embedding videos, so I have no idea what's wrong. As for the video window size, it seems to work fine on other sites using my installation of firefox. It must be a problem with my site, but I'm not sure why and I haven't made very many modifications to the default theme. But when it does happen, it does so for both mpeg1 and avi videos and only with firefox. There's extra black space at the top and even more on the left of the window.

The mozilla bug report does seem similar. Mine occurs when trying to play mpeg1 files. I receive the message alerting me that I need additional plug-ins to play the file and then it suggests that I install Apple Quicktime 6.5.1. But, after supposedly installing it, the page reloads and it goes through the same routine all over again. I wonder if updating firefox and/or quicktime to the latest version would fix the problem, but I haven't tried yet.

I can't think of another site to test. I haven't gotten around to using firefox regularly yet and so I don't know if this is a normal reaction or something specific to your work. If I come across any new information, I'll post an update for you.

Update: After writing this, I updated to the latest version of firefox and quicktime and it still wouldn't play mpeg 1 videos. Then it occured to me that I don't normally use QT to play mpegs, so I configured QT to play both mpeg video and audio files and it worked! It's interesting that it worked in IE regardless of the mpeg mime types being set in QT.

I still haven't figured out the problem with the video window and I'm not even sure where to begin looking. I'll let you know if I find an answer though.

Update2: Dave, I noticed that when trying to play videos in firefox on my website, the width/height listed in the OBJECT tag is 320x255. When playing videos on your site, where the window is the correct size, the width/height is listed as 320x240, as I assume it should be. With avi videos, it's listed as 320x290. The aspect ratio of all the movies on my site is 320x240.

Update3: Okay, this is weird. I'm using the 'solid' border for my images and videos, but I noticed that you were using your custom film border. So, I decided to try out a different border and selected the 'Polaroid' one. The problem seemed to disappear and everything looks fine. However, when I go back to the 'solid' border, the problem returns.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-01-05 14:20
rogun wrote:
Update3: Okay, this is weird. I'm using the 'solid' border for my images and videos, but I noticed that you were using your custom film border. So, I decided to try out a different border and selected the 'Polaroid' one. The problem seemed to disappear and everything looks fine. However, when I go back to the 'solid' border, the problem returns.

We are making progress! I never did test with different Frames so I guess I will have some work to do.

I did sme changes to the layout/embedded_movie.inc and got FF to play the .avi files correctly and then reverted the changes and it seems to work for me as well. I don't understand why it still works now that I reverted the changes back to the original. Must be a Firefox/Windows thing. .avi is a microsoft format so I think they might be at their tricks again? :wink:

Dave

 
rogun

Joined: 2004-01-05
Posts: 19
Posted: Wed, 2005-01-05 17:26
floridave wrote:
I did sme changes to the layout/embedded_movie.inc and got FF to play the .avi files correctly and then reverted the changes and it seems to work for me as well. I don't understand why it still works now that I reverted the changes back to the original. Must be a Firefox/Windows thing. .avi is a microsoft format so I think they might be at their tricks again? :wink:

Dave

It did not work right after I reverted back to the solid frame. I'm not sure if you misunderstood me or if I misunderstood you, but it only works correctly for me when I have an actual frame around the video (Btw, I meant frame and not border earlier.)

Isn't the solid frame actually an html border tag, whereas the polaroid frame is probably made up of block tags? If so, I would guess the problem has to do with the video not being positioned correctly.

Also, I somewhat lied to you earlier: I have messed with embedding video before, but it's been so long ago that I don't remember much and it wasn't anything as elaborate as what you're doing. However, I seem to remember having similar problems with the video when it wasn't positioned correctly. I'm having trouble with the video disappearing and moving within the window when I move the scroll bar or mess with the video controls. I think those problems will disappear when you have the video positioned correctly and that I used this as a guide.

I hope something here helps!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-01-07 05:17

Fix: Force a <br> after the movie if the frame type is "none". >>>inline_movie.frame.default
Fix: "In order for the controller to appear properly, add 16 pixels to the height of a movie." from Apple documentation. Change to 16 from 15 for QuickTime and Mpeg movies.
Fix: formatting of quotes and spaces for the <object> and <embed> tags
Fix: proper width of controller for "real" files.
Temp fix: Divide by zero error in /classes/getID3/module.audio-video.quicktime.php

I would like to "start over" so to speak. I have been looking at code and heights and widths for some time and can't seem to find a issue with the files/OS/Browsers that I have. I have created a sub album with the assorted movies and this album has a "solid" frame. It is still a table around the movie but a slightly different layout. It still should work as it is just tables with background images.

If you have a issue then send me a link to the issue or PM me a link and describe the issue. It is hard to fix what I cant see.

I have updated the download to reflect the changes and fixes above.

Dave

 
Neone

Joined: 2003-12-28
Posts: 54
Posted: Fri, 2005-01-07 17:15

Hi there Dave. I think it's EXCELLENT that you take you time to create this mod. I'm hosting a website with pictures and videos from rave parties. There's only me and another site that hosts this kind of high quality edited video material from rave and trance parties.

So when there's a new video out, there's a rush for the visitors to get it downloaded. That's why I was asking if you could put in a download link as well. That would be perfect. Me for example, I never watch the videos in my browser, I rather download them and watch them from the HDD.
If there was a [Download] link below the thumbnail or something, it would be perfect! That way the visitors can choose to either watch it online or offline.

I don't know if you think it's a good idea, but I think it is ;) And a tip for the download link, make it forced. So it doesn't open in their default media player as it often do on windows systems. The "save file as" dialog should come up instead of the WMP window.

I really appreciate this mod, and I will definitely try to get it up and running. But since you almost always have to make the statement that your visitors have IQ=0 (I don't know how many times I've had to explain to my visitors that if they read the news they'll find the link to the picutures, and a LOT of other common things...), it would be great if there was a possibility to post optional info from the videofile under the thumbnail, it could be really nice if you use CSS. View the attached image for an example of how it could looke like.

Even better was if there was a "Download codec" link as well. Because regular visitors doesn't know shit about anything, so you almost have to do everything for them (actually, I've done it a few times)... So maybe a settings page would be nice? Paths to codecs for download, in what order should the extracted info be displayed etc. And maybe a customized thumbnail that overrides the one created by the gallery? That way you could make it REALLY neat ;)

I don't know so much about PHP, so it might be a LOT of work to implement all that, but it would be so awsome. I've scouted hotscripts.com and freshmeat.net for a neat video gallery, but there are no good ones! Your mod is the most qualified - by far! :D

Take a look at the attached picture I've made in Photoshop. It's not impossible to make it look like that with a CSS and your neat script :D

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2005-01-08 07:16
Neone wrote:
I rather download them and watch them from the HDD.
If there was a [Download] link below the thumbnail or something, it would be perfect! That way the visitors can choose to either watch it online or offline.

Done!

Neone wrote:
I don't know if you think it's a good idea, but I think it is ;) And a tip for the download link, make it forced. So it doesn't open in their default media player as it often do on windows systems. The "save file as" dialog should come up instead of the WMP window.

That took some doing and I have only tested it in IE and FireFox. I tried a Java Script solution but it did not work in FireFox so google found a php soultion.
New file download.php and a updated /html_wrap/inline_moviethumb.frame.default

Neone wrote:
I really appreciate this mod, and I will definitely try to get it up and running. But since you almost always have to make the statement that your visitors have IQ=0 (I don't know how many times I've had to explain to my visitors that if they read the news they'll find the link to the picutures, and a LOT of other common things...), it would be great if there was a possibility to post optional info from the videofile under the thumbnail, it could be really nice if you use CSS. View the attached image for an example of how it could looke like.

I will work on this, but the thumbnail page will get VERY cluttered, that is why I did the popup movie properties so that it ties in with the photo properties link.
Other opinions? I will most likely make it a all or nothing type of thing with a switch at the beginning to turn it off.

Neone wrote:
Even better was if there was a "Download codec" link as well. Because regular visitors doesn't know shit about anything, so you almost have to do everything for them (actually, I've done it a few times)... So maybe a settings page would be nice? Paths to codecs for download, in what order should the extracted info be displayed etc. And maybe a customized thumbnail that overrides the one created by the gallery? That way you could make it REALLY neat ;)

I don't understand what you are after here. Perhaps more pix are in order.
As for the custom thumbnail. That is another thread. ffmpeg, mplayer or custom thumbs
or play with G2 it does this now.

updated files

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2005-01-09 06:08

NEW: added upload date to movie_properties.php.
Change: added upload date to inline_moviethumb.frame.default Comment out if not required. & save without the .default ending.

Neone wrote:
it would be great if there was a possibility to post optional info from the videofile under the thumbnail, it could be really nice if you use CSS. View the attached image for an example of how it could looke like.....

New/change: moved movie properties to /layout/movie_properties.inc it can now be called from inline_moviethumb.frame.defaultbut you must un-comment it to show under the thumbnail.

Unless all your movies have the same amount of data, it does not look good. Here is a screen shot:
screen shot w/properties on
Formatting of the table is done with a new css class .movie,
Formatting of the movie parameters is done with a new css class movieP
Formatting of the movie data is done with a new css class movieD
So... you will have to add this to your css if you plan on using it on the thumbnail page. (remember the default for properties under the thumb is off)

updated files

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-01-26 07:07

Changing the movie size AFTER determining the size of the users screen is a pain. You have to set a cookie with Java script and then reload the page and read the cookie with php.
What if the user has cookies turned off? :(
What is the user has Java script turned off? :(
What if the gallery in embedded in a cms and only has 200 pixels used up for a left or right navigation...That only leaves less than 600 (if designing for 800 width). :cry:

I tested this cookie method and got it to work but finally decided on a user configurable method.

So now you can scale your movies if they are over a certain size. In /layout/embedded_movie.inc You will see

	// make movie smaller if bigger than 600 wide shrink the movie by 65%
	// set the 2 values below to your situation
		$video_width_resized = 600;
		$video_shrink = 0.65;
		if ($video_width > $video_width_resized) {
	        	$video_width = round($video_width * $video_shrink);
	        	$video_height = round($video_height * $video_shrink);
	        	$video_is_resized = true;
		}

If the movie is over 600px wide it will be scaled back 65%. These values can be adjusted to your site and design.
Example: If the original movie is 720 X 480 it will be embedded at 468 X 362 . . . 312movie height+50controller (dependent on mime type) = 362
Live example: http://langleycom.com/g1/movie/Widescreen1

If the movie is scaled then a note is added under the movie "This movie has been resized to fit screen" edit to your tastes.

As usual, you can download the embedded movie mod

 
wayhigh

Joined: 2005-02-12
Posts: 2
Posted: Sat, 2005-02-12 04:06

I just installed your gallery on 1.4.4-pl6 and I'm getting a javascript error when trying to view movies in the browser window.

The error is as follows:
Line: 96
Char: 2
Error: 'document photo_j' is null or not an object
Code: 0
URL: http://www.chasingashley.com/birds_videos/jamani_v_toypile1

Any ideas why I'm receiving the error?

Thank you,
Kevin Lynn

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2005-02-12 06:13

Just a stab in the dark before I go to bed..... Turn off the fit to window for that album and see if that helps.

Dave

 
wayhigh

Joined: 2005-02-12
Posts: 2
Posted: Sun, 2005-02-13 04:32

Thanks a bunch for your help in figuring out that weird javascript error.

I still have one more problem that I thought may have been related to the previous error but I guess not. The embedded movie add-on is crashing my wife's IE browser window.

Do you have any idea why it would cause the browser window to crash?

Thank you,
Kevin Lynn

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2005-02-13 06:16

Your movies and the rest of gallery look fine to me in IE6 on win2k. It also looks ok on IE6 on win98.
It still could be related to this mod.....look at the source and you will see

<td align="center"><a >
<!-- begin embedded WindowsMedia file... -->

bla-bla-bla

</EMBED>
</OBJECT>
<!-- ...end embedded WindowsMedia file -->
</a></td>

note the opening <a> and closing </a>. This is not right and I will have to work on this. You might be able to test this by saving the source remove the <a> tags I mentioned and see if it still crashes your wifes computer.

Another thing is the version of media player might have something to do with this as well. I can't reproduce this so it is hard to tell.

Dave

 
jagsfan

Joined: 2005-01-19
Posts: 14
Posted: Sun, 2005-02-13 23:47
Quote:
Warning: filesize(): Stat failed for /home/tropangb/public_html/gallery/albums/album02/Widescreen1.wmv (errno=2 - No such file or directory) in /home/tropangb/public_html/gallery/html_wrap/inline_moviethumb.frame.default on line 43

hey dave im now getting this exact same error. the 8 second clip i was using i deleted and tried adding the real thing as well as some smaller vids around 3mb in size, i dont know if it is related to the latest mod update i added but i have also tried all the fixes that correspond to this error with no luck, any ideas?

 
mosco

Joined: 2005-01-28
Posts: 14
Posted: Mon, 2005-02-14 02:09

Great mod! Thanks for putting it together and sharing it.
I downloaded it and will be testing it this week.

Can the plugin also support .flv video files (flash video files)?

It would be great if it worked without having to save them in flash swf file. The new flash video flv format can be standalone, and can also have custom skins on top of the video (for controls.) The marcomedia site has an overview here

the nice part is that anyone with the flash plugin can view them (pretty much everyone) and I don't need to have flash to create the video files. FFMPEG can create flv files, so this would be a great way to completely automate the process and ensure that all viewers can see the video.

 
mosco

Joined: 2005-01-28
Posts: 14
Posted: Mon, 2005-02-14 02:15

follow up question: when installing, I have a heavily modified version of gallery. I keep track of my changes so it's fairly easy to deal with upgrades.
Can you let me know on which line numbers your modifications to view_album.php and view_photo.php are? This way I can just drop them in my modified version. (I don't have access to diff...)

Thanks.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-02-14 03:03
mosco wrote:
Can you let me know on which line numbers your modifications to view_album.php and view_photo.php are? This way I can just drop them in my modified version. (I don't have access to diff...)

The best way to do this is to get a fresh version of the file(s) and use http://winmerge.org/ or if you have a Mac there is a similar program but I don't know its name. I am not going to provide a step by step method as I find this very hard to support and people ALWAYS screw it up. If people have moded the core files then they are more than competent to look for the changes with winmerge or diff or something similar. It is just a pain for me to look through my modded version as well.

Quote:
Can the plugin also support .flv video files (flash video files)?

It would be great if it worked without having to save them in flash swf file. The new flash video flv format can be standalone, and can also have custom skins on top of the video (for controls.)

I will have to read up on this. Can you provide a link that has this type of file embedded in a simple webpage. The link you provided assumes the user has dreamweaver. I will read more and try to digest it all. I will change this mod if I can find a way to do this and/or if getID3 supports the file format.

Can you send me a file or provide a link to a file that you would like supported. If you do then this will happen faster.

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-02-14 04:09
jagsfan wrote:
Quote:
Warning: filesize(): Stat failed for /home/tropangb/public_html/gallery/albums/album02/Widescreen1.wmv (errno=2 - No such file or directory) in /home/tropangb/public_html/gallery/html_wrap/inline_moviethumb.frame.default on line 43

Did the file get added? Is the file in the location from the error? The error is quite explanitory....No such file or directory
The files modded should not prevent you from adding items. Perhaps restore the files to the original state and try again.
Rerun the config wiz and turn on debug mode and try a upload again and see what it says.

Dave

 
mosco

Joined: 2005-01-28
Posts: 14
Posted: Mon, 2005-02-14 04:13
floridave wrote:
mosco wrote:
Can you let me know on which line numbers your modifications to view_album.php and view_photo.php are? This way I can just drop them in my modified version. (I don't have access to diff...)

The best way to do this is to get a fresh version of the file(s) and use http://winmerge.org/ or if you have a Mac there is a similar program but I don't know its name. It is just a pain for me to look through my modded version as well.

Ok, I understand. I will use your suggested method, in any case I do track all the changes I have made so it shouldn't be too hard to figure out.

floridave wrote:
mosco wrote:
Can the plugin also support .flv video files (flash video files)?

It would be great if it worked without having to save them in flash swf file. The new flash video flv format can be standalone, and can also have custom skins on top of the video (for controls.)

I will have to read up on this. Can you provide a link that has this type of file embedded in a simple webpage. The link you provided assumes the user has dreamweaver. I will read more and try to digest it all. I will change this mod if I can find a way to do this and/or if getID3 supports the file format.

Can you send me a file or provide a link to a file that you would like supported. If you do then this will happen faster.

Dave

Ah yes, I am not sure if it can be done without having the marcomedia video kit (which is a plugin for flash or dreamweaver). I do have a test file I will pm it to you so you can take a look, it was created in dreamweaver though, so maybe it can't be embedded into gallery?

Thanks for looking into it. I'll also try to find out more and share anything I find...

 
mosco

Joined: 2005-01-28
Posts: 14
Posted: Mon, 2005-02-14 04:24

I am testing the mod and getting the following message on view_photo.php:
"Can't find Embedded payer"

The "Launch in external player" link does work, but when I click on the movie properties window it looks like it can't read the movie properties, it shows:
Upload Date : 09/20/04
File Size : 0.00 B
(0)
Movie width : -
Movie Height : -
Mime type : -
Play Time : -

The video files are mpg and they play ok in quicktime or windows media player.

The weird part is that on view_album.php it does display the movie file size and running time accurately. It is not generating any php errors.

Sorry if I missed something obvious in the setup.
I am running 1.4.4 pl6 on a windows2000 server.
I copied the latest version, I will pm you a test url if you want to see the pages.

Thanks for all your help!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-02-14 07:01

mosco,
I took the movie that you sent me via PM (mpg format) and did not have any issues with it at all.

floridave wrote:
Troubleshooting:
Not tested on a windows server and I have no access either so; if some one can verify it works let this thread know. You might need some 'helper applications' for windows as well.
If you don't get the correct size or properties for the movie....download the full version of getId3 and verify its functionality by browsing to /demo/demo.browse.php after you have downloaded the full version of getId3.

The only thing I can think of is if you install the full version getid3 and then browse to the /classes/getid3/demo/index.php and see if getid3 can tell you the info about the file. I suspect that you might need some "helper" files for windows. Or you have a space in the path to getid3 or its helper files see http://www.getid3.org/phpBB2/viewtopic.php?t=277&highlight= or http://www.getid3.org/phpBB2/viewtopic.php?t=179&highlight=

Remember to remove the demo folder/directory when you are done as there is no security and you can delete files on the file system with the demo.

I don't have a windows server so I hope somebody will chime in here and lend a hand.

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-02-14 16:02
mosco wrote:
Got it to work with the full version getid3.

Glad you got it to work.

mosco wrote:
I think it would also work by just moving the helperapps dir one level up and then your files do not have to be modified. (so you should have getid3 in classes dir, and helperapps in classes dir also.) But I haven't tested that.

I have moved the helper directory to classes in the new zip file. Somebody let me know if this does not work.

mosco wrote:
ps: a really minor issue, but that could throw off someone installing for the first time, in the zip file of embedded_movie the file gallery/layout/embedded_movie.inc is actually name embedded_movie.inc.txt. It has to be renamed to embedded_movie.inc (removing the .txt) for it to work.

Fixed in the new zip file. Thanks for point out the errors and fixes.

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-02-14 21:20

mosco, maggard, and the rest that are interested in Flash FLV movie files.....
After a quick look through the docs it seems that three files are needed for this to work properly.....
The movie itself movie.flv the skin Skin_name.swfand the file that controls the movie/skin/etc: FLVPlayer_Progressive.swf.

Correct me if I am wrong here. So for each movie it needs three files to work correctly. You would need to be uploaded these 3 files to the server.
I think this could be done....with a few drawbacks.
1.) First the user would have to add the FLVPlayer_Progressive.swf to gallery as it would be different for each movie.
2.) the movies could be stored in a directory outside or inside gallery as the FLVPlayer_Progressive.swf will point to it.
3.)The Skin_anme.swf could be anyplace as well and if you are happy with the same controls for the movies then only one would be needed and could be hard coded in the <object>&<embed> tags. But what if you want to have a different "skin" for your movie or your movies are of different sizes?

Now to test to see if getID3 will get the correct size for the movie/swf file.

Comments?

 
mosco

Joined: 2005-01-28
Posts: 14
Posted: Tue, 2005-02-15 04:06

Yes I think that's correct, a different FLVPlayer_Progressive.swf is required for each movie.

For me, I think having a common skin for all movies within the same album or even for the whole gallery would be fine.

Somethings to note: after looking more into it, my understanding is that to get the full benefits of flv files (progressive download flv's) users need flash 7, but most users still have flash 6 so using swf's might still be the better option. Adding the hassle of having to upload a separate FLVPlayer_Progressive.swf for each movie makes it even less attractive. Unless there is way to automatically create that file? But it would be a nice option to have nonetheless.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2005-02-15 05:25

getid3 does not recognize the flash movie .fla format. Therefore, in order to get this to play properly in gallery we need the height and width of the .swf file. getID3 does extract this correctly (as far as I can tell with the limited testing/resources)

I am only making assumptions here as I have not tried making my own movie.
When making a movie you tell the software (flashMx/dreamweaver etc) makes these three files and creates the correct directory structure.

The issue that I am running into is gallery will only upload one file (that is OK as we can put the movies and a skin some place else). So that file has to be the FLVPlayer_Progressive.swf. GetID3 extracts the correct file size and mime type for this file. The issue is that the code for displaying the file embedded, is different than a regular flash .swf file. In the Flashmovie file there is extra parameters that are not needed with standard flash files. Here is just two:

<param name="salign" value="lt" />
<param name="scale" value="noscale" />

We need a method of having gallery or getID3 tell the difference between the to .swf files;
---regular swf display the correct <object>&<embed> tags for that type
---progressive.swf display the correct <object>&<embed> tags for that type

A couple ways to go about this;
1.)Use the name of the file FLVPlayer_Progressive.swf as a check.

2.)One of the returned values from getID3 form FLVPlayer_Progressive.swf is:

Quote:
[swf] [header] [signature] string CWS

So I could check this value and then display the correct <object>&<embed> tags. I don't know if this is the right way to go or not as I have only checked a few files for that header string.

3.)Check the name of the album and then only display progressive movies if the album name starts with progressive for example. I don't like this method as it relies on the user to know what he is doing. and this is not the case some of the time.

Comments? ideas?...

Dave

 
ophidite

Joined: 2004-03-26
Posts: 26
Posted: Fri, 2005-02-18 11:54

Since I have applied the embeded movie MOD to my Gallery

Here is the error i got when i click on a thumbnail and i load an image (movie or photo)

Erreur: Index demandé [0] hors limites [39]
Fatal error: Call to a member function on a non-object in /data/www/com/e/t/ophidite.com/www/htdocs/modules/gallery/classes/Album.php on line 1258

If Anyone have encontered this error code , can you give me a clue to solve it .

I think it is relative with view_photo.php

Thanks in advance

 
moiz87

Joined: 2005-02-18
Posts: 19
Posted: Fri, 2005-02-18 12:19

i am looking to upload about 25 meg mpg clips and play them on the gallery, i can't upload for some reason anything bigger then 2 megs on g2 it keeps giving me an error... any help wud be appreciated thank you.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-02-18 15:41

moiz87, FAQ Gallery:c.16 or most likley FAQ Gallery:c.6

The other option is to make a thumb for the image and create a new custom field and call it view movie. Then add a link to the move where you have it on the server. You can add links (regular HTML) to the data field of the new custom field. For a example of what I mean: WWII movies

The other option is to add a small movie with the same name and then FTP the full movie overwritting the the /albums/nameOfAlbum/nameOfMovie.mpg. Then this will "fool" gallery into thinking that you added the movie.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-02-18 17:11
ophidite wrote:
Since I have applied the embeded movie MOD to my Gallery

Here is the error i got when i click on a thumbnail and i load an image (movie or photo)

Erreur: Index demandé [0] hors limites [39]
Fatal error: Call to a member function on a non-object in /data/www/com/e/t/ophidite.com/www/htdocs/modules/gallery/classes/Album.php on line 1258

If Anyone have encontered this error code , can you give me a clue to solve it .

I think it is relative with view_photo.php

Thanks in advance

Can you reapply the files? I never tested it with 1.4.4pl3 or lower. I never tested it in embedded environment.
I would upgrade to 1.4.4pl6 and reapply the files. This is the first time that I have seen this so I can't offer much more. Give that a try and see if it works stand alone first and see if that helps.

Dave

 
ophidite

Joined: 2004-03-26
Posts: 26
Posted: Sat, 2005-02-19 11:04

Yes I find the problem in sentinel.php . Your MOD is not the problem .

NUKE Gallery in 1.4.4 can cause trouble with Sentinel 2.1.3

 
jagsfan

Joined: 2005-01-19
Posts: 14
Posted: Mon, 2005-02-21 01:22

hey dave sorry i didnt respond sooner, i reloaded my entire site as well as gallery to try and determine the problem im having with uploading movies. its seems that the small clip i uploaded is only about a meg or so thats why it goes up to the server but 3 meg clip will not. now i have read all of the faq on this and cannot get it working. im not sure where my php.ini file is ither but it tried tricking gallery like you said here

Quote:
The other option is to add a small movie with the same name and then FTP the full movie overwritting the the /albums/nameOfAlbum/nameOfMovie.mpg. Then this will "fool" gallery into thinking that you added the movie.

problem is that i am unable to overwrite file it will not let you. im using cpanel that my host provides i upload to a different folder fine then i select move and it tells me its not alowed. i tried changing permissions but that dosnt help either, is there anything else you can think of? im really not likeing the idea of adding a link to the movie i like the embedded feature. thanks

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-02-21 03:30
jagsfan wrote:
problem is that i am unable to overwrite file it will not let you. im using cpanel that my host provides i upload to a different folder fine then i select move and it tells me its not alowed. i tried changing permissions but that dosnt help either, is there anything else you can think of?

With your control panel you should be able to delete the "small" movie and upload a new "full version" in its place. If you cant do that then how did you upgrade gallery? How did you overwrite the existing files from my mod? Did you try the URL method of adding your movie? You FTP your movie to your server (outside gallery) and click add photo, click the URL tab, enter the path to where you added the movie. Turn debug mode on in the config wiz if that fails and try again.

I really don't know what to say :roll: If you can't add large files then perhaps is is time for a a new Host? PM me your login info and Cpanel info and I will take a look if you wish.

Dave

 
jagsfan

Joined: 2005-01-19
Posts: 14
Posted: Mon, 2005-02-21 04:20

dave i can upload large files with no problem i can even overwrite and all, its only anything under the albums folder that i cannot manipulate. i looked at my php.ini file and its set to 50m im pretty sure my host is not limiting me its gotta be somwhere in the config. i asked my host though where to edit my php.ini file and they said i cant they said put .htaccess folder in gallery directory and set the upload there, tried but that doesnot work.

dave url way works thanks for the help, i was under the impression that it was gonna link me to another window with the url at the bottom.

 
khsjr1970

Joined: 2004-04-24
Posts: 271
Posted: Mon, 2005-02-21 17:38

dave were you sent a copy of a .mp3 with a a graphic encoded in ?

I don't see where you got what you asked for, and what effect the embedded album art in a .mp3 has had on this thread.

I can send a file that I am sure has embedded cover art.

I will be happy to send if needed.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2005-02-21 18:33

khsjr1970,
Thanks for reading the thread. Yes I would like to have that if you can send it via PM or email that will be fine.
There has been very little talk on audio and I think this is a great tool for the .mp3 format.

I don't know much about .mp3 s so it might take some time to do this. Have you see this done on anther site? Seeing how somebody else does stuff is a great learning tool.
What did you envision?

 
mosco

Joined: 2005-01-28
Posts: 14
Posted: Tue, 2005-02-22 17:07

Hey Dave,

Sorry haven't had time to follow up on the .flv tests. I did get your mod to work with my install using swf movies and it rocks! At this point I'm not sure using flv's will be worth the effort if swf are working so well, so I probably won't have time to test it any further.

Thanks again for your work and help.

 
jagsfan

Joined: 2005-01-19
Posts: 14
Posted: Wed, 2005-02-23 03:24

Hey dave i have a question for ya: while viewing a movie clip with firefox i am unable to adjust my volume, skip forward or backward in the clip without losing the picture, the only way to get it back is to refresh. any ideas? here is an example here

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2005-02-23 04:19

jagsfan,
It works fine for me on IE v6 and in FF v1. I have media player v9. on window 2000.

I do notice that if you pause or stop a movie for a long period of time (or go to another window while paused or stopped) the movie part disappears but the controls are still there. Pressing play brings everything back together again. Is see that behavior on my test site as well.

Volume works for me as well.

 
jagsfan

Joined: 2005-01-19
Posts: 14
Posted: Wed, 2005-02-23 04:54

thanks for checking it out dave! im also using ffv1 but i have mediap v10 and xp. but i guess if 90% of visitors can see ok then im happy. thanks again!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2005-02-25 23:04
khsjr1970 wrote:
dave were you sent a copy of a .mp3 with a a graphic encoded in ?

I don't see where you got what you asked for, and what effect the embedded album art in a .mp3 has had on this thread.

I can send a file that I am sure has embedded cover art.

I will be happy to send if needed.

Thanks for the MP3. I have now got gallery/getID3 to extract the "cover art" from the mp3 file. The cover art then replaces the default thumb & the image above the embedded player. See the results:
http://langleycom.com/ipw-web/gallery/audio/Steve_Stevens_Top_Gun_Theme
I have not extensively tested this feature and would like more examples of mp3s with embedded cover art. So can some others send me mp3s via email or PM; links &/or attachments that have mp3s with the embedded cover art. Also feedback if this feature is the way it should be or not.

Cheers!

Dave

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2005-04-17 04:40

Upgraded files for 1.5. http://langleycom.com/g1/movie/embeded_movie_mod

If I could get some help making a readme or some documentation I would really appreciate it.

A few notes:
albums.php does not need to be changed if you don't want the thumbs to have stuff above and below.

I have started to do some docs http://langleycom.com/ipw-web/gallery/MovieMod_Docs but gave up.
I need help with this (the docs) if you can.

Dave

 
peiqinglong

Joined: 2003-11-17
Posts: 55
Posted: Wed, 2005-04-27 02:09

I just installed this and I'm getting an error message just going into any albums, I haven't uploaded any movies yet:

Fatal error: Call to undefined function: getrequestvar() in /home/bui4eve/public_html/pics/view_album.php on line 27

I'm using Gallery 1.4.4pl6.

Website: www.bui4ever.com/pics

Any idea? Thanks!

floridave wrote:
It looks to me like you used the 1.5 version of the mod over your 1.4.4 install.

There is 2 links on my download page one for 1.4.4pl6 and one for 1.5.

Why not upgrade gallery to 1.5 and then you get icons as well with this mod.

Dave

Doh my bad! Didn't realize that!

Edited by floridave;
just to keep the thread shorter

 
kunald

Joined: 2004-03-17
Posts: 14
Posted: Thu, 2005-04-28 12:46

Hi Dave, great Mod! I just have a few questions though (sorry if this isn't the right place);

- When viewing an album, is it possible NOT to show the "view in browser" things- just the title of the file. This includes not showing the date and information above the thumbnail. An example is this: http://www.kunation.com/gallery/album01
I want the movie thumbnails to just show what an image would without the mod.
When viewing the movie I don't mind these options showing up.

- I'm using the Bblue skin and the "view in browser" and other things appear on a black background with dark text. It's very hard to read, how would I get around this?

- Ever sine I installed this mod there has been a space under all the titles of the titles in an album; http://www.kunation.com/gallery/album01
Is there a way to remove that space under the titles?