Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

Script mittels Button starten und anschließen Form schließen geht nicht

$
0
0

Hallo,

mit einem kleinen Script füttere ich ffmpeg zum Rechnen von Video-Clips. Es gibt zwei Arten von Abläufen, die ich am Anfang innerhalb einen Form mittels Buttons starten lassen möchte. Allerdings bekomme ich es nicht hin, dass nach dem Drücken eines Buttons die Abfrage verschwindet und das entsprechende Script bzw. die Funktion  dann startet. Außerdem schmiert mir die Shell ab, wenn ich den FolderBrowserDialog bzw. den OpenFileDialog, der nach dem klicken der Buttons aufgeht, wieder schließe. Die Fehlermeldung hierzu:

Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.Management.Automation.ExitException: Systemfehler
   bei System.Management.Automation.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   bei System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   bei System.Management.Automation.CommandProcessorBase.DoComplete()
   bei System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)
   bei System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
   bei System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
   bei System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   bei System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   bei System.Management.Automation.CommandProcessorBase.DoComplete()
   bei System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)
   bei System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
   bei System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
   bei System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   bei System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(Boolean createLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
   bei System.Management.Automation.ScriptBlock.<>c__DisplayClass4.<InvokeWithPipe>b__2()
   bei System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action)
   bei System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
   bei System.Management.Automation.ScriptBlock.InvokeAsDelegateHelper(Object dollarUnder, Object dollarThis, Object[] args)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Geladene Assemblys **************
mscorlib
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18444 built by: FX451RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll.
----------------------------------------
powershell_ise
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398 (win8_gdr_oobssr.120820-1900).
    CodeBase: file:///C:/Windows/system32/WindowsPowerShell/v1.0/PowerShell_ISE.exe.
----------------------------------------
Microsoft.PowerShell.ISECommon
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.ISECommon/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.ISECommon.dll.
----------------------------------------
System
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Windows.Forms
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Management.Automation
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16481.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management.Automation/v4.0_3.0.0.0__31bf3856ad364e35/System.Management.Automation.dll.
----------------------------------------
System.Core
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
powershell_ise.resources
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/system32/WindowsPowerShell/v1.0/de/powershell_ise.resources.DLL.
----------------------------------------
Microsoft.PowerShell.GPowerShell
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.GPowerShell/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.GPowerShell.dll.
----------------------------------------
System.ComponentModel.Composition
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll.
----------------------------------------
Microsoft.PowerShell.Editor
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Editor/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Editor.dll.
----------------------------------------
PresentationFramework
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll.
----------------------------------------
WindowsBase
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll.
----------------------------------------
PresentationCore
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll.
----------------------------------------
System.Xaml
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll.
----------------------------------------
System.Configuration
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
System.Xml
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
System.Runtime.Serialization
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll.
----------------------------------------
UIAutomationProvider
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll.
----------------------------------------
Accessibility
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll.
----------------------------------------
MetadataViewProxies_c77da18b-d318-4c51-8a79-f8ce753d1378
    Assembly-Version: 0.0.0.0.
    Win32-Version: 4.0.30319.18408.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.Composition/v4.0_4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll.
----------------------------------------
Microsoft.PowerShell.GPowerShell.resources
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.GPowerShell.resources/v4.0_3.0.0.0_de_31bf3856ad364e35/Microsoft.PowerShell.GPowerShell.resources.dll.
----------------------------------------
Microsoft.Management.Infrastructure
    Assembly-Version: 1.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.Management.Infrastructure/v4.0_1.0.0.0__31bf3856ad364e35/Microsoft.Management.Infrastructure.dll.
----------------------------------------
System.Management
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll.
----------------------------------------
System.DirectoryServices
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.DirectoryServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll.
----------------------------------------
System.Numerics
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll.
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly-Version: 0.0.0.0.
    Win32-Version: 4.0.30319.18444 built by: FX451RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll.
----------------------------------------
PresentationCore.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationCore.resources/v4.0_4.0.0.0_de_31bf3856ad364e35/PresentationCore.resources.dll.
----------------------------------------
PresentationFramework.Aero
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll.
----------------------------------------
UIAutomationTypes
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll.
----------------------------------------
Microsoft.PowerShell.Editor.resources
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Editor.resources/v4.0_3.0.0.0_de_31bf3856ad364e35/Microsoft.PowerShell.Editor.resources.dll.
----------------------------------------
PresentationFramework-SystemXml
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll.
----------------------------------------
System.Management.Automation.resources
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management.Automation.resources/v4.0_3.0.0.0_de_31bf3856ad364e35/System.Management.Automation.resources.dll.
----------------------------------------
System.Configuration.Install
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration.Install/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll.
----------------------------------------
System.Transactions
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll.
----------------------------------------
Microsoft.PowerShell.Security
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Security/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Security.dll.
----------------------------------------
mscorlib.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
PSEventHandler
    Assembly-Version: 0.0.0.0.
    Win32-Version: 6.2.9200.16481.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management.Automation/v4.0_3.0.0.0__31bf3856ad364e35/System.Management.Automation.dll.
----------------------------------------
Microsoft.PowerShell.GraphicalHost
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.GraphicalHost/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.GraphicalHost.dll.
----------------------------------------
Microsoft.PowerShell.GraphicalHost.resources
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.GraphicalHost.resources/v4.0_3.0.0.0_de_31bf3856ad364e35/Microsoft.PowerShell.GraphicalHost.resources.dll.
----------------------------------------
Microsoft.GeneratedCode
    Assembly-Version: 1.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
PresentationFramework.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.resources/v4.0_4.0.0.0_de_31bf3856ad364e35/PresentationFramework.resources.dll.
----------------------------------------
PresentationFramework-SystemCore
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemCore/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemCore.dll.
----------------------------------------
Microsoft.CSharp
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll.
----------------------------------------
System.Data
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll.
----------------------------------------
PresentationFramework-SystemData
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemData/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemData.dll.
----------------------------------------
Microsoft.PowerShell.Commands.Management
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Management/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Management.dll.
----------------------------------------
Microsoft.PowerShell.Commands.Utility
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Utility/v4.0_3.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Utility.dll.
----------------------------------------
Microsoft.PowerShell.Commands.Utility.resources
    Assembly-Version: 3.0.0.0.
    Win32-Version: 6.2.9200.16398.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Utility.resources/v4.0_3.0.0.0_de_31bf3856ad364e35/Microsoft.PowerShell.Commands.Utility.resources.dll.
----------------------------------------
SMDiagnostics
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll.
----------------------------------------
System.ServiceModel.Internals
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel.Internals/v4.0_4.0.0.0__31bf3856ad364e35/System.ServiceModel.Internals.dll.
----------------------------------------
System.Windows.Forms.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Wenn das JIT-Debuggen aktiviert ist, werden alle Ausnahmefehler an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.

Leider kann ich damit überhaupt nichts anfangen.

Und hier das Script (vermutlich wahnsinnig umständlich geschrieben, aber die Shell und ich sind erst seit kurzem Freunde):

# Temp Ordner Reste löschen
if (Test-Path -path C:\TOOLS\TEMP\) {
    Get-ChildItem C:\TOOLS\TEMP | where-object {$_.LastWriteTime -lt (get-date).AddDays(-1)} | Remove-Item -recurse
    } else {
        New-Item C:\TOOLS\TEMP\ -type directory 
}


# Datei-Auswahl-Dialog für mehrere Dateien
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null

$DateiAuswahlRoot = New-Object System.Windows.Forms.Form
$DateiAuswahlRoot.TopMost = $true

$DateiAuswahl = New-Object System.Windows.Forms.OpenFileDialog
$DateiAuswahl.Title = "JR Proxytool - HighResClips auswählen:"
$DateiAuswahl.InitialDirectory = "$env:USERPROFILE\Desktop\"
$DateiAuswahl.MultiSelect = $true
#$DateiAuswahl.Filter = "AVCHD-Clips (*.MTS)|*.MTS|MXF-Clips (*.mxf)|*.mxf|Quicktime-Clips (*.mov)|*.mov"
$DateiAuswahl.Filter = "*.MTS // *.MXF // *.MOV|*.MTS;*.mxf;*.mov"
#$DateiAuswahlErgebnis = $DateiAuswahl.ShowDialog($DateiAuswahlRoot)
    if ($DateiAuswahl.ShowDialog($DateiAuswahlRoot) -eq [System.Windows.Forms.DialogResult]::OK -eq "OK"){
	            # Dateien in ein Array schreiben
                $DateiAuswahlNamenMitPfad = @($DateiAuswahl.FileNames)
                # Dateinamen ohne Pfad in ein Array schreiben
                $DateiNamen = @(Get-ChildItem $DateiAuswahl.FileNames | % {$_.BaseName})  
            } else {
                exit
}    

$MTSinput = (Get-ChildItem $DateiAuswahl.FileNames | Where-Object {$_.Extension -eq ".MTS"})
$MXFinput = (Get-ChildItem $DateiAuswahl.FileNames | Where-Object {$_.Extension -eq ".MXF"})
$MOVinput = (Get-ChildItem $DateiAuswahl.FileNames | Where-Object {$_.Extension -eq ".MOV"})


# prüfen ob Timecodeinformationen im MTS-Input vorhanden sind
if ($MTSinput.Count -gt 0) {
    if ((C:\Tools\exiftool.exe -a $MTSinput[0] | findstr /c:"Time Code") -notmatch "Time Code") {
        # Timecode fehlt Meldung
        $DatumUhrzeit2 = Get-Date -format "dd.MM.yyyy HH:mm:ss"
        [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
        $form2 = New-Object System.Windows.Forms.Form
        $form2.topmost = $true
        [System.Windows.Forms.MessageBox]::Show($form2,"Die ausgewählten Clips beinhalten keine Timecodeinformationen!`nVorgang wird abgebrochen.","JR Proxytool - $DatumUhrzeit2",
        [Windows.Forms.MessageBoxButtons]::OK,[Windows.Forms.MessageBoxIcon]::Warning)
    exit
    }           
} 


# prüfen ob Timecodeinformationen im MXF-Input vorhanden sind
if ($MXFinput.Count -gt 0) {
    if ((C:\TOOLS\ffmpeg\bin\ffprobe $MXFinput[0] 2>&1 | findstr timecode) -notmatch "timecode") {
        # Timecode fehlt Meldung
        $DatumUhrzeit2 = Get-Date -format "dd.MM.yyyy HH:mm:ss"
        [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
        $form2 = New-Object System.Windows.Forms.Form
        $form2.topmost = $true
        [System.Windows.Forms.MessageBox]::Show($form2,"Die ausgewählten Clips beinhalten keine Timecodeinformationen!`nVorgang wird abgebrochen.","JR Proxytool - $DatumUhrzeit2",
        [Windows.Forms.MessageBoxButtons]::OK,[Windows.Forms.MessageBoxIcon]::Warning)
    exit
    }            
}


# prüfen ob Timecodeinformationen im MOV-Input vorhanden sind
if ($MOVinput.Count -gt 0) {
    if ((C:\TOOLS\ffmpeg\bin\ffprobe $MOVinput[0] 2>&1 | findstr timecode) -notmatch "timecode") {
        # Timecode fehlt Meldung
        $DatumUhrzeit2 = Get-Date -format "dd.MM.yyyy HH:mm:ss"
        [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
        $form2 = New-Object System.Windows.Forms.Form
        $form2.topmost = $true
        [System.Windows.Forms.MessageBox]::Show($form2,"Die ausgewählten Clips beinhalten keine Timecodeinformationen!`nVorgang wird abgebrochen.","JR Proxytool - $DatumUhrzeit2",
        [Windows.Forms.MessageBoxButtons]::OK,[Windows.Forms.MessageBoxIcon]::Warning)
    exit
    }            
} 



function ClipsZusammenfassen {

    function ZielDateiAuswahl {
    # Datei-Auswahl-Dialog

        [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
        $DateiAuswahlRoot = New-Object System.Windows.Forms.Form
        $DateiAuswahlRoot.TopMost = $true
        $DateiAuswahl = New-Object System.Windows.Forms.SaveFileDialog
        $DateiAuswahl.Title = "JR Proxytool - Zieldatei auswählen:"
        $DateiAuswahl.InitialDirectory = "$env:USERPROFILE\Desktop\"
        $DateiAuswahl.Filter = "mp4 Proxy-Clip (*.mp4)|*.mp4"
                if ($DateiAuswahl.ShowDialog($DateiAuswahlRoot) -eq [System.Windows.Forms.DialogResult]::OK){
	            return $DateiAuswahl.FileName
            } else {
                exit
            }	
    }

    $ZielDatei = ZielDateiAuswahl
    $ZielDateiName = $ZielDatei.split('\.')[-2]
    $ZielDateiPfad = $ZielDatei.Replace("\$ZielDateiName.mp4", "")


    function MTSproxy {
        $Global:DatumUhrzeit1 = Get-Date -format "dd.MM.yyyy HH-mm-ss"
        md "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1"
        for ($i=0; $i -lt $MTSinput.Count; $i++) {
        $Eingabe = $MTSinput[$i]
        $Ausgabe = $DateiNamen[$i]

            $ExifOutput = (C:\Tools\exiftool.exe -a $Eingabe | findstr /c:"Time Code")
            foreach($str in $ExifOutput) {
                $ExifOutput = ($ExifOutput.TrimStart("Time Code"))
                $ExifOutput = $ExifOutput.TrimStart(": ")
                $ExifTimecode = $ExifOutput.Split(":")
                $ExifStunde = $ExifTimecode[0]
                $ExifMinute = $ExifTimecode[1]
                $ExifSekunde = $ExifTimecode[2]
                $ExifFrame = $ExifTimecode[3]
                }

                    #$font = "/TOOLS/arial.ttf"
                    $font = "/Windows/Fonts/arial.ttf"
                    $timecode_ausgelesen = "$ExifStunde\:$ExifMinute\:$ExifSekunde\:$ExifFrame" 
                    $timecode_concatenating = "$ExifStunde-$ExifMinute-$ExifSekunde-$ExifFrame"
                    $tc = "drawtext=fontfile=${font}: timecode='$timecode_ausgelesen' :r=25 :x=5 :y=10 :fontcolor=white :fontsize=35 :box=1 :boxcolor=0x00000099"
                    $branding = "drawtext=fontfile=${font} :text='proxytool written by johannes.ramson@thommtv.de' :x=5 :y=275 :fontcolor=white@0.7 :fontsize=10 :box=1 :boxcolor=0x00000099@0.7"
                    $filename = "drawtext=fontfile=${font} :text='Source\: $Ausgabe.MTS' :x=5 :y=36 :fontcolor=white :fontsize=10 :box=1 :boxcolor=0x00000099"

                       C:\TOOLS\ffmpeg\bin\ffmpeg -i $Eingabe -b:v 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -vcodec mpeg4 -acodec aac -strict -2 -b:a 96k -y -aspect 16:9 -vf "[in]scale=512:288, $tc, $filename, $branding[out]" "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1\${timecode_concatenating}_TEMP.mp4"
        }
    }


    function MXFproxy {
        $Global:DatumUhrzeit1 = Get-Date -format "dd.MM.yyyy HH-mm-ss"
        md "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1"
        for ($i=0; $i -lt $MXFinput.Count; $i++) {
        $Eingabe = $MXFinput[$i]
        $Ausgabe = $DateiNamen[$i]

            $ffprobeOutput = (C:\TOOLS\ffmpeg\bin\ffprobe $Eingabe 2>&1 | findstr timecode)
            foreach($str in $ffprobeOutput) {
                $ffprobeTimecode = $ffprobeOutput.Trim()
                $ffprobeTimecode = $ffprobeTimecode.TrimStart("timecode")
                $ffprobeTimecode = $ffprobeTimecode.Trim()
                $ffprobeTimecode = $ffprobeTimecode.TrimStart(": ")
                $ffprobeTimecode = $ffprobeTimecode.Split(":")
                $ffprobeStunde = $ffprobeTimecode[0]
                $ffprobeMinute = $ffprobeTimecode[1]
                $ffprobeSekunde = $ffprobeTimecode[2]
                $ffprobeFrame = $ffprobeTimecode[3]
                }

                    #$font = "/TOOLS/arial.ttf"
                    $font = "/Windows/Fonts/arial.ttf"
                    $timecode_ausgelesen = "$ffprobeStunde\:$ffprobeMinute\:$ffprobeSekunde\:$ffprobeFrame"
                    $timecode_concatenating = "$ffprobeStunde-$ffprobeMinute-$ffprobeSekunde-$ffprobeFrame"
                    $tc = "drawtext=fontfile=${font}: timecode='$timecode_ausgelesen' :r=25 :x=5 :y=10 :fontcolor=white :fontsize=35 :box=1 :boxcolor=0x00000099"
                    $branding = "drawtext=fontfile=${font} :text='proxytool written by johannes.ramson@thommtv.de' :x=5 :y=275 :fontcolor=white@0.7 :fontsize=10 :box=1 :boxcolor=0x00000099@0.7"
                    $filename = "drawtext=fontfile=${font} :text='Source\: $Ausgabe.mxf' :x=5 :y=36 :fontcolor=white :fontsize=10 :box=1 :boxcolor=0x00000099"
                       C:\TOOLS\ffmpeg\bin\ffmpeg -i $Eingabe -b:v 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -vcodec mpeg4 -acodec aac -strict -2 -b:a 96k -y -aspect 16:9 -vf "[in]scale=512:288, $tc, $filename, $branding[out]" "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1\${timecode_concatenating}_TEMP.mp4"
        }
    }


    function MOVproxy {
        $Global:DatumUhrzeit1 = Get-Date -format "dd.MM.yyyy HH-mm-ss"
        md "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1"
        for ($i=0; $i -lt $MOVinput.Count; $i++) {
        $Eingabe = $MOVinput[$i]
        $Ausgabe = $DateiNamen[$i]

            $ffprobeOutput = (C:\TOOLS\ffmpeg\bin\ffprobe $Eingabe 2>&1 | findstr timecode)
            foreach($str in $ffprobeOutput) {
                $ffprobeTimecode = $ffprobeOutput.Trim()
                $ffprobeTimecode = $ffprobeTimecode.TrimStart("timecode")
                $ffprobeTimecode = $ffprobeTimecode.Trim()
                $ffprobeTimecode = $ffprobeTimecode.TrimStart(": ")
                $ffprobeTimecode = $ffprobeTimecode.Split(":")
                $ffprobeStunde = $ffprobeTimecode[0]
                $ffprobeMinute = $ffprobeTimecode[1]
                $ffprobeSekunde = $ffprobeTimecode[2]
                $ffprobeFrame = $ffprobeTimecode[3]
                }

                    #$font = "/TOOLS/arial.ttf"
                    $font = "/Windows/Fonts/arial.ttf"
                    $timecode_ausgelesen = "$ffprobeStunde\:$ffprobeMinute\:$ffprobeSekunde\:$ffprobeFrame" 
                    $timecode_concatenating = "$ffprobeStunde-$ffprobeMinute-$ffprobeSekunde-$ffprobeFrame"
                    $tc = "drawtext=fontfile=${font}: timecode='$timecode_ausgelesen' :r=25 :x=5 :y=10 :fontcolor=white :fontsize=35 :box=1 :boxcolor=0x00000099"
                    $branding = "drawtext=fontfile=${font} :text='proxytool written by johannes.ramson@thommtv.de' :x=5 :y=275 :fontcolor=white@0.7 :fontsize=10 :box=1 :boxcolor=0x00000099@0.7"
                    $filename = "drawtext=fontfile=${font} :text='Source\: $Ausgabe.mov' :x=5 :y=36 :fontcolor=white :fontsize=10 :box=1 :boxcolor=0x00000099"

                       C:\TOOLS\ffmpeg\bin\ffmpeg -i $Eingabe -b:v 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -vcodec mpeg4 -acodec aac -strict -2 -b:a 96k -y -aspect 16:9 -vf "[in]scale=512:288, $tc, $filename, $branding[out]" "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1\${timecode_concatenating}_TEMP.mp4"
        }
    }



    # MTS Proxies rechnen
    if ($MTSinput.Count -gt 0) {
        MTSproxy
    }

    # MXF Proxies rechnen
    if ($MXFinput.Count -gt 0) {
        MXFproxy
    }

    # MOV Proxies rechnen
    if ($MOVinput.Count -gt 0) {
        MOVproxy
    }
    
    

    function proxyConcat {
        (Get-ChildItem "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1" -recurse -exclude *.txt).Fullname | %{"file '$_'"} > ($ConcatListe_TEMP = "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1\ConcatListe_TEMP.txt")
        (Get-Content "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1\ConcatListe_TEMP.txt" | sort) | out-file ($ConcatListe = "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1\ConcatListe.txt") -encoding ASCII
        C:\TOOLS\ffmpeg\bin\ffmpeg -f concat -i $ConcatListe -c copy -y "$ZielDateiPfad\${ZielDateiName}.mp4" 2>&1 | tee ($Script:ErrorLogTemp = "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1\JR ProxyTool - ErrorLog $DatumUhrzeit1.txt")
    }
    proxyConcat



    if ((Get-Content $ErrorLogTemp) -match "Invalid data found when processing input"){
        $DatumUhrzeit4 = Get-Date -format "dd.MM.yyyy HH:mm:ss"
        [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
        $form4 = New-Object System.Windows.Forms.Form
        $form4.topmost = $true    
            [System.Windows.Forms.MessageBox]::Show($form4,"Vorgang fehlgechlagen! `nIm Anschluss wird das LogFile geöffnet.","JR Proxytool - $DatumUhrzeit4",
            [Windows.Forms.MessageBoxButtons]::OK,[Windows.Forms.MessageBoxIcon]::Warning)
            # Logfile öffnen
            Invoke-Item $ErrorLogTemp
            Exit
    }


    # Temp Ordner löschen
    # Remove-Item -Recurse -Force "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1"


    # Abschluss Meldung
    $DatumUhrzeit2 = Get-Date -format "dd.MM.yyyy HH:mm:ss"
    [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
    $form1 = New-Object System.Windows.Forms.Form
    $form1.topmost = $true    
        [System.Windows.Forms.MessageBox]::Show($form1,"$ZielDateiPfad\${ZielDateiName}.mp4 `nwurde erfolgreich gerechnet.","JR Proxytool - $DatumUhrzeit2",
        [Windows.Forms.MessageBoxButtons]::OK,[Windows.Forms.MessageBoxIcon]::Asterisk)
            # Zielordner öffnen
            # Invoke-Item $ZielDateiPfad
}


function ClipsEinzeln {

    function ZielOrdnerAuswahl {
    # Datei-Auswahl-Dialog

        [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
        $OrdnerAuswahlRoot = New-Object System.Windows.Forms.Form
        $OrdnerAuswahlRoot.TopMost = $true
        $OrdnerAuswahl = New-Object System.Windows.Forms.FolderBrowserDialog
        $OrdnerAuswahl.Description = "JR Proxytool - Zielordner auswählen:"
        $OrdnerAuswahl.SelectedPath = "$env:USERPROFILE\Desktop\"
                if ($OrdnerAuswahl.ShowDialog($OrdnerAuswahlRoot) -eq [System.Windows.Forms.DialogResult]::OK){
	            return $OrdnerAuswahl.SelectedPath
            } else {
                exit
            }	
    }

    $ZielOrdner = ZielOrdnerAuswahl


    function MTSproxy {
        $Global:DatumUhrzeit1 = Get-Date -format "dd.MM.yyyy HH-mm-ss"
        # md "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1"
        for ($i=0; $i -lt $MTSinput.Count; $i++) {
        $Eingabe = $MTSinput[$i]
        $Ausgabe = $MTSinput.BaseName[$i]

            $ExifOutput = (C:\Tools\exiftool.exe -a $Eingabe | findstr /c:"Time Code")
            foreach($str in $ExifOutput) {
                $ExifOutput = ($ExifOutput.TrimStart("Time Code"))
                $ExifOutput = $ExifOutput.TrimStart(": ")
                $ExifTimecode = $ExifOutput.Split(":")
                $ExifStunde = $ExifTimecode[0]
                $ExifMinute = $ExifTimecode[1]
                $ExifSekunde = $ExifTimecode[2]
                $ExifFrame = $ExifTimecode[3]
                }

                    #$font = "/TOOLS/arial.ttf"
                    $font = "/Windows/Fonts/arial.ttf"
                    $timecode_ausgelesen = "$ExifStunde\:$ExifMinute\:$ExifSekunde\:$ExifFrame" 
                    $timecode_concatenating = "$ExifStunde-$ExifMinute-$ExifSekunde-$ExifFrame"
                    $tc = "drawtext=fontfile=${font}: timecode='$timecode_ausgelesen' :r=25 :x=5 :y=10 :fontcolor=white :fontsize=35 :box=1 :boxcolor=0x00000099"
                    $branding = "drawtext=fontfile=${font} :text='proxytool written by johannes.ramson@thommtv.de' :x=5 :y=275 :fontcolor=white@0.7 :fontsize=10 :box=1 :boxcolor=0x00000099@0.7"
                    $filename = "drawtext=fontfile=${font} :text='Source\: $Ausgabe.MTS' :x=5 :y=36 :fontcolor=white :fontsize=10 :box=1 :boxcolor=0x00000099"

                       C:\TOOLS\ffmpeg\bin\ffmpeg -i $Eingabe -b:v 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -vcodec mpeg4 -acodec aac -strict -2 -b:a 96k -y -aspect 16:9 -vf "[in]scale=512:288, $tc, $filename, $branding[out]" "$ZielOrdner\$Ausgabe.mp4"
        }
    }


    function MXFproxy {
        $Global:DatumUhrzeit1 = Get-Date -format "dd.MM.yyyy HH-mm-ss"
        # md "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1"
        for ($i=0; $i -lt $MXFinput.Count; $i++) {
        $Eingabe = $MXFinput[$i]
        $Ausgabe = $MXFinput.BaseName[$i]

            $ffprobeOutput = (C:\TOOLS\ffmpeg\bin\ffprobe $Eingabe 2>&1 | findstr timecode)
            foreach($str in $ffprobeOutput) {
                $ffprobeTimecode = $ffprobeOutput.Trim()
                $ffprobeTimecode = $ffprobeTimecode.TrimStart("timecode")
                $ffprobeTimecode = $ffprobeTimecode.Trim()
                $ffprobeTimecode = $ffprobeTimecode.TrimStart(": ")
                $ffprobeTimecode = $ffprobeTimecode.Split(":")
                $ffprobeStunde = $ffprobeTimecode[0]
                $ffprobeMinute = $ffprobeTimecode[1]
                $ffprobeSekunde = $ffprobeTimecode[2]
                $ffprobeFrame = $ffprobeTimecode[3]
                }

                    #$font = "/TOOLS/arial.ttf"
                    $font = "/Windows/Fonts/arial.ttf"
                    $timecode_ausgelesen = "$ffprobeStunde\:$ffprobeMinute\:$ffprobeSekunde\:$ffprobeFrame"
                    $timecode_concatenating = "$ffprobeStunde-$ffprobeMinute-$ffprobeSekunde-$ffprobeFrame"
                    $tc = "drawtext=fontfile=${font}: timecode='$timecode_ausgelesen' :r=25 :x=5 :y=10 :fontcolor=white :fontsize=35 :box=1 :boxcolor=0x00000099"
                    $branding = "drawtext=fontfile=${font} :text='proxytool written by johannes.ramson@thommtv.de' :x=5 :y=275 :fontcolor=white@0.7 :fontsize=10 :box=1 :boxcolor=0x00000099@0.7"
                    $filename = "drawtext=fontfile=${font} :text='Source\: $Ausgabe.mxf' :x=5 :y=36 :fontcolor=white :fontsize=10 :box=1 :boxcolor=0x00000099"
                       C:\TOOLS\ffmpeg\bin\ffmpeg -i $Eingabe -b:v 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -vcodec mpeg4 -acodec aac -strict -2 -b:a 96k -y -aspect 16:9 -vf "[in]scale=512:288, $tc, $filename, $branding[out]" "$ZielOrdner\$Ausgabe.mp4"
        }
    }


    function MOVproxy {
        $Global:DatumUhrzeit1 = Get-Date -format "dd.MM.yyyy HH-mm-ss"
        # md "C:\Tools\TEMP\Proxy_TEMP $DatumUhrzeit1"
        for ($i=0; $i -lt $MOVinput.Count; $i++) {
        $Eingabe = $MOVinput[$i]
        $Ausgabe = $MOVinput.BaseName[$i]

            $ffprobeOutput = (C:\TOOLS\ffmpeg\bin\ffprobe $Eingabe 2>&1 | findstr timecode)
            foreach($str in $ffprobeOutput) {
                $ffprobeTimecode = $ffprobeOutput.Trim()
                $ffprobeTimecode = $ffprobeTimecode.TrimStart("timecode")
                $ffprobeTimecode = $ffprobeTimecode.Trim()
                $ffprobeTimecode = $ffprobeTimecode.TrimStart(": ")
                $ffprobeTimecode = $ffprobeTimecode.Split(":")
                $ffprobeStunde = $ffprobeTimecode[0]
                $ffprobeMinute = $ffprobeTimecode[1]
                $ffprobeSekunde = $ffprobeTimecode[2]
                $ffprobeFrame = $ffprobeTimecode[3]
                }

                    #$font = "/TOOLS/arial.ttf"
                    $font = "/Windows/Fonts/arial.ttf"
                    $timecode_ausgelesen = "$ffprobeStunde\:$ffprobeMinute\:$ffprobeSekunde\:$ffprobeFrame" 
                    $timecode_concatenating = "$ffprobeStunde-$ffprobeMinute-$ffprobeSekunde-$ffprobeFrame"
                    $tc = "drawtext=fontfile=${font}: timecode='$timecode_ausgelesen' :r=25 :x=5 :y=10 :fontcolor=white :fontsize=35 :box=1 :boxcolor=0x00000099"
                    $branding = "drawtext=fontfile=${font} :text='proxytool written by johannes.ramson@thommtv.de' :x=5 :y=275 :fontcolor=white@0.7 :fontsize=10 :box=1 :boxcolor=0x00000099@0.7"
                    $filename = "drawtext=fontfile=${font} :text='Source\: $Ausgabe.mov' :x=5 :y=36 :fontcolor=white :fontsize=10 :box=1 :boxcolor=0x00000099"

                       C:\TOOLS\ffmpeg\bin\ffmpeg -i $Eingabe -b:v 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -vcodec mpeg4 -acodec aac -strict -2 -b:a 96k -y -aspect 16:9 -vf "[in]scale=512:288, $tc, $filename, $branding[out]" "$ZielOrdner\$Ausgabe.mp4"
        }
    }



    # MTS Proxies rechnen
    if ($MTSinput.Count -gt 0) {
        MTSproxy
    }

    # MXF Proxies rechnen
    if ($MXFinput.Count -gt 0) {
        MXFproxy
    }

    # MOV Proxies rechnen
    if ($MOVinput.Count -gt 0) {
        MOVproxy
    }
    
    
    # Abschluss Meldung
    $DatumUhrzeit2 = Get-Date -format "dd.MM.yyyy HH:mm:ss"
    [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
    $form1 = New-Object System.Windows.Forms.Form
    $form1.topmost = $true    
        [System.Windows.Forms.MessageBox]::Show($form1,"Vorgang abgeschlossen.","JR Proxytool - $DatumUhrzeit2",
        [Windows.Forms.MessageBoxButtons]::OK,[Windows.Forms.MessageBoxIcon]::Asterisk)
            # Zielordner öffnen
            # Invoke-Item $ZielDateiPfad
}


[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") 
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") 
$Date = Get-Date -format "dd.MM.yyyy HH:mm:ss"
$objForm = New-Object System.Windows.Forms.Form 
$objForm.Text = "JR Proxytool - $Date”
$objForm.Size = New-Object System.Drawing.Size(300,150) 
$objForm.minimumSize = New-Object System.Drawing.Size(300,150) 
$objForm.maximumSize = New-Object System.Drawing.Size(300,150)
$objForm.FormBorderStyle = "FixedDialog"
$objForm.StartPosition = "CenterScreen"
$objForm.Topmost = $true
$objForm.Add_Shown({$ZusammenFassenButton.focus()})

# Enter und Ecape definieren
$objForm.KeyPreview = $true
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter") 
    {ClipsZusammenfassen;$objForm.close()}})
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Escape") 
    {$objForm.Close()}})

$ZusammenFassenButton = New-Object System.Windows.Forms.Button
$ZusammenFassenButton.Location = New-Object System.Drawing.Size(20,50)
$ZusammenFassenButton.Size = New-Object System.Drawing.Size(125,50)
$ZusammenFassenButton.Text = "Ausgewählte Clips zusammenfassen"
$ZusammenFassenButton.Add_Click({ClipsZusammenfassen;$objForm.close()})
$objForm.Controls.Add($ZusammenFassenButton)
$EinzelnButton = New-Object System.Windows.Forms.Button
$EinzelnButton.Location = New-Object System.Drawing.Size(150,50)
$EinzelnButton.Size = New-Object System.Drawing.Size(125,50)
$EinzelnButton.Text = "Jeden Clip einzeln rechnen"
$EinzelnButton.Add_Click({ClipsEinzeln;$objForm.close})
$objForm.Controls.Add($EinzelnButton)

$objLabel = New-Object System.Windows.Forms.Label
$objLabel.Location = New-Object System.Drawing.Size(35,20) 
$objLabel.Size = New-Object System.Drawing.Size(280,20) 
$objLabel.Text = "Wie sollen die ProxyClips gerechnet werden?"
$objForm.Controls.Add($objLabel) 

[void] $objForm.ShowDialog()

Was mache ich falsch?


Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>