Post by xgo on Oct 23, 2007 16:52:05 GMT 1
1. Runing
Its writen for Microsoft Powershell (u will have to dl and install it to use the script) Just copy paste save it as script123.ps1 and run it with powershell
1. type: Set-ExecutionPolicy Unrestricted (so that scripts can be executed)
2. go to the folder where u have the script, type name of script +(press tab) );
2. Avi script
PICTURES + WAV = AVI from demolist
---
createAvi.ps1
MY defaultVD.txt
MY mmeRunSettings.txt
3. Capture size/length/time
Ever wonder if u have enought disk space to capture your demolist? Heres the script:
The script reads which files are in the demolist, then looks up the project files of those demos and finds out the capture start and capture end, then sums up all the differences
captureLenght.ps1
4. Demo request/collect
LINK
Its writen for Microsoft Powershell (u will have to dl and install it to use the script) Just copy paste save it as script123.ps1 and run it with powershell
1. type: Set-ExecutionPolicy Unrestricted (so that scripts can be executed)
2. go to the folder where u have the script, type name of script +(press tab) );
2. Avi script
PICTURES + WAV = AVI from demolist
---
createAvi.ps1
#===============DEFINE================= v 1.4
$demolist = "d:\MOVIE\mme\dl10.txt"
$mmePath = "D:/MOVIE/mme/capture"
$mme = "D:/MOVIE/mme"
$basepath = "d:/movie"
$mmeSavePath = "D:/MOVIE/avi"
$mmeRunSettings = "D:/MOVIE/mme/mmeRunSettings.txt"
$virtualDubPath = "d:\Programi\MULTIMEDIJA\MovieMaking\VirtualDub-1.7.6\"
$virtualDubSetting = "d:\MOVIE\ps\defaultVD.txt"
$imageType = "jpg" #jpg, tga, pgn, *, anything u want
#======================================
Get-Date
$i = 1; $notFound = 0; $currentpath = Get-Location; $runSettings = gc $mmeRunSettings
Write-Host "`n Q3MME RUN SETTING: `n $runSettings `n"
foreach
($vrstica in Get-Content $demolist)
{
$parse = $vrstica.Split(""""); $path = $parse[1]; $project = $parse[3]
#=============== RUN Quake3MME CAPTURE ===============
Write-Host "`n== $i == Quake3MME CAP ====" -f green
Write-Host "DEMO: $path `nPROJECT: $project"
sc $mme/xgoDL.txt $vrstica #.Substring(0,$foo.LastIndexOf("\"))
$p = [diagnostics.process]::Start("d:\MOVIE\quake3mme.exe", "$runSettings +set fs_basepath $basepath +demolist xgoDL.txt +set mme_demoListQuit 1")
$p.WaitForExit()
$firstImage = ""; $firstImage = dir $mmePath$path/$project*.$imageType -name
if($firstImage -eq $null)
{
$notFound++
Write-Host ====== COULDNT FIND IMAGE FILE $notFound ****** ======
Write-Host $mmePath$path/$project*.$imageType -name
}
else
{
$firstImage = $firstImage[0]
$wavFile = dir $mmePath$path/$project.wav -name
#=============== CREATE VirtualDub SCRIPTO ===============
$aviPath = $path.Substring($path.LastIndexOf("/")+1)
$defaultVD = Get-Content $virtualDubSetting
$scripta = "VirtualDub.Open(U""$mmePath$path/$firstImage"", """", 0);
VirtualDub.audio.SetSource(U""$mmePath$path/$wavFile"");
$defaultVD
VirtualDub.SaveAVI(U""$mmeSavePath/$aviPath-$project.avi"");
"
#=============== WRITE VirtualDub SKRIPTO ===============
$scripta | Out-File $virtualDubPath\VirtualDubMod.jobs -encoding "ASCII"
Write-Host " "
Write-Host "VdScripta: " -f yellow
Write-Host CAP DIR: $mmePath$path
Write-Host IMAGE: $firstImage
Write-Host WAV: $wavFile
Write-Host SAVE: $mmeSavePath/$aviPath.avi
Write-Host " "
#================ $i. RUN VirtualDub SKRIPTO =================
cd $virtualDubPath
.\vdub.exe /s VirtualDubMod.jobs
cd $currentpath
#============== DELETE CAPTURE IMAGES =================
#CAREFULL WITH THIS ONE
#Write-Host "`n==== DELETING ====" -f red
#Write-Host "dir" $mmePath$path/$project*.$imageType
#Remove-Item $mmePath$path/$project*.$imageType
$i++
}
Write-Host "==========================================================`n"
}
Write-Host "`n==== Number of not found image files: $notFound ====`n" -f red
Get-Date
MY defaultVD.txt
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetSmartRendering(0);
VirtualDub.video.SetPreserveEmptyFrames(0);
VirtualDub.video.SetFrameRate2(50,1,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetCompression(0x75796668,0,10000,0);
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[0].Config(50,50,1,4,3,1,320,240,4,3,0,7,1,0x000000);
VirtualDub.video.filters.Add("sharpen");
VirtualDub.video.filters.instance[1].Config(22);
VirtualDub.audio.filters.Clear();
MY mmeRunSettings.txt
+set fs_game mme +set mme_renderWidth 1024 +set mme_renderHeight 768 +set r_multisample 4 +set r_multisampleNvidia 1 +set r_anisotropy 16 +set fs_extraGames osp +set r_picmip 0 +exec test.cfg
3. Capture size/length/time
Ever wonder if u have enought disk space to capture your demolist? Heres the script:
The script reads which files are in the demolist, then looks up the project files of those demos and finds out the capture start and capture end, then sums up all the differences
captureLenght.ps1
#===============DEFINE================= v 1.3
$demolist = "d:/MOVIE/mme/dl5.txt"
$mmePath = "d:/MOVIE/mme"
$oneFrame = 1.5 #size in MB
$fps = 50
$oneSecCapture = 20 #in sec for 1 second capture footage
$compressionTime = 5.8 #in sec for 1 sec captured footage
#======================================
$sum = 0
foreach
($vrstica in Get-Content $demolist)
{
$parse = $vrstica.Split(""""); $path = $parse[1]; $project = $parse[3]
$parser = "<", ">"
$file = Get-Content $mmePath/project$path/$project.cfg
foreach($text in $file)
{
if($text.IndexOf("<start>") -gt 0) {
$start = $text.Split($parser)[2]
}
if($text.IndexOf("<end>") -gt 0) {
$end = $text.Split($parser)[2]; break
}
}
$sum = $sum + ([int]$end - [int]$start)
}
$sec = $sum/1000
$min = $sum/60000
Write-Host Sec: $sec ::or:: Min: $min
Write-Host FPS = $fps :: One frame size = $oneFrame MB
Write-Host SIZE: ($sec*$fps*$oneFrame) MB
Write-Host Capture time: ([int]($sec*($oneSecCapture)/60)) min ::or:: (([int]($sec*($oneSecCapture)/36)/100)) hours
Write-Host Compression time: ([int]($compressionTime*$sec/60)) min
4. Demo request/collect
LINK