#
在mingw32环境下 FFmpeg中 ./configure --enable-libutvideo 是出现 ERROR: utvideo not found.
网上查了不少资料,有各种方法,修改代码等等,我认为都不是正解.首先要清楚的是utvideo的开发环境.
编译utvideo需要 vs2005+
Microsoft SDKs 6.1.所以这两个都要安装.这两个都是1G以上的安装包.
问题原因两种 一是没有正确编译libutvideo.a 还有/MinGW/include/utvideo/Codec.h有问题
第一正确编译libutvideo.a,这个需要
cross_compile交叉编译, mingw32 默认安装就没有交叉编译环境
需要安装
w32api-3.14-3-msys-1.0.12-dev.tar.lzma,下载地址
http://sourceforge.net/projects/mingw/files/MSYS/msysdev/w32api/
下载之后把include lib目录下的文件拷贝到/MinGW/下
还有utvideo-xx.x.x 原代码文件中 GNUmakefile 中
CROSS_PREFIX=
#WINSDK_ROOT="/c/Program Files/Microsoft SDKs/Windows/v6.1"
#CPPFLAGS=-I/usr/include/w32api -I$(WINSDK_ROOT)/Include
修改成
CROSS_PREFIX=
ming32-
WINSDK_ROOT="/c/Program Files/Microsoft SDKs/Windows/v6.1"
CPPFLAGS=-I/
mingw/include/w32api -I$(WINSDK_ROOT)/Include
之后make / make install就生成libutvideo.a
第二正确编译utvideo之后在FFmpeg中./configure --enable-libutvideo 还出现ERROR: utvideo not found.
include/utvideo/Codec.h:31:24: error: 'INT_PTR' has not been declared
这是\MinGW\include\utvideo\Codec.h文件中没有定义INT_PTR
在\MinGW\include\utvideo\
Codec.h文件中添加
windows.h 就可以
#pragma once
#include <windows.h> //<-----------
openjpeg-1.5.0
check_func opj_version -lopenjpeg
check_ld cc -lopenjpeg
check_cc
BEGIN /tmp/ffconf.FjPhvrcd.c
1 extern int opj_version();
2 int main(void){ opj_version(); }
END /tmp/ffconf.FjPhvrcd.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -I/mingw/include \
-std=c99 -fno-common -fomit-frame-pointer -mms-bitfields -IC:/MinGW/include -IC:/MinGW/include/fribidi \
-IC:/MinGW/include/freetype2 -IC:/MinGW/include/glib-2.0 -IC:/MinGW/lib/glib-2.0/include \
-IC:/MinGW/include/freetype2 -IC:/MinGW/include -c -o /tmp/ffconf.sopDAXEw.o /tmp/ffconf.FjPhvrcd.c
gcc -L/mingw/lib -Wl,--as-needed -o /tmp/ffconf.auqRaaGu.exe /tmp/ffconf.sopDAXEw.o \
-lopenjpeg -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -LC:/MinGW/lib\
-lfreetype -lcelt0 -lcelt0 -LC:/MinGW/lib -lass -lavifil32 -lm -lz
-lpsapi -lshell32
D:/TEMP/ffconf.sopDAXEw.o:ffconf.FjPhvrcd.c:(.text+0xc): undefined reference to `_opj_version'
collect2.exe: error: ld returned 1 exit status
ERROR: libopenjpeg not found
需要libopenjpeg static编译
./configure --prefix=/mingw --build=mingw32 --target=mingw32 --enable-static --disable-shared \
--includedir=/mingw/include --libdir=/mingw/lib
make CFLAGS="-DWIN32 -DOPJ_STATIC $CFLAGS"
make install-strip
需要正确安装 libpng libpng不能static编译.
libpng 需要默认编译 我用的 [libpng-1.5.12]
./configure --prefix=/mingw
make
make install-strip
pkg-config --exists librtmp||echo no 显示 no 说明pkg-config 没有找到相应的 librtmp.pc
问题是librtmp自动生成的/MinGW/lib/pkgconfig/librtmp.pc 文件格式有问题
原文是
prefix=/mingw
exec_prefix=${prefix}
libdir=/mingw/lib
incdir=${prefix}/include
Name: librtmp
Description: RTMP implementation
Version: v2.4
Requires: libssl,libcrypto
URL: http://rtmpdump.mplayerhq.hu
Libs: -L${libdir} -L@OPENSSLLIB@ -lrtmp -lz -lssl -lcrypto
Libs.private: -lws2_32 -lwinmm -lgdi32
Cflags: -I${incdir} -I@OPENSSLINC@
修改成
prefix=/mingw
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: librtmp
Description: RTMP implementation
URL: http://rtmpdump.mplayerhq.hu
Version: v2.4
Requires.private:
Libs: -L${libdir} -L@OPENSSLLIB@ -lrtmp
Libs.private: -lws2_32 -lwinmm -lgdi32 -lm
Cflags: -I${includedir}
修改之后
pkg-config --exists librtmp||echo no 就不显示 no
Git是一个分布式源代码版本管理控制程序. Git 是一个由林纳斯托瓦兹为了更好地管理
linux内核开发而创立的分布式版本控制/软件配置管理软件。
https://gitorious.org/ 注册后要Add a new public SSH key 下面介绍key如何生成
STEP1
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
STEP2
Generating public/private rsa key pair.Enter
Enter file in which to save the key (/home/b/.ssh/id_rsa):Enter
Enter passphrase (empty for no passphrase):Enter
Enter same passphrase again:Enter
Your identification has been saved in /home/b/.ssh/id_rsa.
Your public key has been saved in /home/b/.ssh/id_rsa.pub.
The key fingerprint is:id_rsa.pub
______________________________
STEP1:下载编译所需的文件包并安装
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.安装 svn-win32-1.6.6 下载源码 在要下载的目录中创建 svn-down-mplaye.bat 批处理文件.
http://subversion.tigris.org/files/documents/15/47848/Setup-Subversion-1.6.6.msi
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
2.下载MinGW-full版本,该版本中所需的编译库文件都有,如果喜欢最新的可以自己更新
http://cdnetworks-kr-1.dl.sourceforge.net/project/mplayer-ww/MinGW-full/MinGW-full-20101119.7z
解压到C:根目录下C:/MinGW/目录下面,把MPlayer-ww源码拷贝到/MinGW/home/下面
3.下载FFmpeg Windows builds 在Win-XP上必须要这个其他系统版本编译时出错
http://ffmpeg.zeranoe.com/builds/source/ffmpeg/ffmpeg-git-a366bea.tar.xz
下载之后解压到mplayer-ww代码目录下的 ffmpeg/ 先编译FFmpeg 不然编译mplayer-ww时出错
./configure --prefix=/usr/local/ffmpeg-ww \
--enable-shared --disable-static --enable-memalign-hack
make
make install
__________________________
STEP2: Configuring MPlayer
~~~~~~~~~~~~~~~~~~~~~~~~~~
不同的机器适当调整参数 写个脚本文件方便修改
____________
1.static编译
~~~~~~~~~~~~
# !/bin/sh
_gcc=no
test "$1" && _gcc="$1"
_config="configure \
--prefix="D:/MPlayer/static" \
--disable-mencoder \
--disable-menu \
--disable-gif \
--disable-tga \
--disable-pnm \
--disable-sdl \
--disable-caca \
--disable-ssse3 \
--disable-faac \
--disable-x264 \
--disable-xvid \
--disable-vidix \
--disable-toolame \
--disable-twolame \
--disable-md5sum \
--disable-vidix-pcidb \
--disable-libdirac-lavc \
--enable-gui \
--enable-static \
--enable-freetype \
--enable-runtime-cpudetection \
--extra-libs="-mwindows" "
if test $_gcc != no; then
_config+=" --cc=$_gcc "
fi
./$_config
____________
2.shared编译
~~~~~~~~~~~~
# !/bin/sh
_gcc=no
test "$1" && _gcc="$1"
_config="
--prefix="D:/MPlayer/shared" \
--disable-mencoder \
--disable-tga \
--disable-pnm \
--disable-sdl \
--disable-caca \
--disable-ssse3 \
--disable-faac \
--disable-x264 \
--disable-xvid \
--disable-vidix \
--disable-toolame \
--disable-twolame \
--disable-md5sum \
--disable-vidix-pcidb \
--disable-libdirac-lavc \
--disable-ffmpeg_a \
--enable-freetype \
--enable-runtime-cpudetection \
--extra-cflags="-I/usr/local/ffmpeg-ww/include" \
--extra-ldflags="-L/usr/local/ffmpeg-ww/lib" \
--extra-libs-mplayer="-Wl,--enable-auto-import" \
--extra-libs="-mwindows" "
if test $_gcc != no; then
_config+=" --cc=$_gcc "
fi
./configure $_config
____________
3.debug 编译
~~~~~~~~~~~~
# !/bin/sh
_gcc=no
test "$1" && _gcc="$1"
_config="configure \
--prefix="D:/MPlayer/debug" \
--disable-mencoder \
--disable-menu \
--disable-gif \
--disable-tga \
--disable-pnm \
--disable-sdl \
--disable-caca \
--disable-ssse3 \
--disable-faac \
--disable-x264 \
--disable-xvid \
--disable-vidix \
--disable-toolame \
--disable-twolame \
--disable-md5sum \
--disable-vidix-pcidb \
--disable-libdirac-lavc \
--enable-static \
--enable-freetype \
--enable-debug=3 \
--enable-runtime-cpudetection \
--extra-libs="-mwindows" "
if test $_gcc != no; then
_config+=" --cc=$_gcc "
fi
./$_config
_______________________________
STEP3: Compiling MPlayer & Play
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make #需要耐心等待 有可能出错 原因通常是配置或者configue参数有问题
make install
mplayer [moviefile] #拷贝相应的DLL 都在/mingw/bin
主要2个部分,去掉提示购买窗口和水印部分。
在网上找Ultra Video to GIF Converter 1.2 破解版、序列号都没有找到,就自己动手破解。
搞了好几个小时终于搞定啦。这个工具的优点是比其他转换工具图像清晰并且文件大小很小,
目前我用过的转换工具中最给力的。
1.DFM 中删除 把下面的资源都用00来代替
01136BB0 06 54 54 69 6D 65 72 10 54 69 6D 65 TTimer Time
01136BC0 72 53 68 6F 77 42 75 79 50 61 67 65 07 4F 6E 54 rShowBuyPage OnT
01136BD0 69 6D 65 72 07 15 54 69 6D 65 72 53 68 6F 77 42 imer TimerShowB
01136BE0 75 79 50 61 67 65 54 69 6D 65 72 04 4C 65 66 74 uyPageTimer Left
01136BF0 03 48 02 03 54 6F 70 02 60 00 00 00 H Top `
2.程序退出时出现错误 60cce7 53 改成 C3
0060CCDC /. 53 PUSH EBX <--------C3 RETN
0060CCDD |. 56 PUSH ESI
0060CCDE |. 8BF0 MOV ESI,EAX
0060CCE0 |. A1 80FD6200 MOV EAX,DWORD PTR DS:[62FD80]
0060CCE5 |. 8B00 MOV EAX,DWORD PTR DS:[EAX]
0060CCE7 |. 80B8 F2010000 CMP BYTE PTR DS:[EAX+1F2],0
0060CCEE |. 75 25 JNE SHORT 0060CD15
0060CCF0 |. 8BCE MOV ECX,ESI
0060CCF2 |. B2 01 MOV DL,1
0060CCF4 |. A1 80406000 MOV EAX,DWORD PTR DS:[604080]
0060CCF9 |. E8 2E84F0FF CALL 0051512C
0060CCFE |. 8B15 80FD6200 MOV EDX,DWORD PTR DS:[62FD80]
0060CD04 |. 8902 MOV DWORD PTR DS:[EDX],EAX
0060CD06 |. A1 80FD6200 MOV EAX,DWORD PTR DS:[62FD80]
0060CD0B |. 8B00 MOV EAX,DWORD PTR DS:[EAX]
0060CD0D |. 8B10 MOV EDX,DWORD PTR DS:[EAX]
0060CD0F |. FF92 20010000 CALL DWORD PTR DS:[EDX+120]
0060CD15 |> 8B9E A4030000 MOV EBX,DWORD PTR DS:[ESI+3A4]
0060CD1B |. 33D2 XOR EDX,EDX
0060CD1D |. 8BC3 MOV EAX,EBX
0060CD1F |. E8 20AEF4FF CALL 00557B44 ; [Video2GIF.00557B44
0060CD24 |. 33C0 XOR EAX,EAX
0060CD26 |. 8983 48050000 MOV DWORD PTR DS:[EBX+548],EAX
0060CD2C |. 8983 4C050000 MOV DWORD PTR DS:[EBX+54C],EAX
0060CD32 |. 33C0 XOR EAX,EAX
0060CD34 |. 8983 50050000 MOV DWORD PTR DS:[EBX+550],EAX
0060CD3A |. 8983 54050000 MOV DWORD PTR DS:[EBX+554],EAX
0060CD40 |. 33C0 XOR EAX,EAX
0060CD42 |. 8983 58050000 MOV DWORD PTR DS:[EBX+558],EAX
0060CD48 |. 8983 5C050000 MOV DWORD PTR DS:[EBX+55C],EAX
0060CD4E |. 8B9E A8030000 MOV EBX,DWORD PTR DS:[ESI+3A8]
0060CD54 |. B2 01 MOV DL,1
0060CD56 |. 8BC3 MOV EAX,EBX
0060CD58 |. E8 4FD4F6FF CALL 0057A1AC ; [Video2GIF.0057A1AC
0060CD5D |. 33C0 XOR EAX,EAX
0060CD5F |. 8983 38010000 MOV DWORD PTR DS:[EBX+138],EAX
0060CD65 |. 8983 3C010000 MOV DWORD PTR DS:[EBX+13C],EAX
0060CD6B |. A1 706B6300 MOV EAX,DWORD PTR DS:[636B70]
0060CD70 |. 33D2 XOR EDX,EDX
0060CD72 |. 8915 706B6300 MOV DWORD PTR DS:[636B70],EDX
0060CD78 |. E8 CF83DFFF CALL 0040514C
0060CD7D |. 5E POP ESI
0060CD7E |. 5B POP EBX
0060CD7F \. C3 RETN
3.去掉水印
Unregistered Version
Purchase it to remove this watemark
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F
001B2910 B0 04 02 00 FF FF FF FF ?
001B2920 14 00 00 00 55 00 6E 00 72 00 65 00 67 00 69 00 U n r e g i
001B2930 73 00 74 00 65 00 72 00 65 00 64 00 20 00 56 00 s t e r e d V
001B2940 65 00 72 00 73 00 69 00 6F 00 6E 00 00 00 00 00 e r s i o n
001B2950 B0 04 02 00 FF FF FF FF 24 00 00 00 70 00 75 00 ? $ p u
001B2960 72 00 63 00 68 00 61 00 73 00 65 00 20 00 69 00 r c h a s e i
001B2970 74 00 20 00 74 00 6F 00 20 00 72 00 65 00 6D 00 t t o r e m
001B2980 6F 00 76 00 65 00 20 00 74 00 68 00 69 00 73 00 o v e t h i s
001B2990 20 00 77 00 61 00 74 00 65 00 72 00 6D 00 61 00 w a t e r m a
001B29A0 72 00 6B 00 00 00 00 00 r k
B0 04 02 00 FF FF FF FF 后面的 14[24] 是字符串长度,把它改成 00 就可以去掉水印
下 载 part01
下 载 part02
下 载 part03
下 载 part04
解压密码:http://www.cppblog.com/nenlong
还有一款转换工具 gamani GIF Movie Gear 4.22 也不错,就是很多参数要手动调整,比较专业。
User Guide
Welcome to gamani GIF Movie Gear and its User Guide. Hopefully, this document will answer any questions you have about using this product to its fullest. Just getting started? You might want to check out the Tutorial. Enjoy!
Basics
GIF Movie Gear is a tool for building GIF animations. A GIF animation is nothing more than an ordered list of separate GIF images, much like a slide show, with instructions on how long to delay between images. The original GIF 89a specification was extended by adding the ability to loop, paving the way for animation on the World Wide Web that is simple to build and quick to download. The end result is what looks like a plain old GIF file (i.e. "filename.gif") but actually contains a small animation. An animation is inserted into an HTML page using an IMG tag, just like a "normal" GIF.
Terminology
First, some notes on terminology used in this document. A frame is a single image in an animation. An ordinary bitmap image becomes a frame once it is inserted into an animation. An animation refers to the collection of frames, complete with all related timing and color instructions. A GIF animation defines a screen size which is the rectangle in which the animation is visible. Individual frames are clipped to this screen. A frame's delay is the amount of time that the animation pauses after displaying the frame and before displaying the next frame; the delay is the primary method of controlling the flow of the animation. A palette is a collection of colors that is used to define a frame. GIF animations can contain two different kinds of palettes: a global palette that applies to all the frames in an animation and a local palette that controls the colors of a single frame. The GIF format definition limits palettes to 256 colors.
下 载 GIF Movie Gear 4.22
9158 虚拟视频 logo 是在主程序的资源中有一个32位位图BMP图片。所以把这个资源文件用白色的同样大的图片替换就可以。开发商没有加密这区数据也没有加壳,所以修改起来灰长简单。下面针对
4.5.0.3 版本进行试验。
下载编译程序
FILE *in= fopen("9158VirtualCamera.exe","r+");
if(!in)
{
in= fopen("C:\\Program Files\\9158VirtualCamera\\Bin\\9158VirtualCamera.exe","r+");
if(!in)
{
MessageBox("打开 9158VirtualCamera.exe 失败.\n\n"
"把我复制到安装程序目录下面 \n\n"
"安装默认目录是 C:\\Program Files\\9158VirtualCamera\\Bin");
return;
}
}
long beginpos = 0x170cc0;//位图数据区开始地址
long endpos = 0x1742FF;//位图数据区结束地址
fseek(in,beginpos,0);
long p=0;
for(long i=beginpos;i<=endpos;i++)
{
//FF FF FF 00 来替换 就是白色
p++;
if(p%4!=0)
fputc(0xff,in);
else
fputc(0x00,in);
}
fclose(in);
MessageBox("去掉LOGO成功!");
年初母亲病重突然离我而去,心情特别沉重。我在外面拼命工作也是为让母亲过的更好,可没有母亲我在外地工作也没有动力。现在有些怀疑我为什么在一个陌生的城市这样无聊地活下去。有了这样的想法,工作也不顺心,决定要准备离开这个陌生的城市。现在挣钱不是最重要的事情,在外地挣的钱够在老家过十多年,想到这里真不想在这个城市待着,三十六计走为上策,回老家过着平静的生活。
我从第一个单位出来已经整整10多年了,出来之后忙于挣钱东奔西跑,钱是攒了些,缺忽略了以前的亲密战友。
前几天管理微博时突然发现非常熟悉的名字,还留QQ号码和电话,真的非常高兴,......