ffmpeg 的编译

操作如下:

1.首先我们要下载相关工具,这里不多说,大家按照我的地址去下载文件就好了

CODE:
[Copy to clipboard]
MINGW下载地址:http://prdownloads.sourceforge.net/mingw/MinGW-3.1.0-1.exe?download
然后在下载MSYS :http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download
好先喝点咖啡,哈哈
首先我们先安装一下MINGW,我的目录是c:/MINGW,默认的,然后接下来要安装MSYS

这里要有些注意,安装目录看到别人是这么说的,C:/MinGW/bin/1.0,意思就是安装在你的MINGW目录下的BIN里面

OK,开始安装吧!注意安装完毕以后有个DOS界面,这里至关重要,请谨慎操作

按照图片的操作即可,

安装好以后,我们在下载一个LAME,我不知道是干嘛用的,反正就安装吧

CODE:
[Copy to clipboard]
下载地址:http://prdownloads.sourceforge.net/lame/lame-3.97b2.tar.gz?download
然后解压到C:/MinGW/bin/1.0/lame-3.97

好了,启动桌面上的MSYS,然后出入一下代码
首先进入lame目录,呵呵
下面步骤

CODE:
[Copy to clipboard]
1.cd c:
2.cd MinGw
3.cd bin
4 cd 1.0
5.cd lame-3.97
然后开始编译,一下是步骤

CODE:
[Copy to clipboard]
1 ./configure(根据的你电脑速度决定快慢)
2. make
3. make install
好了,你可以下载FFMPEG文件进行编译了,哈哈
首先下载FFMPEG
然后解压到磁盘里面,同样使用MSYS进入该目录输入一下代码

CODE:
[Copy to clipboard]
./configure –enable-memalign-hack –enable-mingw32 –enable-mp3lame –extra-cflags=-I/local/include –extra-ldflags=-L/local/lib
执行完毕以后,在输入

CODE:
[Copy to clipboard]
make
执行完毕以后,在输入

CODE:
[Copy to clipboard]
make install
OK了吧:),如果存在问题,希望高手纠错阿

 //--------------------------------------------

在编译ffmpeg-0.4.9-p20060530时,会出现下面的错误:

C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0x3d2): In function `main':
c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:152: undefined reference to `fseeko64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0x516):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:164: undefined reference to `fseeko64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0x51e):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:165: undefined reference to `ftello64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0x900):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:248: undefined reference to `fseeko64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0xe08):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:133: undefined reference to `fseeko64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0xe2d):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:140: undefined reference to `ftello64'
make: *** [qt-faststart.exe] Error 1
就是在文件qt-faststart.c开头找不到定义的函数fseeko64'和函数ftello64,在网上有如下帖子:

(连接):http://www.datafocus.com/docs/man3/fseek.3.asp

fseek() , fseeko() , fseeko64()

reposition a stream's file pointer 

Function

<script language="JavaScript" type="text/javascript"> } </script>


SYNOPSIS

#include <stdio.h>

int fseek(FILE *stream, long offset, int whence);

int fseeko(FILE *stream, off_t offset, int whence);

int fseeko64(FILE *stream, off64_t offset, int whence);


DESCRIPTION

The fseek() function repositions a file pointer for a stream.

The fseeko() function is identical to fseek() except for the type of the offset.

The fseeko64() function is a part of the large file extensions, and is similar to fseeko() except that a larger file offset can be specified.

If the stream is writeable, and buffered data has not yet been written to the underlying file, fseek() causes the unwritten data to be written to the file, and marks the st_ctime and st_mtime fields of the file for update.


PARAMETERS

 

stream 

Points to the stream whose file pointer is to repositioned

offset 

Is the new position in the file (relative to whence) for the file pointer.

whence 

Specifies from what point the offset is determined.

 


RETURN VALUES

The fseek() , fseeko() , and fseeko64() functions return 0 if they succeed; otherwise, they return -1 and errno is set to one of the following values:

 

EAGAIN 

The O_NONBLOCK flag is set for the file descriptor underlying stream, and the process would be delayed in the write operation.

EBADF 

The file descriptor underlying stream is not valid.

EFBIG 

The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.

EINTR 

A signal interrupted the call.

EINVAL 

The whence argument is invalid.

ENOSPC 

There was no free space remaining on the device containing the file.

EOVERFLOW 

The resulting file offset would be a value which cannot be represented correctly in an object of the requested type.

EPIPE 

An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal is also sent to the process.

 


CONFORMANCE

ANSI/ISO 9899-1990.

fseeko() , fseeko64() : Large File Specification, revision 1.5.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

The file positions reported by fgetpos() , ftell() , ftello() may be incorrect for files that are open in text mode in the case that the file is being read, or the case where the file is being written to and there is buffered data which has not yet been written to the underlying file. In the case that the file is being written to, fflush() can be used prior to calling fgetpos() ftell() , or ftello() to ensure the accuracy of these functions. Text mode files with no buffering do not have this problem, however performance can be significantly degraded with buffering turned off.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

 

Functions:
fopen() , ftell() , lseek() , popen() , rewind() , ungetc() , write()

 

 

Miscellaneous:
lf64

也就是说在此环境下找不到这两个函数,我在文件的开头修改如下:

#ifdef __MINGW32__
//#define fseeko(x,y,z)  fseeko64(x,y,z)//deleted by Liu
#define fseeko(x,y,z)  fseek(x,y,z)
//#define ftello(x)      ftello64(x)//deleted by Liu
#define ftello(x)      ftell(x)
#endif

这两个函数的区别在于一个便宜量为64位的,一个位32位的,感觉在一般的电脑上32位已经够用,应该不会发生问题。

望高手给于指点!

1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值