Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

setMaxResolution for adaptive video #699

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

thegobot
Copy link
Contributor

For adaptive video, you need to limit the transcoded resolution. I needed this to limit the output bndwidth for rtmp (i use streaming-out) and probably to reduce the load on the processor

Usage:

var addOutput = function (codec, resolution, framerate, bitrate, keyFrameInterval, on_ok, on_error) {

engine.setMaxResolution(stream_id, 1000, 0); //by width
engine.setMaxResolution(stream_id, 0, 1000); //by height

Please see my question
#698

@labwebrtctest labwebrtctest requested a review from daijh November 16, 2020 05:34
@@ -176,6 +176,26 @@ void VideoTranscoder::forceKeyFrame(const v8::FunctionCallbackInfo<v8::Value>& a
me->forceKeyFrame(outStreamID);
}

void VideoTranscoder::setMaxResolution(const v8::FunctionCallbackInfo<v8::Value>& args){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is not registered in node layer through "init" function in line 24. Who will call this function?

@thegobot
Copy link
Contributor Author

This works for me. Maybe I made a crooked patch, I'm not good at GIT. Try adding all the wrappers yourself. I think this patch is useful. It's simple

7f77a26

@@ -1,4 +1,4 @@
Apache License
Apache License!!!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why adding this change to license and readme file?

@@ -93,7 +93,7 @@ function calculateSignature (toSign, key) {
function ManagementApi (spec) {
this.id = spec.id;
this.key = spec.key;
this.url = spec.url || '/';
this.url = spec.url || window.location.pathname.replace(/\/console.*/g, "/");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code conflict with latest master code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants