# Using gstreamer-0.10 with Wowza

**URL:** https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306
**Category:** Wowza Streaming Engine
**Created:** [July 2, 2008, 5:41pm UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306 "2008-07-02T17:41:59Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)
#### Post date: [July 2, 2008, 5:41pm UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/1 "2008-07-02T17:41:59Z")

</div>

Hi

I’ve begun experimenting using Wowza together with the gstreamer media framework.

Here’s the cmd line i’m using:

> gst-launch-0.10 -vvv videotestsrc ! queue ! x264enc byte-stream=true bitrate=300 ! rtph264pay ! udpsink port=5000 host=127.0.0.1 sync=false

It results in creating a 320x240 video test pattern encoded using x264.

Since there’s no RTCP enabled with such command line, i put the systemclock sync parameter in the Application.xml config file.

Server-side (on the local host), here’s the myStream.sdp file:

> v=0
> 
> o=- 1188340656180883 1 IN IP4 127.0.0.1
> 
> s=Session streamed by GStreamer
> 
> i=server.sh
> 
> t=0 0
> 
> a=tool:GStreamer
> 
> a=type:broadcast
> 
> m=video 5000 RTP/AVP 96
> 
> c=IN IP4 127.0.0.1
> 
> a=rtpmap:96 H264/90000
> 
> Here’s the debug log (relevant parts):
> 
> > DEBUG server comment - cmd: play
> > 
> > INFO server comment - MediaStreamMediaCasterPlay: startPlay
> > 
> > INFO server comment - RTPMediaCaster.create
> > 
> > INFO server comment - RTPMediaCaster.init
> > 
> > DEBUG server comment - cmd: setBufferTime
> > 
> > INFO server comment - RTPMediaCaster.Reconnector: start
> > 
> > INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: /usr/local/WowzaMediaServerPro/content/myStream.sdp
> > 
> > DEBUG server comment - sdp: v=0
> > 
> > DEBUG server comment - sdp: o=- 1188340656180883 1 IN IP4 127.0.0.1
> > 
> > DEBUG server comment - sdp: s=Session streamed by GStreamer
> > 
> > DEBUG server comment - sdp: i=server.sh
> > 
> > DEBUG server comment - sdp: t=0 0
> > 
> > DEBUG server comment - sdp: a=tool:GStreamer
> > 
> > DEBUG server comment - sdp: a=type:broadcast
> > 
> > DEBUG server comment - sdp: m=video 5000 RTP/AVP 96
> > 
> > DEBUG stream setbuffertime myStream.sdp -
> > 
> > DEBUG server comment - sdp: c=IN IP4 127.0.0.1
> > 
> > DEBUG server comment - sdp: a=rtpmap:96 H264/90000
> > 
> > DEBUG server comment - onFlushNotifyClients: false
> > 
> > DEBUG server comment - flushInterval: 0
> > 
> > DEBUG server comment - verboseDebug: false
> > 
> > INFO stream create - -
> > 
> > DEBUG server comment - RTPDePacketizerRFC3984H264.init
> > 
> > INFO stream publish myStream.sdp -
> > 
> > INFO server comment - UDPTransport.bind: /127.0.0.1:5000
> > 
> > DEBUG server comment - config: session: setReuseAddress: from:false to:true
> > 
> > DEBUG server comment - config: session: setReceiveBufferSize: from:55296 to:65000
> > 
> > DEBUG server comment - config: session: setSendBufferSize: from:55296 to:55296
> > 
> > DEBUG server comment - config: session: setTrafficClass: from:0 to:0
> > 
> > INFO server comment - UDPTransport.bind: /127.0.0.1:5001
> > 
> > DEBUG server comment - config: session: setReuseAddress: from:false to:true
> > 
> > DEBUG server comment - config: session: setReceiveBufferSize: from:55296 to:65000
> > 
> > DEBUG server comment - config: session: setSendBufferSize: from:55296 to:55296
> > 
> > DEBUG server comment - config: session: setTrafficClass: from:0 to:0
> > 
> > INFO server comment - RTPMediaCaster.Reconnector: stop
> > 
> > DEBUG server comment - rtp[video:1024] {80 60 11 af 25 e9 6f d6 e3 2f 49 73 1c 89 30 00 }
> > 
> > DEBUG server comment - myStream.sdp: 17:36:15: waitforend: dropped:1
> > 
> > INFO server comment - UDPTransport.firstPacket: /127.0.0.1:5000
> > 
> > DEBUG server comment - rtp[video:286] {80 60 11 b0 25 e9 6f d6 e3 2f 49 73 1c 49 c7 bf }
> > 
> > DEBUG server comment - myStream.sdp: 17:36:15: waitforend: dropped:2
> > 
> > DEBUG server comment - rtp[video:1024] {80 60 11 b1 25 e9 7b 8f e3 2f 49 73 1c 89 10 00 }
> > 
> > DEBUG server comment - myStream.sdp: 17:36:15: waitforend: dropped:3
> > 
> > DEBUG server comment - rtp[video:990] {80 60 11 b2 25 e9 7b 8f e3 2f 49 73 1c 49 de 0a }
> > 
> > DEBUG server comment - myStream.sdp: 17:36:15: waitforend: dropped:4
> > 
> > DEBUG server comment - rtp[video:1024] {80 60 11 b3 25 e9 87 46 e3 2f 49 73 1c 89 30 00 }
> > 
> > DEBUG server comment - myStream.sdp: 17:36:15: waitforend: dropped:5
> > 
> > DEBUG server comment - rtp[video:148] {80 60 11 b4 25 e9 87 46 e3 2f 49 73 1c 49 49 9f }
> > 
> > DEBUG server comment - myStream.sdp: 17:36:15: waitforend: dropped:6
> > 
> > DEBUG server comment - rtp[video:1024] {80 60 11 b5 25 e9 92 fe e3 2f 49 73 1c 89 30 00 }
> > 
> > DEBUG server comment - myStream.sdp: 17:36:15: waitforend: dropped:7
> > 
> > DEBUG server comment - rtp[video:177] {80 60 11 b6 25 e9 92 fe e3 2f 49 73 1c 49 7a 2f }
> 
> Of course this won’t be an easy task, yet i’m wondering what this log mean ? Why are all frames dropped ?
> 
> Cheers
> 
> Florent

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [July 16, 2008, 4:07pm UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/2 "2008-07-16T16:07:12Z")

</div>

Also, describe how to install gstreamer. I can’t get it to work with x264enc. I am on Fedora6.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [August 13, 2008, 4:04am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/3 "2008-08-13T04:04:58Z")

</div>

I really don’t have any new information here. The format of the sprop-parameter-sets looks OK to me. I think there is an issue with Wowza Pro not being able to recognize keys frames in the stream coming from gstreamer.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [November 26, 2008, 8:19am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/4 "2008-11-26T08:19:51Z")

</div>

I have sent you an email directly. Wowza Pro is not receiving UDP packets from the encoder. So you need to sort this out first.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [December 22, 2008, 8:48am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/5 "2008-12-22T08:48:49Z")

</div>

I don’t think you are transcoding the content to H.264 in your gstreamer command. It needs to be somethine like:

```auto
gst-launch-0.10.exe -v filesrc location=videotestsrc_h264.avi ! avidemux ! x264enc byte-stream=true bitrate=300 ! rtph264pay mtu=1438 ! udpsink host=10.218.35.135 port=1234

```

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [January 6, 2009, 5:01am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/6 "2009-01-06T05:01:46Z")

</div>

I have been looking at this and I am pretty sure the bug is with gstreamer. There is code in the rtph264pay system that is searching for H.264 start codes. It is looking for start codes in the format:

0x00000001

Start codes in H.264 are only three bytes long. Like this:

0x000001

So it is not properly chopping up the NAL units to send them over RTP. Some RTP handlers can handle this. We cannot. I am hesistant to add support for this since it does not seem to be the standard way to do it. I was planning on attempting to fix the problem in gstreamer to validate my findings but have not had time to get a working gstreamer development setup.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [January 6, 2009, 7:28am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/7 "2009-01-06T07:28:50Z")

</div>

Thanks for the development instructions. I will try to get back to this to figure out the problem.

I did make a change that fixes the test pattern but it does not seem to universally fix the issue. I have since found other gstreamer setups that do not work even with this fix in place. Again, it has to do with the way gstreamer is breaking apart (or not breaking part) the H.264 packets. I can seem that VLC is able to stream data in this format but it just doesn’t seem correct to me.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [January 6, 2009, 9:07am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/8 "2009-01-06T09:07:59Z")

</div>

So I am confused. Is it all working now with the most recent version of gstreamer?

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [January 19, 2009, 9:53am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/9 "2009-01-19T09:53:26Z")

</div>

Upgrade the most recent patch:

[https://www.wowza.com/devbuild.html](https://www.wowza.com/devbuild.html)

I believe it only works with the most recent version of GStreamer.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [January 26, 2009, 4:17am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/10 "2009-01-26T04:17:09Z")

</div>

How long does it take for it to go out of sync? RTCP is used to synchronize the video and audio but is only needed to initially sync the stream. MPEG-TS synchronizes the audio and video in the stream (all streams run on a 90KHz clock and are pre-synchronized). Not sure why your stream is going out of sync.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [January 26, 2009, 12:34pm UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/11 "2009-01-26T12:34:24Z")

</div>

> 1. why do i need to restart the server after stopping and restarting the (publisher) streaming process ? Is there a workaround ? If i do not, the flash player only shows a black screen

It is because when the encoder starts/stop it changes the time basis which screws up Wowza Pro and Flash. There are two methods to work around this. Take a look at the **sdpFileCheckFreqency** and **streamTimeout** properties as discussed in the **Native Real-time Transport Protocol (RTP) Streaming** section of the User’s Guide. You can setup Wowza Pro to monitor the SDP file for date or size changes ( **sdpFileCheckFreqency** ) so the stream is restarted when the SDP file changes. You can instruct Wowza Pro monitor the stream for long breaks ( **streamTimeout** ) and restart the stream if needed. The **streamTimeout** is tricky to get right since if it is too short it will restart the stream when it first tries to connect if it can’t find a key frame quickly enough.

> 1. audio plays back faster
> 
> 2. my audio tests samples (voice/claps) seem to have a direct effect on drifting speed ! If i speak longer, the desync comes faster !
> 
> This is a tough one. I just don’t have the resources to dig into gstreamer and debug something like this. I know there are plenty of RTP based encoders where there is no issue with AV sync. So it is most likely not a Wowza Pro issue. There may be rounding issues in GStreamer. I have seen this problem in other encoders where they don’t deal with timecodes properly and they calculate time differentials which insert small rounding errors that add up over time.
> 
> Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [May 4, 2009, 12:57pm UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/12 "2009-05-04T12:57:40Z")

</div>

Great!

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [September 3, 2009, 7:56am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/13 "2009-09-03T07:56:18Z")

</div>

These type of issues are usually due to av sync issues. Take a look at this post to see if any of the suggestions here help:

[http://community.wowza.com/t/-/57](http://community.wowza.com/t/-/57)

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [September 3, 2009, 10:34am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/14 "2009-09-03T10:34:48Z")

</div>

I have personally not had much luck with gstreamer. Other then what I have suggested I do not know any magic bullets.

Charlie

---

<div class="post-metadata">

### Author: ![Florent\_Thiery](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Florent\_Thiery](https://community.wowza.com/u/Florent_Thiery)
#### Post date: [July 2, 2008, 5:53pm UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/15 "2008-07-02T17:53:06Z")

</div>

I changed the resolution to 640x480:

> gst-launch-0.10 -vvv videotestsrc ! capsfilter caps=“video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)30/1” ! queue ! x264enc byte-stream=true bitrate=300 ! rtph264pay ! udpsink port=5000 host=127.0.0.1 sync=false
> 
> Now i’m getting these messages (again, using systemclock sync):
> 
> > DEBUG server comment - FU-A: end:false tc:3371173062 st:true
> > 
> > DEBUG server comment - rtp[video:212] {80 e0 05 8f c8 f0 04 c6 3f e9 f1 e0 5c 41 ee c5 }
> > 
> > DEBUG server comment - FU-A: end:true tc:3371173062 st:false
> > 
> > DEBUG server comment - rtp[video:14] {80 60 05 90 c8 f0 10 7f 3f e9 f1 e0 09 30 }
> > 
> > DEBUG server comment - SINGLE: end:false tc:3371176063 sz:2
> > 
> > DEBUG server comment - rtp[video:1400] {80 60 05 91 c8 f0 10 7f 3f e9 f1 e0 5c 81 9a d9 }
> > 
> > DEBUG server comment - FU-A: end:false tc:3371176063 st:true
> > 
> > DEBUG server comment - rtp[video:512] {80 e0 05 92 c8 f0 10 7f 3f e9 f1 e0 5c 41 7a e5 }
> > 
> > DEBUG server comment - FU-A: end:true tc:3371176063 st:false
> > 
> > DEBUG server comment - rtp[video:14] {80 60 05 93 c8 f0 1c 36 3f e9 f1 e0 09 30 }
> > 
> > DEBUG server comment - SINGLE: end:false tc:3371179062 sz:2
> > 
> > DEBUG server comment - rtp[video:1400] {80 60 05 94 c8 f0 1c 36 3f e9 f1 e0 5c 81 9a dd }
> > 
> > My questions are the following:

- can i assume that wowza is getting video frames correctly ?
- is it possible to get detailed comments/explanation about the debug messages ?

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [July 2, 2008, 10:50am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/16 "2008-07-02T10:50:45Z")

</div>

The SDP data does not contain the **sprop-parameter-sets** parameter. This line usually looks like this in the SDP data.

```auto
a=fmtp:96 packetisation-mode=0; profile-level-id=42801e; sprop-parameter-sets=Z01AHuigsPbB6kBAQGQkAAADAAQABX5BgAAHoQAAFuNm974PihM0,aP91IA==

```

Without this information Wowza Pro must hunt in the NAL units of the H.264 packets for this data. It can’t start video playback until it finds this information. This information is not always contained within the stream.

I really don’t have a specific answer for you. I just know that this is what it seems to be searching for.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [July 16, 2008, 3:51pm UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/17 "2008-07-16T15:51:20Z")

</div>

First, try it with Wowza Pro 1.5.1. You can download the upgrade patch here:

[https://www.wowza.com/devbuild.html](https://www.wowza.com/devbuild.html)

If that doesn’t work, follow these instructions and send me the debug log files and the command line you are using:

> _Note: If you experience problems getting either the audio or video to play through Flash, double check the version number of the Flash player (Flash player version **9.0.115.0** or above is required). If you still have problems, turn on Wowza Pro debug logging (edit **[install-dir]/conf/log4j.properties** and change the **log4j.rootCategory** on the first line from **INFO** to **DEBUG** ), try the encoder several more times, zip up and send your **[install-dir]/logs** folder along with screen shots of the encoder setup screens and the **LiveVideoStreaming** player screen and send a detailed description of your problem to support@wowza.com._

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [August 13, 2008, 9:40am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/18 "2008-08-13T09:40:31Z")

</div>

Here is SDP data from Wirecast:

```auto
v=0
o=- 1798860268 1798860268 IN IP4 127.0.0.0
s=Wirecast
t=0 0
a=range:npt=now-
m=audio 5432 RTP/AVP 96
c=IN IP4 127.0.0.1
a=rtpmap:96 mpeg4-generic/32000/1
a=fmtp:96 profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1288
m=video 5434 RTP/AVP 97
c=IN IP4 127.0.0.1
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;profile-level-id=4D400C;sprop-parameter-sets=J01ADKkYKD9gDUGAQa2wrXvfAQ==,KN4JF6A=
a=cliprect:0,0,240,320
a=framesize:97 320-240
b=AS:200

```

It looks like the backslashes could be a problem. If you want me to look at debugs to see if it is a key frame problem, I can.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [August 14, 2008, 3:51am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/19 "2008-08-14T03:51:55Z")

</div>

Send me the entire debug log. Send it to charlie@wowza.com.

Charlie

---

<div class="post-metadata">

### Author: ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)
#### Post date: [November 3, 2008, 8:57am UTC](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306/20 "2008-11-03T08:57:07Z")

</div>

Be sure you are properly setting the “M” bit in the RTP header of the video packets. We require this so we can identify the starts of packets.

Charlie

[Next page](https://community.wowza.com/t/using-gstreamer-0-10-with-wowza/306.md?page=2)
