In addition to playing Falsh on a webpage, FLV video is also the most common format. Insus. NET wants to implement this function in the MVC application.
This function downloads vcastr22.swf from the Internet. If you cannot find it online, download the http://download.cnblogs.com/insus//MVC/vcastr22.swf from the following link and place it under the Scripts directory under the application.Create a model, because the previous exercise in the MVC applic
Use php to convert any video format into the flv implementation code. for details, refer.
The code is as follows:
Define ("ROOT_DIR", dirname (_ FILE __));
Class EcodeFlv {
Var $ fromFile; // uploaded File
Var $ toFilePath; // Save the file path
Var $ toPicPath; // save the image path
Var $ mpeg; // path of the ffmpeg.exe file
Var $ mencode; // The path of the mencode.exe file
Var $ convert tofile; // convert the file command
Var $ convert topic; //
Php obtains the flv video time. Php gets flv time! Source code! You can use it! Super simple .? PhpfunctionBigEndian2Int ($ byte_word, $ signedfalse) {$ int_value0; $ byte_wordlenstrlen ($ byte_word php gets flv time! Source code! You can use it! Super simple.
Function BigEndian2Int ($ byte_word, $ signed = false ){
$ Int_value = 0;
$
Php gets flv time! Source code! You can use it! Super simple .? PhpfunctionBigEndian2Int ($ byte_word, $ signed = false) {$ int_value = 0; $ byte_wordlen = strlen ($ byte_word); for ($ I = 0; $ I $ B
Php gets flv time! Source code! You can use it! Super simple.
Function BigEndian2Int ($ byte_word, $ signed = false ){
$ Int_value = 0;
$ Byte_wordlen = strlen ($ byte_word );
For
This article mainly introduces PHP from the FLV file to obtain video preview of the method, the example analysis of the PHP operation FLV File acquisition skills, with a certain reference value, the need for friends can refer to the next
This example describes how PHP obtains a video preview from an FLV file. The implementation method is as follows:
The code is
Convert any video format into flv code using php. Copy the code as follows :? Define (ROOT_DIR, dirname (_ FILE _); classEcodeFlv {var $ fromFile; uploaded FILE var $ toFilePath; save FILE path var $ toPicPath; save
The code is as follows:
Define ("ROOT_DIR", dirname (_ FILE __));Class EcodeFlv {Var $ fromFile; // uploaded FileVar $ toFilePath; // Save the file pathVar $ toPicPath; // save the image pathVar $ mpeg; // path of the ffmpeg.exe fileVa
The playback duration of the flv file read using PHP. Copy the code as follows :? Php + ---------------------------------------------------------------------- + | PHPversion4 $ byte_wordlenstrlen ($ byte_word); for ($ i0; $ I $
The code is as follows:
// + ------------------------------------------------------------------------ +// | PHP version 4 5 |// + ------------------------------------------------------------------------ +// | Copyright (c)
1. Download flvplayer.swf.2. Create an XML configuration file.3. In the body of the HTML:PARAM tags are used by IE, embed tags are used by Firefox and Google.4. Parameter Description:
Parameter name
Description
Default value
Vcastr_file
Pass the movie FLV file address parameter, multiple use | separate
Empty
Vcastr_title
Movie title parameter, multiple use | separate, use with vcastr_f
Today found a customer's website FLV video can not play, found that some of the virtual host's MIME type set a period of time will automatically expire, for this need to re-addNew extension: FLVMIME type: Flv-application/octet-streamFLV Web Player CodeThe flvplayer.swf file of this code should be put into the local server or space, you can also download the Charm network prepared attachments directlyWeb
In addition to playing Falsh on the Web page, there is also a format that is FLV video, which is also the most common. Insus.net again wants to implement this functionality in an MVC application.To implement this feature, you need to download a call vcastr22.swf from the Internet. If you can't find it on the Internet, you can download it from the following link: http://download.cnblogs.com/insus//MVC/vcastr22.swf is then placed under the Scripts direc
SOURCE Download: http://download.csdn.net/detail/njxiaogui/7609687Front desk:. aspx"video_content" runat=" server" style=" ">Backstage. CS ( get the address of FLV through the background for video playback ) protected voidPage_Load (Objectsender, EventArgs e) { This. video_content. InnerHtml = Play ("sp.flv",472,385); } Public Static stringPlay (stringUrlintWidthintheight) { stringStrtmp =URL. ToLower (); if
Solution
For FLV types:
Open Internet Information Services Manager (IIS (Microsoft Web server Platform)), select Local Computer--> user site--> Open Properties--> HTTP Header "-->" MIME type "-->" new. Extension = ". flv" MIME type = "Flv-application/octet-stream", save exit.
For RMVB type:
Open Internet Information Services Manager (IIS (Microsoft Web server P
In fact, the reason is very simple, because most of the domestic Win2003 host. The default is to not specify output FLV this format.
Although it can be seen in FTP, but not through HTTP access, it can not be played.
Open IIS Manager Select Web site properties that's where you can set the host header.
and the Security directory HTTP header custom error service
When you see this, you choose HTTP headers.
So then you see a MIME type and then you dot type
A compact for the FLV format to convert to AVI format software, no installation, decompression can directly run the current format of the FLV movie to AVI format software is not many
Riva FLV Encoder is the most famous one, but it has no Chinese version, the file volume is also large, installation package on the 4.7M
When the installation is complete, it take
This morning, my former high school classmate asked me to teach him to write an FLV player with Flex. Online should also have a lot of tutorials, but after dinner after lunch, feel that they write well, after all, they rarely write a tutorial on their blog, so they wrote ... If there is a mistake, please point out. Here's a simple tutorial I wrote today on my blog:
With AS2.0 to do a lot of FLV player, Flex
If we want to encapsulate Speex encoding into rtmp or FLV, we may encounter problems with how to populate Audiotagheader, Speex encoding supports 8k,16k,32k sample rate, but only 16k in rtmp or FLV protocol, At this point the sampling rate needs to be treated as 11.025k, that is, the packet of this byte is 0xb6
For the AAC encoding in RTMP or FLV packets, AAC sa
Software Version: Version 5.0 Build 9 Beta 1Software size: 7, 606kbSupported platforms: Win95/98/NT/2000/2003/XP/meSoftware introduction:A plug-in integrating decompression, compression, transcoding, and playback. When DVDRip is popular today, have you ever faced the pain of looking for a decoder to watch a DVDRip movie? Nimo codec pack can help you solve this difficult problem. It integrates almost all popular audio and video decoders today, includin
Recently, I briefly read the Skype SILK codec algorithm. The basic principles and procedures are basically clear. I will take a closer look at the details later. I will give a brief introduction today. SILK Codec is a speech and audio Codec algorithm that provides great flexibility for audio bandwidth, network bandwidth, and algorithm complexity. Four sampling ra
Http://zh.wikipedia.org/zh-cn/LibavcodecHttp://baike.baidu.com/view/856526.htmLibavcodec is a LGPL free software codec library for video and audio data encoding and decoding work. Libraries with this name have ffmpeg projects and LIBAV projects, but they are incompatible with each other.Libavcodec is an integration of many open source multimedia applications and frameworks. Common MPlayer, Xine, and VLC media players use it as their main built-in deco
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.