This article describes how to use the Wowza GoCoder™ app on Android devices to publish a live stream to Wowza Streaming Engine™ media server software. You can use the 64-bit Wowza GoCoder app for Android to capture and send encoded live audio and video over 4G, 3G, and Wi-Fi to a Wowza Streaming Engine server, which can then broadcast the content as HD-quality H.264 adaptive bitrate streams to any screen.
- Wowza GoCoder for Android requires Android 5.0 (API 21) or later and is available at the Google Play store.
- The Wowza GoCoder app doesn't support SSL connections to Wowza Streaming Engine.
Configure Wowza Streaming Engine
Follow the configuration instructions in Set up live streaming using an RTMP-based encoder in Wowza Streaming Engine to create a live application. The GoCoder configuration steps in this article are based on a Wowza Streaming Engine application named live.
If you plan to perform adaptive bitrate streaming, you must also configure Transcoder. Transcoder will decode the incoming single-bitrate live stream from the GoCoder app and re-encode it to multiple bitrates with properly aligned keyframes. For more information, see Set up and run Transcoder in Wowza Streaming Engine.
Configure Wowza GoCoder
You can configure the GoCoder app to connect to the Wowza Streaming Engine server by editing settings in the app itself, or by emailing the configuration URL from Wowza Streaming Engine to the Android device that's running the GoCoder app.
Configure connection settings in the GoCoder app
- Open the Wowza GoCoder app on your Android device.
An instructional overlay appears with descriptions for each of the app's buttons. To dismiss the overlay, tap anywhere onscreen.
- Tap Connect (the Wowza gear icon) in the upper-right corner of the app.
- On the Connect To screen, tap Wowza Streaming Engine.
- Sequentially tap Host, Application, and Source Authentication, and enter those details as follows. Tap Back to accept your selections and proceed through the settings.
- Host – For Server, enter the Wowza Streaming Engine server's IP address or hostname. For Port, enter the port used for streaming. By default, Wowza Streaming Engine servers bind to TCP port 1935.
- Application – Enter the Application and Stream Name for your Wowza Streaming Engine app. If you're using the default live app, the Application is live and the Stream Name is myStream.
- Source Authentication – Enter the Source Username and Source Password that are specified in the Source Authentication page of your live app in Wowza Streaming Engine Manager. For more information on creating source accounts, see Authenticating connections from live sources.
- Tap Done after you've entered the Wowza Streaming Engine connection details.
Next, specify video and audio encoding settings.
- Tap Options (the slider icon) in the upper-right corner of the app.
- Sequentially tap Stream, Video Settings, and Video Size, and enter those details as follows. Tap Back to accept your selections and proceed through the settings.
- Stream – Select the type of data you want to stream: Video + Audio, Video Only, or Audio Only. Selecting Audio Only removes all video options from the app and sends only audio to Wowza Streaming Engine.
- Video Settings – For Framerate, enter the number of seconds between keyframes, such as 30. For Keyframe Interval, specify the number of frames between keyframes. The keyframe interval should be a multiple of the frame rate.
Note: Not all Android devices guarantee the target frame rate or keyframe interval of the output stream.
Turn on Allow Rotated Video to allow the video output to match the orientation of the camera. If you want to keep the video output upright and when the camera switches between portrait and landscape modes, turn off Allow Rotated Video. Make sure Auto-rotate is enabled in your device settings.
- Video Size – Select the size of the video you want to stream. Options vary depending on the device.
Note: For information on Sharing Message, see Share a stream on social media.
- Tap Done after you've specified the stream options.
Next, specify the bitrate for the encoded stream.
- Tap the bitrate button in the lower-left corner of the app.
- Select the bitrate that you want to stream. The available bitrates vary depending on the device's capabilities, the selected Video Size, and network connection type.
- Tap Done.
Configure the GoCoder app by emailing the connection settings URL
The Wowza GoCoder app can be configured by emailing the connection link from Wowza Streaming Engine to your Android device. When you open the email on the device, just tap the link URL in the message to open GoCoder so that it's preconfigured based on the connection URL's parameters.
- In Wowza Streaming Engine Manager, select your live application, click Sources (Live), and then click Wowza GoCoder.
- Make sure the connection settings are correct, and then click Email Me.
Wowza Streaming Engine opens a new email in your default email program. The body of the message contains a GoCoder configuration link generated from your connection settings.
- Enter the desired email address and then append any other custom parameters to the URL. Separate parameters with an ampersand (&). The following URL is an example configuration link for Android devices:
Available URL parameters:
- publishHost = [wowza-ip-address] or [hostname]
- publishPort = [integer]
- publishApplication = [application-name]
- publishStream = [stream-name]
- publishURL = [playback-URL] to share via social media
- publishUser = [source-username]
- publishPassword = [source-password]
- publishRotationLock = [YES | NO]
- publishAutoStart = [YES | NO]
- publishAutoRestart = [YES | NO]
- publishBroadcastType = [integer] from 0 to 2 where:
- 0 = Audio only
- 1 = Video only
- 2 = Audio and video
- publishFPS = [float] that indicates the frame rate, for example, 30.00
- publishKeyFrameInterval = [integer] that indicates the number of frames between key frames
- publishBitrateIndex = [integer] from 0 to 3 where:
- 0 = Low
- 1 = Medium
- 2 = High
- 3 = Very high
The actual value that results depends on the selected frame size.
- publishFrameSizeIndex = [integer] from 0 to 10 where:
- 0 = 192x144
- 1 = 320x240
- 2 = 352x240
- 3 = 352x288
- 4 = 480x360
- 5 = 640x360
- 6 = 640x480
- 7 = 960x540
- 8 = HD720
- 9 = HD1080
- 10 = UHD2160
- publishCamera = [FRONT | BACK] specifies whether to use the front or back camera by default
- Send the email, open it on the Android device, and then tap the configuration URL.
GoCoder opens and is configured with the URL and parameters you sent in the email.
- All URL parameters are optional. GoCoder uses default values for parameters that aren't specified. For best results, pass a complete set for all options that you want to configure.
- Check the URL carefully, as typos or invalid values can cause GoCoder to behave incorrectly.
- This configuration URL, while internal to the device, isn't secure. The publishPassword parameter is in clear text on the device.
- If you specify a parameter value that isn't supported by the device, GoCoder uses the closest available size.
- Not all Android email applications support this configuration method. If your configuration link doesn't open in GoCoder, try a different email client.
Broadcast an encoded stream from the GoCoder app
- When the GoCoder app is configured and you're ready broadcast, tap the big red Encode button .
A timer begins to track the duration of the stream and a "Connected" message appears in the app.
- Depending on the capabilities of the Android device, you can do either or both of the following while you're broadcasting:
- If the device has both front- and rear-facing cameras, tap the Camera Switch button () in the upper-left corner of the app to toggle between cameras.
- If the device has an LED flash for the rear-facing camera, tap the Camera Flash button () in the upper-left corner of the app to toggle the flash on and off.
- To stop the broadcast, tap the Encode button again.
Play the stream
Play in Wowza Streaming Engine Manager
- In Wowza Streaming Engine Manager, click the Test Players button in the upper-right corner of the live application page.
The Test Players window includes test players that are preconfigured to stream the live stream named myStream over various streaming formats.
Each tab in the Test Players window either hosts a test player that can play the live stream, or provides instructions for playing the live stream. For example, to use Adobe HDS to play myStream, click the Adobe tab, and then click Start.
You can also access the test players on the Wowza Test Player webpage.
Play in Wowza example playersFor information on using example players installed with Wowza Streaming Engine to test the stream in your live application, see the following articles:
- Play streams with the Adobe RTMP example player in Wowza Streaming Engine
- Play streams with the Adobe HDS example player in Wowza Streaming Engine
- Play streams with the Silverlight example player in Wowza Streaming Engine
- Play streams with the MPEG-DASH example player in Wowza Streaming Engine
- Play Wowza Streaming Engine streams on Apple iOS devices
- Play Wowza Streaming Engine streams on RTSP/RTP players
Share a stream on social media
When your stream is broadcasting, you can send or post its playback URL and a custom message via Gmail, Facebook, and other apps. First, though, configure the sharing options in the GoCoder app.
- In the GoCoder app, tap the Options button in the upper-right corner of the screen.
- Tap Sharing Message and then tap the Message text.
- Enter a custom message that GoCoder will post to your social media account.
- Tap URL and enter the URL of the website that's hosting the video stream. This URL is automatically appended to the message.
- Tap Done to save the Sharing Message settings.
- While broadcasting, tap the Sharing button in the upper-right corner of the app.
- Tap the application you want to use to share the message: Facebook, Skype, Gmail, Tweet, or Messaging.
- Make sure the message's text and URL are correct and then post or send the announcement.
Depending on the application, you may be able to add an image, add a location, or check the number of available characters remaining in the post.
The application opens with the sharing message and URL entered as a new post or message.
Using GoCoder with Android Wear
Install the GoCoder app on your Android Wear watch to control your GoCoder stream from a distance. A help screen appears when you first open the app on your watch and when you select the Help icon from the options list. From your watch you can start and stop the stream, view stream play time, and view a video preview from your main device. Tap the screen to toggle the camera preview on or off. Swipe left on the preview screen to access options that let you Switch camera between back and front cameras, toggle the Flashlight on or off, and Mute audio.
If the app can't connect to Wowza Streaming Engine, open the following URL in a web browser to verify that the server is running:
The browser displays the Wowza media server software version and build number. If it doesn't, make sure that the server is running and that TCP port 1935 is open on your router, firewall, and/or software firewall (iptables on Linux).
If the server is running, verify that the Host information in the app is correct and make sure that the Server field only contains the server IP address or hostname. It must not contain a complete publishing URL.
Latency between Wowza GoCoder and a Wowza Streaming Engine server should be less than 2 seconds using default settings. If the delay is longer than 2 seconds, try enabling the Low-latency stream option on the live application's Setup tab in Wowza Streaming Engine Manager. Alternatively or in Wowza Media Server, set the <Streams>/<StreamType> property in Application.xml to rtp-live-lowlatency.
Server-to-device latency is typically higher for Apple HLS streams than for Adobe HDS streams. The keyframe interval that you specify in the app and the chunk duration interval that's specified in the Wowza Streaming Engine application configuration can affect the latency between the server and the device that receives the stream. For iOS devices, you can tune application configuration properties to reduce latency. For more information, see Configure Apple HLS packetization in Wowza Streaming Engine.
For tuning suggestions to reduce latency when streaming to Adobe Flash Player and Flash-based players such a JW Player and Flowplayer, see Set up low latency applications in Wowza Streaming Engine for RTMP streaming.
Encoding makes heavy use of device hardware and may drain your battery faster than other apps. To view current battery status on your device, swipe down from the top of the screen to temporarily show the status bar.