Embedded Video Improvement

suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2006-10-15 21:15

Oh, and I forgot to mention.
@valiant - I set 2 variables sb and lb for short buffer and long buffer respectively.
So we can adjust these buffer lengths externally if we wish via flashVars.
If they are not set externally they default to 3 and 15.

-s

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Sun, 2006-10-15 23:04

I tried it, didn't seem to work but reading your post about poor video encoders made me try to encode one with ffmpeg (i was using some other 3rd party) So I encoded it with

"C:\video\ffmpeg\ffmpeg.exe" -i "C:\downloads\vids4website\mvi_0947.mpg"
 -b 160 -r 15 -s 320x240 -deinterlace -ab 80 -ar 44100 -ac 2 -croptop 10
 -cropbottom 2 -cropleft 6 -cropright 6 "C:\downloads\vids4website\mvi_0947.flv" 

tested the new file thinking it may make a difference, but didn't

Questions: do I need FFMpeg plugin enabled on gallery2? if so that may be the problem, my server doesn't have ffmpeg on it (rented host)

(file encoded with ffmpeg) http://www.richardcurry.com/gallery2/main.php?g2_itemId=1518

***edit*** I do notice that the mark on the status bar shows (where in the video it is playing) when encoding it with ffmpeg where the other videos I have uploaded dont

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2006-10-15 23:06

actually the link you supplied worked for me, no bufferclip.
try clearing your cache after replacing G2flv.swf.

And ffmpeg itself does not inject metadata into flv.

-s

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Sun, 2006-10-15 23:16

Sorry, YES that fixed it, it even worked on the clips encoded with the other program, but ffmpeg gives a better end product, even though its a little harder to encode (no point and click :) )

thanks again all!!!

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Mon, 2006-10-16 00:00

what i was talking about is with ffmpeg (command line) i get the slider bar showing where the clip is playing at the moment, but with the 3rd party (uses ffmpeg in the background) one it shows the bar but not the line of where it is at that moment

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Thu, 2006-10-19 21:17

does this newer version still have the autostart=false option in it?? I just tested the one I had placed in a forum (back when testing it) and it is now auto starting even thought the false option is at the end.

(will be out of town for a week, so if not i can test things after the 30th)

thanks!

 
sphism
sphism's picture

Joined: 2006-10-11
Posts: 4
Posted: Fri, 2006-10-27 16:22

oh my god!!!

I finally got it working, you guys rule!!!

So i now have flv files playing in gallery2.

Awesome work everyone :)

I don't have thumbnails yet but i'll try to sort that out now.

I have ffmpeg making nice thumbnails for other video formats, hmm

1 question tho. Since i've now updated my galery version to 1.0.0.3, what happens the next time there is an upgrade?

I'm not sure how much help i can be, but i'm very interested in making a really nice player that has play speed controls and other functions (setting up online video tuition site) I've got a lot of flash experience but not sure where to start, are there some fla files for the player knocking about anywhere for me to have a look at?

Cheers everyone,

matt

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Thu, 2006-11-16 04:59

you guys (and maybe gals) have been a great help, with searching other forums and moving custom fields, the layout of my video and info is almost done, just need to work on the theme a bit still..

but thanks!

so far..

http://www.off-roadvideos.com/main.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=Snow&g2_itemId=1300

 
aperion

Joined: 2006-01-13
Posts: 6
Posted: Mon, 2006-11-20 20:17

Now to figure out how to get thumbnails working...

BTW I set up gallery2 2.2 and the video work is amazing, thank you guys so much. Video's used to be annoying, not any more!

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Mon, 2006-11-20 21:51

unless something has changed, I think you still need to create the thumbs on your own and upload them.

......
suprsidr,
I had mentioned this before but was out of town and didn't follow up on it..

with the new versions of this plugin, the "autoStart=false" that you added at one time doesn't work any longer, so if you add a video to your front page or on an external page, it plays as soon as you load the page.

 
aperion

Joined: 2006-01-13
Posts: 6
Posted: Mon, 2006-11-20 22:08

I actually tried that but for some reason it didn't work. although I don't see a reason why gallery couldn't do it, I used ffmpeg to create the thumb from the final flash video. Any Idea where I could look at to try to get this to work, even if just on my own copy?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2006-11-20 22:53

@curbob - sorry, I re-added it to svn/flash, but forgot to add id to the module.
Its now available in svn flashvideo module, and the nightly by tomorrow.

@aperion if you install and configure the ffmpeg module, it should make your thumbnails for you.(you also need the thumbnail module)
some of the newer builds of ffmpeg finally support the On2 codec(yeah!) but spark has been supported for quite some time.

-s

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Mon, 2006-11-20 23:16

aperion

oops.. sorry i knew there was a reason it still didn't work for me, FFmpeg hasn't been installed by my host.. sorry I misled you.

Suprsidr,

Thanks, I'll grab it tomorrow at some time

 
aperion

Joined: 2006-01-13
Posts: 6
Posted: Mon, 2006-11-20 23:16
suprsidr wrote:
@aperion if you install and configure the ffmpeg module, it should make your thumbnails for you.(you also need the thumbnail module) some of the newer builds of ffmpeg finally support the On2 codec(yeah!) but spark has been supported for quite some time.

-s

Yeah it's enabled and activated, I get the broken thumbnail icon. The version of ffmpeg I have is 0.4.9_pre1, I tried following some of the "guides" I found online with building a thumbnail using ffmpeg and they all included the "-vframes 1" when I removed this option it worked fine, so if gallery2 uses this option that would explain why it would fail.

 
aperion

Joined: 2006-01-13
Posts: 6
Posted: Mon, 2006-11-20 23:27
curbob wrote:
aperion

oops.. sorry i knew there was a reason it still didn't work for me, FFmpeg hasn't been installed by my host.. sorry I misled you.

Suprsidr,

Thanks, I'll grab it tomorrow at some time

If your hosting is running linux you can get the binary here: http://gallery.menalto.com/node/36523
although then you may just be in the same boat as me :)

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Fri, 2006-11-24 02:10

thanks the "autoStart=false" worked now !!

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Tue, 2006-11-28 03:36

where is flashvars="streamName= setup, because I would like to add the "autoStart=false" to all my videos, or is this the correct place to add it.. or can i change the default from true?

reason being, I see that using main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=fullSize will show a random fullsized video (i'm sure others knew this but i just noticed it) but ff I add it to a website, i would like the user to have to click it to start it.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2006-11-28 03:47

Look to modules/flashvideo/classes/FlashVideoRenderer.class

-s

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Tue, 2006-11-28 03:49

yep..

I took this code

<embed src="%s" flashvars="%s" type="application/x-shockwave-flash"
			   width="100%%" height="100%%" quality="high" scale="noscale" salign="lt"
			   pluginspage="http://www.macromedia.com/go/getflashplayer"/>

and made it..

<embed src="%s" flashvars="%s&autoStart=false" type="application/x-shockwave-flash"
			   width="100%%" height="100%%" quality="high" scale="noscale" salign="lt"
			   pluginspage="http://www.macromedia.com/go/getflashplayer"/>

thanks!

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Tue, 2006-11-28 17:02

opening a page with autostart=false works great with the above changes but does anyone know what I need to do, probably during encoding, to show the video with the play button on it when you open a page? What I mean is right now I see a blank video box with a play button in the middle, I would like to see the video (first scene) behind the play button.-like the replay button at the end

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Fri, 2006-12-01 00:07

I guess the "autostart=false" didn't work as well as I thought... looks great under firefox, but in IE you can't see the play button (don't think it's there) but also the entire video window is black and the video starts without clicking the video, but instead waits till you move your mouse over the video window (just mouseover)

--edit-- ok i fixed the play when mouseover, had a false where it was a true.. :)
So the only problem is that in IE the video window is black (and you can't see the play button)and FireFox the video window is white with the play button. So it go back to my question a couple post ago, how do I have the first graphic of the video instead of being blank? --edit--

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2006-12-01 01:30
Quote:
how do I have the first graphic of the video instead of being blank?

That was something I was planning for a future update, to call in the thumb when autostart=false.
But did'nt you and I discuss puting the thumb/image in the background of a table or something along those lines?

-s

oh, and IE7 does alot of strange things with flash.

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Fri, 2006-12-01 01:54

nope we hadn't talked about that, but without thinking of the code yet.. If i upload a "thumb" that is really 384x288 will gallery still show a 75x75 thumb on the album pages (auto size the large image to 75x75)? I guess it's something I can try :)

 
curbob

Joined: 2003-10-06
Posts: 70
Posted: Fri, 2006-12-01 02:01

just tested, yep i can add a pic that is 384x288 and it will auto shrink it for a thumb....
So now to think about code :) sticking that "thumb" behind the play button

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2006-12-01 02:22

if you make sure the swf has a transparent bg ie:
<param name="wmode" value="transparent" /> - for object
wmode="transparent" - for embed

-s

 
vampy

Joined: 2002-12-05
Posts: 86
Posted: Wed, 2007-01-03 06:11

Hi, all! I was wondering whether this module can be changed to also accept image files as well... Essentially, what I'm looking for is the ability to get flash player to display pictures. Why? Cos' I do not want users to be able to right-click on image files and download them. The good thing about having the flash player displaying image files is that a watermark can be placed in the flash movie itself such that even if the user were to have a cache copy of the flash file, the copyright notice will still be there. Having said all that I want to say that this module is fantastic!

 
nolageek

Joined: 2007-01-25
Posts: 8
Posted: Wed, 2007-01-31 10:48

I have ffmpeg installed and configured correctly. I have the Thumbnail Manager installed. I installed the FlashModule.

No thumbnail is created. How do i configure that?

 
ulancan

Joined: 2006-10-20
Posts: 25
Posted: Thu, 2007-02-01 16:34

Hey can someone say me where can i download the module files for this "Embedded Video Improvement"????

Thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2007-02-02 06:51

click "downloads" in the top bar of this site and find Gallery 2.2-RC-1. the flashvideo module is included.

 
ulancan

Joined: 2006-10-20
Posts: 25
Posted: Fri, 2007-02-02 19:16
mindless wrote:
click "downloads" in the top bar of this site and find Gallery 2.2-RC-1. the flashvideo module is included.

Thank you for your help!!! NoW!
I installed the 2.2-RC-1 version succesfull, and installed the flashvideo module!!!
so how can i know that the video uploading works?? in the admin area their is no option for flashvideo module, what i must do next to get work it???

Thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2007-02-04 00:03

upload a .flv file.. without flashvideo module installed, browsing this is G2 would just show a "download" link. with flashvideo module (and flash support in your browser!) you'll see the movie in a flash player.

 
ulancan

Joined: 2006-10-20
Posts: 25
Posted: Sun, 2007-02-04 11:00
mindless wrote:
upload a .flv file.. without flashvideo module installed, browsing this is G2 would just show a "download" link. with flashvideo module (and flash support in your browser!) you'll see the movie in a flash player.

K mindless so the thing is the flashvideo module is activated and when i upload the video i see te download link, and i test out my "mp3 modules" when i upload mp3 formats its showing on flash player that works but when i upload flv format i see their download link and the module "flashvideo"is activated!!

2) what you mean with (and flash support in your browser!) where can i find the oprion for that

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-02-04 11:08

click "edit movie" and set the movie dimensions.
for further questions, please create a topic in the support forums. this is a thread to discussion development, not support or usage. thanks.

--------------
Enter the Gallery 2 Theme Contest today!

 
shivaya

Joined: 2006-12-22
Posts: 132
Posted: Mon, 2007-06-25 12:24

I can't ulpoad any image as thumbnail in "edit movie", i'have a error on stable G2.2.1 :

Quote:
Error (ERROR_PLATFORM_FAILURE)

* in modules/thumbnail/classes/ThumbnailImage.class at line 213 (gallerycoreapi::error)
* in modules/thumbnail/classes/ThumbnailHelper.class at line 242 (thumbnailimage::create)
* in modules/thumbnail/CustomThumbnailOption.inc at line 90 (thumbnailhelper::additem)
* in modules/core/ItemEdit.inc at line 109 (customthumbnailoption::handlerequestafteredit)
* in main.php at line 231 (itemeditcontroller::handlerequest)
* in main.php at line 94
* in main.php at line 83

thanks for help.

 
jjk212

Joined: 2007-07-24
Posts: 3
Posted: Wed, 2007-07-25 06:25

Hello all,
I have been using flvplayer in my gallery 2.2.2 site for a little while now. Everything is running great so far, however I need help on setting the player to use a different skin.
I have created a modules/flashvideo/lib/skin directory and put in all the flvplayer skins.

I'd like to use:
clearSkin_1
http://www.peldi.com/fmswiki/index.php?title=Image:Clear_1.jpg
or
haloSkin_2
http://www.peldi.com/fmswiki/index.php?title=Image:Halo_2.jpg

Heres the flvplayer section I currently have in my FlashVideoRender.class
-----
$playerUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/flvplayer.swf'),
array('forceFullUrl' => true));
$skinUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/skin'), array('forceFullUrl' => true));
$flashVars = sprintf('streamName=%s&skinName=%s&autoPlay=true&autoRewind=false',
urlencode($src), urlencode($skinUrl));
-----

What would I need to change it to to make use of a different skin? I see the part that reads skinName=%s , just wondering what exactly I put there to get it to work properly.

Thanks,
John

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2007-07-25 10:38
$playerUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/flvplayer.swf'),
array('forceFullUrl' => true));
$skinUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/skin/clearSkin_1.swf'), array('forceFullUrl' => true));
$flashVars = sprintf('streamName=%s&skinName=%s&autoPlay=true&autoRewind=false',
urlencode($src), urlencode($skinUrl));

I don't remember if you need the .swf at the end.

-s
FlashYourWeb and Your Gallery

 
jjk212

Joined: 2007-07-24
Posts: 3
Posted: Thu, 2007-07-26 18:09

Suprsidr,
Thanks for the quick response.
If I had to guess I'd say the .swf at the end of the skinUrl is not needed. The skin files are in pairs for each skin:
clearSkin_1.as
clearSkin_1.fla

... hours later
Just realized ther those 2 skin files arent actually skin files but parts to make a skin file. After using them to make a skin file with a trial version of macromedia I was able to place the new clearSkin_1.swf file into my gallery/modules/flashvideo/lib/skin/ directory. Only then was I able to get the skin to work. Incidentally its is clearSkin_3.swf that had the adjustable volume slider (not clearSkin_1 as the site http://www.peldi.com/fmswiki/index.php?title=FLVPlayer suggests

I've also used your suggestion and packaged files you make available at
http://gallery.menalto.com/node/61982#comment-227121
to get IE (not just IE 7, but also IE 6) to play the video right away. The only thing I did was(see quote below) convert the file from dos to unix (removing the arbitrary ^M's at the end of each line of txt in the file

Quote:
$ dos2unix FlashVideoRenderer.class

Here is a snippet of my tweaked FlaskVideoRenderer.class that calls the javascript you posted for the FLVPlayer as well as the default player

Quote:
/*
*-------------------------------------------------------------------------------
* To use FLVPlayer ( http://www.peldi.com/fmswiki/index.php?title=FLVPlayer )
* get this version of the player: http://gallery.menalto.com/files/flvplayer.zip
* unzip in the flashvideo/lib directory and uncomment the lines below:
*------------------------------------------------------------------------------
*/

/* Including SWFObject<http://blog.deconcept.com/swfobject/> to defeat the "Click to activate..." in IE */
$SWFObjectUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/swfobject.js'),
array('forceFullUrl' => true));
$playerUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/flvplayer.swf'),
array('forceFullUrl' => true));
$skinUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/skin/clearSkin_4'), array('forceFullUrl' => true));
$flashVars = sprintf('streamName=%s&skinName=%s&autoPlay=true&autoRewind=false',
urlencode($src), urlencode($skinUrl));

My only hangup now is getting the right side of the player bar, after the volume, to show up. The bar ends abruptly
See: http://keyburn.net/gallery/v/album03/album13/album18/Puppies_2005-9-12.flv.html
This is clearSkin_3 modified to use the same button for play & pause (I named the new skin clearSkin_4) Attached are the clearSkin_4 skin files. If you have a go at it and can get it working please let me know! Thanks

have a good one,
John

 
marsietis

Joined: 2007-07-24
Posts: 2
Posted: Mon, 2007-07-30 14:30

hi, first off all - great job guys

but I do have a question: does this modification works wiht 2.2.2 ?
couse, well it looks for me that I followed the instractions, but some how the onlly thing I get on a page is a link to the uploaded flv - Download movie

to elliminate questions that, where and how I did :/ here is hole history
maybe some one later will find it usefull "all in one place"
ofcourse :) if it is any good and the problem is on my end

I tried this modification on localhost with Apache and MySQL5.0
did tried typical and developer's installation zip
the resilt is the same - "Donload movie"

soooo to the busines
I followed this mindless recommendations

mindless wrote:
Recommendations:
1) I suggest developing for G2.1 rather than 2.0.x
2) If you were doing this only for your own use then a module would be a good idea.. but since you're working with the dev team I think you should develop a patch for core module that we can then roll into the product.

This means instead of a new GalleryFlashMovieItem we should modify the existing core code to also support flv.. which do you think makes more sense? GalleryMovieItem which does other movie types, or GalleryAnimationItem which already handles application/x-shockwave-flash mime type? I'm leaning towards the latter.. keep flash stuff together.

Steps:

  1. Setup a development install from current CVS or nightly snapshot.. CVS is preferred, then it is easy to generate diffs.
  2. Edit modules/core/CoreModuleExtras.inc, look for GalleryAnimationItem.. the 2nd place you find this you'll see a list of mime types just below it.. add the type for flv (what is the mime type, anyway?)
  3. Also add that mime type to modules/core/classes/helpers/GalleryMimeTypeHelper_advanced.class if needed.
  4. Bump the core module version to apply your changes:
    1. modules/core/module.inc, find the setVersion line and increment the last digit by one
    2. modules/core/CoreModuleExtras.inc, look for "README:" and you'll find some instructions on adding a new version.. basically look for "case 'end of upgrade path'" and just above that add case '1.0.30': or whatever is the OLD core version (if you just changed module.inc to 1.0.31 then you want case 1.0.30)
    3. just below your new case statement put code to add your new mime type (the change in MimeTypeHelper_advanced only adds the type in new installs).. you can copy the content from case '1.0.1' and just adjust the extension/mime type.
    4. search for the next "case 'end of upgrade path'" and add the same "case" line here.. don't need any content after it.
  5. Finally, edit modules/core/classes/GalleryAnimationItem.class
    1. function canBeViewedInline, add the new mime type
    2. function render, the html for embedded display

Now load any page and you'll jump to the upgrader.. after upgrade you should be able to add flv and get a GalleryAnimationItem. Now you can view the item and tweak the render code until it displays right.

like it was sujested, did the following changes and in the following files:
(p.s. unmodifide core version is 1.2.0.4)

modules/core/module.inc

Quote:
$this->setVersion('1.2.0.5');

modules/core/CoreModuleExtras.inc

Quote:
case '1.2.0.5':
/* Add video/x-flv mime type */
list ($ret, $mimeType) = GalleryCoreApi::convertExtensionToMime('flv');
if (!$ret && $mimeType == 'application/unknown') {
$ret = GalleryCoreApi::addMimeType('flv', 'video/x-flv', false);
if ($ret) {
return $ret;
}
}
***********************
and later in _prepareConfigUpgrade version was bumped aswell
***********************

next:

modules/core/classes/GalleryAnimationItem.class

Quote:
function canBeViewedInline() {
/* The mimeTypes listed here should provide a render() output */
static $mimeList = array(
'application/x-shockwave-flash',
'application/x-director',
'video/x-flv',
);

***************************************

function render($format, $params) {
global $gallery;

$fallback = trim(preg_replace("/[\r\n]/", '', $params['fallback']));

switch($format) {
case 'HTML':
$urlGenerator =& $gallery->getUrlGenerator();
$src = $urlGenerator->generateUrl(
array('view' => 'core.DownloadItem', 'itemId' => $this->getId(),
'serialNumber' => $this->getSerialNumber()),
array('forceFullUrl' => true));

***************************************

case 'video/x-flv':
$flvUrl = str_replace('&amp;', '%26', $src);
return sprintf( '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="%s" height="%s" id="%s"%s>

<param name="movie" value="%s" />
<param name="salign" value="lt" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="FlashVars" value="skinName=%s&autoPlay=true&autoRewind=false&streamName=%s"/>
<embed src="%s" flashvars="skinName=%s&autoPlay=false&autoRewind=false&streamName=%s" quality="high" scale="noscale" width="%s" height="%s" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
<noembed>%s</noembed>
</object>',
$width, $height,
!empty($params['id']) ? $params['id'] : 'movie',
!empty($params['class']) ? ' class="' . $params['class'] . '"' : '',
$urlGenerator->generateUrl(array('href' => 'modules/core/data/flvplayer.swf'), array('forceFullUrl' => true)),
$urlGenerator->generateUrl(array('href' => 'modules/core/data/skin'), array('forceFullUrl' => true)), $flvUrl,
$urlGenerator->generateUrl(array('href' => 'modules/core/data/flvplayer.swf'), array('forceFullUrl' => true)),
$urlGenerator->generateUrl(array('href' => 'modules/core/data/skin'), array('forceFullUrl' => true)), $flvUrl,
$width, $height,
$fallback);

if this can be of any help, I include in the attachment all changed files
and a flash video stream file - fish.flv for the test purposes

by the way does any one knows what official module FlashVideo was ment to do ?
is it onlly for swf files, couse even it has smth code for flash stream files it doesn't do much (atleast for me)

thnx, looking forward for any king of help

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2007-07-30 21:08

So the completed flashvideo module that has been out for 2 yrs and has been working for all does not work for you?

-s
FlashYourWeb and Your Gallery

 
marsietis

Joined: 2007-07-24
Posts: 2
Posted: Tue, 2007-07-31 08:31

i do realise how it sounds :/
whole week triing difrent aproachess

well, today got a tip form a friend in scriptlance.com
to try difrent OS patform
:/ will see if it helps

 
mari9755

Joined: 2007-08-08
Posts: 2
Posted: Wed, 2007-08-08 17:13

Hello,

i guess that it's better to place my question here instead of opening a new thread. I'm a php-beginner and I'm not so familiar with scripting. Nevertheless I would like to replace standard G2flv.swf-Flashplayer with JW FLVPlayer from www.jeroenwijering.com in flashvideo module. I've already changed the name in FlashVideoRender.class as follows:

/* Default player: G2flv.swf replaced by flvplayer*/
/* Including SWFObject<http://blog.deconcept.com/swfobject/> to defeat the "Click to activate..." in IE */
$SWFObjectUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/swfobject.js'),
array('forceFullUrl' => true));
$expressInstallUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/expressinstall.swf'),
array('forceFullUrl' => true));
$playerUrl = $urlGenerator->generateUrl(
array('href' => 'modules/flashvideo/lib/flvplayer.swf'),
array('forceFullUrl' => true));
$flashVars = 'file=http://www.jeroenwijering.com/upload/afraid.flv' . '&Width=' . $width . '&Height=' . $height;

With the static full URL in $flashVars it works fine. Even with uploaded files on the local server. But when I try it with variable content under flashVars I'll never get the right path. I searched for this about 3 days when I found this thread. But unfortunately I didn't understand how it works with $urlGenerator and all that stuff. When I try similar settings for $flashVars from flvplayer I always see only the black screen on the player and the movie never starts. I put in an echo function on $src Variable with the following result:

$src = http://web222.webbox666.server-home.org/gallery2/d/77-2/48testisdn_001.flv?
But the right path I need is:
http://web222.webbox666.server-home.org/gallery2/Video/48testisdn_001.flv

"Video" is the real directory, where I uploaded all my flashfiles. With that path the JW FLVPlayer works pretty good. So can anybody from you experts tell me how I should realize that line with $flashVars or with $src?
Here is a very good readmefile for JW FLVPlayer with all possible flashvar settings:http://www.jeroenwijering.com/extras/readme.html

I really appreciate your work and your great Gallery2 script. I checkt out several other Gallery scripts, but I think thats really the best of all!!

Let me know, when you need further information.

Here is the system info:
Gallery-Version = 2.2.2 Kern 1.2.0.4
PHP-Version = 4.4.7 cgi
Webserver = Apache/1.3.37 (Unix) FrontPage/5.0.2.2623 mod_ssl/2.8.28 OpenSSL/0.9.8a
Datenbank = mysqlt 5.0.32-Debian_7etch1-log, lock.system=flock
Werkzeuge = ArchiveUpload, Exif, Getid3, LinkItemToolkit, Gd, Ffmpeg
Beschleunigung = none/0, partial/900
Betriebssystem = Linux webbox666 2.6.18.2 #1 SMP Mon Nov 6 12:37:38 CET 2006 i686
Standard-Motiv = classic
gettext = Aktiviert
Sprache = de_DE
Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 2.0.50727; .NET CLR 1.1.4322; Media Center PC 4.0)
Zeilen in der GalleryAccessMap Tabelle = 16
Zeilen in der GalleryAccessSubscriberMap Tabelle = 14
Zeilen in der GalleryUser Tabelle = 2
Zeilen in der GalleryItem Tabelle = 12
Zeilen in der GalleryAlbumItem Tabelle = 2
Zeilen in der GalleryCacheMap Tabelle = 30

best regards...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-08-08 18:36
Quote:
"Video" is the real directory, where I uploaded all my flashfiles.

Did you add them manually or did you use the gallery interface? You can't just add items to an album in Gallery without using the Gallery interface. Gallery has to add the meta data etc. to the database to know where your items are.
http://codex.gallery2.org/Gallery2:How_to_Add_Items

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
mari9755

Joined: 2007-08-08
Posts: 2
Posted: Wed, 2007-08-08 21:29

Thanks Dave,

of course I used the gallery interface. First I uploaded them manually via ftp into my own created Video directory. Then I added them with "add item" --> "localy from server". And with standard G2flv.swf player it works fine. Even the thumbnails were automatically generated. Before that worked I had to install ffmpeg (as slackbinary) because this function is not supported by the webspace provider. But as I said that all works fine.I also tried the flowplayer and that worked also very good.
Now I don't understand how I can get that path to my flashfiles in my Video directory. I guess that the database should know the real location even if .../d/77-2/flashfile.flv is shown when .../Video/flashfile.flv is the physical place. ....on the other side...maybe that I'm absolutely wrong and you would say that the flashfiles were copied into the "database" directory .../d/77-2/.... Then in that case I really have a problem with JW FLVPlayer. ...Maybe I didn't have the right syntax for flashVars then.
What I tried first was: $flashVars = 'file=' . urlencode($src) . '&Width=' . $width . '&Height=' . $height;
And here is the line from setup wizard made by JW FLVPlayer side: flashvars="&file=http://www.jeroenwijering.com/upload/afraid.flv&height=180&width=320"
With my settings the JW FLVPlayer came up but without showing a video (and without a second right click ;-) ).

Hope you can help me. I can't solve that because I don't understand the process behind that.

 
shivaya

Joined: 2006-12-22
Posts: 132
Posted: Fri, 2007-11-02 23:58

I would like to have the size of video files with the command Php filesize (), how do we generate a hard path plz?

 
shivaya

Joined: 2006-12-22
Posts: 132
Posted: Sat, 2007-11-03 02:57
shivaya wrote:
I would like to have the size of video files with the command Php filesize (), how do we generate a hard path plz?

ok i found : $item->fetchPath()