fixed syntax errors
This commit is contained in:
@@ -44,7 +44,7 @@ Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [INFO] All required paths
|
||||
|
||||
# --- Skip if OBS is already running (handles reconnect scenarios) ---
|
||||
if (Get-Process -Name 'obs64' -ErrorAction SilentlyContinue) {
|
||||
Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [INFO] OBS already running — exiting."
|
||||
Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [INFO] OBS already running - exiting."
|
||||
Stop-Transcript -ErrorAction SilentlyContinue
|
||||
exit 0
|
||||
}
|
||||
@@ -81,34 +81,34 @@ Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [INFO] OBS config files de
|
||||
$profileDir = "$env:APPDATA\obs-studio\basic\profiles\$($config.ProfileName)"
|
||||
New-Item -ItemType Directory -Path $profileDir -Force | Out-Null
|
||||
|
||||
@"
|
||||
[General]
|
||||
Name=$($config.ProfileName)
|
||||
|
||||
[Output]
|
||||
Mode=Simple
|
||||
FilenameFormatting=%CCYY-%MM-%DD_%hh-%mm-%ss
|
||||
|
||||
[SimpleOutput]
|
||||
FilePath=$userCapturePath
|
||||
RecFormat2=mkv
|
||||
RecQuality=HQ
|
||||
RecRBTime=$($config.BufferSeconds)
|
||||
RecRBSize=512
|
||||
|
||||
[Video]
|
||||
BaseCX=$width
|
||||
BaseCY=$height
|
||||
OutputCX=$width
|
||||
OutputCY=$height
|
||||
FPSType=1
|
||||
FPSNum=30
|
||||
FPSDen=1
|
||||
ScaleType=bicubic
|
||||
ColorFormat=NV12
|
||||
ColorSpace=709
|
||||
ColorRange=Partial
|
||||
"@ | Set-Content -Path "$profileDir\basic.ini" -Encoding UTF8
|
||||
Set-Content -Path "$profileDir\basic.ini" -Encoding UTF8 -Value @(
|
||||
'[General]'
|
||||
"Name=$($config.ProfileName)"
|
||||
''
|
||||
'[Output]'
|
||||
'Mode=Simple'
|
||||
'FilenameFormatting=%CCYY-%MM-%DD_%hh-%mm-%ss'
|
||||
''
|
||||
'[SimpleOutput]'
|
||||
"FilePath=$userCapturePath"
|
||||
'RecFormat2=mkv'
|
||||
'RecQuality=HQ'
|
||||
"RecRBTime=$($config.BufferSeconds)"
|
||||
'RecRBSize=512'
|
||||
''
|
||||
'[Video]'
|
||||
"BaseCX=$width"
|
||||
"BaseCY=$height"
|
||||
"OutputCX=$width"
|
||||
"OutputCY=$height"
|
||||
'FPSType=1'
|
||||
'FPSNum=30'
|
||||
'FPSDen=1'
|
||||
'ScaleType=bicubic'
|
||||
'ColorFormat=NV12'
|
||||
'ColorSpace=709'
|
||||
'ColorRange=Partial'
|
||||
)
|
||||
|
||||
Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [INFO] OBS profile written: $profileDir\basic.ini"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user