Results 1 to 3 of 3

Thread: Overlay Image not scaling

  1. #1
    Join Date
    Sep 2015

    Default Overlay Image not scaling

    Developed wowza module to add overlay in live streaming using above link. Overlay images added into live stream but id didn't scaled properly.

    if (!encoderInfo.destinationVideo.isPassThrough())
    int destinationHeight = encoderInfo.destinationVideo.getFrameSizeHeight();
    scalingFactor = (double)destinationHeight/(double)sourceHeight;

    System.out.println("desination height"+destinationHeight);
    System.out.println("source height"+sourceHeight);
    System.out.println("scaling factor"+scalingFactor);
    TranscoderVideoOverlayFrame overlay = new TranscoderVideoOverlayFrame(mainImage.GetWidth(scalingFactor),
    mainImage.GetHeight(scalingFactor), mainImage.GetBuffer(scalingFactor));
    encoderInfo.destinationVideo.addOverlay(overlayIndex, overlay);
    //Add padding to the destination video i.e. pinch
    encoderInfo.videoPadding[0] = 0; // left
    encoderInfo.videoPadding[1] = 0; // top
    encoderInfo.videoPadding[2] = 0; // right
    encoderInfo.videoPadding[3] = (int)(((double)videoBottomPadding.getStepValue())*scalingFactor); // bottom
    For scaling above code is used. I tried to print out destination and source height and scaling factor. Scalling factor changes with respect to stream.
    But overlay image size remaing same for all streams. But if i add overlay via wowza manager and then view in different stream. Overlay image scaled correctly.

  2. #2
    Join Date
    Jun 2012



    If you want to have the overlay image displayed and scaled on all your transcoded outputs, you should add it when decoding the incoming stream.
    The overlay can be added during the decode or during the encode.

    I assume that using the Wowza Streaming Engine Manager UI you have added the overlay image in the decoding preset tab.


  3. #3
    Join Date
    Sep 2011


    For details on overlays and the effects of adding them to the Encode or Decode sections of the transcoding template, please see Transcoder overlay image requirements


Similar Threads

  1. not getting image overlay on live streams
    By kavita in forum AddOn: Transcoder
    Replies: 17
    Last Post: 05-19-2016, 08:27 AM
  2. Replies: 3
    Last Post: 10-06-2015, 11:24 PM
  3. PiP and text/image overlay on the fly
    By lgbmdev in forum Suggestions
    Replies: 1
    Last Post: 09-23-2013, 05:43 AM
  4. Live rtmp with image overlay
    By nomido in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 05-01-2013, 11:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts