use obs shadowplay

This commit is contained in:
Mylloon 2024-08-20 17:41:42 +02:00
parent cd559c9f1a
commit 9e22e6e1c8
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
7 changed files with 393 additions and 36 deletions

View file

@ -0,0 +1,235 @@
{
"DesktopAudioDevice1": {
"prev_ver": 503447555,
"name": "Audio du bureau",
"uuid": "bd19a8ef-aee4-4725-92b0-8a1d2ab917a1",
"id": "wasapi_output_capture",
"versioned_id": "wasapi_output_capture",
"settings": {
"device_id": "default"
},
"mixers": 251,
"sync": 0,
"flags": 0,
"volume": 1.0,
"balance": 0.5,
"enabled": true,
"muted": false,
"push-to-mute": false,
"push-to-mute-delay": 0,
"push-to-talk": false,
"push-to-talk-delay": 0,
"hotkeys": {
"libobs.mute": [],
"libobs.unmute": [],
"libobs.push-to-mute": [],
"libobs.push-to-talk": []
},
"deinterlace_mode": 0,
"deinterlace_field_order": 0,
"monitoring_type": 0,
"private_settings": {}
},
"AuxAudioDevice1": {
"prev_ver": 503447555,
"name": "Mic/Aux",
"uuid": "b72a6bee-252d-4ab5-833e-46bbc4864f76",
"id": "wasapi_input_capture",
"versioned_id": "wasapi_input_capture",
"settings": {
"device_id": "default"
},
"mixers": 253,
"sync": 0,
"flags": 2,
"volume": 1.4125375747680664,
"balance": 0.5,
"enabled": true,
"muted": false,
"push-to-mute": false,
"push-to-mute-delay": 0,
"push-to-talk": false,
"push-to-talk-delay": 0,
"hotkeys": {
"libobs.mute": [],
"libobs.unmute": [],
"libobs.push-to-mute": [],
"libobs.push-to-talk": []
},
"deinterlace_mode": 0,
"deinterlace_field_order": 0,
"monitoring_type": 0,
"private_settings": {}
},
"current_scene": "Scène",
"current_program_scene": "Scène",
"scene_order": [
{
"name": "Scène"
}
],
"name": "ReplayBuffer",
"groups": [],
"quick_transitions": [
{
"name": "Coupure",
"duration": 300,
"hotkeys": [],
"id": 1,
"fade_to_black": false
},
{
"name": "Fondu",
"duration": 300,
"hotkeys": [],
"id": 2,
"fade_to_black": false
},
{
"name": "Fondu",
"duration": 300,
"hotkeys": [],
"id": 3,
"fade_to_black": true
}
],
"transitions": [],
"saved_projectors": [],
"current_transition": "Fondu",
"transition_duration": 300,
"preview_locked": false,
"scaling_enabled": false,
"scaling_level": 0,
"scaling_off_x": 0.0,
"scaling_off_y": 0.0,
"virtual-camera": {
"type2": 3
},
"modules": {
"scripts-tool": [],
"output-timer": {
"streamTimerHours": 0,
"streamTimerMinutes": 0,
"streamTimerSeconds": 30,
"recordTimerHours": 0,
"recordTimerMinutes": 0,
"recordTimerSeconds": 30,
"autoStartStreamTimer": false,
"autoStartRecordTimer": false,
"pauseRecordTimer": true
},
"auto-scene-switcher": {
"interval": 300,
"non_matching_scene": "",
"switch_if_not_matching": false,
"active": false,
"switches": []
},
"captions": {
"source": "",
"enabled": false,
"lang_id": 1036,
"provider": "mssapi"
}
},
"sources": [
{
"prev_ver": 503447555,
"name": "Capture d'écran",
"uuid": "62ecad8b-28d0-48f4-a0ef-b6952f9c1de7",
"id": "monitor_capture",
"versioned_id": "monitor_capture",
"settings": {
"monitor_id": "\\\\?\\DISPLAY#AOC2590#5&243f34f&2&UID155906#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}"
},
"mixers": 0,
"sync": 0,
"flags": 0,
"volume": 1.0,
"balance": 0.5,
"enabled": true,
"muted": false,
"push-to-mute": false,
"push-to-mute-delay": 0,
"push-to-talk": false,
"push-to-talk-delay": 0,
"hotkeys": {},
"deinterlace_mode": 0,
"deinterlace_field_order": 0,
"monitoring_type": 0,
"private_settings": {}
},
{
"prev_ver": 503447555,
"name": "Scène",
"uuid": "0b53bf55-6a71-4b86-960a-f2df1c2e0c3d",
"id": "scene",
"versioned_id": "scene",
"settings": {
"id_counter": 1,
"custom_size": false,
"items": [
{
"name": "Capture d'écran",
"source_uuid": "62ecad8b-28d0-48f4-a0ef-b6952f9c1de7",
"visible": true,
"locked": false,
"rot": 0.0,
"pos": {
"x": 0.0,
"y": 0.0
},
"scale": {
"x": 1.0,
"y": 1.0
},
"align": 5,
"bounds_type": 0,
"bounds_align": 0,
"bounds_crop": false,
"bounds": {
"x": 0.0,
"y": 0.0
},
"crop_left": 0,
"crop_top": 0,
"crop_right": 0,
"crop_bottom": 0,
"id": 1,
"group_item_backup": false,
"scale_filter": "disable",
"blend_method": "default",
"blend_type": "normal",
"show_transition": {
"duration": 0
},
"hide_transition": {
"duration": 0
},
"private_settings": {}
}
]
},
"mixers": 0,
"sync": 0,
"flags": 0,
"volume": 1.0,
"balance": 0.5,
"enabled": true,
"muted": false,
"push-to-mute": false,
"push-to-mute-delay": 0,
"push-to-talk": false,
"push-to-talk-delay": 0,
"hotkeys": {
"OBSBasic.SelectScene": [],
"libobs.show_scene_item.1": [],
"libobs.hide_scene_item.1": []
},
"deinterlace_mode": 0,
"deinterlace_field_order": 0,
"monitoring_type": 0,
"private_settings": {}
}
]
}

View file

@ -0,0 +1,119 @@
[General]
Name=ReplayBuffer
[Output]
Mode=Advanced
FilenameFormatting=%CCYY-%MM-%DD %hh-%mm-%ss
DelayEnable=false
DelaySec=20
DelayPreserve=true
Reconnect=true
RetryDelay=2
MaxRetries=25
BindIP=default
IPFamily=IPv4+IPv6
NewSocketLoopEnable=false
LowLatencyEnable=false
[Stream1]
IgnoreRecommended=false
EnableMultitrackVideo=false
MultitrackVideoMaximumAggregateBitrateAuto=true
MultitrackVideoMaximumVideoTracksAuto=true
[SimpleOutput]
FilePath=C:\\Users\\anri\\Videos
RecFormat2=mkv
VBitrate=2500
ABitrate=160
UseAdvanced=false
Preset=veryfast
NVENCPreset2=p5
RecQuality=Stream
RecRB=false
RecRBTime=20
RecRBSize=512
RecRBPrefix=Replay
StreamAudioEncoder=aac
RecAudioEncoder=aac
RecTracks=1
StreamEncoder=nvenc
RecEncoder=nvenc
[AdvOut]
ApplyServiceSettings=true
UseRescale=false
TrackIndex=1
VodTrackIndex=2
Encoder=obs_x264
RecType=Standard
RecFilePath=C:\\Users\\anri\\Videos
RecFormat2=fragmented_mp4
RecUseRescale=false
RecTracks=7
RecEncoder=none
FLVTrack=1
StreamMultiTrackAudioMixes=1
FFOutputToFile=true
FFFilePath=C:\\Users\\anri\\Videos
FFVBitrate=2500
FFVGOPSize=250
FFUseRescale=false
FFIgnoreCompat=false
FFABitrate=160
FFAudioMixes=1
Track1Bitrate=320
Track2Bitrate=320
Track3Bitrate=320
Track4Bitrate=160
Track5Bitrate=160
Track6Bitrate=160
RecSplitFileTime=15
RecSplitFileSize=2048
RecRB=true
RecRBTime=120
RecRBSize=512
AudioEncoder=ffmpeg_aac
RecAudioEncoder=ffmpeg_aac
RecSplitFileType=Time
FFFormat=
FFFormatMimeType=
FFVEncoderId=0
FFVEncoder=
FFAEncoderId=0
FFAEncoder=
Track1Name=System sounds and microphone
Track2Name=System sounds
Track3Name=Microphone
FFExtension=mp4
[Video]
BaseCX=1920
BaseCY=1080
OutputCX=1280
OutputCY=720
FPSType=0
FPSCommon=30
FPSInt=30
FPSNum=30
FPSDen=1
ScaleType=bicubic
ColorFormat=NV12
ColorSpace=709
ColorRange=Partial
SdrWhiteLevel=300
HdrNominalPeakLevel=1000
[Audio]
MonitoringDeviceId=default
MonitoringDeviceName=Par défaut
SampleRate=48000
ChannelSetup=Stereo
MeterDecayRate=23.53
PeakMeterType=0
[Panels]
CookieId=5C49A2560FAAB895
[Hotkeys]
ReplayBuffer={"ReplayBuffer.Save":[]}

View file

@ -0,0 +1 @@
{"bitrate":8000,"use_bufsize":false}

View file

@ -192,7 +192,7 @@ sync-windows:
@$(WGET) $(REPO_SRC)/windows/installers/vencord.bat -O $(WIN_HOME)/Documents/Local/vencord_installer.bat
@$(WGET) $(REPO_SRC)/windows/fix_nvidia_wsl.bat -O $(WIN_HOME)/Documents/Local/fix_nvidia_wsl.bat
@$(WGET) $(REPO_SRC)/windows/fix_mihoyo_shortcut.bat -O $(WIN_HOME)/Documents/Local/fix_mihoyo_shortcut.bat
# @$(WGET) $(REPO_SRC)/windows/fix_obs_shortcut.bat -O $(WIN_HOME)/Documents/Local/fix_obs_shortcut.bat
@$(WGET) $(REPO_SRC)/windows/start_obs_as_shadowplay.bat -O $(LOCALAPPDATA)/start_obs_as_shadowplay.bat
@echo "$(WIN) Scripts synced!"
@echo
@ -202,7 +202,7 @@ sync-windows:
$(WGET) $(REPO_SRC)/games/cs2/myconfig.cfg -O $(CS2_CFG)/myconfig.cfg; \
$(WGET) $(REPO_SRC)/games/cs2/customgame.cfg -O $(CS2_CFG)/customgame.cfg; \
$(WGET) $(REPO_SRC)/games/cs2/normalgame.cfg -O $(CS2_CFG)/normalgame.cfg; \
echo "$(WIN) CS2 scripts synced!"; \
echo "$(WIN) CS2 configs synced!"; \
echo; \
fi
# Firefox

View file

@ -1,20 +0,0 @@
@ECHO OFF
:: Start as administrator
fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1
)
EXIT 0
)
PowerShell -Command "" ^
"$WshShell = New-Object -COM WScript.Shell;" ^
"$Shortcut = $WshShell.CreateShortcut('%ProgramData%\Microsoft\Windows\Start Menu\Programs\OBS Studio\OBS Studio (64bit).lnk');" ^
"$Shortcut.TargetPath = '%ProgramFiles%\obs-studio\bin\64bit\obs64.exe';" ^
"$Shortcut.WorkingDirectory = '%ProgramFiles%\obs-studio\bin\64bit';" ^
"$Shortcut.Arguments = '--profile ""ANRI GAMING (PROFIL)"""" --multi';" ^
"$Shortcut.Save()"
IF NOT "%1"=="yes" PAUSE
EXIT /B

View file

@ -0,0 +1,19 @@
@ECHO OFF
:: Start as administrator
fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1
)
EXIT 0
)
:: Working directory
CD "%ProgramFiles%\obs-studio\bin\64bit"
:: Run OBS
START "OBS Shadowplay batch wrapper" ^
obs64.exe --portable --minimize-to-tray --disable-missing-files-check \
--profile "ReplayBuffer" --scene "ReplayBuffer" --startreplaybuffer
EXIT /B

View file

@ -25,7 +25,7 @@ fltmc >NUL 2>&1 || (
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/installers/vencord.bat -OutFile '!local!\vencord_installer.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_nvidia_wsl.bat -OutFile '!local!\fix_nvidia_wsl.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_mihoyo_shortcut.bat -OutFile '!local!\fix_mihoyo_shortcut.bat'"
:: PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_obs_shortcut.bat -OutFile '!local!\fix_obs_shortcut.bat'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/start_obs_as_shadowplay.bat -OutFile '%LOCALAPPDATA%\start_obs_as_shadowplay.bat'"
:: === Install Spotify ==
@ -363,19 +363,22 @@ PowerShell -Command "Invoke-WebRequest -Uri !repo!/.config/WindowsAutoNightMode/
:: === OBS ==
:: TODO: Replaced by NVidia Shadowplay
:: OBS replay buffer at startup
:: PowerShell -Command "$WshShell = New-Object -COM WScript.Shell;" ^
:: "$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\OBS.lnk');" ^
:: "$Shortcut.TargetPath = '%ProgramFiles%\obs-studio\bin\64bit\obs64.exe';" ^
:: "$Shortcut.WorkingDirectory = '%ProgramFiles%\obs-studio\bin\64bit';" ^
:: "$Shortcut.Arguments = '--disable-missing-files-check --minimize-to-tray " ^
:: "--startreplaybuffer --profile ""ReplayBuffer"""" --scene ""ReplayBuffer""""';" ^
:: "$Shortcut.Save()"
:: :: Default shortcut should start default profile
:: CALL "!local!\fix_obs_shortcut.bat" yes
:: :: Allow system to go in sleep mode when OBS is running
:: powercfg -requestsoverride process obs64.exe display system awaymode
MKDIR "%ProgramFiles%\obs-studio\config\obs-studio\basic\profiles\ReplayBuffer" 2>NUL
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.config/obs/ReplayBuffer/basic.ini -OutFile '%ProgramFiles%\obs-studio\config\obs-studio\basic\profiles\ReplayBuffer\basic.ini'"
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.config/obs/ReplayBuffer/streamEncoder.json -OutFile '%ProgramFiles%\obs-studio\config\obs-studio\basic\profiles\ReplayBuffer\streamEncoder.json'"
MKDIR "%ProgramFiles%\obs-studio\config\obs-studio\basic\scenes" 2>NUL
PowerShell -Command "Invoke-WebRequest -Uri !repo!/.config/obs/ReplayBuffer.json -OutFile '%ProgramFiles%\obs-studio\config\obs-studio\basic\scenes\ReplayBuffer.json'"
SCHTASKS /Create /TN "OBS Shadowplay" ^
/TR "'%LOCALAPPDATA%\start_obs_as_shadowplay.bat'" ^
/SC ONSTART ^
/RU "%USERNAME%" ^
/RL HIGHEST ^
/F
:: Allow system to go in sleep mode when OBS is running
POWERCFG /REQUESTSOVERRIDE PROCESS obs64.exe DISPLAY SYSTEM AWAYMODE
:: === miHoYo Games launcher ==