FlashComGuru Home Imediasee Influxis Uvault Akamai
                                                                                       Forum Index | Active Topics | Register
                                                                                                          List Overview | List Archives
                                                                                                                           About this site | Advertise
 

home

Adobe AIR (8)
Applications (33)
Books & Training (9)
Collaboration (10)
Components (6)
Events (56)
Flash Player (11)
Flex (31)
FMS (78)
General (113)
Hosting (5)
Jobs (13)
Off topic (33)
Press Releases (13)
Site Check (9)
Tools (43)
Videos & Players (57)

Follow me on Twitter

Alltop, all the cool kids (and me)

 
Yes I am stupid and I should have checked all the Devcenter articles first... It was only when I finished this little tutorial that I realized that Lisa Larson had already covered this ground. I used her Flashcom Server based article as a starting point to turn it into a progressive download and then found out that she had already taken care of it. Ah well, I think I still had some value to add. In particular, my list will not download all flv's in the background but shows a preview and then stops the download as outlined in my tip here. No jpg thumbnails are needed from here on.
Check the video tutorial: yet another flv listbox

Comments
[Add Comment]
Ok, so with this you are able to create "faux-Jpegs" of the FLV by just grabbing the first bit. However, lets say you wanted to create an animated thumb of the FLV. Would this be possible? I would think that you would use ASCuepoints to set a limit for how much of the animation you wish to download. However, i am not sure that Cuepoints would work for this...maybe you would use a percentage loader then when a certain percentage is reached you load the nonexistent FLV.

what do you think? is this possible? And I am using PHP with the FLVPlayback component.

Well thanks for writing this article, it is very timely.
# Posted By brent arnold | 10/24/05 9:38 PM
Animated thumbs would also work but I am not sure if you could then stop the entire flv from downloading in the background. Maybe a better way would be to start and loop playback of a thumb once the user mouses over it?
FYI I will shortly release an updated version of this sample app which uses Flash8's bitmapdata api to create the thumbnail in an alternative and possibly more robust way.
# Posted By stoem | 10/25/05 9:13 AM
Yes I was thinking that the thumbs would not start playing until the user mouses over it. However would you still have to load the whole flv? You think the "nonexistent FLV" trick would not work anymore? Is this asking to much out of an FLV?

Well thanks again and i look forward to your update.
# Posted By brent arnold | 10/25/05 2:40 PM
I think it would be difficult. Even if you stop the flv from loading at some stage but requesting a non-exisiting flv you then must start replay again from the start, requesting the original flv. Because some of it is now cached it would start loading the rest.

This may be an issue but may also be workable. Not sure. For my needs the thumbs do the job.
# Posted By stoem | 10/25/05 2:47 PM
It seems that the Stop video button does NOT work with the supplied FLA, & sample files. any ideas?

Steve
# Posted By Steve | 2/5/06 3:22 PM
stop button has been fixed and sources have been updated. Thanks.
# Posted By stoem | 2/6/06 8:55 AM
Hi,
V.interested by your idea Stefan, as have been using Lisa's tut as a template for my own project and was beginning to think that using FFMPEG server-side would be the only way to generate dynamic thumbnails.
I just downloaded the source however, and the swf crashes my machine.. without fail.
Looking at my menumeters, my processor floods and I get beachballed and have to force-quit.
Anyone else suffered this? perhaps some mods are in order?
Will continue going through the code and search for an answer, thanks for sharing..
Dave
# Posted By Dave | 9/8/06 10:49 AM
hmm i think i have heard about problems on macs once before.... sorry but I have no idea why this would crash your machine... :-/
# Posted By Stefan | 9/8/06 10:58 AM
Is there a reason as to why the VideoThumb.as file wont execute in my adapted example? I have put in some trace outputs and they work in your downloaded copy but I can't figure out why my app doesnt. I can't seem to find where you actually call it. I am assuming that it has to do with how I get the VideoThumb into my library as a component.
# Posted By Chad Courtney | 9/12/06 10:49 AM
i was just wondering if there's a way to have the text that's next to each thumbnail from the XML file to be on more than one line (Wrap) so that i can have more text?

thanks :)
# Posted By kevin | 10/24/06 3:53 PM
Found this just at the right time - is there a way to play a part of the video and then pause - and even better the amount to play to be read in from the XML - so that the different video stops at the appropiate time
# Posted By Pete | 11/1/06 7:06 PM
yeah that's entirely possible, bit hard to explain the full process here though :-)
# Posted By Stefan | 11/1/06 7:20 PM
great job, Stefan. the button works perfectly in my project - thanks.
would it be possible to add a progress bar so after user clicks on a thumbnail it shows info of how much is buffered. it would be a nice feature, because now it just continue to show thumbnail in the video box while wating for the buffering to complete the preset amount of seconds. to user it may look like the player is not working.
i tried and couldn't make it work with this approach :
http://livedocs.macromedia.com/flash/8/main/wwhelp...

any ideas appreciated.
# Posted By adam | 12/11/06 11:44 PM
Hello Stefan,
thanks a lot for your published information. i have tried it. & it's working...good...
# Posted By Jeevan K Augustin | 3/7/07 9:30 AM
Great Script, I would like mine to begin playing automatically the play on down the list, If a user select the FLVs they would continue to play from that point
# Posted By Joshua | 8/8/07 8:09 PM
Hi
This is a great article.
I was wondering could you use this list component with the FLV Playback component in flash 8 or CS3.
# Posted By Andrew K | 1/9/08 6:49 AM
yes I think you could
# Posted By Stefan | 1/9/08 9:00 AM
forgive me for being dumb how!!!!!!
I'm new to actionscript
# Posted By Andrew K | 1/10/08 5:39 AM
Hey there, I love this little idea...only one question:

Like the FLV Playback Component it stops the video if you set it to autoPlay=false on frame 1. There must be a way of stopping the flv the same whay with this solution?

BR

/Andreas
# Posted By Andreas | 2/15/08 8:34 AM
Sorry forgot to write: that whatever i do trying to stop the flv it always plays about 0.3 to 0.9 seconds before stopping...
# Posted By Andreas | 2/15/08 8:36 AM
maybe try a shorter buffer?
# Posted By Stefan | 2/15/08 9:04 AM
So I did manage to make it stop on the first frame with:

if (info.code== "NetStream.Play.Start"){
   _ns.seek(0);
}
if (info.code=="NetStream.Seek.Notify"){
_ns.pause();
_nc.close();
}

Problem is that it still loads a few bytes more then the first frame. Why because imagine a page full with thumbnails if it has to load 10-40kb/thumbnail even if the first frame of the flv probably need alot less then that. there is no point in doing this instead of a real jpg thumbnail.
Im trying to figure out how I can get hold of how many bytes the first fram is anf the stop the loading with
"if(_ns.bytesLoaded>first frame) then "_ns.play("nonexist.flv");"
# Posted By Andreas | 2/15/08 9:55 AM
Sorry forgot: I've tried setting the buffer to 0.1 & 0.01 and tons of other setting...but "NetStream.Buffer.Full" is sent way to late after "NetStream.Play.Start"

/A
# Posted By Andreas | 2/15/08 9:58 AM
Hi again,

Looks like the best whay to detect when the first frame is loaded is this (the important part):

var bLoadedTot = "FALSE";
this.onEnterFrame = function() {
   //tracing the bytes loaded in a text variable
   bLoaded = _ns.bytesLoaded;
   trace("thumb.video.height="+thumb.video.height);
   //if the video object is loaded its height turns to above zero
   if (thumb.video.height>0) {
      if (bLoadedTot == "FALSE") {
         bLoadedTot = _ns.bytesLoaded;
         _ns.pause();
         _nc.close();
         _ns.play("nonexist.flv");
         delete this.onEnterFrame;
      }
   }
   
};
# Posted By Andreas | 2/18/08 7:20 AM