Flash video n' related stuff
Just wrapped up a three-hour workshop at Streaming Media East here in NYC on building video players for Flash. Thanks to everyone who attended for staying alert for the full three hours — what a marathon! As promised, here are the resources for the talk; some links, and the example source code:
Adobe Developer Connection: Dynamic Streaming overview
Adobe Developer Connection: Dynamic Streaming ActionScript guide
If you have any outstanding questions or comments, feel free to comment and I’ll get back with you as soon as I can.


15 Responses for "Developing a Rich Video Player for Flash: Resources"
Hi Lisa,
I have implemented your AS3 Dynamic video playlist and it works great! I now would like to add a xml preroll for a intro video but I don’t know how to set it up. Your help would be greatly appreciated.
Thanks for your help,
Ruben
Hello Lisa,
Can you please contact me by email?
I have a question to ask you after reading one of your articles in adobe.
Best Regards,
Elad
lisa
how may I contact you about a large scale project we are developing?
Thanks
al
Hi Lisa, what are you doing the first qtr of 2010. i’d like you to speak at a confrence in my country. email me for details.
Hello Lisa
I’ll be attending flashbelt and I’m looking forward to your Streaming Made Easy with FMS 3.5 session. Is there any chance you’ll add a longer more in-depth session about streaming? Or, would you be willing to advise/tutor/work with individuals or a small group of developers sometime during flashbelt?
Thanks,
Teresa
Lisa..Hi…I’m not sure this is the right way to ask a question/request help…but…
I’m trying to understand/characterise the download and throughput characteristrics of vidoes etc. as they are seen on hulu and youtube. I beleive these kinds of sites use apache FLV and SWFs extensively.
When I look at the packet traces (like with wireshark etc.), I see, for even moderately sized files, first a 1 or 2 second high speed burst, I guess for buffering, followed by periodic (several times per second) bursts for the duration of the video (all tcp). I’ve read the high level articles about streaming and progressive, but now I am looking for more detial…like how does the server ‘know’ how much to send out for the buffer, and would teh subsequent bursts be acutaly ‘streamign’ bursts?
I haven’t been able to find (maybe understandably) the kinds of books and tutorials you see for http etc.,where well established handshake and protocol information diagrams are provided. Can you give me any pointers on where I could learn what I am lookign for?
Thanks!!!
Ben Widrevitrz
Hi Lisa,
I am wondering if it is possible to create a .swf file that will play any video that is passed as the streamName inside of the embed code? Is it possible maybe to declare an unassigned variable inside of the .swf code so that it can be assigned to the .flv file that is included in the embed code?
Thank You So Much,
Eddie
Hi Eddie,
Yes, this is certainly possible! I show you how to do this in my book, but also in the ‘extras’ included with the source of my Developer Connection article on Adobe.com:
http://tinyurl.com/flashvideoplaylist
@Teresa,
Looking forward to meeting you at FlashBelt!
I’m not going to have a lot of extra time at the conference, unfortunately, (as I’ll have my little one in tow!) but I’d be happy to answer any specific questions you may have after the talk.
See you there
@elad,
I don’t generally offer one-on-one tech help offline (or I’d never get any work done!) I believe its best to post for all to read and learn. That being said, what can I assist you with?
// Lisa
@Ruben,
There are a few ways to add preroll ads into your playlists. The easiest way would be to make your playlist auto-play, and specify the prerolls right in the playlist. Of course, you may want to add some more sophisticated functionality (such as disabling the video controls during ads) which would be more involved. I do provide sample code for autoplaying in the ‘extra’ code provided with my playlist article.
Hope that helps!
//Lisa
Hi Lisa
I was sick last week-end and was unable to travel to flashbelt. Bummer! I was looking forward to your talk on the FMS 3.5 and I was hoping to ask you two questions.
1. In AS2 I used loadVars to load videos into a swf player, but I can’t get that to work in AS3. There must be a way to do this in AS3, right? I think Eddie’s question about ‘embedding the streamName inside of the embed code’ is asking the same thing so I will reread your article on Adobe’s dev center to help me understand this.
On pages 142-144 of your book you explain how to use PHP and the loadVariables method to pass a filename into a .swf but that seems complicated. In AS2 I can pass the video filename to the .swf without using PHP. Is there another place in your book where you cover this?
2. How do I connect to my FMS via NetConnection? When I load the source in an flvPlayback instance the path is
rtmp://myFMSserver/myApp/video_filename – for example,
rtmp://myFMSserver/dogs/poodle.flv
This path doesn’t work with NetConnection. I think I’m missing something but I can’t figure out what I’m missing.
On page 87 you show the nc.connect path as
rtmp://yourFMSserver.com/yourAppName/yourInstanceName
What is ‘yourInstanceName’? In my example above I think ‘myInstanceName’ should follow dogs/ like this:
rtmp://myFMSserver/dogs/myInstanceName — but I don’t know what ‘myInstanceName’ refers to. Is it the name of the player? You don’t need an instance of the flvPlayback component when using NetConnection, right? So what do I give an instance name to?
I know this is a simple concept but I am totally not getting it. Any help you can offer will be greatly appreciated.
Thanks, and sorry I missed you at flashbelt. Maybe next year…
Teresa
@Teresa
You probably already have this issue solved, but I’ll take a crack at it anyway…
“myFMSserver” is a dummy URL… it would need to be the address of your FMS server, like:
localhostor
http://www.flashconnections.comor
345.24.389So, if you are creating a new netconnection to play back a video using the built-n video on demand application, your connection string would look something like this:
rtmp://www.flashconnections.com/vodInstance names are used if you have more than one version of an application running, say for a chat room or other situation where you want to keep track of separate accounts, etc. For example, in my childcare monitoring application, each childcare center runs its own instance of the iFoxCam application, so the parents only have access to their center’s video feed. The connection string would look like this:
rtmp://www.iFoxCam.com/videomonitoringapp/daycare1Hope this helps!
Currently I am developing a Video app with Flex-AIR and the videos are of .mov type. My videos are of 480p/720p and 1080p resolution.
While going to fullscreen I am using hardware scaling by passing a rectangular video area to the stage.fullScreenSourceRect. My video is scaling fine but along with it the videoControls are also scaling which I dont need.
I have gone through lot of blogs but couldn’t find any solution. I was actually referring youtube sort of fullscreen with HD videos.
Please let me know if any solution exists to stop scaling of the video controls and control it by the code.
Thanks in Advance
@Siva Shanker
Here is a link to a great collection of best practice tips for fullscreen playback in Flash: http://www.flashstreamworks.com/archive.php?post_id=1241799250. Jens suggests using FullScreenRect to enlarge just the video object. I suspect, though, that you are using the FLVPlayback component. Couldn’t you just use a skin with the controls below the video, and zoom in only on the video area?
Leave a reply