will I add it at the end? will I need to change the & (of &autostart) to a %3 (or which ever number it is?) and will the control panel or at least a play button show so a user will know to hit play?
I know, I ask alot of questions, just making sure I understand how this will work.
Thanks
Rich
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2006-08-26 19:39
Well, as you can see in my example, the player just kinda sits there with the bufferclip running.
I was thinking of having it import a thumb for display, and a big ole' play button like youtube. But now we are talking some extra work.
And the thumb would most likely be stretched and look crappy without also including the thumb dimensions into the vars.
This is all doable, but may take me a little while to complete. I also have a flash slideshow module to complete
And my XML video player for gallery is also almost complete.
-s
curbob
Joined: 2003-10-06
Posts: 70
Posted: Sat, 2006-08-26 21:04
no worries, forget about this for now and maybe sometime in the far away future it will come up again. There are more important things that I should be doing also
again, thanks
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2006-08-26 21:23
actually I have the bigPlay button in place.
-s
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2006-08-27 16:27
I have a demo of the new XML Flash video player up in my gallery.
-s
modules_
Joined: 2005-01-12
Posts: 63
Posted: Sun, 2006-08-27 17:25
Hello,
is it possible to prevent downloading the flv file?
I only want my users to see a stream but do not
download the file.
I tested the no autostart and it may be because i'm adding it to a forums but it isn't working for me. I even uninstalled the flashplugin and reinstalled after copying the new file over.
I don't see much difference except I'm using the older js.
Are you sure you uploaded the new swf?
Cleared your cache?
-s
curbob
Joined: 2003-10-06
Posts: 70
Posted: Tue, 2006-08-29 03:07
i tested it using your code, pointing to your video and your g2flv file, still auto playes, it has to be something with the forums. I'm using PNphpBB2 within postnuke, i'll do some searching around tomorrow and see if I can find a reason this would be happening..
thanks again!
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2006-08-29 03:51
in the url gallery generates, the only thing that really needs replacing is the & (ampersand).
Flash interprets this as a break in the vars, and assigns the following string to a variable (if one exsists) (put simply)
so, your url only needs to replace all of gallery's & with %26 http://www.richardcurry.com/gallery2/modules/flashvideo/lib/G2flv.swf" flashvars="streamName=http://www.richardcurry.com/gallery2/main.php?g2_view=core.DownloadItem%26g2_itemId=915%26g2_serialNumber=6%26g2_GALLERYSID=954d0ce9593c40aa193f0d751506aa83&autoStart=false"
leaving the last & in place to separate the stramName with autoStart.
although phpBB is probably evaluating your html. try viewing page source, and seeing what phpbb replaces.
-s
curbob
Joined: 2003-10-06
Posts: 70
Posted: Wed, 2006-08-30 00:45
it worked, just like it should only needed the & and nothing fancy like %26 or Amp..
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2006-08-30 03:48
I just successfully implemented swfObject into my site for all flash objects (mp3 module, flv module, and xml video player).
No more "Click to activate and use this control" for IE users
-s
curbob
Joined: 2003-10-06
Posts: 70
Posted: Wed, 2006-08-30 23:12
So when will this great XML Flash video player be ready for release?
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2006-08-30 23:26
Well, I had to hack the rss module a bit for it to include the proper vars. As a result my feeds no longer validate.
Personnaly I don't care about validating, I think we should be able to add whatever we want to our feeds.
As the extra elements should not break anyone elses app, simply because they would not be looking for them.
But we shall strive to fix what we break, and get our feeds to validate again. Before release.
-s
curbob
Joined: 2003-10-06
Posts: 70
Posted: Thu, 2006-08-31 01:19
sounds good to me, while I wait, I guess I should work on my theme formatting. ..always learnin' !
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2006-09-03 04:02
Well, I'm releasing this crazy little XML Flv Player.
I decided to create my own rss generator as not to hack up gallery's feeds.
I updated to from 2.1.1 2.1.2 but I dont see any options for flv in Gallery Modules or in mime types
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2006-09-17 12:52
That's because the flashvideo module was not written for the 2.1.x revisions but rather 2.2 only available in the nightly snaps or svn.
-s
flashfreaker
Joined: 2005-05-04
Posts: 8
Posted: Tue, 2006-09-19 19:32
I was having difficulty getting thumbnails created for my FLV files, and it turned out that I just needed to compile my own version of ffmpeg with On2 VP6 decoding support. (Note that ffmpeg can not encode VP6 FLV files, but it can read them to generate thumbnails.)
P.S. I'm in the middle of writing the Flash Video Studio Techniques for Adobe Press, and plan to cover ffmpeg as an encoding utility. I might be able to fit a discussion of Gallery2 into that chapter as well.
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-09-19 21:48
cool.. if you do, let us know!
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2006-09-19 22:27
Bravo Robert,
Will you be able to share this version with On2 VP6 with the rest of us?
We've been waiting for the ffmpeg crew to get to that.
-s
flashfreaker
Joined: 2005-05-04
Posts: 8
Posted: Tue, 2006-09-19 22:35
I can post it, but like I said, it's only _decoding_ support. You still can't encode FLV files with VP6 in ffmpeg, nor will you ever be able to it since it's not based on an open-source codec like Spark is.
-Robert
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2006-09-19 23:13
Yeah, personally I would just like the thumbnail gemeration. I already encode in On2.
But as of now, I have to use spark for anything I put in my gallery unless I want to make custom thumbs.
And I don't want my users to think Gallery is broken.
I assume this is a linux build. How are you with compiling on windows? I tried using mingw, but failed miserably.
I would appreciate your recent build if you would.
Thanks,
-s
flashfreaker
Joined: 2005-05-04
Posts: 8
Posted: Tue, 2006-09-19 23:35
Not a problem. This is a Windows build, with the last SVN source code for FFMPEG. I followed the tutorial here to compile it myself:
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
flashfreaker
Joined: 2005-05-04
Posts: 8
Posted: Tue, 2006-09-19 23:40
Since I'm a Flash developer, I'd love to make a dynamic thumbnail module for G2 that enables a thumbnail to be generated from a real-time streaming FLV, hosted on a Flash Media Server (like Influxis.com). If I made a thumbnail SWF file that loaded just the first frame of the FLV, would it be hard to put this into an album template? Any thoughts/suggestions would be greatly appreciated.
In addition to that, I'd like to build a Flash Video player that works with streaming URLs (rtmp) too. Has anyone done that yet? Specifically, I'd like to build a SMIL-enabled FLV player (the FLVPlayback component that ships with Flash Pro 8 already supports SMIL) to handle a video clip that has several bitrate variations. The only thing G2 would need to store is the SMIL file (hopefully, it could remain editable--it's just a text file). Technically, it shouldn't be too hard to build a tab for the module so that you could specify your bitrate files individually and G2 would dynamically spit out the SMIL file for the FLV player. I use SMIL for both progressive and streaming FLV content. Here's an example of progressive FLV smil.
(I've never built a module specifically for G2, so I'm pretty clueless about the time involved to do it. The Flash work is relatively easy for me to do, but I'm not a PHP whiz.)
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
ArthurWetselaar
Joined: 2002-06-11
Posts: 38
Posted: Wed, 2006-09-20 09:17
Wow Robert, I've been waiting for this. My MP4 video's had to be converted to spark pro, which resulted in significant quality loss and file size growth. And boy I'm a glad that you compiled for Windows. I've never seen a compiler and try to keep it that way.
Thanks for your work.
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2006-09-20 21:33
Robert,
I think we could incorporate your SMIL player into the current flv module fairly easy(?).
Just have gallery forward all smil files to the flv module, and it would spit out the proper html for your player like it does for our current player.
I think we already have support for Peldi's player which is also smil enabled.
I'll look into this further.(kinda busy currently though )
-s
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-09-20 23:37
@flashfreaker:
i like the idea of having a single-frame swf file as a thumbnail for flash based movies in the album page.
would the thumbnail .swf be generated on the server-side?
the good news:
it's possible to extend g2 in a modular way to accomplish this. you'd need to write a module, no need to tamper with the existing codebase.
the bad news:
you need to write a module / extend the existing flashvideo module. as with most open source projects, the docs are kinda lacking. but there are some and we're glad to help you out.
What do you need to do to accomplish the task?
1. you need a toolkit that generates such a thumbnail swf from a flash movie. A toolkit in gallery is a class that registers itself to act specified operations on files of specified mime types.
your toolkit must register itself for the mime-type of those movie files. it must register the thumbnail operation (generating a thumbnail). (done in performFactoryRegistrations() of your module.inc)
examples:
the imagemagick, netpbm, dcraw (generating web-viewable images from raw images), gd, .. modules all register their toolkit in module.inc.
2. you need a new class GalleryDerivativeFlashAnimation (or so) which extends GalleryDerivative.
once a flash movie is added to g2, g2 wants to create a thumbnail.
you register your derivative class as a GalleryDerivative instance with the hint = mime type of the flash movie.
see: modules/core/CoreModuleExtras.class function performFactoryRegistrations().
background:
when an item is added to g2, the framework tries to create a thumbnail with the following call:
GalleryCoreApi::newFactoryInstanceByHint('GalleryDerivative', $source->getEntityType());
3. You need a renderer that generates the HTML to show the .swf thumbnail.
background:
- the "item" (GalleryItem or subclasses) in this case is the original flash movie
- the "thumbnail" is a GalleryDerivative (your GalleryDerivativeFlashAnimation class)
- themes/matrix/templates/album.tpl calls g->image (smarty template code) to render the HTML for a specific thumbnail.
- modules/core/classes/GalleryTemplateAdapter.class function image -> function _image loads the thumbnail. $entity is in this case the thumbnail, $item is the item.
- it then asks the item to return an appropriate renderer to render itself. there's e.g. modules/flashvideo/classes/FlashVideoRenderer.class which returns the HTML to display the flv player.
you can adjust that existing renderer to check GalleryUtilities::isA($entity, 'GalleryDerivative'); if it's a derivative, render it as a thumbnail, else it's a movie and you should use the existing render code in that class.
- finally it calls $renderer->render(...). For a normal image thumbnail, it would just return something like <a href="url to fullsized image"><img src="url to thumbnail.jpg"/></a>.
instead of extending the existing flashvideo module, you can create your own, independent one that only does the thumbnailing.
question:
since you're an experienced flash developer i got a question for you.
also, i'd like to see thumbnails for normal flash animations. i asked an adobe/mm developer for a freely available tool that extracts a frame from a flash animation (e.g. as jpeg). he told me to get back to me, but never did.
do you know of any solution?
let's assume it's impossible to get a jpeg as thumb. there is probably the option of
a) showing the animation just in smaller dimensions
b) a wrapper swf that extracts a single frame of the actual animation (client-side). downside: bandwidth. each user would download the original animation on the album page. not an option.
c) server-side generates a small thumbnail swf from the animation. but there's no free software that could do this, is there?
flashfreaker
Joined: 2005-05-04
Posts: 8
Posted: Thu, 2006-09-21 00:27
Actually, I don't need G2 to generate any thumbnail image for a real-time streaming FLV file (i.e. one served over RTMP)--the only thing I would need is for G2 to pass a template SWF the URL to the FLV. Within the template SWF, I could simply connect to the real-time streaming to "grab" the first frame, and then cut off the connection. This would require, though, that G2 detects whether the URL for the FLV file was http or rtmp based. If http, then G2 should just proceed with a thumbnail display as it currently does, loading the FFMPEG-created JPEG file. If RTMP, then G2 would know to load a flv_rtmp_thumbnail.swf (just made up that name) and pass it a few flashvars params, including the stream app URL (i.e. rtmp://flashbible.rtmphost.com/f8b), the stream name (i.e. lizard.flv), and the in point for the frame (i.e. 3.2, meaning grab the first frame at 3.2 seconds into the stream). So that means G2 needs to store three values for the stream's thumbnail.
RE: thumbnailing an animation SWF, at Schematic, where I work, we had a homegrown solution that opened the SWF on the desktop, took a screen grab of it, and then saved the screen grab. It wasn't elegant, but it worked for a CMS we built.
I found this on a google search just now:
I haven't found an open source tool yet, but I'll "look into it and get back to you." ;)
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-09-21 01:40
Would you like to show the flash movie (that is served by your rtmp server) in g2 in a flash player?
If so...
How would you add such an rtmp movie file to g2?
I understand that you don't add the actual movie to g2 since it's being served by a dedicated RTMP server. But you need to create an item in g2 which knows URI to the resource.
So you also need to create a new entity type for your rtmp file.
Your new class GalleryRtmpFlashMovie (extends GalleryDataItem) needs to store the URI of the resource (e.g. rtmp://contentserver.com/file123.flv).
Also, your item isn't a normal one for G2. Your item is a GalleryDataItem which is a GalleryFilesystemEntity which usually have a file handle associated with them.
In the create() method of your Rtmp entity, you can unlink the given file and put a placeholder file on disk to make the g2 framework happy.
@toolkit:
Either you need to create a toolkit that does nothing at all and just pretends to do the operations.
Or you should configure the rtmp entity to be "viewable".
so all in all you need:
1. new class GalleryRtmpFlashMovie (handles adding RTMP, ...)
2. new class GalleryDerivativeFlashAnimation (required to get g2 to render the HTML for flv_rtmp_thumbnail.swf)
3. extend existing flash renderer class to differentiate between rendering a thumbnail and the movie itself.
An alternative if you don't want to show the rtmp movies within g2:
- Use the G2 linkitem module to just create an item that links to your external movie player page.
- extend the linkitem module by registering your GalleryDerivativeFlashAnimation entity and ensure that it's rendered correctly by either adjusting GalleryLinkItem::getRenderer() or by other means.
ArthurWetselaar
Joined: 2002-06-11
Posts: 38
Posted: Fri, 2006-09-22 07:07
@flashfreaker
Your ffmpeg compilation for Windows does not generate thumbnails on my Windows 2003 server. In the past I saw a similar problem with a dcraw.exe . This exe is needed to read RAW files. It had been compiled for Windows but needed some extra switches to make it work on Windows 2003. Maybe you can shed some light on this.
ZiaTioN
Joined: 2006-02-14
Posts: 11
Posted: Wed, 2006-09-27 23:01
Is there an official release for this feature yet? I downloaded and installed one of the nightly builds a while back for this flash player. Every once in a while, the entire photo album is displayed incorrectly. It is missing all of it's style and images. It is just a white bg with text and thumbnails. I really need this flash player feature but would also like a more stable release.
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-09-28 15:33
haven't heard of any problems like that before.. what's in the nightly will be in 2.2 unless we can identify a particular problem. if you find steps to reproduce this problem consistently, please post them.
See if this does the trick for you. Its hard to tell as my server is on my lan, and everything loads instantly.
So I cannot tell if it breaks the functionality on large clips.
But, the bufferclip only shows for about a sec.
-s
I also have some videos that are small, I downloaded the resizable_player_v1.2.zip but i'm not sure where to add the player.swf file??
that file was for if your clips are shorter than 10 secs correct?
Thanks
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2006-10-14 03:35
Actually I think the version that ships with the latest nightly has that.
I've added the final and even tried the files from the latest SVN,
but since many of my users videos are like 2-3 seconds,
the graphic is in the way of the clip.
Is there a way (somewhere you point me to, to read) to change the graphic
and or move it to a corner of the video?
try this one. the one currently on your site does not have the fix(I peeked inside).
-s
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-10-15 00:26
suprsidr
i just checked the current svn version and as curbob says, that version still has the problem.
can we get your new version into svn?
also, i observed that the buffering time estimation is too optimistic / wrong.
if i follow http://209.254.158.237/index.php and watch the mac ads, it starts too early to play.
say it buffers 30% and then starts to play. it still loads the rest of the movie at the same pace when it plays the movie, but it just plain started playing the movie too early.
at 40% of the movie it stops playing because it hasn't downloaded more than 40% yet.
it's not like it would download slower after the movie starts playing, it just must do the wrong math to estimate how long it takes to download the rest.
hope that description is detailed enough. i don't know flash / actionscript, but if i can help to resolve that problem with an algorithm or so, let me know.
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2006-10-15 01:57
As far as I know player_less_then_10.zip should be as up to date as that player has gotten, and should be fine for svn.
I ended up with many versions as requests were fulfilled.
In this player I check to see if the netObject is reporting a duration of less then 10 seconds and disable the bufferClip accordingly.
Quote:
also, i observed that the buffering time estimation is too optimistic / wrong.
ns.setBufferTime(10);
is simply in seconds.
My server is not a very good example for displaying videos as I'm on a 1Mb connection.
And if more than one person is viewing at the same time results are quite poor.
I have the same setup on many client sites with much better results.
-s
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-10-15 02:47
do you suggest we use this new version for g2 or should we do some more testing? any other changes since the last version?
@buffering:
what's ns.setBufferTime() and where is it set?
do you say it always buffers a constant time of second, it's not dynamically estimated based on the downloadrate and the remaining time of the video?
aidanlister
Joined: 2005-12-07
Posts: 56
Posted: Sun, 2006-10-15 03:01
This is fantastic, thanks very much for all the work that has gone into this.
I'm interested in this preferred-derivative path for having all movie files converted on upload, or by maintenance task, to FLV files.
What needs to be done?
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2006-10-15 03:17
I would like to hear back from curbob as to whether it works for him and fixes his problem.
ns.setBufferTime()
The net stream bufferTime is set in the actionscript and is currently static at 10 seconds.
This should be fine, unless the video bitrate is very high, or as in my case the server connection is slow.
If you think we should modify this let me know.
We could make it another variable to include via flashVars and allow people to change it if they experience problems.
I copied the file over to flashvideo/lib and tested, i even tried renaming it to G2flv.swf.
It doesn't seen to make a difference, unless i'm missing a step. Did I need to reset anything
after copying over the file to my server?
thanks for all your work on this everyone..
aidanlister
Joined: 2005-12-07
Posts: 56
Posted: Sun, 2006-10-15 05:22
I will start work on creating a reliable method to either auto-convert, or convert manually via a module.
@ns.setBufferTime():
I think pretty much every other streaming video player does the buffering based on formula / algorithm:
$playMovie = false; // boolean
$fileSize = null; // kbytes
$duration = 0; // seconds
$downloadRate = 0; // kbytes per seconds
$bufferPosition = 0; // kbytes
// ($fileSize - $bufferPosition ) / $downloadRate) = remaining time it takes to download.
while ($someNullChecking && $duration - (($fileSize - $bufferPosition ) / $downloadRate) > 0) {
// keep buffering, don't play
// ...
// update fileSize, $bufferPosition, $downloadRate, set $duration if not determined yet
// ...
}
// start playing, keep downloading
// ...
i mean, with your model you wait x seconds to buffer some seconds and then you start. which is prone to fail in the high-bitrate or in the low-bandwidth case.
you could use these seconds to compute an averaged $downloadRate.
Also, I wouldn't start at the break-even point where $duration == $remainingTimeToDownload.
Give it an extra 10% error margin such that it doesn't stop playing just because the d/l rate dropped by 10% or so.
Having said all this, I must admit that I never wrote a streaming client before. Other people will know what the common practices are.
flashfreaker
Joined: 2005-05-04
Posts: 8
Posted: Sun, 2006-10-15 16:11
It really depends on what you want for a video deployment strategy. If you create multiple bitrates for any given clip, then you need not worry (as much) about your buffering strategy. Secondly, there's real-time streaming vs. progressive download. With real-time streaming and Flash Video, you can implement a double buffering strategy as described here:
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2006-10-15 21:08
@flashfreaker
I have implemented the strategy from that article. I'm not sure how it will effect progressive streams, but I'm willing to try.
As for your ffmpeg build for windows - FANTASTIC!
My partner has been going nuts adding every On2 video he has and more.
I would be willing to slide a few dollars your way if you would be willing to build a freeBSD version with On2 vp6. Let me know if you can/cannot.
@curbob give this one a try.
I'm curious as to whether ffmpeg detect your videos duration/dimensions.
Poor video encoders do not add the proper metadata for flash to read and result in the inability to determine bufferlength and such.
Posts: 8339
Ok, here is G2flv with the new var:
autoStart=false
so you would add it to your flashvars like:
flashvars="streamName=http://www.yoursite.com/your.flv&autoStart=false"
if you do not include this var, it will be assumed that autoStart=true.
Hope this helps.
-s
Posts: 70
thanks, i'll test it out later this evening
since the flashver line looks like this
will I add it at the end? will I need to change the & (of &autostart) to a %3 (or which ever number it is?) and will the control panel or at least a play button show so a user will know to hit play?
I know, I ask alot of questions, just making sure I understand how this will work.
Thanks
Rich
Posts: 8339
Well, as you can see in my example, the player just kinda sits there with the bufferclip running.
I was thinking of having it import a thumb for display, and a big ole' play button like youtube. But now we are talking some extra work.
And the thumb would most likely be stretched and look crappy without also including the thumb dimensions into the vars.
This is all doable, but may take me a little while to complete. I also have a flash slideshow module to complete
And my XML video player for gallery is also almost complete.
-s
Posts: 70
no worries, forget about this for now and maybe sometime in the far away future it will come up again. There are more important things that I should be doing also
again, thanks
Posts: 8339
actually I have the bigPlay button in place.
-s
Posts: 8339
I have a demo of the new XML Flash video player up in my gallery.
-s
Posts: 63
Hello,
is it possible to prevent downloading the flv file?
I only want my users to see a stream but do not
download the file.
Can lighttpd-flv 'streaming' be integrated in the
player? http://jan.kneschke.de/projects/flv-streaming/
Posts: 70
the flash video player is awesome!
I tested the no autostart and it may be because i'm adding it to a forums but it isn't working for me. I even uninstalled the flashplugin and reinstalled after copying the new file over.
this is the code I used
It still just autoplays. I haven't tried yet on just a plain html page.
Posts: 8339
this is what mine looks like:
I don't see much difference except I'm using the older js.
Are you sure you uploaded the new swf?
Cleared your cache?
-s
Posts: 70
i tested it using your code, pointing to your video and your g2flv file, still auto playes, it has to be something with the forums. I'm using PNphpBB2 within postnuke, i'll do some searching around tomorrow and see if I can find a reason this would be happening..
thanks again!
Posts: 8339
in the url gallery generates, the only thing that really needs replacing is the & (ampersand).
Flash interprets this as a break in the vars, and assigns the following string to a variable (if one exsists) (put simply)
so, your url only needs to replace all of gallery's & with %26
http://www.richardcurry.com/gallery2/modules/flashvideo/lib/G2flv.swf" flashvars="streamName=http://www.richardcurry.com/gallery2/main.php?g2_view=core.DownloadItem%26g2_itemId=915%26g2_serialNumber=6%26g2_GALLERYSID=954d0ce9593c40aa193f0d751506aa83&autoStart=false"
leaving the last & in place to separate the stramName with autoStart.
although phpBB is probably evaluating your html. try viewing page source, and seeing what phpbb replaces.
-s
Posts: 70
it worked, just like it should only needed the & and nothing fancy like %26 or Amp..
Posts: 8339
I just successfully implemented swfObject into my site for all flash objects (mp3 module, flv module, and xml video player).
No more "Click to activate and use this control" for IE users
-s
Posts: 70
So when will this great XML Flash video player be ready for release?
Posts: 8339
Well, I had to hack the rss module a bit for it to include the proper vars. As a result my feeds no longer validate.
Personnaly I don't care about validating, I think we should be able to add whatever we want to our feeds.
As the extra elements should not break anyone elses app, simply because they would not be looking for them.
But we shall strive to fix what we break, and get our feeds to validate again. Before release.
-s
Posts: 70
sounds good to me, while I wait, I guess I should work on my theme formatting. ..always learnin' !
Posts: 8339
Well, I'm releasing this crazy little XML Flv Player.
I decided to create my own rss generator as not to hack up gallery's feeds.
So if you want to try it out, get it here.
-s
Posts: 5
I updated to from 2.1.1 2.1.2 but I dont see any options for flv in Gallery Modules or in mime types
Posts: 8339
That's because the flashvideo module was not written for the 2.1.x revisions but rather 2.2 only available in the nightly snaps or svn.
-s
Posts: 8
I was having difficulty getting thumbnails created for my FLV files, and it turned out that I just needed to compile my own version of ffmpeg with On2 VP6 decoding support. (Note that ffmpeg can not encode VP6 FLV files, but it can read them to generate thumbnails.)
P.S. I'm in the middle of writing the Flash Video Studio Techniques for Adobe Press, and plan to cover ffmpeg as an encoding utility. I might be able to fit a discussion of Gallery2 into that chapter as well.
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
Posts: 8601
cool.. if you do, let us know!
Posts: 8339
Bravo Robert,
Will you be able to share this version with On2 VP6 with the rest of us?
We've been waiting for the ffmpeg crew to get to that.
-s
Posts: 8
I can post it, but like I said, it's only _decoding_ support. You still can't encode FLV files with VP6 in ffmpeg, nor will you ever be able to it since it's not based on an open-source codec like Spark is.
-Robert
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
Posts: 8339
Yeah, personally I would just like the thumbnail gemeration. I already encode in On2.
But as of now, I have to use spark for anything I put in my gallery unless I want to make custom thumbs.
And I don't want my users to think Gallery is broken.
I assume this is a linux build. How are you with compiling on windows? I tried using mingw, but failed miserably.
I would appreciate your recent build if you would.
Thanks,
-s
Posts: 8
Not a problem. This is a Windows build, with the last SVN source code for FFMPEG. I followed the tutorial here to compile it myself:
http://arrozcru.no-ip.org/ffmpeg_wiki/tiki-index.php?page=HomePage
It took me at least an hour to go through all the steps, but I got a workable ffmpeg.exe out of it. You can use my build of it, located here:
http://www.flashsupport.com/books/fvst/ffmpeg.zip
(Note that I may change the contents of this ZIP file as future versions of ffmpeg are released.)
Good luck!
P.S. I just presented a Flash Video workshop at the Flashforward conference in Austin, Texas. You can download my session files here:
http://www.flashsupport.com/forum/topic.asp?TOPIC_ID=2696
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
Posts: 8
Since I'm a Flash developer, I'd love to make a dynamic thumbnail module for G2 that enables a thumbnail to be generated from a real-time streaming FLV, hosted on a Flash Media Server (like Influxis.com). If I made a thumbnail SWF file that loaded just the first frame of the FLV, would it be hard to put this into an album template? Any thoughts/suggestions would be greatly appreciated.
In addition to that, I'd like to build a Flash Video player that works with streaming URLs (rtmp) too. Has anyone done that yet? Specifically, I'd like to build a SMIL-enabled FLV player (the FLVPlayback component that ships with Flash Pro 8 already supports SMIL) to handle a video clip that has several bitrate variations. The only thing G2 would need to store is the SMIL file (hopefully, it could remain editable--it's just a text file). Technically, it shouldn't be too hard to build a tab for the module so that you could specify your bitrate files individually and G2 would dynamically spit out the SMIL file for the FLV player. I use SMIL for both progressive and streaming FLV content. Here's an example of progressive FLV smil.
(I've never built a module specifically for G2, so I'm pretty clueless about the time involved to do it. The Flash work is relatively easy for me to do, but I'm not a PHP whiz.)
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
Posts: 38
Wow Robert, I've been waiting for this. My MP4 video's had to be converted to spark pro, which resulted in significant quality loss and file size growth. And boy I'm a glad that you compiled for Windows. I've never seen a compiler and try to keep it that way.
Thanks for your work.
Posts: 8339
Robert,
I think we could incorporate your SMIL player into the current flv module fairly easy(?).
Just have gallery forward all smil files to the flv module, and it would spit out the proper html for your player like it does for our current player.
I think we already have support for Peldi's player which is also smil enabled.
I'll look into this further.(kinda busy currently though )
-s
Posts: 32509
@flashfreaker:
i like the idea of having a single-frame swf file as a thumbnail for flash based movies in the album page.
would the thumbnail .swf be generated on the server-side?
the good news:
it's possible to extend g2 in a modular way to accomplish this. you'd need to write a module, no need to tamper with the existing codebase.
the bad news:
you need to write a module / extend the existing flashvideo module. as with most open source projects, the docs are kinda lacking. but there are some and we're glad to help you out.
What do you need to do to accomplish the task?
1. you need a toolkit that generates such a thumbnail swf from a flash movie. A toolkit in gallery is a class that registers itself to act specified operations on files of specified mime types.
your toolkit must register itself for the mime-type of those movie files. it must register the thumbnail operation (generating a thumbnail). (done in performFactoryRegistrations() of your module.inc)
examples:
the imagemagick, netpbm, dcraw (generating web-viewable images from raw images), gd, .. modules all register their toolkit in module.inc.
2. you need a new class GalleryDerivativeFlashAnimation (or so) which extends GalleryDerivative.
once a flash movie is added to g2, g2 wants to create a thumbnail.
you register your derivative class as a GalleryDerivative instance with the hint = mime type of the flash movie.
see: modules/core/CoreModuleExtras.class function performFactoryRegistrations().
background:
when an item is added to g2, the framework tries to create a thumbnail with the following call:
GalleryCoreApi::newFactoryInstanceByHint('GalleryDerivative', $source->getEntityType());
3. You need a renderer that generates the HTML to show the .swf thumbnail.
background:
- the "item" (GalleryItem or subclasses) in this case is the original flash movie
- the "thumbnail" is a GalleryDerivative (your GalleryDerivativeFlashAnimation class)
- themes/matrix/templates/album.tpl calls g->image (smarty template code) to render the HTML for a specific thumbnail.
- modules/core/classes/GalleryTemplateAdapter.class function image -> function _image loads the thumbnail. $entity is in this case the thumbnail, $item is the item.
- it then asks the item to return an appropriate renderer to render itself. there's e.g. modules/flashvideo/classes/FlashVideoRenderer.class which returns the HTML to display the flv player.
you can adjust that existing renderer to check GalleryUtilities::isA($entity, 'GalleryDerivative'); if it's a derivative, render it as a thumbnail, else it's a movie and you should use the existing render code in that class.
- finally it calls $renderer->render(...). For a normal image thumbnail, it would just return something like
<a href="url to fullsized image"><img src="url to thumbnail.jpg"/></a>
.instead of extending the existing flashvideo module, you can create your own, independent one that only does the thumbnailing.
question:
since you're an experienced flash developer i got a question for you.
also, i'd like to see thumbnails for normal flash animations. i asked an adobe/mm developer for a freely available tool that extracts a frame from a flash animation (e.g. as jpeg). he told me to get back to me, but never did.
do you know of any solution?
let's assume it's impossible to get a jpeg as thumb. there is probably the option of
a) showing the animation just in smaller dimensions
b) a wrapper swf that extracts a single frame of the actual animation (client-side). downside: bandwidth. each user would download the original animation on the album page. not an option.
c) server-side generates a small thumbnail swf from the animation. but there's no free software that could do this, is there?
Posts: 8
Actually, I don't need G2 to generate any thumbnail image for a real-time streaming FLV file (i.e. one served over RTMP)--the only thing I would need is for G2 to pass a template SWF the URL to the FLV. Within the template SWF, I could simply connect to the real-time streaming to "grab" the first frame, and then cut off the connection. This would require, though, that G2 detects whether the URL for the FLV file was http or rtmp based. If http, then G2 should just proceed with a thumbnail display as it currently does, loading the FFMPEG-created JPEG file. If RTMP, then G2 would know to load a flv_rtmp_thumbnail.swf (just made up that name) and pass it a few flashvars params, including the stream app URL (i.e. rtmp://flashbible.rtmphost.com/f8b), the stream name (i.e. lizard.flv), and the in point for the frame (i.e. 3.2, meaning grab the first frame at 3.2 seconds into the stream). So that means G2 needs to store three values for the stream's thumbnail.
RE: thumbnailing an animation SWF, at Schematic, where I work, we had a homegrown solution that opened the SWF on the desktop, took a screen grab of it, and then saved the screen grab. It wasn't elegant, but it worked for a CMS we built.
I found this on a google search just now:
http://www.comobjects.net/Products/MediaProcessor/
I haven't found an open source tool yet, but I'll "look into it and get back to you." ;)
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
Posts: 32509
Would you like to show the flash movie (that is served by your rtmp server) in g2 in a flash player?
If so...
How would you add such an rtmp movie file to g2?
I understand that you don't add the actual movie to g2 since it's being served by a dedicated RTMP server. But you need to create an item in g2 which knows URI to the resource.
So you also need to create a new entity type for your rtmp file.
Your new class GalleryRtmpFlashMovie (extends GalleryDataItem) needs to store the URI of the resource (e.g. rtmp://contentserver.com/file123.flv).
Also, your item isn't a normal one for G2. Your item is a GalleryDataItem which is a GalleryFilesystemEntity which usually have a file handle associated with them.
In the create() method of your Rtmp entity, you can unlink the given file and put a placeholder file on disk to make the g2 framework happy.
@toolkit:
Either you need to create a toolkit that does nothing at all and just pretends to do the operations.
Or you should configure the rtmp entity to be "viewable".
so all in all you need:
1. new class GalleryRtmpFlashMovie (handles adding RTMP, ...)
2. new class GalleryDerivativeFlashAnimation (required to get g2 to render the HTML for flv_rtmp_thumbnail.swf)
3. extend existing flash renderer class to differentiate between rendering a thumbnail and the movie itself.
An alternative if you don't want to show the rtmp movies within g2:
- Use the G2 linkitem module to just create an item that links to your external movie player page.
- extend the linkitem module by registering your GalleryDerivativeFlashAnimation entity and ensure that it's rendered correctly by either adjusting GalleryLinkItem::getRenderer() or by other means.
Posts: 38
@flashfreaker
Your ffmpeg compilation for Windows does not generate thumbnails on my Windows 2003 server. In the past I saw a similar problem with a dcraw.exe . This exe is needed to read RAW files. It had been compiled for Windows but needed some extra switches to make it work on Windows 2003. Maybe you can shed some light on this.
Posts: 11
Is there an official release for this feature yet? I downloaded and installed one of the nightly builds a while back for this flash player. Every once in a while, the entire photo album is displayed incorrectly. It is missing all of it's style and images. It is just a white bg with text and thumbnails. I really need this flash player feature but would also like a more stable release.
Posts: 8601
haven't heard of any problems like that before.. what's in the nightly will be in 2.2 unless we can identify a particular problem. if you find steps to reproduce this problem consistently, please post them.
Posts: 32509
Could you please add a link to the ffmpeg binary for windows to the ffmpeg page on the codex?
http://codex.gallery2.org/index.php/Gallery2:Modules:ffmpeg
Posts: 70
I also have some videos that are small, I downloaded the resizable_player_v1.2.zip but i'm not sure where to add the player.swf file??
that file was for if your clips are shorter than 10 secs correct?
Thanks
Posts: 8339
Actually I think the version that ships with the latest nightly has that.
add the swf to gallery2/modules/flashvideo/lib
Also you might be interested in my G2 XML FLV player.
I've just added thumbs to the video menu
-s
Posts: 70
I've added the final and even tried the files from the latest SVN,
but since many of my users videos are like 2-3 seconds,
the graphic is in the way of the clip.
Is there a way (somewhere you point me to, to read) to change the graphic
and or move it to a corner of the video?
Thanks again
(example) http://www.richardcurry.com/gallery2/main.php?g2_itemId=1300
Posts: 8339
try this one. the one currently on your site does not have the fix(I peeked inside).
-s
Posts: 32509
suprsidr
i just checked the current svn version and as curbob says, that version still has the problem.
can we get your new version into svn?
also, i observed that the buffering time estimation is too optimistic / wrong.
if i follow http://209.254.158.237/index.php and watch the mac ads, it starts too early to play.
say it buffers 30% and then starts to play. it still loads the rest of the movie at the same pace when it plays the movie, but it just plain started playing the movie too early.
at 40% of the movie it stops playing because it hasn't downloaded more than 40% yet.
it's not like it would download slower after the movie starts playing, it just must do the wrong math to estimate how long it takes to download the rest.
hope that description is detailed enough. i don't know flash / actionscript, but if i can help to resolve that problem with an algorithm or so, let me know.
Posts: 8339
As far as I know player_less_then_10.zip should be as up to date as that player has gotten, and should be fine for svn.
I ended up with many versions as requests were fulfilled.
In this player I check to see if the netObject is reporting a duration of less then 10 seconds and disable the bufferClip accordingly.
ns.setBufferTime(10);
is simply in seconds.
My server is not a very good example for displaying videos as I'm on a 1Mb connection.
And if more than one person is viewing at the same time results are quite poor.
I have the same setup on many client sites with much better results.
-s
Posts: 32509
do you suggest we use this new version for g2 or should we do some more testing? any other changes since the last version?
@buffering:
what's ns.setBufferTime() and where is it set?
do you say it always buffers a constant time of second, it's not dynamically estimated based on the downloadrate and the remaining time of the video?
Posts: 56
This is fantastic, thanks very much for all the work that has gone into this.
I'm interested in this preferred-derivative path for having all movie files converted on upload, or by maintenance task, to FLV files.
What needs to be done?
Posts: 8339
I would like to hear back from curbob as to whether it works for him and fixes his problem.
ns.setBufferTime()
The net stream bufferTime is set in the actionscript and is currently static at 10 seconds.
This should be fine, unless the video bitrate is very high, or as in my case the server connection is slow.
If you think we should modify this let me know.
We could make it another variable to include via flashVars and allow people to change it if they experience problems.
-s
Posts: 8339
@aidanlister try here: http://gallery.menalto.com/node/55500
Posts: 70
I copied the file over to flashvideo/lib and tested, i even tried renaming it to G2flv.swf.
It doesn't seen to make a difference, unless i'm missing a step. Did I need to reset anything
after copying over the file to my server?
thanks for all your work on this everyone..
Posts: 56
I will start work on creating a reliable method to either auto-convert, or convert manually via a module.
I'll use this other thread for discussion:
http://gallery.menalto.com/node/55500#comment-204103
Posts: 32509
suprsidr
@ns.setBufferTime():
I think pretty much every other streaming video player does the buffering based on formula / algorithm:
i mean, with your model you wait x seconds to buffer some seconds and then you start. which is prone to fail in the high-bitrate or in the low-bandwidth case.
you could use these seconds to compute an averaged $downloadRate.
Also, I wouldn't start at the break-even point where $duration == $remainingTimeToDownload.
Give it an extra 10% error margin such that it doesn't stop playing just because the d/l rate dropped by 10% or so.
Having said all this, I must admit that I never wrote a streaming client before. Other people will know what the common practices are.
Posts: 8
It really depends on what you want for a video deployment strategy. If you create multiple bitrates for any given clip, then you need not worry (as much) about your buffering strategy. Secondly, there's real-time streaming vs. progressive download. With real-time streaming and Flash Video, you can implement a double buffering strategy as described here:
http://www.adobe.com/devnet/flashmediaserver/articles/fms_dual_buffering.html
-Robert
Robert Reinhardt
Author, the Flash Bible | VP, Multimedia Platforms, Schematic
Posts: 8339
@flashfreaker
I have implemented the strategy from that article. I'm not sure how it will effect progressive streams, but I'm willing to try.
As for your ffmpeg build for windows - FANTASTIC!
My partner has been going nuts adding every On2 video he has and more.
I would be willing to slide a few dollars your way if you would be willing to build a freeBSD version with On2 vp6. Let me know if you can/cannot.
@curbob give this one a try.
I'm curious as to whether ffmpeg detect your videos duration/dimensions.
Poor video encoders do not add the proper metadata for flash to read and result in the inability to determine bufferlength and such.
-s