1CM

  

#

长寿老人的习惯

1.무조건 [8시간은 잔]다.
2.절대로 [배불리 먹지] 않는다.
3.반드시 [일을] 한다
4.끊임없이 [걷는]다.
5.결코 [늙었다고 생각하지] 않는다.

1.必须睡8个小时
2.适当饮食
3.做适合自己的劳动
4.天天散步
5.年轻的心态

posted @ 2012-10-03 20:29 1CM 阅读(172) | 评论 (0)编辑 收藏

利用FFmpeg+Mencoder完成自动剪辑合并批处理

    目前有很多视频剪辑合并工具,其功能很强大.但是用起来很麻烦,一段一段需要手动处理.为了弥补这个弊端利用
批处理文件完成全自动剪辑和合并的功能.效率灰常高哈哈 通过配置文件输入剪辑时间使用起来更加方便
__________________________________________________________
Conversion_Batch.bat 从  _Periods.ini 中读取剪辑信息和时间
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setlocal enabledelayedexpansion
echo @echo off>zCmd_tmp.bat
set /a count=0
rem Directory or file name contains an ! exclamation point problem
for /f "eol=# delims=" %%i in (_Periods.ini) do (
    set /a count=!count!+1
	if !count! EQU 1 (set ifn="%%i")
	if !count! EQU 2 (set ofn=%%i)
	if !count! EQU 3 (set extn=%%i
		set mCmd=call Lib_Conversion !ifn! !ofn! !extn!)
	if !count! GEQ 4 (
        set /a newindex=!count!-3
		if !newindex! LEQ 9 (set index=0!newindex!) else (set index=!newindex!)
		set _time=%%i
		rem echo !mCmd! !_time:~0,12! !_time:~13,12! !index!
		echo !mCmd! !_time:~0,12! !_time:~13,12! !index!>>zCmd_tmp.bat ))
setlocal disabledelayedexpansion
call zCmd_tmp.bat
del zCmd_tmp.bat
__________________________________________________________________________
计算总时间  Lib_CalculateTotalTime.bat 01:02:03.400 04:03:10.510 [display]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@echo off
set start_pos_tmp=%1
set end_pos_tmp=%2

if "%start_pos_tmp:~1,1%"==":" set "start_pos_tmp=0%start_pos_tmp%"
if "%end_pos_tmp:~1,1%"==":" set "end_pos_tmp=0%end_pos_tmp%"

set hour=%start_pos_tmp:~0,2%
set min=%start_pos_tmp:~3,2%
set sec=%start_pos_tmp:~6,2%
set msec=%start_pos_tmp:~9,3%

rem --------for skip 08 09---------------
if %hour:~0,1%==0  set hour=%hour:~1,1%
if %min:~0,1%==0   set min=%min:~1,1%
if %sec:~0,1%==0   set sec=%sec:~1,1%
if %msec:~0,1%==0  set msec=%msec:~1,2%
if %msec:~0,1%==0  set msec=%msec:~1,1%

set /a hour=%hour%
set /a min=%min%
set /a sec=%sec%
set /a msec=%msec%

set /a start_millsec=%hour%*60*60+%min%*60+%sec%
set /a start_millsec=%start_millsec%*1000+%msec%

set ehour=%end_pos_tmp:~0,2%
set emin=%end_pos_tmp:~3,2%
set esec=%end_pos_tmp:~6,2%
set emsec=%end_pos_tmp:~9,3%

rem --------for skip 08 09---------------
if %ehour:~0,1%==0  set ehour=%ehour:~1,1%
if %emin:~0,1%==0   set emin=%emin:~1,1%
if %esec:~0,1%==0   set esec=%esec:~1,1%
if %emsec:~0,1%==0  set emsec=%emsec:~1,2%
if %emsec:~0,1%==0  set emsec=%emsec:~1,1%

set /a ehour=%ehour%
set /a emin=%emin%
set /a esec=%esec%
set /a emsec=%emsec%

set /a end_millsec=%ehour%*60*60+%emin%*60+%esec%
set /a end_millsec=%end_millsec%*1000+%emsec%

set /a total_time_millsec=%end_millsec%-%start_millsec%
rem echo %hour% %min% %sec% %msec%
rem echo %ehour% %emin% %esec% %emsec%

rem echo %start_millsec% %end_millsec% %total_time_millsec%
set /a tsec=%total_time_millsec%/1000
set /a tmsec=%total_time_millsec%-%tsec%*1000
set /a tmin=%tsec%/60
set /a tsec=%tsec%-%tmin%*60
set /a thour=%tmin%/60
set /a tmin=%tmin%-%thour%*60

if %thour% LEQ 9 (set thour=0%thour%)
if %tmin%  LEQ 9 (set tmin=0%tmin%)
if %tsec%  LEQ 9 (set tsec=0%tsec%)
if %tmsec%  LEQ 9 (set tmsec=00%tmsec%) else (if %tmsec%  LEQ 99 (set tmsec=0%tmsec%))
set total_time=%thour%:%tmin%:%tsec%.%tmsec%
if "%3"=="display" (echo [%start_pos_tmp% - %end_pos_tmp%] = %total_time%)
_______________________
转换 Lib_Conversion.bat
~~~~~~~~~~~~~~~~~~~~~~~
@echo off
set h=%time:~0,2%
if "%h:~0,1%"==" " set "h=0%h:~1%"
set m=%time:~3,2%
set s=%time:~6,2%
set hms=%h%%m%%s%
rem ------------------------------input parameters-----------------------------
set         inFile=%1
set        outFile=%2_%hms%_%6.%3
set      start_pos=%4
set        end_pos=%5

rem set video_bit_rate=-b:v 1500k
rem set audio_bit_rate=-b:a 64k
rem set     frame_size=-s 720x404
rem set         aspect=-aspect 16:9
set    logFileName=%2_conversion.log

rem for copy
set    video_codec=-c:v copy
set    audio_codec=-c:a copy

rem for H264
rem set    video_codec=-c:v libx264
rem set    audio_codec=-c:a libvo_aacenc

rem for mpeg4 xvid
rem set    video_codec=-c:v mpeg4
rem set fourcc_tag_out=-tag:v XVID
rem set    audio_codec=-c:a libmp3lame

rem set         inFile="D:\TDDOWNLOAD\01.mp4"
rem set        outFile="%hms%.avi"
rem set      start_pos=00:40:10.000
rem set        end_pos=00:40:11.000
rem ------------------------------calctime-------------------------------------
if "%end_pos%"    NEQ "" (call Lib_CalculateTotalTime %start_pos% %end_pos% display)
if "%total_time%" NEQ "" (set total_time=-t %total_time%)
if "%start_pos%"  NEQ "" (set start_pos=-ss %start_pos%)
rem ------------------------------make cmd-------------------------------------
set cmd=ffmpeg
set cmd=%cmd% %start_pos%
set cmd=%cmd% -y -i %inFile% %total_time%
set cmd=%cmd% %audio_codec% %audio_bit_rate%
set cmd=%cmd% %video_codec% %fourcc_tag_out% %video_bit_rate%
rem set cmd=%cmd% -g 12 -bf 2 -qcomp 0.2 -dc 10 -mbd 2 %frame_size% %aspect%
set cmd=%cmd% %frame_size% %aspect%
set cmd=%cmd% %outFile%
rem ------------------------------run cmd--------------------------------------
set begin_time=%date:~0,10% %time:~0,11%
@echo on
%cmd%
@echo off
set end_time=%date:~0,10% %time%
rem ------------------------------write to log---------------------------------
echo ---%date:~0,10% %time:~0,11%---------------------------------------------->>%logFileName%
echo %cmd%>>%logFileName%
echo.>>%logFileName%
echo         inFile = %inFile%>>%logFileName%
echo        outFile = %outFile%>>%logFileName%
if "%video_bit_rate%" NEQ "" (echo Video bit rate = %video_bit_rate:~5,10%>>%logFileName%)
if "%audio_bit_rate%" NEQ "" (echo Audio bit rate = %audio_bit_rate:~5,10%>>%logFileName%)
echo.>>%logFileName%
echo      start_pos = %start_pos:~4,12%>>%logFileName%
echo        end_pos = %end_pos%>>%logFileName%
echo     total_time = %total_time:~3,12%>>%logFileName%
echo.>>%logFileName%
echo     begin time = %begin_time%>>%logFileName%
echo       end time = %end_time%>>%logFileName%
rem ------------------------------put message----------------------------------
echo -------The end of the conversion------------------------------------------
rem echo         inFile = %inFile%
rem echo        outFile = %outFile%
if "%video_bit_rate%" NEQ "" (echo  video bit rate = [v:%video_bit_rate:~5,10%] [a:%audio_bit_rate:~5,10%])
echo      video time = [%start_pos:~4,12% - %end_pos%] = %total_time:~3,12%
call Lib_CalculateTotalTime %begin_time:~11,11% %end_time:~11,11%
echo conversion time = [%begin_time:~11,11%  - %end_time:~11,11% ] = %total_time:~0,12%
echo --------------------------------------------------------------------------
__________________
合并 Lib_Joins.bat
~~~~~~~~~~~~~~~~~~
@echo off
setlocal enabledelayedexpansion
dir *.avi/b/w/n/on>all_avi_name.txt
set aaf=mencoder
for /f %%i in (all_avi_name.txt) do (set aaf=!aaf! "%%i")
set aaf=!aaf! -oac copy -ovc copy -o join.avi
rem set aaf=!aaf! -oac pcm -ovc copy -o join.avi
echo %aaf%>>join.log
set begin_time=%date:~0,10% %time:~0,11%
%aaf%
set end_time=%date:~0,10% %time%
echo ------------ All video join are completed ------------
call Lib_CalculateTotalTime %begin_time:~11,11% %end_time:~11,11%
echo join time = [%begin_time:~11,11% - %end_time:~11,11%] = %total_time:~0,12%
echo ------------------------------------------------------
下载批处理

posted @ 2012-09-20 14:23 1CM 阅读(1343) | 评论 (0)编辑 收藏

ffmpeg version N-43921-ga366bea 版本 视频转换参数详解

    libavutil      51. 70.100
    libavcodec     54. 54.100
    libavformat    54. 25.104
    libavdevice    54.  2.100
    libavfilter     3. 13.101
    libswscale      2.  1.101
    libswresample   0. 15.100
    libpostproc    52.  0.100

rem -c:v libx264              视频解码器
rem      libvpx copy libxvid mpeg4 mpeg2video rawvideo
rem -b:v 2000k                视频比特率 x264固定解码率是正确 其他的都不正确
rem -c:a libmp3lame           音频解码器
rem -b:a 128k                 音频比特率

rem -q:v 1                    固定视频量化标度(VBR) 0.1-31 1高 31最差 这时-b:v无效 以前是 -qscale n格式
rem                           mpeg4时 0.1=4335k 1=3835k 2=3403k 3=2186k 4=1678k 5=1336k 6=1158k 7=1003k 31=286k
rem -qmin 1                   最小视频量化标度(VBR)
rem -qmax 1                   最大视频量化标度(VBR)
rem -qcomp 1.0                视频量化标度压缩(VBR) 0.0-1.0

rem -sameq                    同样视频质量 此时 -b:v -qscale 无效

rem -ss      00:20:00.000     转换开始时间 不能在 -i 后面
rem -t       00:01:10.000     转换总时间
rem -vframes 600              转换振幅总数
rem -s       720x404          转换分辨路
rem -aspect 16:9              设置横纵比
rem -g gop_size               设置图像组大小
rem -bf frames                使用frames B 帧,支持mpeg1,mpeg2,mpeg4
rem -qcomp compression        视频量化标度压缩(VBR)
rem -dc                       设置dct的算法
rem -mbd 2                    宏块决策算法(高质量模式) 0=mbcmp (default) 1=fewest bits 2=best rate distortion 
rem 转换某时间段
rem ffmpeg -y -ss 00:20:00.000 -i in_xxx.wmv -t 00:00:03.000 -c:a libmp3lame -b:a 128k -c:v mpeg4 -sameq -g 12 -bf 2 -qcomp 0.2 -dc 10 -mbd 2 -aspect 16:9 -f avi -s 720x404 out_xxx.avi

rem 全部转换
rem ffmpeg -y -i in_xxx.wmv -c:a libmp3lame -b:a 128k -c:v mpeg4 -sameq -g 12 -bf 2 -qcomp 0.2 -dc 10 -mbd 2 -aspect 16:9 -f avi -s 720x404 out_xxx.avi

视频合并
mencoder 001 002 003 -oac copy -ovc copy -o jion.avi

获取摄像头
ffmpeg -y -f vfwcap -i 0 -c:v mpeg4 -q:v 1 -qmin 1 -s 640x480 -r 24 -g 12 -bf 2 -qcomp 0.2 -dc 10 -mbd 2 -aspect 4:3 -f avi cap.avi

posted @ 2012-09-18 03:13 1CM 阅读(440) | 评论 (0)编辑 收藏

Fedora 17+wine+迅雷deb 5.8 安装详解

1.安装wine 
    [xxx@localhost ~]$sudo yum install wine

    You need to install cabextract first!
    yum install wine cabextract

    升级linux+wine中安装IE
    http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
    在ies4linux-2.99.0.1/lib/install.sh 中修改corefonts下载地址
    http://cdnetworks-kr-1.dl.sourceforge.net/project/corefonts/the%20fonts/final/andale32.exe

    for font in $COREFONTS; do
	#download "http://internap.dl.sourceforge.net/sourceforge/corefonts/$font"
        download  "http://cdnetworks-kr-1.dl.sourceforge.net/project/corefonts/the%20fonts/final/$font"
    done

    在install.sh 426行左右
    subsection $MSG_CREATING_PREFIX
    set_wine_prefix "$BASEDIR/ie1/"
    wineprefixcreate &> /dev/null
    clean_tmp

    改为:
    subsection $MSG_CREATING_PREFIX
    set_wine_prefix "$BASEDIR/ie1/"
    winepath &> /dev/null
    clean_tmp

    在functions.sh 242行左右
    function create_wine_prefix {
    if which wineprefixcreate &> /dev/null; then
    ( wineprefixcreate 2>&1 ) | debugPipe
    else
    error $MSG_ERROR_NO_WINEPREFIXCREATE
    fi
    }

    改为:
    function create_wine_prefix {
    if which winepath &> /dev/null; then
    ( winepath 2>&1 ) | debugPipe
    else
    error $MSG_ERROR_NO_WINEPREFIXCREATE
    fi
    } 
    ./ies4linux --no-gui --beta-install-ie7 --locale CN --install-corefonts

2.下载rar+迅雷deb版 for Linux 5.5 绿色版
    http://dl-sh-ctc-2.pchome.net/0p/jh/rarlinux-4.2.0.tar.gz
      解压到一个目录 运行 make install
    http://dx.cr173.com//soft1/wine_thunder.rar 其他版本都运行不正常
      Thunder.tar.gz 解压到 /home/xxx/.wine/drive_c/Program Files/Thunder

3.配置wine中文环境
    /home/xxx/.wine/drive_c/windows 下创建chinese_env.reg文件
    文件内容是
    REGEDIT4
    [KEY_LOCAL_MACHINE\\Software\\Microsoft\\Window NT\\CurrentVersion\FontSubstitutes]
    "MS Shell Dlg"="SimSun.ttc,SimSun"
    "MS Shell Dlg 2"="SimSun.ttc,SimSun"
    SimSun.ttc字体文件拷贝到/home/xxx/.wine/drive_c/windows/Fonts
    然后
    [xxx@localhost ~]$cd /home/xxx/.wine/drive_c/windows
    [xxx@localhost ~]$wine regedit.exe
    在regedit菜单中选导入chinese_env.reg,退出wine.
    [xxx@localhost ~]$export LANG=zh_CN.UTF-8
4.开始运行程序
    [xxx@localhost ~]$wine filename 就可以运行中文界面的程序 这样可以运行大部分程序
5.运行迅雷5出现问题,比如暂停死机、暂停下载重新下载时从零开始下载的问题时,如下操作就可以
    首先把迅雷5程序拷贝到/xxx/.ies4linux/ie6/drive_c/Program Files/下面
    [xxx@localhost ~]$ie6
    运行ie6,然后在打开菜单中选择迅雷5就可以运行,暂停死机的问题就解决了。
备注:ie6 运行比较正常,为了加快速度启动把主页改成about:blank,下次启动ie6时比较快
这个版本的ie7有些问题,有些功能都没有,Internet选项功能没有,如何修改主页呢?
文件->打开->regedit.exe 主页修改成 about:blank
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page

posted @ 2012-09-15 02:13 1CM 阅读(2051) | 评论 (0)编辑 收藏

Fedora17 USB安装出错解决方法

环境:Win系统
用liveusb-creator-3.11.7工具把Fedora-17-x86_64-Live-Desktop.iso文件写入U盘安装成功.
用liveusb-creator-3.11.7工具Fedora-17-i386-DVD.iso文件写入U盘,进行安装时写分区信息时出现如下错误提示
An unhandled exception has occurred.This is most likely a bug.
Pleas save a copy of the detailed exception and file a bug report.
Live-Desktop只是应用平台,没有开发平台.

解决方法:
当然最简单的是刻录DVD就可以,没有DVD光驱这么办呢?
环境:Fedora系统
df -h               #查看U盘的设备名称 通常是 /dev/sdb1
umount U盘挂载目录  #如 /run/media/xxx/xxx 制作安装盘时不能挂载
su -c yum install livecd-tools 
su -c livecd-iso-to-disk path_to/Fedora-17-i386-DVD.iso /dev/sdb1

备注:liveusb-creator-3.11.7工具有缺陷,只能用livecd-iso-to-disk命令,得出这个结果让我浪费了好多时间

posted @ 2012-09-12 11:16 1CM 阅读(618) | 评论 (0)编辑 收藏

MPlayer-ww+MinGW+Win 编译过程详解











STEP1.下载MinGW-full-20101119.7z 2010-11-19 63.6MB 解压到C:/MinGW下
  http://sourceforge.net/projects/mplayer-ww/files/MinGW-full/

STEP2.下载源码
  https://gitorious.org/mplayer-ww
  下载的部分
  A.patch for mplayer ww
  B.x264 support pictiming in pmp files.
  C.mplayer-ww
  D.ffmpeg-ww
  ---------------------------------------
  E.F.是VS2010编写的配置可视化程序可以忽略
  E.meditor2 - Configure file editor for mplayer ww
  F.dshownative - Direct Show Native Wrapper for mplayer
  备注:git下载方法 Source tree -> Commint log -> Download master as tar.gz

STEP3.进行编译
  A.下载的4个包都解压到/MinGW/home/
  B.把mplayer-ww-mpatch的所有文件覆盖到mplayer-ww-mplayer-ww目录下
  C.编译mplayer-ww-x264-pmp,该目录下的automk.sh自动编译
  D.编译mplayer-ww-ffmpeg-ww,该目录下的automk.sh自动编译[编译时间较长]
  E.编译mplayer-ww-mplayer-ww,该目录下的automk.sh自动编译

STEP4.运行测试
  A.ffmpeg-ww\bin\*.dll 拷贝到mplayer-ww-mplayer-ww/release/
  B.下载MPlayer-ww运行程序,最新Revision 35130 2012-08-31
  http://sourceforge.net/projects/mplayer-ww/files/MPlayer_Release/
  安装目录下的[*.ini meditor2.exe meditor.exe skin]拷贝到mplayer-ww-mplayer-ww/release/
  运行mplayer.exe

posted @ 2012-09-09 23:29 1CM 阅读(249) | 评论 (0)编辑 收藏

VS 2010 afxglobals.h(375): error C2143 解决方法 VC++ Directories全局设置

安装VS2010之前安装了VS6,这是环境变量是
include=C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include
lib=C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib
MSDevDir=C:\Program Files\Microsoft Visual Studio\Common\MSDev98
Path=C:\Program Files\Real\RealProducer Plus 11;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\T58KTV\9158VirtualCamera\Package\bpl;C:\Program Files\T58KTV\9158VirtualCamera\bin;C:\Program Files\9158VirtualCamera\bin;C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin;C:\Program Files\svn-win32-1.6.6\bin;C:\Program Files\GTK2-Runtime\bin;C:\Program Files\TortoiseGit\bin;c:\mingw\bin;C:\MinGW\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\DownLoads\doxygen\bin;D:\DownLoads\Graphviz 2.28\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin
安装VS2010后,创建MFC工程,编译就出现 afxglobals.h(375): error C2143错误
这是因为include和lib目录有缺陷。
VS2010->Property Pages->VC++ Directories->Debug[Release]->Microsoft.Cpp.Win32.user->Include and Library设置正确的路径。
VS2010之前的VC++ Directories目录是全局共享的。VS2010后VC++ Directories是每个工程单独设置,没有全局共享模式。
特别提示:默认VC++ Directories虽然没有设置全局的界面,但是通过Microsoft.Cpp.Win32.user->这个操作可以修改默认的VC++ Directories设置。

修改方法
STEP1.修改环境
VS2010默认安装中Microsoft SDKsv7.0A,#include "SDKDDKVer.h"这个就在SDK中,配置时一定要SDK的目录。
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat这个批处理是自动配置VS2010的环境变量
DevEnvDir=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\
INCLUDE=C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.0A\include;
LIB=C:\Program Files\Microsoft Visual Studio 10.0\VC\LIB;C:\Program Files\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib;
LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\Program Files\Microsoft Visual Studio 10.0\VC\LIB;C:\Program Files\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;
WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v7.0A\
VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 10.0\
Path=C:\Program Files\Microsoft F#\v4.0\;C:\Program Files\Microsoft Visual Studio 10.0\VSTSDB\Deploy;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\Program Files\Microsoft Visual Studio 10.0\VC\VCPackages;C:\Program Files\HTML Help Workshop;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Performance Tools;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin;

SETP2.修改VC++ Directories
在创建的工程中,Property Pages->VC++ Directories->Microsoft.Cpp.Win32.user->Include中增加$(include) Library中增加$(lib);$(libpath)

这样配置完成了,这样VS6.VS2005.VS2010可以一起使用。
如果觉得修改环境变量麻烦,就在VC++ Directories中正确的配置绝对路径也可以。

posted @ 2012-09-09 19:47 1CM 阅读(1238) | 评论 (0)编辑 收藏

MPlayer+MinGW+WIN 编译图形界面的

MPlayer源代码从SVN还是GIT下载的代码,在MinGW+WIN下编译不会出现图形界面。折腾好久发现如下调整就可以。
./configure ... 之后修改 config.h config.mak
config.h
#undef CONFIG_GTK2
#define CONFIG_GUI 1

config.mak
EXTRALIBS_MPLAYER = -Wl,--enable-auto-import -lopengl32 -lgdi32 -lwinmm -lgdi32 -lcomctl32
GUI = yes
GUI_GTK =
GUI_WIN32 = yes

编译之后还要skin文件 ./mplayer/skins/目录下面 下载地址 http://www.mplayerhq.hu
然后运行mplayer.exe -gui 这样图形界面出来后,可以运行gmplayer.exe可以不带参数。

posted @ 2012-09-09 00:15 1CM 阅读(491) | 评论 (0)编辑 收藏

Clang+LLVM 在mingw32+msys快速安装

LLVM 与 Clang 介绍
LLVM 是 Low Level Virtual Machine 的简称,这个库提供了与编译器相关的支持,能够进行程序语言的编译期优化、链接优化、在线编译优化、代码生成。
Clang 是一个 C++ 编写、基于 LLVM、发布于 LLVM BSD 许可证下的 C/C++/Objective C/Objective C++ 编译器,其目标(之一)就是超越 GCC。
Clang 的特性
快 内存占用小 诊断信息可读性强 GCC 兼容性 设计清晰简单,容易理解,易于扩展增强 基于库的模块化设计

官方主页 http://llvm.org/
LLVM 3.1 Release Notes http://llvm.org/releases/3.1/docs/ReleaseNotes.html
Clang 3.1 Release Notes http://llvm.org/releases/3.1/docs/ClangReleaseNotes.html
下载地址 http://llvm.org/releases/download.html
Experimental Clang Binaries for Mingw32/x86 (69M)下载地址
http://llvm.org/releases/3.1/clang+llvm-3.1-i386-mingw32-EXPERIMENTAL.tar.bz2

若感兴趣的可以下载源代码自己重新编译,不过需要很长时间
./configure --prefix=/mingw --enable-optimized --disable-assertions
make
make install

测试写个hello.c
#include "stdio.h"
int main(){
printf("Hello Clang!!");
return 0;}
clang -v hello.c

posted @ 2012-09-08 11:29 1CM 阅读(893) | 评论 (0)编辑 收藏

Avidemux frame by frame 非常出色的视频剪辑软件免费开源软件

可以编辑到一个振幅的非常优秀的工具
Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities.

Avidemux is available for Linux, BSD, Mac OS X and Microsoft Windows under the GNU GPL license. The program was written from scratch by Mean, but code from other people and projects has been used as well. Patches, translations and even bug reports are always welcome.

http://www.avidemux.org/
http://avidemux.razorbyte.com.au/#download
http://sourceforge.net/projects/avidemux-mswin/
http://sourceforge.net/projects/avidemux-mswin/files/

posted @ 2012-09-06 19:12 1CM 阅读(208) | 评论 (0)编辑 收藏

仅列出标题
共8页: 1 2 3 4 5 6 7 8