Insert an FLV video file in a Web page

Source: Internet
Author: User
Tags flv file

The source of the FLV video file
first of all, this flash video, that is, flash videos.
Why do you use this? It's obvious that you need to play the video in the Web. We all know the general video file, or ASF format, WMV format using MediaPlayer for playback, or RM format with RealPlayer playback.
The problem is that different formats require you to choose a different player, which is not available to the local computer for users who do not have the appropriate player installed.
Also, because of the large capacity of these files, download slow, the view is not very smooth.
So, to solve the problem of players and capacity, the use of Flash has a way: All kinds of video files into Flash video files.
Player has embedded in the browser Flash Player, which is like everyone's machine, solve other general video files need to pick the player's problem, of course, this is the advantage of Flash.
Capacity, from the FlashMX2004 to support the conversion to Flash video, after the relevant settings, can reduce the capacity of the original video, the final conversion of the file name extension is flv.
Bottom line: The last thing you get is an FLV Flash video file.
So how does the flv file appear in the Web page? The FLV file is also just a video file, and its playback also requires the player, and the player is flashplayer.
The first method:
The local FLV file import is deployed into the Flash software, in the form of elements in the library, dragged into the scene, adjusted to the location, and published as a SWF file.
Note that the above files are not problematic for local testing, but when uploaded to the network, other browsers are unable to view them because the current player is invoking the local FLV file.
So, you need to adjust the path. First you need to upload the FLV file to a network space and get its exact path address.
Second, open the Flash software, select the FLV component, ALT+F7 Open the Component inspector, replace the path in "Contentpath" from the local address with the network absolute address

The flash publication is then exported to the SWF file. This is the only time you can use the SWF file as you would any other general Flash file.
Test:
http://www.cnbruce.com/flv/13.swf

Of course, there will also be a Player control button related to a SWF file, remember to accompany.
The second way:
Before the second presentation, did you notice that the first way was a bit of a hassle? Because we need to insert the video into the Web page, we need to make a SWF player file first, and there are some twists and turns. Then open the Web page editor to insert the SWF file.
Just as we insert the Flash button in the Web page, we first use Flash to make the button, and then insert the flash into the Web page. But have you noticed that Dreamweaver provides the ability to insert flash buttons directly, which means that you don't have to make flash buttons, and you can quickly accomplish your needs directly through the DW.
So, again, the current Dreamweaver8 supports this feature: Insert Flash Video
You don't need to make a SWF file that plays video, just provide an FLV video file. That's the point I'm going to talk about.
Open the Insert Panel, select a common category, click the down arrow after the media button, and select Flash Video from the Drop-down list
The dialog box that pops up can use the already fixed FLV file address on the network. You can also choose to browse the local FLV file, but be aware that the FLV file should be in the current site of the DW you defined, to get a relative path, so that after all files are uploaded together, you can find the file as well.
As expected, after Setup, DW8 automatically generated flvplayer_progressive.swf player files and halo_skin_3.swf controller skin files.
Then, the last time you upload the page is 4 files uploaded together.

OK, debug an address to see:


http://www.cnbruce.com/flv/


The Third Way:

If you still think the file is much more, just need a player and an flv file. So, to borrow Google's SWF player googleplayer.swf, you only need to provide the FLV path, in addition to the FLV, googleplayer.swf also supports MP3 files.


Specifically how to use Google's this player, danger students introduced a:


http://www.dengjie.com/weblog/comments.asp?post_id=1066


And also provides an online tool


http://dengjie.com/temp/google_player_cn.swf


The following shows the Google player that is set up through the above tools.


Of course, after all, this player is Google, as long as the URL of the parameters of the option to play the corresponding video file.


If you can get out of the first and second ways, and you don't want to use the Google player in the third way, then you have to write a SWF player yourself. Danger seems to have finished.


My approach is to download Google's player, and then put it in its own space, and then use the


http://www.cnbruce.com/flv/

googleplayer.swf?videourl=http%3a%2f%2fwww%2ecnbruce%2ecom%2fflv%2flaislabonita%2eflv&thumbnailurl=http%3a %2f%2fwww%2ecnbruce%2ecom%2fblog%2fimages%2f2006%2d2%2ejpg&playermode=normal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.