diff --git a/obs-plugin/src/plugin-main.c b/obs-plugin/src/plugin-main.c index d1e4f4aec..0fed640ea 100644 --- a/obs-plugin/src/plugin-main.c +++ b/obs-plugin/src/plugin-main.c @@ -15,7 +15,9 @@ MODULE_EXPORT const char *obs_module_description(void) /* OBS's Settings → Stream page only knows the rtmp-services service types, so a * third-party output is reached through a services.json entry whose "protocol" * this plugin registers: rtmp-services hides the entry unless the protocol is - * registered, and the frontend starts whichever output registered it. */ + * registered, and the frontend starts whichever output registered it. OBS + * applies "recommended" to the stream encoders: a segment is one GoP, so 1s + * keyframes keep latency low, and B-frames force viewers onto HLS. */ static const char service_entry[] = "{" "\"name\": \"Streamplace\"," "\"common\": true," @@ -24,7 +26,8 @@ static const char service_entry[] = "{" "\"stream_key_link\": \"https://stream.place/live\"," "\"servers\": [{\"name\": \"Local Streamplace node\", \"url\": \"http://127.0.0.1:38080\"}]," "\"supported video codecs\": [\"h264\"]," - "\"supported audio codecs\": [\"aac\", \"opus\"]" + "\"supported audio codecs\": [\"aac\", \"opus\"]," + "\"recommended\": {\"keyint\": 1, \"bframes\": 0}" "}"; /* Adds the entry to rtmp-services' services.json in the user's config diff --git a/obs-plugin/src/streamplace-output.c b/obs-plugin/src/streamplace-output.c index 2ea59c960..40d834052 100644 --- a/obs-plugin/src/streamplace-output.c +++ b/obs-plugin/src/streamplace-output.c @@ -165,6 +165,8 @@ static bool find_ingest_url(obs_data_t *config, const char *key, struct dstr *ur obs_data_t *endpoint = obs_data_array_item(endpoints, i); if (astrcmpi(obs_data_get_string(endpoint, "protocol"), INGEST_PROTOCOL) == 0) { dstr_copy(url, obs_data_get_string(endpoint, "url_template")); + /* Logged before the key goes in: OBS logs get shared for support. */ + do_log(LOG_INFO, "Ingest endpoint: %s", url->array); dstr_replace(url, "{stream_key}", key); } obs_data_release(endpoint); @@ -595,7 +597,7 @@ static bool start_streaming(struct sp_output *sp, const char *url, struct dstr * return false; } - do_log(LOG_INFO, "Streaming to %s", url); + do_log(LOG_INFO, "Streaming started"); if (!obs_output_begin_data_capture(sp->output, 0)) { /* The send thread owns the connection now; it ends the stream. */ pthread_mutex_lock(&sp->mutex); @@ -624,6 +626,9 @@ static bool connect_and_start(struct sp_output *sp, struct dstr *err) apply_encoder_configs(sp, config, err) && !is_stopping(sp) && start_streaming(sp, url.array, err); obs_data_release(config); dstr_free(&url); + /* Errors can quote the ingest URL; keep the key out of logs and dialogs. */ + if (!ok && key && *key) + dstr_replace(err, key, "{stream_key}"); return ok; }