This sample code is based on Google's shadercam library and extends the shadercam-example app with live streaming support using the GoCoder SDK. The camera preview display is based on Android's camera2 API with real-time filtering using the OpenGL Shading Language (GLSL).
The shadercam-example app was updated to support live streaming by adding a new renderer class (StreamingRenderer
) that uses the WZGLBroadcaster
API class and WZRenderAPI.VideoFrameRenderer
interface from the GoCoder SDK to encode each frame for the video stream while a live broadcast is active.
-
Wowza GoCoder SDK v1.0.1.340 or later
PLEASE NOTE: The GoCoder SDK library necessary to build this app is not provided with this sample code. To receive a free trial copy of the SDK, please fill out the GoCoder SDK trial signup form to be sent a link where you can download the SDK along with a free trial license key.
-
Android SDK v4.4.2 or later.
-
Android Studio v1.2.0 or later.
-
Access to a Wowza Streaming Engine™ server installation or a Wowza Cloud™ hosted service account. You can request a free trial copy of Wowza Streaming Engine software by filling out the Wowza Streaming Engine trial signup form or signup for a Wowza Cloud trial account by filling out the Wowza Cloud account signup form.
Follow the steps below before attempting to build this app for the first time:
-
Copy the GoCoder SDK aar library file (
com.wowza.gocoder.sdk.aar
) to thegocoder-sdk-shaders/libs
folder. -
Edit the lines displayed below, also from the
StreamingShaderActivity
class. with the configuration settings specific to your Wowza Streaming Engine installation or Wowza Cloud account:
mWZBroadcastConfig.setHostAddress("192.168.1.246");
mWZBroadcastConfig.setPortNumber(1935);
mWZBroadcastConfig.setApplicationName("live");
mWZBroadcastConfig.setStreamName("myStream");
mWZBroadcastConfig.setUsername(null);
mWZBroadcastConfig.setPassword(null);
- GoCoder SDK Developer Documentation
- GoCoder SDK for Android API Reference
- GoCoder SDK for Android Release Notes
- GoCoder Product Page
Wowza Media Systems™ provides developers with a platform to create streaming applications and solutions. See Wowza Developer Tools to learn more about our APIs and SDK.
This code is distributed under the Wowza Public License.