Recently, I encountered a problem in the project, that is, mediaelemen in Silverlight can only read videos in WMV format, but I cannot read videos in FLV format, later, I found a lot of information on the Internet and learned a lot about it.
Main Code:
Background:
Private void openbutton_click (Object sender, routedeventargs E) {# region === directly open the stream here and select the file to directly b
with The popularity of WEB application development, the need to play media ( video, audio ) in the browser is becoming more and more common; many enterprises are trying to add multimedia content to the website, the two most common ways :1. normal http file on demand, directly through the website front file upload upload file
need to open the browser on the computer, and then in Baidu Search "quick Video Converter" to enter the official website after downloading the installation of Fast Video converter.Second step: After the video Converter is installed, we will click "Add File" to add the FLV video file that needs to convert the format to the software interface.Step three: After the
In doing a website, found that video files, such as the Flv,mp4 format can be played locally, but reached the development of the machine, it is not. The player's file address is right, or has not been responding.
After a long experiment, the problem was found to be set with IIS. IIS does not allow video files to be played by default, and the solution is as follo
'is set but not used [-Werror = unused-but-set-variable]../Nginx_mod_h264_streaming-2.2.7/src/mp4_reader.c: 376: 12: Error: variable 'stream _ id' is set but not used [-Werror = unused-but-set-variable]../Nginx_mod_h264_streaming-2.2.7/src/mp4_reader.c: In the 'stsd _ parse_vide 'function:../Nginx_mod_h264_streaming-2.2.7/src/mp4_reader.c: 529: 22: Error: variable 'level _ indication 'is set but not used [-Werror = unused-but-set-variable]../Nginx_mod_h264_streaming-
mp4 should be considered a more complex media format, originating from QuickTime. It took a while to study, especially how to integrate it perfectly into the video-on- Demand application, but also a great deal of effort, the main problem is to handle the large "media head" of MP4 file. Of course, streaming media On demand can also be used in the
Today in the FTP upload a mp4 file, found that the player can not play, find a local file to replace the found to play normally, the charm network for this in the browser directly enter the MP4 URL found unable to display the Web page, and then suspect that the server is a problem, may not add the format of this video
/local/src/nginx-rtmp-module-master Note that the third-party module uses the absolute path specified by the Add-moduleYamdiTar xzvf yamdi-1.4.tar.gzCD yamdi-1.4Make make installHow to use: Yamdi-i input.flv-o out.flv/usr/local/src all the files are in this directoryTar xzvf nginx_mod_h264_streaming-2.2.7Tar xzvf nginx-rtmp-module-masterYou can specify the path when compiling--with-http_flv_module--with-http_mp4_module--add-module=/usr/local/src/nginx_mod_h264_streaming-2.2.7 \-
keep in mind:
(1) First select Configure as release Win32, this is how to configure. Configuration method: Build Configuration Manager, and then change the libmp4v2 configuration to Release
(2) Problem analysisThe include file cannot be opened: "Corecrt.h"
workaround, see: VS2015 cannot open include files Corecrt.hTo put it simply, make a copy of the 10.0.15063.0
("Content-length:". $len);These two, try to erase it.
No MIME header
MIME type? Add that, IIS?
Header ("Content-transfer-encoding:binary");Header ("Content-length:". $len);These two, try to erase it.
$len = FileSize ($file);
Header ("Content-length:". $len);
The above 2 sentences can be downloaded after deletion, but no statistics file size, thunder and IE did not show the length of the down
The recent need to encode H264 video into MP4 format. Research, one method is to use the FFmpeg library, you can first decode the H264 file, and then encode the generation of MP4 files, but this method is less efficient, 10M video may take a few seconds to complete. Another way is to encapsulate the H264 package directly into the
--------------------
Header ("Content-transfer-encoding:binary");
Header ("Content-length:". $len);
These two, try to erase it.
------Solution--------------------
Nginx + PHP environment Without you said that the problem, ie and thunder can be normal download but my file is flv, so it can only indicate that the MIME header error
My code is as follows:
function Dl_file ($
-Transfer-Encoding: binary ");Header ("Content-Length:". $ len );Delete them.
No mime header added
MIME type? Canadian, IIS?
Header ("Content-Transfer-Encoding: binary ");Header ("Content-Length:". $ len );Delete them.
$ Len = filesize ($ file );
Header ("Content-Length:". $ len );
The preceding two sentences can be downloaded after deletion, but the file size is not counted. the download d
,duration = 42000. Duration is 70
Rate
4
Recommended playback rate, high 16-bit and low 16-bit are decimal integer part and fractional part, i.e. [16.16] format, the value 1.0 (0x0001 0000) indicates normal forward playback
Volume
2
Similar to rate, [8.8] format, 1.0 (0X0100) indicates maximum volume
Reserved
10
Reserved bits
Matrix
36
Video Change matrix
-If you want to learn a new point of knowledge, the Official Handbook may be the quickest way. Looking at a summary of others on the web may be quicker to get started, but be accurate, thorough, complete, or read the Official Handbook. The following is from an analysis summary of the official document video file Format specification Version 10.In the process, an FLV fil
Many popular TV series and programs can be downloaded from Sohu audio and video. Recently, I found that the format of the video downloaded from Sohu audio and video is not the previous MP4, but the encrypted IFOX. So how can we easily and quickly convert the format? Next I will use my win7 computer to teach you how to implement it in a super simple way.Example1. If you have other video players, convert the ifox format to the
in CentOS 5.4 environment
TAR-XJVF x264-snapshot-20120718-2245-stable.tar.bz2 #进入解压后的源文件目录 cd x264-snapshot-20120718-2245-stable/./configure --prefix=/usr/local--enable-shared Makemake Install//centos 5.4 Environment installation source installation ffmpeg with h264 extension TAR-XJVF ffmpeg-2.1.1.tar.bz2//into the unpacked directory CD ffmpeg-2.1.1./configure--ENABLE-GPL--enable-libx264makemake install// Reload configuration Lcfonfig//test is installed successfully ffmpeg
If you see the follow
($ str );?>This test shows that the swf file is not the flv file we need. Later, we improved the method by referring to a webmaster. The core code is as follows:Copy codeThe Code is as follows: Function fetch_youku_flv ($ url ){Preg_match ("# id _(.*?). Html # ", $ url, $ out );$ Id = $ out [1];$ Content = get_curl_contents ('HTTP: // v.youku.com/player/getPlayL
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.