# 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:** 5\
**Page:** 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.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [December 3, 2018, 11:19pm UTC](https://community.wowza.com/t/transcode-a-stream-only-when-a-client-is-connected-webrtc/52414/2 "2018-12-03T23:19:53Z")

</div>

Checking for you @Andrea Lo Pumo…

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [December 4, 2018, 12:20am UTC](https://community.wowza.com/t/transcode-a-stream-only-when-a-client-is-connected-webrtc/52414/3 "2018-12-04T00:20:47Z")

</div>

At this time, this is our supported WebRTC workflow: Incoming WebRTC for publish for WebRTC playback. Needs to be Chrome (TCP or UDP) or Firefox (UDP only). No transcoding is needed for this scenario.

For Playback: WebRTC -\> HLS/HDS/DASH/MSS/RTMP/RTSP (transcoding the Opus -\> AAC is supported).

- Can’t transcode into WebRTC  
You can’t use the Transcoder feature to transcode non-WebRTC content into a WebRTC stream. However, we do support transcoding WebRTC into other formats.

I am not able to offer you a workaround for the transcoder workflow -\> Chrome at this time [@Andrea Lo Pumo](http://community.wowza.com/community/questions/49947/transcode-a-stream-only-when-a-client-is-connected.html#).

---

<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 4, 2018, 5:57pm UTC](https://community.wowza.com/t/transcode-a-stream-only-when-a-client-is-connected-webrtc/52414/4 "2018-12-04T17:57:55Z")

</div>

WebRTC is working for us: the incoming stream is RTSP from the camera, the outgoing wowza stream is WebRTC.

What it does not work is setting the camera to H.264 profile high. If we do, we need to use a transcoder.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [December 4, 2018, 9:18pm UTC](https://community.wowza.com/t/transcode-a-stream-only-when-a-client-is-connected-webrtc/52414/5 "2018-12-04T21:18:47Z")

</div>

That’s fantastic and please feel free to share that workflow with the community. As far as Wowza support for non-WebRTC ingest, we currently do not provide that. Sorry for any inconvenience that may cause.
