Results 1 to 8 of 8

Thread: modify frame on transcoding

  1. #1

    Default modify frame on transcoding

    Hi everyone,

    Do you know can I use transcoder addon or any other way for modify video frame, for example join 2 stream to one picture or picture analysis (for example histogram calculation and inpaint back to frame)?

    I looked transcoder module and found following functions, but I don't know how put updated data back to frame.

    - onAfterDecodeFrame(...)
    - onAfterScaleFrame(...)
    - onBeforeDecodeFrame(...)
    - onBeforeScaleFrame(...)

    Do you have any ideas?


  2. #2


    Hi Andrey,

    You may be able to grab the original frame from the decoder using the transcoder thumbnail API and then after processing the image, insert it back in as an overlay.
    See the following articles which should give you a starting point.

    How to get thumbnail images from Wowza Transcoder with an HTTP Provider
    How to add graphic overlays to live streams with Wowza Transcoder AddOn
    Transcoder overlay image requirements

    If trying to add overlays at live frame rates, try to keep all of the image data in memory as disk io may drastically affect the frame rate.


  3. #3
    Join Date
    Aug 2014


    Hi Roger,

    Thanks for recommendations!

    I have a same taks, and I have another questions:

    What is overhead to copy image from stream and inpaint it back?

    Also, is it possible to create new stream dynamicaly from two-three-more onother? For example, merge two streams to one anaglyph stream, or create PIP stream (inpaint downscaled image from second stream into first one).

    -- Alexander.
    Last edited by monah_tuk; 08-13-2014 at 11:22 PM.

  4. #4


    Hi Alexander,

    You should be able to do this using the information in the links above. The example files included in the Overlays articles shows how to manipulate the images.

    There will be some overhead as you will be converting YUV frames to a BufferedImage on the decode side and back to YUV on the encode side. This conversion may cause issues on slower machines so you may need to reduce the frame rate of the overlays.

    It isn't possible to directly create a new video from the decoded frames however, you can use the Streams API to create a new stream from an arbitrary source and insert frames on that (You will need to transcode that stream as well).


  5. #5


    Also, check out the following example from one of our other forum users.

    Transcoder Overlay Example


  6. #6
    Join Date
    Aug 2014


    Roger, thanks a lot for information!

  7. #7


    roger_l, do you know how can I check performance? for example drop frames or some else?

    Thank you for your comments.

  8. #8


    Also could you please clarify when transcoding is called. As I understand it's called only when stream is played. So I can't get picture via transcoding when it's streaming, but not playing. Please let me know if I mistaken.

Similar Threads

  1. Frame Rate Transcoding
    By srlindsey in forum Suggestions
    Replies: 4
    Last Post: 04-29-2012, 01:10 PM
  2. Simulate frame-by-frame (for HLS players that don't support it natively)
    By swhiteman in forum Video On Demand Streaming Discussion
    Replies: 2
    Last Post: 12-01-2011, 10:26 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