Live H.264 streaming from Digital Rapids to Helix and Wowza

Helix Mobile Server 14

I had a few difficulties with getting this set up so it’s probably worth sharing them here. Digital Rapids apparently don’t support live broadcasting from their hardware encoder companion software ‘Stream’ to Helix Mobile Server even though the latter supports RTP and SDP, and the encoder clearly offers these up as possible exports when you’re using the Digital Rapids AVC for Web codec profile (an optional extra purchase):

Stream encoder RTP broadcast SDP settings

What happens is that when you copy the SDP file into your Helix server’s Content/rtpencodersdp folder and try to connect to the stream pointing a media player at rtsp://helixserver/rtpencoder/live_stream.sdp it will fail, with the following error appearing in rmerror.log:

21-Sep-2010 13:47:14.062 tmplgpln(6076): 32: Error retrieving URL `rtpencoder/live_stream.sdp’ (Invalid path)

Following contact with Helix support, it turns out that the SDP file which the encoder creates does not declare the bandwidth of the audio track using a b= line as per RFC 4566 – though apparently this is an optional field. You will need to manually add this. 64Kbps results in b=AS:64 as below:

o=- 1287599430 1287599438 IN IP4
s=Session Streamed by Digital Rapids Corp Stream Server
t=0 0
c=IN IP4
m=audio 20002 RTP/AVP 97
a=rtpmap:97 MPEG4-GENERIC/90000/2
a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;bitrate=64000;config=1390
m=video 20000 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4D4020;sprop-parameter-sets=J01AIJZWDQ/8mApEAAADAAQAAAMAyhA=,KO8GDMg=
a=cliprect:0, 0, 416, 234

I also discovered that QuickTime Player is not a reliable player to use for testing as it sometimes crashes, and will not play H.264+AAC streams which VLC has no issue with. This view was echoed by Helix support.

I did have another problem – one of aspect ratios. The Digital Rapids Stream encoder will author files with garbage aspect ratio metadata if the resolution isn’t exactly 16:9 to the nearest even number of pixels. I read somewhere else that the chosen picture width should be a multiple of the x part of the aspect ratio. Here is FFMPEG’s analysis of a non-compliant resolution:

Stream #0.0(eng): Video: h264, yuv420p, 412×232 [PAR 37376:14889 DAR 401453:90053], 399 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc

and a correct 16:9 resolution:

Stream #0.0(eng): Video: h264, yuv420p, 416×234 [PAR 1:1 DAR 16:9], 399 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc


Wowza Media Server 2.1.2

Setting this up was also a little bit confusing, given that the encoder offers you so little insight into what the problem is if it doesn’t start. Anyway, there are excellent tutorials on the Wowza forums – this is the one we need.

As you can see from the screenshot I run Wowza Media Server on port 80 rather than 1935 to make sure that clients using restricted and proxied wifi networks (hotels etc.) are not prevented from viewing the streams:

Digital Rapids Stream RTMP media server settings

There is a gotcha though. In the forum tutorial they mention setting up security, but this is only for RTP encoders, not RTMP. I had been setting the credentials in the dialog above, but in fact you need to leave the drop-down on Server with no password.

Fortunately you can secure RTMP stream publishing in Wowza – you will need to make the following additions to live/application.xml to invoke an additional module:

<!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->

You would then append this secret as a query string on the stream name as below:

Security settings for RTMP stream publishing

The mount point for testing with VLC for this example would be still be rtsp://
or from an iPhone (assuming AVC Level 3.0 or lower and standard AAC audio).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s