Wowza Community

client communicate to server for dynamic overlay of images in real-time

We want to give control to client(who broadcasts live sessions to server), so that he can show some images to viewers whenever the client wants. I followed your tutorial of image overlay, but it’s bit different than what we are looking for. If the server already knows when client wants to show images, that tutorial is great.

How can the broadcaster communicate to server that he wanted to show images at a particular time in real-time?

Any help or suggestions will be appreciated…thanks

If you are using a Flash RTMP player, you can use cue points.

This article provides information on how to injecting cue points server-side, which get recorded and triggered client-side.

How to inject cue points or metadata

Salvadore

Let’s use case this out. Putting aside implementation, is this what you mean?

A: Publish client

B: Wowza

C: Playback client

  1. Publish client publishes a live stream to Wowza

  2. Playback client subscribes to the live stream

  3. Publish client inserts an image by some user action/command

  4. Playback client displays that image

Images are stored in Wowza?

What is the publisher client?

What is the playback client?

If the playback client is Flash RTMP only, you can use cuepoints (time text) on the NetStream. You can develop Flash app that streams and reads your cue-points (which can be named whatever you want) and do some overlay client-side. You would probably store images on a web server to do this. It’s not that complicated but would take some work.

If the playback client might be a HTTP client, e.g. iOS device, or if it is a RTSP client, then you will have to take another approach, which might be easier than the above. You could convert the static images to .mp4 files and use the Stream class streams, for example what is used in the scheduler and the LoopUntilLive example, which might be the best starting place.

In any case, it will take some work. If you need help with it you can post a job description in the Find a Consultant forum, or write to support@wowza.com and ask for the list of independent consultants.

Richard

Yes, cuepoints are triggered in the Flash RTMP playback client, according to your custom coding in most cases (there is some built-in cuepoint handling in some players involving closed caption). Cuepoints can be put into the stream in the Flash RTMP publishing client or server-side as shown.

Richard

Thanks for ur reply Salvadore.

I seriously doubt my understanding of cue points after going through the tutorial link provided by you.

Here is my understanding of cue points and their usage to my case. please correct me

  1. The broadcaster can call “setCaption” or “injectMetaData” using netconnection.call() method, which server module listens.

  2. By “If you are using a Flash RTMP player, you can use cue points”, did u mean the player which is doing broadcasting stream to server? can i use Adobe wirecast, FMLE or java based red5 to inject cue points?

  3. In tutorial and examples, i observed cue points to send captions(text data) to the server. Can i overlay images which are on server-side over the frames of the live-stream in setCaption method of ModuleInjectData class?

  4. We want to replace the certain frames inbetween of stream with the images which are already present on server…can we do it in “setCaption” or “injectMetaData” methods?

  5. To apply to my case: I want to call setcaption with name of image ie. netconnection.call(“setCaption”,null,“myStream”,“testImage.png”,“eng”,“0”) and in server module setCaption method i will follow https://www.wowza.com/docs/how-to-add-graphic-overlays-to-live-streams-with-wowza-transcoder tutorial to overlay testImage.png on to the stream frames. am i in correct direction?

Thanks again.

Thanks Richard for your time.

“Images are stored in Wowza?”

yes, images are stored in wowza.

"What is the publisher client?

What is the playback client?"

publisher and playback clients are both flash based which are provided with red5.

To use cue points, do my both publish and playback clients need to be flash based or just flash based publish client is good enough?

In cue points article, it’s said that the cue points are triggered client-side… does it mean that the publish client injects the cue-points to server and the server processes them and do necessary changes to stream to be reflected in play-back client-side?

Krishna