@echo off
rem ------------------------------Read me--------------------------------------
rem Revision : 1.0.1
rem     Date : 2012-09-26
rem  Created : 2012-09-20
rem  Purpose : automatically join all avi files in a directory
rem ------------------------------Read me--------------------------------------
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 ------------------------------------------------------
set aaf=
set begin_time=
set end_time=
@pause>nul
