# Transcode a stream only when a client is connected (webrtc)

**URL:** <https://community.wowza.com/t/transcode-a-stream-only-when-a-client-is-connected-webrtc/52414>\
**Category:** Wowza Streaming Engine\
**Tags:** transcoder, webrtc\
**Created:** [December 3, 2018, 4:10pm UTC](https://community.wowza.com/t/transcode-a-stream-only-when-a-client-is-connected-webrtc/52414 "2018-12-03T16:10:11Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Andrea\_Lo\_Pumo](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Andrea\_Lo\_Pumo](https://community.wowza.com/u/Andrea_Lo_Pumo)\
**Post date:** [December 3, 2018, 4:10pm UTC](https://community.wowza.com/t/transcode-a-stream-only-when-a-client-is-connected-webrtc/52414/1 "2018-12-03T16:10:11Z")

</div>

We want to stream a RTSP camera via WebRTC. We need to use a transcoder because Chrome does not work with H.264 set with profile high. In order to save CPU resources on the server, we would like to disable the transcoding while there aren’t clients connected. Or in other words, the transcoding should start only when the first client connects to the wowza stream and should stop when the last client disconnects.

What’s the simplest way to achieve this?

Background (long story):

we want to stream a RTSP camera via WebRTC. We are trying this guide:

[https://www.wowza.com/docs/how-to-use-webrtc-with-wowza-streaming-engine](https://www.wowza.com/docs/how-to-use-webrtc-with-wowza-streaming-engine)

and this example:

[https://www.wowza.com/downloads/webrtc/webrtcexamplepages.zip](https://www.wowza.com/downloads/webrtc/webrtcexamplepages.zip)

Unfortunately, setting the camera to H.264 profile high does not allow to view the stream on Chrome. For this reason, we need to use a transcoder.

Already with four cameras, this uses a lot of CPU.

---

_[View the full topic](https://community.wowza.com/t/transcode-a-stream-only-when-a-client-is-connected-webrtc/52414)._
