Wowza Community

How to insert image instead of incoming live stream

I’m publishing Sorenson Spark video stream from Flash to Wowza.

Is there way to substitute this stream by static jpeg image and then switch again to the stream?

I suppose you could make a video of a static image and then use the Stream Class example with playlists to switch between streams. Or you could just display a static image in your flash player.

You can play a vod asset while you wait for a live stream using this technique:

https://www.wowza.com/docs/how-to-loop-a-pre-roll-until-a-live-stream-starts-loopuntillive

Richard

I am also researching for a way to do this. My scenario is such that I need to be able to record that static image. Essentially a user will be sending audio+video and then switch to just sending audio. At that point I’d like to write a static image to the video track so that the recorded flv has a video track that includes only the static image. I’ve already taken care of this during the live stream but replay this isn’t preserved.

Any thoughts would be great. I’m looking to accomplish this using the MediaStreamPassThruRecord class that was floating around a while back.

Thanks for any and all help on this.

Jake

Hi,

I would like to replace publishing stream by static image on the fly.

Case:

  • publishing user presses button “replace stream by static image”

  • wowza replaces stream by the static image

  • playing user watches static image stream instead of live video stream

Static image should go as stream

I guess, it requires server-side transcoding of static picture to video frames.

Alex,

At this time Wowza does not support transcoding from VOD files, including static images. You can use ffmpeg to create a live stream from an image. However, you could save CPU resources and bandwidth by just displaying an image in flash/html5 instead of a video of an image. Here’s an example: http://www.beautifycode.com/webcam-flash-php-upload-to-server

Hi Jake,

There currently isn’t an easy way to do this however here are a few suggestions if you want to dive in and create something.

Use ffmpeg or similar to record a short flv or mp4 of your image. You could also use ModuleCreateSnapShot from the Module Collection to grab a single frame from a current stream. Having a few frames would probably be better in this case so that you could control frame rate & key frame interval.

The Module Collection has a module in it for adding an audio source to an existing video stream. In this module, the audio source is a static file and the video stream without any audio is a live stream. You would need to essentially do the reverse where the video source would be your static file and the audio source would be the live stream. The source code for the module is available in the latest Module Collection download.

There is another module under development at the moment that will allow you to mix video & audio from any sources into an output stream. When it is ready, it will also be added to the collection.

An alternative could be to use a full sized overlay image on a transcoded stream however, this would require that the video track still existed which may not be the case in your example. It would also have a transcoder license cost.

Roger.

i have almost the same problem.

Case 1:

  • publishing user presses button “replace image by stream”

  • wowza replaces image by the stream

  • playing user watches live video stream instead of static image

Case 2:

  • publishing user presses button “replace stream by static image”

  • wowza replaces stream by the static image

  • playing user watches static image stream instead of live video stream

hello?