# Got WebRTC publishing to work in Safari but players get incorrect profile-level-id

**URL:** https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261
**Category:** Wowza Streaming Engine
**Tags:** webrtc
**Created:** [November 4, 2018, 5:48pm UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261 "2018-11-04T17:48:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Teodor\_Nica1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/teodor_nica1/32/1348_2.png) [@Teodor\_Nica1](https://community.wowza.com/u/Teodor_Nica1)
#### Post date: [November 4, 2018, 5:48pm UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261/1 "2018-11-04T17:48:40Z")

</div>

Got webRTC publishing to work with Safari in [BroadcastLiveVideo.com](https://BroadcastLiveVideo.com) solution (can be tested in live demo at [VideoNow.Live](http://https://VideoNow.Live)).

Publishing works (received on server) and is available for playback over RTMP or HLS / MPEG DASH after transcoding but does not work directly in WebRTC.

Publisher JS reports correctly configured profile-level-id 42e01f (Constrained Baseline) in SDP:

```auto
a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

```

Playback JS reports incorrect profile-level-id in SDP:

```auto
a=fmtp:97 packetization-mode=1;profile-level-id=64C029

```

And results in error:

```auto
OperationError: Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set remote video description send parameters..

```

The RTSP stream accessible on server seems to have High profile when publishing with Safari:

```auto
h264 (High), yuv420p(progressive), 640x480, 30 tbr, 90k tbn, 180k tbc

```

When publishing with Chrome is Constrained Baseline:

```auto
h264 (Constrained Baseline), yuv420p(progressive), 640x480, 30 tbr, 90k tbn, 180k tbc

```

Same code works fine when broadcasting from Chrome:

```auto
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f

```

And Chrome stream plays fine in all browsers, including in Safari:

```auto
a=fmtp:97 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

```

The issue seem to be related to Safari publishing stream with High 64C029 profile instead of Constrained Baseline 42e01f.

The question: Is there something that can be done in JS code or Wowza configuration for Safari WebRTC stream to playback using WebRTC directly (without transcoding), similar to how Chrome streams work?

---

<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: [November 5, 2018, 12:30am UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261/2 "2018-11-05T00:30:33Z")

</div>

Thanks for sharing this with the community @Teodor Nica and sharing so many code snippets. Because WebRTC is still in preview here at Wowza and does not currently support Safari playback, I do not have any docs to share with you for a solution here in the forums.

However, you are welcome to submit a support ticket and see if an engineer can assist you with some ideas since you have made so much progress.

* * *

- Currently, playback of WebRTC streams from Wowza Streaming Engine are only supported in Google Chrome and Mozilla Firefox browsers.
- Google Chrome and Mozilla Firefox don’t support AAC audio over WebRTC. Streams with AAC audio are played as video-only.

---

<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: [November 5, 2018, 12:31am UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261/3 "2018-11-05T00:31:18Z")

</div>

> **[Open a Support Ticket | Wowza Media Systems](https://www.wowza.com/support/open-ticket)**
>
> Wowza technical support engineers worldwide help you succeed with your Wowza Streaming Engine™ software or the Wowza Streaming Cloud™ service.

---

<div class="post-metadata">

### Author: ![Teodor\_Nica1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/teodor_nica1/32/1348_2.png) [@Teodor\_Nica1](https://community.wowza.com/u/Teodor_Nica1)
#### Post date: [November 17, 2018, 5:52pm UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261/4 "2018-11-17T17:52:01Z")

</div>

Upgraded from 4.7.6 to 4.7.7 and tested with the exact “webrtcexamplepages” provided, to easily replicate and make sure it’s not something related to our code.

In Chrome, publishing, playback and SDP profiles work fine but Safari publishing generates same issue.

Safari receives High encoded stream and profile in SDP, 64C029:

```auto
m=video 9 RTP/SAVPF 97 
a=rtpmap:97 H264/90000 
a=fmtp:97 packetization-mode=1;profile-level-id=64C029;sprop-parameter-sets=J2QAKawTFlAoD2wAMDAAXcAAF3Be98HaCIRlgA==,KO8fLA== 

```

When publishing from Safari, in JS console stream has correct profile in SDP, 42e01f:

```auto
a=rtpmap:96 H264/90000
a=fmtp:96 x-google-min-bitrate=360;x-google-max-bitrate=360 
a=rtcp-fb:96 goog-remb 
a=rtcp-fb:96 transport-cc a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack a=rtcp-fb:96 nack pli
a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

```

Suspecting issue is somewhere between Safari and server.

Submitted a support ticket.

---

<div class="post-metadata">

### Author: ![Piotr\_Kedziora](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@Piotr\_Kedziora](https://community.wowza.com/u/Piotr_Kedziora)
#### Post date: [April 1, 2019, 3:47pm UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261/5 "2019-04-01T15:47:10Z")

</div>

Did you found the solution?

I’m having a similar problem. I installed a fresh Wowza 4.7.7 and webRTC from Wowza works fine in Chrome (Publish and Play) However in Safari

seems that the profile-id I have is 640029

---

<div class="post-metadata">

### Author: ![Jay\_Charles1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jay_charles1/32/514_2.png) [@Jay\_Charles1](https://community.wowza.com/u/Jay_Charles1)
#### Post date: [April 2, 2019, 6:25pm UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261/6 "2019-04-02T18:25:18Z")

</div>

If you look at the SDP offer Chrome generates (particularly on Windows) you’ll find that there are multiple h264 profiles in the offer, including main and baseline without constraint flags which aren’t supported in all browsers. Wowza parrots that list back in the answer, leaving it up to Chrome to choose which profile to publish.

The solution is to remove them from your SDP offer before sending the offer over the socket to wowza. See internet for “sdp munging”. You need to get rid of the fmtp lines for the offending profiles and all references to them. Strip it down to only 42e01f (spec mandatory), and your video will play almost everywhere.

---

<div class="post-metadata">

### Author: ![Piotr\_Kedziora](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@Piotr\_Kedziora](https://community.wowza.com/u/Piotr_Kedziora)
#### Post date: [April 18, 2019, 3:19pm UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261/7 "2019-04-18T15:19:09Z")

</div>

Thanks Jay, Ths thing is that is have only 42e01f in me sdpOffer on the publisher side. Anyways I will experiment with SDP offers on both sides.

```auto
v=0
o=- 5961871527461151003 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS 261b2156-7668-42d3-ba42-afd70aca12f4
m=audio 9 UDP/TLS/RTP/SAVPF 111
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:TnBB
a=ice-pwd:/sCiuJftFD7Byg4dcvkyv2er
a=ice-options:trickle
a=fingerprint:sha-256 6A:D7:EB:F1:FF:D0:DB:50:65:3A:21:91:95:9E:4C:E9:E8:D8:71:DF:02:E2:F3:E7:BE:EA:5C:5F:5D:0C:39:E4
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 x-google-min-bitrate=64;x-google-max-bitrate=64
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=ssrc:1643664416 cname:utz/napF5lUZQEux
a=ssrc:1643664416 msid:261b2156-7668-42d3-ba42-afd70aca12f4 552a6560-572d-47b8-9da6-7d158e03257c
a=ssrc:1643664416 mslabel:261b2156-7668-42d3-ba42-afd70aca12f4
a=ssrc:1643664416 label:552a6560-572d-47b8-9da6-7d158e03257c
m=video 9 UDP/TLS/RTP/SAVPF 98
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:TnBB
a=ice-pwd:/sCiuJftFD7Byg4dcvkyv2er
a=ice-options:trickle
a=fingerprint:sha-256 6A:D7:EB:F1:FF:D0:DB:50:65:3A:21:91:95:9E:4C:E9:E8:D8:71:DF:02:E2:F3:E7:BE:EA:5C:5F:5D:0C:39:E4
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:98 H264/90000
a=fmtp:98 x-google-min-bitrate=360;x-google-max-bitrate=360
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=ssrc-group:FID 3680798038 1539139510
a=ssrc:3680798038 cname:utz/napF5lUZQEux
a=ssrc:3680798038 msid:261b2156-7668-42d3-ba42-afd70aca12f4 cf24986a-a0d4-47c6-b62d-d6b30dc1813a
a=ssrc:3680798038 mslabel:261b2156-7668-42d3-ba42-afd70aca12f4
a=ssrc:3680798038 label:cf24986a-a0d4-47c6-b62d-d6b30dc1813a
a=ssrc:1539139510 cname:utz/napF5lUZQEux
a=ssrc:1539139510 msid:261b2156-7668-42d3-ba42-afd70aca12f4 cf24986a-a0d4-47c6-b62d-d6b30dc1813a
a=ssrc:1539139510 mslabel:261b2156-7668-42d3-ba42-afd70aca12f4
a=ssrc:1539139510 label:cf24986a-a0d4-47c6-b62d-d6b30dc1813a

```

And it plays on all browsers except Safari that has this “additional” High Profile.

I tried to remove it from sdp on the player but that didn’t helped ☹

---

<div class="post-metadata">

### Author: ![Piotr\_Kedziora](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@Piotr\_Kedziora](https://community.wowza.com/u/Piotr_Kedziora)
#### Post date: [April 19, 2019, 3:21pm UTC](https://community.wowza.com/t/got-webrtc-publishing-to-work-in-safari-but-players-get-incorrect-profile-level-id/52261/8 "2019-04-19T15:21:48Z")

</div>

Also with this SDP(there is only 42e01f in profile) In Wowza logs there is a warrnig that safari is sending indeed High Profile

```auto
INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/_definst_/myStream][avc1.100.41]: H.264 (Video may not be playable on older iPhone and iPod touch devices where Main/Level 3.1 or lower is required) Video info: {H264CodecConfigInfo: codec:H264, profile:High, level:4.1, frameSize:640x480, displaySize:640x480}

```
