How to set up Twitch streaming?

Hello, support,

I’d like to configure the streaming setting to be able to live stream to Twitch. On the document, I see ‘StreamSettings’ object has to be defined.

overwolf.streaming.enums.StreamingProvider enum is set to Twitch

And under ‘StreamParams’ object, what is the basic information that needs to be added in order to be able to enable streaming? My common sense tells me to add the following, but please correct me if I’m wrong.

  1. StreamInfo object
  • url: is this my Twitch channel url?
  1. StreamAuthParams object?
  • client_id: is this Twitch ID?
  • token: where do you get this token?
  1. StreamIngestServer Object
  • I guess you add Twitch stream key here.

Do you have a sample configuration on the Twitch streaming setting that I can refer to?

Best,

Charles

Hi @maximus,

I’m checking the issue and update you here.

Meanwhile, can you please paste your settings JSON from the overwolf.streaming.start()?

Thanks.

Hi,

I’ve tried four different settings. I’ll put each response below.

Case. 1

// provider set to RTMP
var stream_settings_1 = {
“provider”: overwolf.streaming.enums.StreamingProvider.RTMP,
“settings”: {
“audio”: { “mic”: {}, “game”: {} },
“video”: {
“auto_detect”: false,
“auto_calc_kbps”: false,
“override_overwolf_setting”: true,
“fps”: 60,
“width”: 1920,
“height”: 1080,
“max_kbps”: 6000,
“buffer_length”: 40000,
“include_full_size_video”: true,
“notify_dropped_frames_ratio”: 0.5,
“test_drop_frames_interval”: 5000,
“indication_position”: ‘TopRightCorner’,
“indication_type”: ‘dot’,
“encoder”: {
“name”: overwolf.streaming.enums.StreamEncoder.NVIDIA_NVENC,
“config”: {
“preset”: overwolf.streaming.enums.StreamEncoderPreset_NVIDIA.HIGH_QUALITY,
“rate_control”: overwolf.streaming.enums.StreamEncoderRateControl_NVIDIA.RC_CBR,
“keyframe_interval”: 2
}
}
},
“stream_info”: {
“url”: ‘Twitch’,
“title”: ‘overwolf Stream Twitch Test’
},
“auth”: {
“client_id”: ‘yqlxkhzuc42fccewrra8dqifnmlx69’,
“token”: ‘jjyz0u885pseuzpnjzvdhizdid3ymh’
},
“ingest_server”: {
“name”: ‘Twitch’,
“template_url”: ‘rtmp://live-sel03.twitch.tv/app/live_229134165_k9k18C6lq4czOryjwNv18ANckYYLZQ’ // Twitch Ingest Endpoints referenced from URL : Twitch Streamers - Twitch Ingest Recommendation
//“template_url”: ‘rtmp://live-sel03.twitch.tv/app/’ // Tried both cases with or without the stream key following the url.
}
}
};

[Result]


I get Success with ‘unauthorized’ error. No stream is shown on Twitch.

Case 2.

// provider is set to RTMP with blank auth and stream info
var stream_settings2 = {
“provider”: overwolf.streaming.enums.StreamingProvider.RTMP,
“settings”: {

“ingest_server”: {
“name”: ‘Twitch’,
“template_url”: ‘rtmp://live-sel03.twitch.tv/app/live_229134165_k9k18C6lq4czOryjwNv18ANckYYLZQ’ // Twitch Ingest Endpoints referenced from URL : Twitch Streamers - Twitch Ingest Recommendation
//“template_url”: ‘rtmp://live-sel03.twitch.tv/app/’ // Tried both cases with or without the stream key following the url.
}
}
};

[Result]


I get Success with ‘unauthorized’ error. No stream is shown on Twitch.

Case 3.

// provider is set to Twitch로 with blank auth and stream info
var stream_settings3 = {
“provider”: overwolf.streaming.enums.StreamingProvider.Twitch,
“settings”: {

“ingest_server”: {
“name”: ‘Twitch’,
“template_url”: ‘rtmp://live-sel03.twitch.tv/app/live_229134165_k9k18C6lq4czOryjwNv18ANckYYLZQ’ // Twitch Ingest Endpoints referenced from URL : Twitch Streamers - Twitch Ingest Recommendation
//“template_url”: ‘rtmp://live-sel03.twitch.tv/app/’ // Tried both cases with or without the stream key following the url.
}
}
};

[Result]


I get status error on start.

// Provider is set to Twitch
var stream_settings4 = {
“provider”: overwolf.streaming.enums.StreamingProvider.Twitch,
“settings”: {

“stream_info”: {
“url”: ‘Twitch’, // Twitch channel
“title”: ‘overwolf Stream Twitch Test’
},
“auth”: {
“client_id”: ‘yqlxkhzuc42fccewrra8dqifnmlx69’, // Twitch API Client ID
“token”: ‘jjyz0u885pseuzpnjzvdhizdid3ymh’ // Twitch API returned Token ( details below )
},
“ingest_server”: {
“name”: ‘Twitch’,
“template_url”: ‘rtmp://live-sel03.twitch.tv/app/live_229134165_k9k18C6lq4czOryjwNv18ANckYYLZQ’ // Twitch Ingest Endpoints referenced from URL : Twitch Streamers - Twitch Ingest Recommendation
//“template_url”: ‘rtmp://live-sel03.twitch.tv/app/’ // Tried both cases with or without the stream key following the url.
}
}
};

[Result]


Got status error with no stream key in return


this is where I got the returned API key


this is where I got the secret key value

I’ve been having no luck streaming to Twitch.

Best,
Charles

Before I deep dive into the issue: on your first option, I can’t find the unauthorized error.
Can you tell me the exact line? Which function returned it? What is the exact error message?

Also, can you please tell me what your permissions are in the app manifest?

Thanks

@maximus please answers the questions above if you can.

Anyway, we need to investigate it, update the API, create sample code and documentation.
I added it to our backlog. So we will supply it on one of next iterations.

Is that critical or urgent for your app?

@eransharv Thanks for this. I have mistyped the information. There is no ‘unauthorized’ error. The error is shown in the picture as is.

Here is the function used.

overwolf.streaming.start(stream_settings4,
function (result) {
console.log("striming start : " + JSON.stringify(result));
if (result.status == “success”) {
streamId = result.stream_id; //we need it for stopping the stream and manipulating stream settings later
console.log(result.stream_id);
}
else {
console.log(“something went wrong…”);
}
}
);

And here is the full maniffest.

{
“manifest_version”: “1”,
“type”: “WebApp”,
“meta”: {
“name”: “LoL Game Stream Sample (GAME Only)”,
“version”: “0.0.1”,
“minimum-overwolf-version”: “0.153.0.13”,
“author”: “Kazel Yoon”,
“icon”: “icon.png”,
“icon_gray”: “icon_gray.png”,
“description”: “LOL Game Stream Sample”
},
“permissions”: [
“Streaming”,
“DesktopStreaming”,
“Media”,
“Hotkeys”,
“GameInfo”,
“Extensions”,
“GameControl”
],
“data”: {
“start_window”: “index”,
“game_targeting”: {
“type”: “dedicated”,
“game_ids”: [ 5426 ]
},
“windows”: {
“index”: {
“file”: “index.html”,
“transparent”: true,
“clickthrough”: true,
“resizable”: false,
“show_in_taskbar”: true,
“size”: {
“width”: 1150,
“height”: 535
},
“start_position”: {
“Top”: 10,
“Left”: 10
}
}
},
“game_events”: [ 5426 ],
“launch_events”: [
{
“event”: “GameLaunch”,
“event_data”: {
“game_ids”: [ 5426 ]
},
“start_minimized”: false
}
]
}
}

We’d like to test live streaming using overwolf as we’d like build an streaming app. So I would say it’s important.

Best,
Charles

1 Like

Here is an example for stream settings, I hope it helps you (we’ll update our docs with some sample code in the near future):

{
provider: overwolf.streaming.enums.StreamingProvider.Twitch,
settings: {
stream_info: {
url: ‘Twitch’,
title: ‘My Stream!’
},
auth: {
client_id: [twitch_client_id - ‘d6yp57j6aqsursujc0rkxlg4pyepeuk’],
token: [string token from login]
},
// get ingest from: https://api.twitch.tv/kraken/ingests (with token and client-id)
ingest_server: {
name: null,
template_url: null
}

Also set max_kbps to the Twitch limits

an update: note that the ETA is OW v0.158 (~2-3 weeks). Note that this is not a final ETA. It just an estimation.

An update: this is is currently “on-hold” status due to higher priority tasks.
I’m not closing this ticket yet, as we eventually want to implement it as it’s in our backlog.

Thanks for your patience.