New upstream version 26.1.0+dfsg1
This commit is contained in:
parent
040dcc3fc2
commit
013818c4af
594 changed files with 19576 additions and 4478 deletions
|
|
@ -2,6 +2,7 @@ StreamingServices="خدمات البث"
|
|||
CustomStreamingServer="سيرفر بث مخصص"
|
||||
Service="خدمة"
|
||||
Server="سيرفر"
|
||||
Server.Auto="تلقائي (مستحسن)"
|
||||
StreamKey="مفتاح البث"
|
||||
UseAuth="استخدام المصادقة"
|
||||
Username="اسم المستخدم"
|
||||
|
|
|
|||
11
plugins/rtmp-services/data/locale/kab-KAB.ini
Normal file
11
plugins/rtmp-services/data/locale/kab-KAB.ini
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
StreamingServices="Imeẓluyen n usuddem"
|
||||
CustomStreamingServer="Aqeddac n usuddem yugnen"
|
||||
Service="Imeẓluyen"
|
||||
Server="Aqeddac"
|
||||
Server.Auto="Awurman (Yettwasemter)"
|
||||
StreamKey="Tasarut n usuddem"
|
||||
UseAuth="Seqdec asesteb"
|
||||
Username="Isem n useqdac"
|
||||
Password="Awal uffir"
|
||||
ShowAll="Sken akk imeẓluyen"
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
StreamingServices="Strömtjänster"
|
||||
CustomStreamingServer="Anpassad streamningsserver"
|
||||
CustomStreamingServer="Anpassad strömningsserver"
|
||||
Service="Tjänst"
|
||||
Server="Server"
|
||||
Server.Auto="Auto (rekommenderad)"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"url": "https://obsproject.com/obs2_update/rtmp-services",
|
||||
"version": 148,
|
||||
"version": 161,
|
||||
"files": [
|
||||
{
|
||||
"name": "services.json",
|
||||
"version": 148
|
||||
"version": 161
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"format_version": 2,
|
||||
"format_version": 3,
|
||||
"services": [
|
||||
{
|
||||
"name": "Twitch",
|
||||
|
|
@ -193,13 +193,37 @@
|
|||
"recommended": {
|
||||
"keyint": 2,
|
||||
"max video bitrate": 6000,
|
||||
"max audio bitrate": 160,
|
||||
"max audio bitrate": 320,
|
||||
"x264opts": "scenecut=0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "YouTube / YouTube Gaming",
|
||||
"name": "YouTube - HLS",
|
||||
"common": false,
|
||||
"more_info_link": "https://developers.google.com/youtube/v3/live/guides/ingestion-protocol-comparison",
|
||||
"servers": [
|
||||
{
|
||||
"name": "Primary YouTube ingest server",
|
||||
"url": "https://a.upload.youtube.com/http_upload_hls?cid={stream_key}©=0&file=out.m3u8"
|
||||
},
|
||||
{
|
||||
"name": "Backup YouTube ingest server",
|
||||
"url": "https://b.upload.youtube.com/http_upload_hls?cid={stream_key}©=1&file=out.m3u8"
|
||||
}
|
||||
],
|
||||
"recommended": {
|
||||
"keyint": 2,
|
||||
"output": "ffmpeg_hls_muxer",
|
||||
"max video bitrate": 51000,
|
||||
"max audio bitrate": 160
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "YouTube - RTMP",
|
||||
"common": true,
|
||||
"alt_names": [
|
||||
"YouTube / YouTube Gaming"
|
||||
],
|
||||
"servers": [
|
||||
{
|
||||
"name": "Primary YouTube ingest server",
|
||||
|
|
@ -216,6 +240,25 @@
|
|||
"max audio bitrate": 160
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "YouTube - RTMPS (Beta)",
|
||||
"common": true,
|
||||
"servers": [
|
||||
{
|
||||
"name": "Primary YouTube ingest server",
|
||||
"url": "rtmps://a.rtmps.youtube.com:443/live2"
|
||||
},
|
||||
{
|
||||
"name": "Backup YouTube ingest server",
|
||||
"url": "rtmps://b.rtmps.youtube.com:443/live2"
|
||||
}
|
||||
],
|
||||
"recommended": {
|
||||
"keyint": 2,
|
||||
"max video bitrate": 51000,
|
||||
"max audio bitrate": 160
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "VIMM",
|
||||
"servers": [
|
||||
|
|
@ -434,6 +477,12 @@
|
|||
"recommended": {
|
||||
"keyint": 2,
|
||||
"profile": "main",
|
||||
"supported resolutions": [
|
||||
"1280x720",
|
||||
"852x480",
|
||||
"480x360"
|
||||
],
|
||||
"max fps": 30,
|
||||
"max video bitrate": 6000,
|
||||
"max audio bitrate": 128
|
||||
}
|
||||
|
|
@ -1409,52 +1458,8 @@
|
|||
"common": false,
|
||||
"servers": [
|
||||
{
|
||||
"name": "Chicago, US",
|
||||
"url": "rtmp://ingest-any-ord1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Seattle, US",
|
||||
"url": "rtmp://ingest-any-sea1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Los Angeles, US",
|
||||
"url": "rtmp://ingest-any-lax1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Washington DC, US",
|
||||
"url": "rtmp://ingest-any-iad1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Frankfurt, DE",
|
||||
"url": "rtmp://ingest-any-fra1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "London, UK",
|
||||
"url": "rtmp://ingest-any-lhr1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Stockholm, SE",
|
||||
"url": "rtmp://ingest-any-sto1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Tokyo, JP",
|
||||
"url": "rtmp://ingest-any-tyo1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Hong Kong, HK",
|
||||
"url": "rtmp://ingest-any-hkg1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Singapore, SG",
|
||||
"url": "rtmp://ingest-any-sgp1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "Sydney, AU",
|
||||
"url": "rtmp://ingest-any-syd1.broadcast.steamcontent.com/app"
|
||||
},
|
||||
{
|
||||
"name": "São Paulo, BR",
|
||||
"url": "rtmp://ingest-any-gru1.broadcast.steamcontent.com/app"
|
||||
"name": "Default",
|
||||
"url": "rtmp://ingest-rtmp.broadcast.steamcontent.com/app"
|
||||
}
|
||||
],
|
||||
"recommended": {
|
||||
|
|
@ -1792,6 +1797,20 @@
|
|||
"max video bitrate": 5000,
|
||||
"max audio bitrate": 160
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Viloud",
|
||||
"servers": [
|
||||
{
|
||||
"name": "Default",
|
||||
"url": "rtmp://live.viloud.tv:5222/app"
|
||||
}
|
||||
],
|
||||
"recommended": {
|
||||
"keyint": 2,
|
||||
"max video bitrate": 5000,
|
||||
"max audio bitrate": 160
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ struct rtmp_common {
|
|||
char *key;
|
||||
|
||||
char *output;
|
||||
struct obs_service_resolution *supported_resolutions;
|
||||
size_t supported_resolutions_count;
|
||||
int max_fps;
|
||||
|
||||
bool supports_additional_audio_track;
|
||||
};
|
||||
|
|
@ -31,6 +34,7 @@ static inline json_t *find_service(json_t *root, const char *name,
|
|||
const char **p_new_name);
|
||||
static inline bool get_bool_val(json_t *service, const char *key);
|
||||
static inline const char *get_string_val(json_t *service, const char *key);
|
||||
static inline int get_int_val(json_t *service, const char *key);
|
||||
|
||||
extern void twitch_ingests_refresh(int seconds);
|
||||
|
||||
|
|
@ -67,6 +71,43 @@ static void ensure_valid_url(struct rtmp_common *service, json_t *json,
|
|||
}
|
||||
}
|
||||
|
||||
static void update_recommendations(struct rtmp_common *service, json_t *rec)
|
||||
{
|
||||
const char *out = get_string_val(rec, "output");
|
||||
if (out)
|
||||
service->output = bstrdup(out);
|
||||
|
||||
json_t *sr = json_object_get(rec, "supported resolutions");
|
||||
if (sr && json_is_array(sr)) {
|
||||
DARRAY(struct obs_service_resolution) res_list;
|
||||
json_t *res_obj;
|
||||
size_t index;
|
||||
|
||||
da_init(res_list);
|
||||
|
||||
json_array_foreach (sr, index, res_obj) {
|
||||
if (!json_is_string(res_obj))
|
||||
continue;
|
||||
|
||||
const char *res_str = json_string_value(res_obj);
|
||||
struct obs_service_resolution res;
|
||||
if (sscanf(res_str, "%dx%d", &res.cx, &res.cy) != 2)
|
||||
continue;
|
||||
if (res.cx <= 0 || res.cy <= 0)
|
||||
continue;
|
||||
|
||||
da_push_back(res_list, &res);
|
||||
}
|
||||
|
||||
if (res_list.num) {
|
||||
service->supported_resolutions = res_list.array;
|
||||
service->supported_resolutions_count = res_list.num;
|
||||
}
|
||||
}
|
||||
|
||||
service->max_fps = get_int_val(rec, "max fps");
|
||||
}
|
||||
|
||||
static void rtmp_common_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
struct rtmp_common *service = data;
|
||||
|
|
@ -75,12 +116,16 @@ static void rtmp_common_update(void *data, obs_data_t *settings)
|
|||
bfree(service->server);
|
||||
bfree(service->output);
|
||||
bfree(service->key);
|
||||
bfree(service->supported_resolutions);
|
||||
|
||||
service->service = bstrdup(obs_data_get_string(settings, "service"));
|
||||
service->server = bstrdup(obs_data_get_string(settings, "server"));
|
||||
service->key = bstrdup(obs_data_get_string(settings, "key"));
|
||||
service->supports_additional_audio_track = false;
|
||||
service->output = NULL;
|
||||
service->supported_resolutions = NULL;
|
||||
service->supported_resolutions_count = 0;
|
||||
service->max_fps = 0;
|
||||
|
||||
json_t *root = open_services_file();
|
||||
if (root) {
|
||||
|
|
@ -95,9 +140,7 @@ static void rtmp_common_update(void *data, obs_data_t *settings)
|
|||
if (serv) {
|
||||
json_t *rec = json_object_get(serv, "recommended");
|
||||
if (json_is_object(rec)) {
|
||||
const char *out = get_string_val(rec, "output");
|
||||
if (out)
|
||||
service->output = bstrdup(out);
|
||||
update_recommendations(service, rec);
|
||||
}
|
||||
|
||||
service->supports_additional_audio_track = get_bool_val(
|
||||
|
|
@ -115,6 +158,7 @@ static void rtmp_common_destroy(void *data)
|
|||
{
|
||||
struct rtmp_common *service = data;
|
||||
|
||||
bfree(service->supported_resolutions);
|
||||
bfree(service->service);
|
||||
bfree(service->server);
|
||||
bfree(service->output);
|
||||
|
|
@ -370,6 +414,15 @@ static void fill_servers(obs_property_t *servers_prop, json_t *service,
|
|||
}
|
||||
}
|
||||
|
||||
static void fill_more_info_link(json_t *service, obs_data_t *settings)
|
||||
{
|
||||
const char *more_info_link;
|
||||
|
||||
more_info_link = get_string_val(service, "more_info_link");
|
||||
if (more_info_link)
|
||||
obs_data_set_string(settings, "more_info_link", more_info_link);
|
||||
}
|
||||
|
||||
static inline json_t *find_service(json_t *root, const char *name,
|
||||
const char **p_new_name)
|
||||
{
|
||||
|
|
@ -432,7 +485,7 @@ static bool service_selected(obs_properties_t *props, obs_property_t *p,
|
|||
}
|
||||
|
||||
fill_servers(obs_properties_get(props, "server"), service, name);
|
||||
|
||||
fill_more_info_link(service, settings);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -516,7 +569,7 @@ static void apply_video_encoder_settings(obs_data_t *settings,
|
|||
|
||||
item = json_object_get(recommended, "bframes");
|
||||
if (json_is_integer(item)) {
|
||||
int bframes = json_integer_value(item);
|
||||
int bframes = (int)json_integer_value(item);
|
||||
obs_data_set_int(settings, "bf", bframes);
|
||||
}
|
||||
|
||||
|
|
@ -654,6 +707,57 @@ static bool supports_multitrack(void *data)
|
|||
return service->supports_additional_audio_track;
|
||||
}
|
||||
|
||||
static void rtmp_common_get_supported_resolutions(
|
||||
void *data, struct obs_service_resolution **resolutions, size_t *count)
|
||||
{
|
||||
struct rtmp_common *service = data;
|
||||
*count = service->supported_resolutions_count;
|
||||
*resolutions = bmemdup(service->supported_resolutions,
|
||||
*count * sizeof(struct obs_service_resolution));
|
||||
}
|
||||
|
||||
static void rtmp_common_get_max_fps(void *data, int *fps)
|
||||
{
|
||||
struct rtmp_common *service = data;
|
||||
*fps = service->max_fps;
|
||||
}
|
||||
|
||||
static void rtmp_common_get_max_bitrate(void *data, int *video_bitrate,
|
||||
int *audio_bitrate)
|
||||
{
|
||||
struct rtmp_common *service = data;
|
||||
json_t *root = open_services_file();
|
||||
json_t *item;
|
||||
|
||||
if (!root)
|
||||
return;
|
||||
|
||||
json_t *json_service = find_service(root, service->service, NULL);
|
||||
if (!json_service) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
json_t *recommended = json_object_get(json_service, "recommended");
|
||||
if (!recommended) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (audio_bitrate) {
|
||||
item = json_object_get(recommended, "max audio bitrate");
|
||||
if (json_is_integer(item))
|
||||
*audio_bitrate = (int)json_integer_value(item);
|
||||
}
|
||||
|
||||
if (video_bitrate) {
|
||||
item = json_object_get(recommended, "max video bitrate");
|
||||
if (json_is_integer(item))
|
||||
*video_bitrate = (int)json_integer_value(item);
|
||||
}
|
||||
|
||||
fail:
|
||||
json_decref(root);
|
||||
}
|
||||
|
||||
struct obs_service_info rtmp_common_service = {
|
||||
.id = "rtmp_common",
|
||||
.get_name = rtmp_common_getname,
|
||||
|
|
@ -665,4 +769,7 @@ struct obs_service_info rtmp_common_service = {
|
|||
.get_key = rtmp_common_key,
|
||||
.apply_encoder_settings = rtmp_common_apply_settings,
|
||||
.get_output_type = rtmp_common_get_output_type,
|
||||
.get_supported_resolutions = rtmp_common_get_supported_resolutions,
|
||||
.get_max_fps = rtmp_common_get_max_fps,
|
||||
.get_max_bitrate = rtmp_common_get_max_bitrate,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include <obs-module.h>
|
||||
#include <util/dstr.h>
|
||||
|
||||
struct rtmp_custom {
|
||||
char *server, *key;
|
||||
|
|
@ -109,6 +110,19 @@ static const char *rtmp_custom_password(void *data)
|
|||
return service->password;
|
||||
}
|
||||
|
||||
#define RTMP_PROTOCOL "rtmp"
|
||||
|
||||
static void rtmp_custom_apply_settings(void *data, obs_data_t *video_settings,
|
||||
obs_data_t *audio_settings)
|
||||
{
|
||||
struct rtmp_custom *service = data;
|
||||
if (service->server != NULL && video_settings != NULL &&
|
||||
strncmp(service->server, RTMP_PROTOCOL, strlen(RTMP_PROTOCOL)) !=
|
||||
0) {
|
||||
obs_data_set_bool(video_settings, "repeat_headers", true);
|
||||
}
|
||||
}
|
||||
|
||||
struct obs_service_info rtmp_custom_service = {
|
||||
.id = "rtmp_custom",
|
||||
.get_name = rtmp_custom_name,
|
||||
|
|
@ -120,4 +134,5 @@ struct obs_service_info rtmp_custom_service = {
|
|||
.get_key = rtmp_custom_key,
|
||||
.get_username = rtmp_custom_username,
|
||||
.get_password = rtmp_custom_password,
|
||||
.apply_encoder_settings = rtmp_custom_apply_settings,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#pragma once
|
||||
|
||||
#define RTMP_SERVICES_FORMAT_VERSION 2
|
||||
#define RTMP_SERVICES_FORMAT_VERSION 3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue