Host is null when I use WZBroadcastConfig for recording during live streaming

Hello everyone!

I’m implementing an Android App to broadcast live video to wowza server application, if I use WowzaConfig class to set the properties of the streaming, the code works fine, but if I use WZBroadcastConfig instead (because it allows to record video on local storage during broadcast), the logcat says that Host is null when I start streaming

This is the working code:

     // Specify the broadcast configuration parameters
        WowzaConfig broadcastConfig = this.goCoder.getConfig();
        // Update the active config to the defaults for 720p video
        broadcastConfig.set(WZMediaConfig.FRAME_SIZE_1280x720);
        // Set the address for the Wowza Streaming Engine server or Wowza Cloud
        broadcastConfig.setHostAddress(host);
        // Set the name of the stream
        broadcastConfig.setStreamName(path);
        broadcastConfig.setUsername(username);
        broadcastConfig.setPassword(password);
        broadcastConfig.setPortNumber(port);
        broadcastConfig.setApplicationName("test");
        broadcastConfig.setVideoProfileLevel(new WZProfileLevel(WZProfileLevel.PROFILE_MAIN));
        // Update the active config
        this.goCoder.setConfig(broadcastConfig);

and this is the not working code:

    WZBroadcastConfig config = new WZBroadcastConfig(WZBroadcastConfig.FRAME_SIZE_1280x720);
        WZMP4Writer mMP4Writer = new WZMP4Writer();
       mMP4Writer.setFilePath(Tools.VIDEO_PATH + "/" + "recorded.mp4");
        config.registerVideoSink(mMP4Writer);
        config.registerAudioSink(mMP4Writer);
        config.set(WZMediaConfig.FRAME_SIZE_1280x720);
       config.setHostAddress(host);
       config.setStreamName(path);
        config.setUsername(username);
       config.setPassword(password);
        config.setPortNumber(port);
        config.setApplicationName("test");
        config.setVideoProfileLevel(new WZProfileLevel(WZProfileLevel.PROFILE_MAIN));
       goCoder.setConfig(config);

host,username,password and port variables are the same for both snippets.

Hi,

Do please try generating error log output from your code and post it here so that we can further investigate. Make sure to remove any identifying information such as IP addresses. Alternatively, you can open a support ticket so that you can send us the complete log information.

Michelle