Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

@@ -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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants