Question / Help [recording] OBS 24 ignores FFACustom

rez_spb

New Member
Hello, I'm in need of some help.
I record via ffmpeg custom. Sometimes I do recordings for extralow bandwidth (i.e. old modems with up to 56kbps rate).

What I want to achieve
Using ffmpeg I have chosen 11khz mono being enough for my needs and encode it in 32kbps aac.
OBS has Advanced Output mode, where in Recording tab I set Audio Encoder Settings as I see them fit.

What I do
Set -ab 32k -ar 11025 -ac 1 -c:a aac -aac_coder twoloop to Audio Encoder Settings.
This works as intended in ffmpeg (so that's not an issue on ffmpeg side, I checked it before posting).

Full config (OBS 24.0.3-modified, built from source, not the latest as I don't have newer CMAKE for this distrib):
INI:
[General]
Name=lq (hevc)

[Output]
Mode=Advanced
RetryDelay=10

[SimpleOutput]
StreamEncoder=x264
RecFormat=mkv
NVENCPreset=default
VBitrate=5000
UseAdvanced=false
FilePath=/home/rez/data/video_record
FileNameWithoutSpace=true
ABitrate=128
Preset=veryfast

[AdvOut]
TrackIndex=1
RecType=FFmpeg
RecTracks=1
FFOutputToFile=true
FFVEncoderId=174
FFAEncoderId=86018
FFAudioTrack=1
ApplyServiceSettings=false
RescaleRes=1920x1080
RecRescaleRes=1920x1080
FFRescaleRes=1920x1080
RecFilePath=/home/rez/data/video_record
RecFileNameWithoutSpace=true
RecFormat=mkv
RecEncoder=ffmpeg_nvenc
Track1Bitrate=32
Track2Bitrate=96
Track3Bitrate=96
Track4Bitrate=96
FFFilePath=/home/rez/data/video_record
FFFileNameWithoutSpace=true
FFFormat=mp4
FFFormatMimeType=video/mp4
FFExtension=mp4
FFVBitrate=0
FFVEncoder=hevc_nvenc
FFVCustom=-c:v hevc_nvenc -preset:v llhp -rc:v ll_2pass_quality -cq 26
FFABitrate=32
FFAEncoder=aac
FFAudioMixes=1
Pre22.1Settings=true
FFACustom=-ab 32k -ar 11025 -ac 1 -c:a aac -aac_coder twoloop
Track1Name=32kbps
FFMCustom=

[Video]
OutputCX=1920
OutputCY=1010
ScaleType=lanczos
FPSCommon=30
BaseCX=1920
BaseCY=1010
ColorFormat=NV12
FPSType=1
FPSInt=15

[Panels]
CookieId=<some_string>

[Audio]
ChannelSetup=Stereo
The result
OBS obeys 32kbps and uses AAC, but ignores my custom audio settings and overrides it to stereo 44khz, which sounds expectedly bad at 32kbps.

There are no errors in log file:
Code:
12:57:36.203: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds (source: Mic/Aux)
12:57:36.203:
12:57:41.603: ==== Recording Start ===============================================
12:57:45.054: Output 'adv_ffmpeg_output': stopping
12:57:45.054: Output 'adv_ffmpeg_output': Total frames output: 50
12:57:45.054: Output 'adv_ffmpeg_output': Total drawn frames: 56
12:57:45.055: ==== Recording Stop ================================================
13:23:08.277: Settings changed (stream 1, outputs)
13:23:08.277: ------------------------------------------------
13:32:28.476: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: Desktop Audio)
13:32:28.476:
Could you please advise on a proper way of doing this?
Currently I think that OBS sets its own parameters after mine, thus they are overridden as a result. I need to somehow specify my -ac and -ar as priority settings.
 

rez_spb

New Member
I am sorry to up this, but I wasn't able to find a solution for 3 weeks and would really appreciate advice on this.

What I learned is that FFVCustom does the same for recording with several other ffmpeg options.
Example: I was unable to pass -pix_fmt yuv420p10le to hevc_nvenc to enable 10bit stream (my card supports it and I can transcode postfactum without issues, but transcoding takes time and impacts quality).
 
Top