02 October 2007
Drag & Drop Flex MyTube
Streaming video with Flash Media Server
Categories: Flash Media Server Flex
Recently I was shown a video email application that would send email recipients a link to a video email message. The idea was cool, but raised concerns for my healthcare practice due to the new privacy laws (HIPPA) and the app being hosted on third party servers. So I figured I would try to build a similar app using Flex and hosting it internally...This way there would be no privacy issues. Before going full bore on a video email app, I thought I might get my feet wet building a simple streaming video library using Flash Media Server to see how it performed. The video files I have on hand are about 30 minutes in length, shot in HDV, and edited in Sony Vegas. This produces, when fully rendered as NTSC (720x480), about a 2GB MPEG file. So, step one was to get some working FLV files that I could test. I needed to batch upload to FMS (Flash Media Server) and transcode the MPEG's (or any other file for that matter) to the FLV format on the fly. I found a command line tool called FFMPEG that does this with great speed, and also captures a still frame from the file that you can use as the thumbnail preview. Sweet...this tool is a must! More on FFMPEG in a later post. I also needed to create a standard SQL database table to hold additional info about each of the videos, like description, title, duration etc. (FLV's can be injected with Metadata for some of these fields, but its limited), and I created a CFC that will query the database and return all recordsets to the Flex app upon initialize. Okay, boring part finished, now onto the Flex front-end and FMS. So my thoughts were to have a single interface, where users could browse the preview thumbnails, and watch a video at the same time. I went with draggable previews that drop onto the main player, and the video starts playing. Easy and intuitive, and you can just page through the rest of the recordset while the video play, while tooltips on the previews provide the user with a video description and duration. Flash Media Server, to my surprise, is such a breeze as well. Just install FMS, create your app directory structure, upload the FLV's into the "streams/_definst_" folder, and feed your Flex app the source paths of the FLV's using the rtmp protocol. It all just works, and the videos stream in!
I have posted an early example of the app HERE which includes source code. (Right-click for the source code) Flash Media Server is for sure the way to go if you want true streaming, video copy protection, and an easy way to deliver lengthy presentations. Way to go Adobe for making it so easy for us!
Subscription Options
You are not logged in, so your subscription status for this entry is unknown. You can login or register here.
Re: Drag & Drop Flex MyTube
Flash Video Server is a powerful video streaming platform which provides services of streaming Flash videos and audios between the server side and client side. Flash Video Server offers you easy solution to enable your clients to play, record, and publish local Flash videos, live videos and audios to the server and share with other users.
This program makes it possible for online meetings, live video publishing, recording, and playing.
http://www.flvsoft.com/
This program makes it possible for online meetings, live video publishing, recording, and playing.
http://www.flvsoft.com/
Posted by isabella219 on October 28, 2008 at 2:52 AM

