差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
home:rec:encode-checker-ps1-01 [2010/06/20 13:22]
yuki
home:rec:encode-checker-ps1-01 [2021/05/22 22:11]
yuki 削除
ライン 1: ライン 1:
 ====== Aviutlのエンコード進捗率確認用スクリプト ====== ====== Aviutlのエンコード進捗率確認用スクリプト ======
 出力イメージは、[[..:​encoding]]を参照。 出力イメージは、[[..:​encoding]]を参照。
 +
 +エラー処理とかちゃんと書かないといけないよなぁ、と思いつつ、既に飽きていたりする。\\
 +しかも、バッチ登録後に順番を変えると追随しないという本当に適当な実装。
  
 スクリプトはPowerShellで動かす。 スクリプトはPowerShellで動かす。
ライン 10: ライン 13:
 #​--------------------------------------------------------- #​---------------------------------------------------------
 #---- $AviutlPath : Aviutlのパス #---- $AviutlPath : Aviutlのパス
-#---- $OutputMovie ​    ​: ファイルの出力先パス+#---- $OutputMovie:​ ファイルの出力先パス
 #---- $Filetype ​  : 出力ファイルの拡張子 #---- $Filetype ​  : 出力ファイルの拡張子
 +#---- $Machine ​   : エンコード中のマシン名
 #​--------------------------------------------------------- #​---------------------------------------------------------
-$AviutlPath ​ = "C:\local\tools\movie\aviutl99i2\+$AviutlPath ​ = "​C:​\movie\aviutl
-$OutputMovie = "V:\ainoniwa\anime_present"+$OutputMovie = "V:\anime"
 $Filetype ​   = "​mp4"​ $Filetype ​   = "​mp4"​
-$OutputLog ​  = "V:\server\www-linux\data\txt\encoding.txt"​+$OutputLog ​  = "Z:​\data\txt\encoding.txt
 +$Machine ​    = "​KIYOKA"
  
 #​--------------------------------------------------------- #​---------------------------------------------------------
 #---- 日付とAviutlのエンコード残り時間取得(window名の取得) #---- 日付とAviutlのエンコード残り時間取得(window名の取得)
 #​--------------------------------------------------------- #​---------------------------------------------------------
-$Date = date +$Date = Get-Date 
-$Run  = get-process | % {if ($_.mainwindowhandle -ne 0) {$_.mainwindowtitle}} | ?{$_ -like "出力中*"}+$Run  = get-process | % {if ($_.mainwindowhandle -ne 0) {$_.mainwindowtitle}} | ?{$_ -like "*%*"}
  
 #​--------------------------------------------------------- #​---------------------------------------------------------
ライン 29: ライン 34:
 Set-Content $OutputLog "​====== エンコード状況 ======"​ -encoding UTF8 Set-Content $OutputLog "​====== エンコード状況 ======"​ -encoding UTF8
 Add-Content $OutputLog ""​ -encoding UTF8 Add-Content $OutputLog ""​ -encoding UTF8
-Add-Content $OutputLog "** $Date 取得(取得時間が古い場合、たぶんKIYOKAはお休み中です) **" -encoding UTF8+Add-Content $OutputLog "** $Date 取得(取得時間が古い場合、たぶん ​$Machine ​はお休み中です) **" -encoding UTF8 
 +Add-Content $OutputLog "" -encoding UTF8
  
-if($Run ​-notcontains ​"出力中"){+if($Run.IndexOf("%")){
         Add-Content $OutputLog " ​ * 現在、エンコード中のタスクはありません。"​ -encoding UTF8         Add-Content $OutputLog " ​ * 現在、エンコード中のタスクはありません。"​ -encoding UTF8
-        [System.Environment]::​Exit(0) 
 } }
  
ライン 39: ライン 44:
 #---- Aviutlで使っているbatchファイルの一覧取得 #---- Aviutlで使っているbatchファイルの一覧取得
 #​--------------------------------------------------------- #​---------------------------------------------------------
-$AviutlBatch = Join-path $AviutlPath batch* -Resolve+$AviutlBatch = @(Join-path $AviutlPath batch* -Resolve)
  
 #​--------------------------------------------------------- #​---------------------------------------------------------
ライン 52: ライン 57:
     if($count -eq 0){     if($count -eq 0){
 #        Write-Host "​$count : $Encoding : $Run" #        Write-Host "​$count : $Encoding : $Run"
-        Add-Content $OutputLog "KIYOKAが頑張ってエンコードしてくれてます。"​ -encoding UTF8+        Add-Content $OutputLog "$Machine ​が頑張ってエンコードしてくれてます。"​ -encoding UTF8
         Add-Content $OutputLog "​^ ​ エンコード順序 ​ |  エンコ対象 ​ |  進捗率 ​ |" -encoding UTF8         Add-Content $OutputLog "​^ ​ エンコード順序 ​ |  エンコ対象 ​ |  進捗率 ​ |" -encoding UTF8
         Add-Content $OutputLog "​^ ​ $count ​ | $Encoding | $Run |" -encoding UTF8         Add-Content $OutputLog "​^ ​ $count ​ | $Encoding | $Run |" -encoding UTF8
ライン 62: ライン 67:
  
 Add-Content $OutputLog ""​ -encoding UTF8 Add-Content $OutputLog ""​ -encoding UTF8
- 
 </​code>​ </​code>​
  
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0