Recording with Custom FFmpeg output: How to Set Parameters

EE0000

New Member
I'm using OBS on Linux.
I have tried to record screen by integrated graphics card via VAAPI on ffmpeg with the following command:
ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 1920x1080 -i :0 -c:v hevc_vaapi -qp 36 output.mp4
This works perfectly, but in OBS's settings pane, under type "standard" and Encoder "FFMPEG VAAPI", the only VAAPI Codec I can choose is "H.264 (default)".
In "Custom Output (FFmpeg)", I don't know how to fill out Muxer Settings and Video Encoder Settings.
Screenshot from 2022-02-06 07-58-19.png

I have tried this, but it doesn't work.
Screenshot from 2022-02-06 08-08-19.png

Does anyone know how to fill this?
 

Quaternions

New Member
Have you tried this with empty "Video Encoder Settings" and "Muxer Settings" fields? I think that is what it's complaining about. DRI128 is probably the default vaapi device and does not need to be specified, and maybe ffmpeg can figure out hwupload and format conversion automatically. This is how I stream to my local streaming server using nvidia hardware encoding:
Screenshot_2022-03-24_23-00-38.png

Try depopulating all of the fields that say "(if any)".

Edit:
Looks like I've been using Video Encoder Settings incorrectly for years, whoops! Your post helped me solve my own issue of selecting which gpu to encode video on!
 

Quaternions

New Member
Found my way back here trying to do the same thing as you, and it's not possible without a new text field to enter the vaapi_device parameter.
 

Gwyneth Llewelyn

New Member
How did you enable"libx265" encoder?
I have 3080ti and the latest OBS. My GPU must have support for this. Or what?

I have the same question (after half a year without answers) — even though I have far lower hardware. Is there any trick to enable the x265 encoder?
 

Kiritosblade

New Member
This is the settings i'm using currently for Beat Saber 1440p 60fps capture.
My bitrate is 84,000 even though you should be able to theoretically use roughly 34,000 for 1440p 60fps (According to various sources).
-- This Calculator for example: https://www.omnicalculator.com/other/streaming-bitrate
But this has been tested by me and did not work out well. Until I hit the 84,000 range.
In my example screenshot the calc is essentially calculating the bandwidth in bitrate required to stream not record. But same logic applies

In the screenshot you can see my encoders are available to use 265 or 264, I would not suggest recording directly into 265 however (same for streaming into 265) as 265 is actually more cpu intensive than 264 from my experience and tends to bug out anyways.
But yeah, this is my example to show.
If you want to make use of 265 I would suggest still recording directly to 264, then after the fact process the footage and re-encode to 265.

Now I do have a question.
This is technically CBR (Constant Bitrate), is there a way to make these same muxer settings work with VBR instead or CQP?
Is it as simple as entering in a range f.e. 1000-4000 ?
Not a clue.
 

Attachments

  • OBS_Settings.png
    OBS_Settings.png
    41 KB · Views: 602
  • Calc_Example.png
    Calc_Example.png
    20.1 KB · Views: 590
Last edited:

geekley

New Member
This code seems to indicate that the parameters must use "=" and " " (space) somehow, probably to separate them like so:
param1=value1 param2='value 2'
So, instead of -vaapi_device /dev/dri/renderD128 you could try vaapi_device="/dev/dri/renderD128"
This should solve the "Failed to parse muxer settings" error.
 
Top