# Wrong codec when publishing through RTSP

**URL:** <https://community.wowza.com/t/wrong-codec-when-publishing-through-rtsp/52291>\
**Category:** Wowza Streaming Engine\
**Created:** [November 8, 2018, 4:38pm UTC](https://community.wowza.com/t/wrong-codec-when-publishing-through-rtsp/52291 "2018-11-08T16:38:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baptiste](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@Baptiste](https://community.wowza.com/u/Baptiste)\
**Post date:** [November 8, 2018, 4:38pm UTC](https://community.wowza.com/t/wrong-codec-when-publishing-through-rtsp/52291/1 "2018-11-08T16:38:21Z")

</div>

Hi,

Sometimes, when publising in RTSP, Wowza does not recognize correctly the codecs.

My workflow is the following : I have a H264/AAC stream that I transcode and republish to Wowza with gstreamer in VP8/OPUS, using RTSP/UDP.

That is :

stream1 (H264/AAC) —RTSP/UDP—\> gstreamer transcode —RTSP/UDP–\> stream2(VP8/OPUS)

But _sometimes_, the audio or video of the stream2 does not want to play (with a webrtc player or VLC). In those cases, the log file tells me that the codec found in stream2 is H264 or AAC instead of VP8/OPUS.

For example :

LiveStreamPacketizerCupertino.handlePacket[live/_definst_/stream2]: Video codec:VPX LiveStreamPacketizerCupertino.handlePacket[live/_definst_/stream2]: Audio codec:AAC

or

LiveStreamPacketizerCupertino.handlePacket[live/_definst_/stream2]: Video codec:H264 LiveStreamPacketizerCupertino.handlePacket[live/_definst_/stream2]: Audio codec:OPUS

But the stream does contains VP8/OPUS, as the SDP exchanged between Wowza and Gstreamer tells so :

…

m=audio 0 RTP/AVP 96

…

a=rtpmap:96 OPUS/48000/2

…

m=video 0 RTP/AVP 98

…

a=rtpmap:98 VP8/90000

…

Do you have any clue about this ?

Thank you,

Ben

---

<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 8, 2018, 6:39pm UTC](https://community.wowza.com/t/wrong-codec-when-publishing-through-rtsp/52291/2 "2018-11-08T18:39:59Z")

</div>

Thanks for reaching out @Baptiste. With webRTC playback the audio does need to be transcoded to Opus (as one option) and you show you did that.

I don’t have any specific Wowza docs to share with you for gstreamer, but I did see a few people have had an issue getting Wowza to read what’s inside the gstreamer package. On Stack Overflow, someone did share a solution that worked for them and they disabled security settings to ensure the gstreamer is compatible and can be read.

I hope this link helps:

[https://stackoverflow.com/questions/41550901/how-to-stream-via-rtmp-using-gstreamer](https://stackoverflow.com/questions/41550901/how-to-stream-via-rtmp-using-gstreamer)

---

<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 8, 2018, 6:45pm UTC](https://community.wowza.com/t/wrong-codec-when-publishing-through-rtsp/52291/3 "2018-11-08T18:45:09Z")

</div>

I saw this solution as well in Google search. Please let me know if either of these work:

[http://gstreamer-devel.966125.n4.nabble.com/Need-Help-to-send-GStreamer-H264-AAC-packets-to-Wowza-Streaming-Engine-td4681972.html](http://gstreamer-devel.966125.n4.nabble.com/Need-Help-to-send-GStreamer-H264-AAC-packets-to-Wowza-Streaming-Engine-td4681972.html)

---

<div class="post-metadata">

**Author:** ![Baptiste](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@Baptiste](https://community.wowza.com/u/Baptiste)\
**Post date:** [November 9, 2018, 8:26am UTC](https://community.wowza.com/t/wrong-codec-when-publishing-through-rtsp/52291/4 "2018-11-09T08:26:51Z")

</div>

Thank you for the answer.

Actually, gstreamer has no problem streaming H264/AAC stream to Wowza through RTMP. But I do need to transcode the stream to VP8/OPUS, and the only way to stream VP8/OPUS to Wowza is through RTSP.

Most of the times, it works correctly. But _sometimes_, Wowza does not seem to recognize correctly the codecs, and tells me what i’m pushing is H264/AAC while it is VP8/OPUS.

---

<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 9, 2018, 10:07pm UTC](https://community.wowza.com/t/wrong-codec-when-publishing-through-rtsp/52291/5 "2018-11-09T22:07:40Z")

</div>

Thanks @Baptiste, I appreciate that feedback. Our tech support team would like to take a look at more closely for you and and run some tests. Would you able to submit a support ticket so we can further assist? I think this would help us best replicate your scenario and determine the cause.

> **[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.
