Best method for embedding flv file on webpage.?

Hi,
What is the easiest, most broadly supported way to embed flv on a web page. I am familiar with how to embed swf files using swfobject. Is it possible to use swfobject to play flv directly? If not, what is the best, and ideally free, solution then?

Thanks,
Sam
SamuelMillerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

btdownloads7Commented:
The easies way is to use FlowPlayer. It has a pretty decent tutorial, and a lot of plugins to extend functionality if you chose to do it later. It's free and pretty easy to set up.
http://flowplayer.org
0
IqAndreasCommented:
If you have Flash Professional, all you have to do is drag a media player component onto the stage and set it's source property to wherever your video is. I don't think you even need to use any coding.

If you don't have Flash Professional, you can download the 30 day trial version and fix something up before it expires. There are literally thousands of videos out there on how to make a Flash video player:
http://www.google.com/#q=as3+video+player+tutorial


Though, for simplicities sake, you might want to upload that FLV to YouTube, and embed their player onto your site. That way, they pay for the bandwidth, and watchers of your video get higher speeds. :)


Good luck with your project,
Andreas
0
SamuelMillerAuthor Commented:
Thanks both for the helpful info!
If one can play a flv file through the players suggested why and when would someone use a swf to play an external FLV. And, if doing so doesn't add much more download time, why not use swfobject to handle flv?

Thanks,
Sam
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

btdownloads7Commented:
FlowPlayer has a bunch more options than the SWF object, including the option to have the scrub bar on the bottom, and the ability to integrate with a lot of different web servers.
0
IqAndreasCommented:
Sorry, I should have clarified that better.

Sadly, I don't believe (at least most) browsers are able to play FLV files directly. They need to be played in some sortof player.

With Flash Professional, you generate a SWF file that can be used by the browser. In fact, FLV stands for "FLash Video". The FLV format was made by Adobe (the creators of Flash) to be used with SWF files and Flash Professional.


I haven't used it myself, but I'm guessing that FlowPlayer is some sort of video player originally made in Flash Professional and exported to SWF format.

Flash Professional contains several templates for playing video files (just check out the links I put in my previous post) so all you need to do is drag a "Video Component" onto the main area, and specify the video file you want to play. Then, you click "Publish" and it will generate a SWF file containing the video that you can embed onto your site.


And if you learn ActionScript (the coding language of Flash) you have A LOT more control over what happens, and you can do things like automatically browse to your website or display a contact form when the video finishes playing. There are tons of opportunities available to you if you learn ActionScript. :)
0
IqAndreasCommented:
If you decide to take the ActionScript route, and want to do some extra coding, Adobe released a free online book "Programming ActionScript 3.0".

This chapter specifically talks about FLV files, but if you want to learn ActionScript, the entire book is a great resource:
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e1a.html


However, if you are just creating a simple video player in Flash Professional, you likely won't need ActionScript at all.
0
SamuelMillerAuthor Commented:
Again thanks both for the very helpful information.
IqAndreas are you saying that the flv players out there are actually swf players that don't require you to export the flash with is own swf file. You just need the flv file to play it with a flv player. In other words, the flv players acts as a "swf" container?

Sam
0
IqAndreasCommented:
I think I understand what you mean, and if so, yes, that is what I am saying.

I attached an image of the difference between the two.

In the left part of the image, you create the SWF yourself, which means you need Flash Professional, but it also gives you more control over the video. You can also add special features, such as redirecting to a contact form when the video is done or something, but the advanced features require learning at least a little ActionScript.

In the part to the right, you do not need Flash Professional. I'm guessing that FlowPlayer (or whatever video player you end up using) automatically generates the SWF file.


Any more questions?

Cheers,
Andreas
Flash-Professional-Video-Player.png
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SamuelMillerAuthor Commented:
Wow, nice diagram! Very clear! Definitely answered my question.

Here is an interesting tutorial the uses SWFObjects and the MPW player, an open-source flv player, to play flv files: http://net.tutsplus.com/tutorials/other/how-to-play-video-using-an-open-source-player/
In the words of  the tutorial: "The advantage of embedding the flv player with SWFObjects is that allows us to use a placeholder image or text in case the user doesn’t have flash or javascript. A big reason for this is many computers or devices like the iPhone don’t have Flash or JavaScript enabled."

Swfobject also uses uses "JavaScript to detect Flash Player and avoid broken SWF content, and is designed to make embedding SWFs as easy as possible." (http://www.adobe.com/devnet/flashplayer/articles/swfobject.html)

It looks like Flowplayer comes with it own api file flowplayer-3.1.4.min.js as an alternative to the opensource SWFobject (http://flowplayer.org/documentation/installation/index.html).
What attracts me to the SWFobject + open-source Flv player method is that there is no branding on the player. I don't have Flash professional, but the person who is providing the videos for the site I am working, might. If he does, I will also explore that option as describe by Andreas.

I've got plenty to work with for now, but I may be back with more questions.

Thanks again,
Sam


0
SamuelMillerAuthor Commented:
Great responses. Fast and detailed.
0
IqAndreasCommented:
SWF Object can be used both when using a custom FLV player (such as MPW Player, which is definitely a precompiled SWF), and when using your own custom SWF for playing the FLV file.

It's actually SWF Object which instructs the SWF (see the right part of the above diagram) where it can find the FLA file.

You can do the same and keep the FLA file separate even when creating your own custom SWF, but it is a lot easier to just embed it.

By default, when you publish a SWF in Flash Professional, it generates a sample "HTML wrapper" for it that uses SWF Object to correctly position and scale the SWF onto the webpage, and will also include (as you found) a notification to install Flash if it is not found on the system.

There is some more information on SWFObject on this page
http://www.gotoandlearn.com/play?id=77
Those video tutorials are aimed more at developers, so you don't have to watch the whole thing, but I if I remember correctly, I believe he does cover the capabilities of SWF Object quite well.


Good luck with your programming,
Andreas
 
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.