Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

setMaxVideoxxx to 0 does not set unlimited upper values, and there is a typo in setMaxOuputBitrate #19

Closed

Description

@hunternet93

I'm trying to stream with a high bitrate, but no matter what I do Kurento (6.2.0) always sets target-bitrate to 300000 on the encoder. Here's my latest attempt:

    viewer.element = create('WebRtcEndpoint');
    viewer.element.setMaxVideoRecvBandwidth(0);
    viewer.element.setMaxVideoSendBandwidth(0);
    viewer.element.setMinVideoRecvBandwidth(1000);
    viewer.element.setMinVideoSendBandwidth(1000);
    viewer.element.setMaxOuputBitrate(1000000);

Oddly enough, the property max-output-bitrate gets correctly set to 1000000 on the KmsWebrtcEndpoint bin, but that doesn't seem to affect vp8enc. The setMin/MaxVideoSend/RecvBandwidth family of functions appear to have to effect whatsoever as far as I can tell.

Also, setMaxOuputBitrate should probably be spelled setMaxOutputBitrate, unless I'm missing something.

Activity

  1. igracia commented on Dec 17, 2015

    @igracia
    Contributor

    I think you are using it wrong. Could you explain what's the expected behavior, and describe your pipeline? If you want to exchange higher rate video between two endpoints, you need to setMaxOutputBitrate in the source. That means that if you have a presenter, you'd do something like this

    presenter.setMaxOutputBitrate(1000000);
    presenter.connect(viewer);

    As for the other parameters, at this moment setting 0 as the max value, is not setting unlimited bandwidth. We've opened a bug about that, and it shouldn't take long. In the mean time, set a ridiculously high value in those max settings if you want unlimited bandwidth.

    One more thing, it is important that those setMax and setMin are done before the negotiation of SDPs takes place, or they will have no effect. We are also working on fixing that.

  2. changed the title [-]setMaxOuputBitrate doesn't do anything[/-] [+]setMaxVideoxxx to 0 does not set unlimited upper values, and there is a typo in setMaxOuputBitrate[/+] on Dec 17, 2015
  3. igracia commented on Dec 17, 2015

    @igracia
    Contributor

    @mparis You already filed the internal bug, but just for traceability I'm assigning this here, too.

  4. added
    bug
    kms
    on Dec 17, 2015
  5. hunternet93 commented on Dec 17, 2015

    @hunternet93
    Author

    I'm streaming from an h.264 RTSP source (using PlayerEndpoint) to a WebRTC endpoint. I just tried setMaxOutputBitrate on the PlayerEndpoint, but it didn't change the encoder's target-bitrate.

    Here's a PDF (because GitHub won't let me upload SVG) of the pipeline's GstreamerDot: rtsp-to-webrtc-vp8-incorrect-bitrate.pdf

    SDP of the WebRTC connection

  6. hunternet93 commented on Jan 4, 2016

    @hunternet93
    Author

    Just dug through the code a bit, setMaxOuputBitrate sets the the element's MIN_OUTPUT_BITRATE and MAX_OUTPUT_BITRATE GObject properties. Oddly enough, I couldn't find any other mentions of those constants except for their #defines, is setMaxOuputBitrate just a no-op at the moment? If so, it should probably be mentioned in the docs.

    Edit: Same for setMaxVideoSendBandwidth et al, they set various properties that never seem to be accessed.

    Another edit: Turns out I'm dumb, kmsagnosticbin accesses the property using -> syntax instead of the macro thingy (I'm not much of a C coder :P).

  7. hunternet93 commented on Jan 5, 2016

    @hunternet93
    Author

    After poking around a bit, I found something odd in kmsenctreebin.c:

    #define KMS_ENC_TREE_BIN_LIMIT(obj, value) \
      MAX((obj)->priv->min_bitrate,MIN((obj)->priv->max_bitrate, (value)))
    

    That seems a bit off, it means that if max_bitrate is greater than the default target bitrate (from kmsagnosticbin.c), then target-bitrate is set to the default instead of the user-defined target.

    Maybe instead kms_enc_tree_bin_new should only take min_bitrate and max_bitrate arguments, and use max_bitrate as the target bitrate.

    Edit: Just rewrote the macro to return max_bitrate, now the encoder's target-bitrate is set properly!

  8. igracia commented on Jan 5, 2016

    @igracia
    Contributor

    @mparis Could you please check this?

  9. jcaden commented on Jan 5, 2016

    @jcaden
    Member

    I'll review this

  10. assigned and unassigned on Jan 5, 2016
  11. dfernandezlop commented on Jun 1, 2016

    @dfernandezlop

    Hi,

    In the last KMS release (6.5.0) we have fixed the wrong behaviour of the properties and typos in properties.

    Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugkms

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions