diff --git a/config/obs-studio/basic/profiles/main/basic.ini b/config/obs-studio/basic/profiles/main/basic.ini new file mode 100644 index 0000000..2741aae --- /dev/null +++ b/config/obs-studio/basic/profiles/main/basic.ini @@ -0,0 +1,113 @@ +[General] +Name=main + +[Output] +Mode=Simple +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=/home/shihaam/videos/obs +RecFormat2=hybrid_mp4 +VBitrate=6000 +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=x264 +RecEncoder=x264 +FileNameWithoutSpace=true + +[AdvOut] +ApplyServiceSettings=true +UseRescale=false +TrackIndex=1 +VodTrackIndex=2 +Encoder=obs_x264 +RecType=Standard +RecFilePath=/home/shihaam +RecFormat2=hybrid_mp4 +RecUseRescale=false +RecTracks=1 +RecEncoder=none +FLVTrack=1 +StreamMultiTrackAudioMixes=1 +FFOutputToFile=true +FFFilePath=/home/shihaam +FFVBitrate=6000 +FFVGOPSize=250 +FFUseRescale=false +FFIgnoreCompat=false +FFABitrate=160 +FFAudioMixes=1 +Track1Bitrate=160 +Track2Bitrate=160 +Track3Bitrate=160 +Track4Bitrate=160 +Track5Bitrate=160 +Track6Bitrate=160 +RecSplitFileTime=15 +RecSplitFileSize=2048 +RecRB=false +RecRBTime=20 +RecRBSize=512 +AudioEncoder=libfdk_aac +RecAudioEncoder=libfdk_aac +RecSplitFileType=Time +FFFormat= +FFFormatMimeType= +FFVEncoderId=0 +FFVEncoder= +FFAEncoderId=0 +FFAEncoder= + +[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=Default +SampleRate=48000 +ChannelSetup=Stereo +MeterDecayRate=23.53 +PeakMeterType=0 + +[Panels] +CookieId=99393F02ED1BC87A diff --git a/config/obs-studio/global.ini b/config/obs-studio/global.ini new file mode 100644 index 0000000..14fb9bb --- /dev/null +++ b/config/obs-studio/global.ini @@ -0,0 +1,20 @@ +[General] +MaxLogs=10 +InfoIncrement=-1 +ProcessPriority=Normal +EnableAutoUpdates=true +BrowserHWAccel=true +LastVersion=536936450 + +[Video] +Renderer=OpenGL + +[Locations] +Configuration=/home/shihaam/.config +SceneCollections=/home/shihaam/.config +Profiles=/home/shihaam/.config +PluginManagerSettings=/home/shihaam/.config + +[PropertiesWindow] +cx=720 +cy=580 diff --git a/config/obs-studio/user.ini b/config/obs-studio/user.ini new file mode 100644 index 0000000..b6b3586 --- /dev/null +++ b/config/obs-studio/user.ini @@ -0,0 +1,57 @@ +[Basic] +Profile=main +ProfileDir=main +SceneCollection=main +SceneCollectionFile=main.json +ConfigOnNewProfile=true + +[General] +Pre19Defaults=false +Pre21Defaults=false +Pre23Defaults=false +Pre24.1Defaults=false +ConfirmOnExit=true +HotkeyFocusType=NeverDisableHotkeys +FirstRun=true + +[BasicWindow] +PreviewEnabled=true +PreviewProgramMode=false +SceneDuplicationMode=true +SwapScenesMode=true +SnappingEnabled=true +ScreenSnapping=true +SourceSnapping=true +CenterSnapping=false +SnapDistance=10 +SpacingHelpersEnabled=true +RecordWhenStreaming=false +KeepRecordingWhenStreamStops=false +SysTrayEnabled=true +SysTrayWhenStarted=false +SaveProjectors=false +ShowTransitions=true +ShowListboxToolbars=true +ShowStatusBar=true +ShowSourceIcons=true +ShowContextToolbars=true +StudioModeLabels=true +SideDocks=true +VerticalVolumeControl=true +MultiviewMouseSwitch=true +MultiviewDrawNames=true +MultiviewDrawAreas=true +MediaControlsCountdownTimer=true +MixerShowInactive=false +MixerKeepInactiveLast=false +MixerShowHidden=false +MixerKeepHiddenLast=false +geometry=AdnQywADAAAAAAAAAAAEOAAAB38AAAi9AAAAAAAABDgAAAd/AAAIvQAAAAEAAAAAB4AAAAAAAAAEOAAAB38AAAi9 +DockState=AAAA/wAAAAD9AAAAAgAAAAAAAAEYAAAESvwCAAAAAvsAAAAUAHMAYwBlAG4AZQBzAEQAbwBjAGsBAAAAGgAAAiMAAACMAP////sAAAAWAHMAbwB1AHIAYwBlAHMARABvAGMAawEAAAJBAAACIwAAAIwA////AAAAAwAABmQAAAED/AEAAAAE+wAAABIAbQBpAHgAZQByAEQAbwBjAGsBAAABHAAAArMAAAECAP////sAAAAeAHQAcgBhAG4AcwBpAHQAaQBvAG4AcwBEAG8AYwBrAQAAA9MAAAIBAAAAxAD////7AAAAGABjAG8AbgB0AHIAbwBsAHMARABvAGMAawEAAAXYAAABqAAAAKIA////+wAAABIAcwB0AGEAdABzAEQAbwBjAGsCAAAHgAAAAt8AAAK8AAAAyAAABmQAAANDAAAAAQAAAAIAAAABAAAAAvwAAAAA +AlwaysOnTop=false +EditPropertiesMode=false +DocksLocked=false + +[Appearance] +FontScale=10 +Density=1 diff --git a/home/obs.nix b/home/obs.nix new file mode 100644 index 0000000..dbb618b --- /dev/null +++ b/home/obs.nix @@ -0,0 +1,33 @@ +# config/obs-studio and is symlinked into place -- home-manager's +# programs.obs-studio module only wraps the package and its plugins, it has no +# options for profiles or scene collections. +# +# recursive = true matters: without it home-manager would symlink the whole +# ~/.config/obs-studio directory into the nix store, and OBS could not create +# logs/, plugin_config/ or basic/scenes/ inside a read-only store path. With it, +# the directories are real and only the tracked files are links. +# +# OBS rewrites its own config on exit (user.ini geometry/DockState, +# global.ini LastVersion, basic.ini whenever settings change). Those writes +# replace the symlink with a regular file, which is harmless -- the next +# nixos-rebuild switch moves it aside as *.hm-bak and relinks. The repo is the +# source of truth, so anything changed in the OBS GUI that should stick has to +# be copied back: +# +# cp -a ~/.config/obs-studio/user.ini config/obs-studio/user.ini +# +# Iteration loop: edit config/obs-studio/... -> git add if new -> +# nixos-rebuild switch -> restart OBS. +{ ... }: + +{ + programs.obs-studio = { + enable = true; + # plugins = with pkgs.obs-studio-plugins; [ ]; + }; + + xdg.configFile."obs-studio" = { + source = ../config/obs-studio; + recursive = true; + }; +} diff --git a/home/packages.nix b/home/packages.nix index 2bd9031..9f03c7c 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -17,7 +17,6 @@ _64gram glab vlc - obs-studio brave firefox wireshark diff --git a/home/shihaam.nix b/home/shihaam.nix index 7878089..e4fd63a 100644 --- a/home/shihaam.nix +++ b/home/shihaam.nix @@ -7,6 +7,7 @@ ./packages.nix ./fonts.nix ./nano.nix + ./obs.nix ./sway.nix ];