長壽老人的習慣
1.??? [8??? ?]?. 2.??? [??? ??] ???. 3.??? [??] ?? 4.???? [??]?. 5.?? [???? ????] ???. 1.必須睡8個小時 2.適當飲食 3.做適合自己的勞動 4.天天散步 5.年輕的心態
posted @ 2012-10-03 20:29 1CM 閱讀(195) | 評論 (0) | 編輯 收藏
1.??? [8??? ?]?. 2.??? [??? ??] ???. 3.??? [??] ?? 4.???? [??]?. 5.?? [???? ????] ???. 1.必須睡8個小時 2.適當飲食 3.做適合自己的勞動 4.天天散步 5.年輕的心態
posted @ 2012-10-03 20:29 1CM 閱讀(195) | 評論 (0) | 編輯 收藏
目前有很多視頻剪輯合并工具,其功能很強大.但是用起來很麻煩,一段一段需要手動處理.為了彌補這個弊端利用 批處理文件完成全自動剪輯和合并的功能.效率灰常高哈哈 通過配置文件輸入剪輯時間使用起來更加方便 __________________________________________________________ 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 閱讀(1376) | 評論 (0) | 編輯 收藏
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 distortionrem 轉換某時間段
posted @ 2012-09-18 03:13 1CM 閱讀(460) | 評論 (0) | 編輯 收藏
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 閱讀(2098) | 評論 (0) | 編輯 收藏
環境: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 閱讀(658) | 評論 (0) | 編輯 收藏
posted @ 2012-09-09 23:29 1CM 閱讀(261) | 評論 (0) | 編輯 收藏
posted @ 2012-09-09 19:47 1CM 閱讀(1308) | 評論 (0) | 編輯 收藏
posted @ 2012-09-09 00:15 1CM 閱讀(519) | 評論 (0) | 編輯 收藏
測試寫個hello.c #include "stdio.h" int main(){ printf("Hello Clang!!"); return 0;} clang -v hello.c
posted @ 2012-09-08 11:29 1CM 閱讀(970) | 評論 (0) | 編輯 收藏
posted @ 2012-09-06 19:12 1CM 閱讀(223) | 評論 (0) | 編輯 收藏