[Fixed] Restream.io suggested settings

sneaky4oe

Member
Hi guys. I'm at restream.io support now, and would like to ask you to set keyframe interval to 2 instead of random number when "enforce streaming service encoder settings" is enabled. It causes lots of troubles for users at end platforms since most of them needs 2 as their keyframe value.

Would be nice to see this change.
 

RytoEX

Forum Admin
Forum Moderator
Developer
Hi guys. I'm at restream.io support now, and would like to ask you to set keyframe interval to 2 instead of random number when "enforce streaming service encoder settings" is enabled. It causes lots of troubles for users at end platforms since most of them needs 2 as their keyframe value.

Would be nice to see this change.

I'm confused by this request. The current rtmp-services services.json shows this:
Code:
{
    "name": "Restream.io",
    "common": true,
<snip>
    "recommended": {
        "keyint": 2
    }
},

So it should already be doing what you're asking. Are you saying the behavior of "enforce streaming service encoder settings" for this instance is buggy?
 

sneaky4oe

Member
Yeah. I've faced some users who had it at 8 for some reason with the "enforce" option enabled for restream.

See the logs: https://gist.github.com/anonymous/2317270bd6442483dea1076219b03791

Keyint at 0, enforcing service's settings.
Keyint at 2, not enforcing anything.
Simple settings.

Keyint's for each case at 30 fps:
250
60
60

[x264 encoder: 'streaming_h264'] preset: veryfast
[x264 encoder: 'streaming_h264'] settings:
rate_control: CBR
bitrate: 2500
buffer size: 2500
crf: 0
fps_num: 30
fps_den: 1
width: 1280
height: 720
keyint: 250

[x264 encoder: 'streaming_h264'] preset: veryfast
[x264 encoder: 'streaming_h264'] settings:
rate_control: CBR
bitrate: 2500
buffer size: 2500
crf: 0
fps_num: 30
fps_den: 1
width: 1280
height: 720
keyint: 60

[x264 encoder: 'simple_h264_stream'] preset: veryfast
[x264 encoder: 'simple_h264_stream'] settings:
rate_control: CBR
bitrate: 2500
buffer size: 2500
crf: 0
fps_num: 30
fps_den: 1
width: 1280
height: 720
keyint: 60

So, yeah. Enforcing leaves keying at ~8 for some reason.
 
Last edited:

sneaky4oe

Member
If you set keyint to 2 manually with "enforce" enabled, it works tho.
But if 0 should be auto - why is it 8.33 then with "enforce" enabled?
 

sneaky4oe

Member
Another thing from current case. OSx user has it on 2 with "enforce" enabled. KF interval is a variable around 1.8 on stream.
 

RytoEX

Forum Admin
Forum Moderator
Developer
A keyint of 250 is the default value for FFmpeg/x264. It seems like if a user creates a new profile and does not modify the default Keyframe Interval value of 0, OBS will not set the service recommended value until the user changes the value to something, and then changes it back to 0. It will instead use the FFmpeg/x264 default, which is the 250 you're seeing.

I'm still looking at the code paths to see exactly why this happens. To clarify, this occurs with all streaming services, not just Restream.


Edit: I do see why this happens now, but I haven't figured out the best way to fix it yet. To workaround it, change any setting in the streaming section, then change it back, and hit apply/OK. For now, I've filed Mantis Issue 1061.
 
Last edited:

sneaky4oe

Member
@RytoEX Thanks, but is there a way to force keyframe of 2 if user won't change it manually? It causes many problems for unexperienced streamers.
 

RytoEX

Forum Admin
Forum Moderator
Developer
Not that I know of currently, other than the workaround that I've already outlined (change any encoder setting, change it back, hit apply/OK).
 

RytoEX

Forum Admin
Forum Moderator
Developer
I probably could, but I don't think that's the best way to solve the issue. I've had other responsibilities away from OBS, and then I was away for a while. Jim has been focused on other development items, and the PR queue had gotten a bit large. This is something that is on my mind and in my backlog of items to address, I just need time to sit down and think it over or talk it out with another contributor (or Jim).
 

sneaky4oe

Member
Today I've had a user who for some reason had keyframe interval of 0.8-1.0 when it was set for 2 with unchecking suggested settings at x264. Switching over to nvenc helped though. Is it legal? :-D
 

sneaky4oe

Member
I probably could, but I don't think that's the best way to solve the issue. I've had other responsibilities away from OBS, and then I was away for a while. Jim has been focused on other development items, and the PR queue had gotten a bit large. This is something that is on my mind and in my backlog of items to address, I just need time to sit down and think it over or talk it out with another contributor (or Jim).

Any news on this bug fix?
With profile selected to "none" with that "enforce" option ticked, user had "baseline" instead of "main".
And I still have a lot of users with keyint 8 instead of 2.
 

DarkDench

New Member
Hello. I have an interval of keyframe 2 (x264) in obs, but restream.io in the statistics after streaming the interval of the keyframe 1. Tell me how to fix this
 

Attachments

  • key int.jpg
    key int.jpg
    68.8 KB · Views: 167
  • restream report.jpg
    restream report.jpg
    37.6 KB · Views: 159
Top