`
hgfghe4
  • 浏览: 62293 次
  • 性别: Icon_minigender_1
  • 来自: 南京
最近访客 更多访客>>
社区版块
存档分类
最新评论

flash视频文件自动的在服务器端转换成FLV文件的FFMPEG的编译方法

阅读更多

在闪吧看别人的帖子看了这么多年了,也没有做出过大的贡献.所以积分少的可怜,近来工作少了,考试又顺利,暑假也放了,应该做点贡献了,废话少说了下面开始讲内容.
     现在
flash
做的播放器相当的流行的,但是一般都只能播放mp3的声音文件和flv的视频文件,所以很大程度上限制了播放的内容.要解决这个问题就是把文件转换成mp3或者flv格式的视频.下面主要的讲flv格式的转变.
     flv格式的转变大家都知道的一种就是导入视频,然后转换的方法,网上有很多的相同的教程,所以我在这里就不浪费大家的时间和论坛的空间了,请上百度搜索.
     大家如果用手动的转换,少量的FLV还可以,那么大量的文件将会使工作变的相当的复杂的,所以解决的方法就是在服务器端,用程序让视频文件格式转变.
    视频文件的转变的方法就是根据视频格式的编码的不相同,来转变的,当然我们如果要写一个转变的文件将会使工作变的相当的繁杂的,还好,有一个叫ffmpeg的解决方案.
    我们需要做的就是把ffmpeg编译成exe文件,然后通过asp(或者php来调用exe文件.). 在asp中使用WScript.Shell可以很简单的调用,关键的难点在于,ffmpeg的编译,和使用的方法,编译的教程,原文件本身有,但是是英文的,所以我翻译后贴在了闪吧.
We install the Minimalist GNU for Windows MinGW (Compiler) and MSYS (Minimal SYStem) which is a kind of UNIX-shell to access the MinGW-commands. Next we download, compile and install Lame, an open-source mp3-codec, with MSYS. Next we install WinCVS and checkout the latest cvs-release of FFMPEG. Finally we compile ffmpeg and I will show a few examples how to work with Flash Video (FLV).
翻译:我们首先安装windows编译程序Minimalist GNU和一个UNIX-核心的 MSYS (Minimal SYStem)来成功的编译程序。接下来,我们下载、编译和用MSYS安装开源的MP3编码程序。然后我们安装WinCVS,找出FFMPEG的最新版本的cvs.最后我们编译FFMPEG,接下来,我将给大家展示如何来使用FLV。
Download MinGW " MSYS current releases (Window Exe Binaries MSYS-1.0.10.exe & MinGW-3.1.0-1.exe)
 
下载MinGW的当前的版本(Window Exe Binaries MSYS-1.0.10.exe & MinGW-3.1.0-1.exe)
Install MinGW 
安装MinGW
Install MSYS 
安装MSYS
HINT: During the Post install be sure to set the right path to MinGW with a "/" instead of a Windows-"". If you did it wrong anyway re-install MSYS to the same directory and do the post install right (I missed it a few times) 
提示:在安装位置的时候必须给MinGW用“/”来代替windows中的” ”设置正确的路径,如果你安装过程不正确,请一定要重新的安装到同一个地址并且保证安装正确(我就安装错了好几次的)。
Download and compile Lame
下载并且编译lame
Extract Lame to your MSYS home-directory
把lame提取到你的 MSYS的根目录。
Open MSYS and change to your lame-directory (cd ../lame-XXX) 
打开你 MSYS并且跳转到你lame所在的目录(cd ../lame-XXX)
Enter the following commands:
输入下面的命令: 
CODE:
代码:
./configure //(takes a few minutes)  
make //(lame is being comiled; takes a few minutes, too)  
make install 
  
After installing you will recognize that there are new directories and files in MSYS/local which we will use while compiling ffmpeg with mp3-support 
等你安装完成了以后你会发现在MSYS/local下有几个我们在用mp3-support编译ffmpeg的时候用到的几个文件和文件目录。
本文转自:http://www.5uflash.com/flashjiaocheng/Fmsjiaocheng/2364.html
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics