Bug Report FFmpeg output - Video Encoder Settings ignored

HeylonNHP

New Member
Hey folks,

Recently I've noticed OBS is now ignoring any settings I enter into the Video Encoder Settings (if any) textbox.
Example:
VlZtMfL.png


The settings --preset placebo --crf 0 seemingly have no effect. I've also tried various combinations, including only using a single (instead of double) preceding dash for each option, and even just straight up entering helloworld into the textbox to see if it would at the very least cause a crash. No dice.

These settings worked flawlessly in prior versions. I'm not sure exactly which version introduced the bug, but it has happened recently (within the last 6 months). I use this mode to record entirely lossless streams from webcams. Now I no longer can.

I've tried both version 21.1.0 & 20.1.3 on two different PCs with the same results.

Advice is much appreciated,

Thanks!

LOG:
https://hastebin.com/xakaxegihu
 

HeylonNHP

New Member
FFmpeg Video encoder setting

Edit: RGBA for recordings? Are you sure?
I'm sure. I've done this successfully in the past.

I record from RGB sources. Recording to YUV often distorts the colours.
I have tried recording to YUV but it doesn't make any difference

Edit:
Thanks for the link
Writing the settings in that format seems to work just fine. Not sure why the format was seemingly changed recently. Either that, or my memory is failing me.

MJ9CYOL.png

I'm now back to fully lossless RGB recordings. Yippie!

Perhaps there should be a help button beside the textbox explaining the required formatting. I had no luck when looking online for documentation.
 
Last edited:

Osiris

Active Member
OBS is not ignoring settings, you are entering them incorrectly.
The format is, <name>=<value> so it would be: preset=placebo crf=0
 

katko

New Member
I'm sorry, but this is absolutely insane. Why would you change the format of FFMPEG settings from literally every single tutorial, guide, and reference material? And add insult to injury, have NO mention of it on the dialog menu (or "on mouse hover"), AND have no error message when you input it like the normal method (even to the log file)?!

This is absolutely a bug! I've been messing with this stuff for over 5 hours today only to finally stumble on this thread. My tab count extension said I had over 250 tabs open.

I'm using mpegts + nvenc_h264 (per a tutorial) and FINALLY I get in the logs (though no error message in dialog!):

01:25:12.755: Failed to set preset=ultrafast
01:25:12.755: Failed to set tune=zerolatency

So at least I KNOW it's ignoring that. So now I can figure out, is it an option that doesn't apply to this codec, or something else?

THANK GOD for this thread. But as a developer, this dialog setup (as-is) is pure insanity. It should have taken me 30 seconds (error dialog or explicit mention of expected format) to realize this format error, not 5+ hours from a silently ignored error with no log entry.

p.s. While passionately stating my case, I still wish the devs the best of luck.
 

Osiris

Active Member
Tutorials/guides give you options to use with the ffmpeg cli tool, OBS' ffmpeg output does not use any CLI tool (it uses the ffmpeg API directly), therefore how you specifiy the settings are not the same.
And preset and tune do not apply to nvenc encoders, only to x264

Also, why are you using custom ffmpeg output? We don't recommend that people use it, for the reasons you mentioned among others, this is also why it's buried farily deep in the application. You are basically on your own when using it.
The focus is currently on making OBS simpler for users, so working on improving the custom ffmpeg output doesn't really make sense.
 
Last edited:

katko

New Member
>Tutorials/guides give you options to use with the ffmpeg cli tool, OBS' ffmpeg output does not use any CLI tool (it uses the ffmpeg API directly), therefore how you specifiy the settings are not the same.

Okay, I'll give you complete credit for that, it makes sense.

>And preset and tune do not apply to nvenc encoders, only to x264

preset does, but the string is "llhq "(low latency high quality). and zerolatency=1. all per "ffmpeg -h nvenc_h264"

>Also, why are you using custom ffmpeg output?

AFAICT, it's the only way to use OBS to send video over IP to another machine.

My goal is, minimum latency possible. This is feasibility research into combining streams from two computers. The first machine sends to the second. The second reads it, plays it using ffplay (as the VLC OBS plugin doesn't work at all following the tutorial--VLC 2.x and 3.x straight also don't work). OBS then window capture's ffplay.

Cutting out the second computer and just using two instances of OBS, I'm still at ~300-500ms minimum, and way higher at worst cases.

I did find out that running NVENC with "full" color space instead of partial explodes and sends macroblocks/packets that ffmpleg can't understand and so whenever you're say, in Age of Empires, and everything is fine, you then scroll, and the motion tracking completely dies and freezes the output until you stop scrolling.

I've been playing around with various ffplay options, such as:

ffplay -fflags nobuffer -flags low_delay -probesize 32 -async_depth 1 -sync ext -analyzeduration 5000 -fpsprobesize 5 -loglevel verbose -loglevel +level udp://192.168.1.121:10000
 

katko

New Member
Somewhat hilariously. I followed the tutorial before which (terribly) recommended using multicast IP address. I was only using <10 MBit so I thought I was fine. Except my wife's internet would die every time I ran it. It was multicasting to every IP address on the network--which is quite a few on modern networks--and obliterating everything even though I wasn't using a fraction of the 5G and zero of the 2.4G channels for my actual purposes.
 

Osiris

Active Member
If you want to combine streams from 2 computers, have you checked out the NDI plugin? Assuming the computers are on the same network.
 

katko

New Member
Ideally, I need internet streaming support. I'm working local at the moment for the absolute "best case" latency before I add the internet to that.
 

SonnyWalkman

New Member
I support Katko on allowing extra encoder and mux settings,
There needs to be some way/method (external settings file) to add the extra ffmpeg mpegts and encoder?. I

'm using OBS to create a close to DVB compliant TS however, without the ability to add these extra settings such as meta service_name="blahblah" provider_name="12345" and about 10 others, I need to series up OBS's output directly with another instance of ffmpeg to copy the TS streams .and add what I require. Double handling.
 
Top