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

**URL:** <https://community.wowza.com/t/host-is-null-when-i-use-wzbroadcastconfig-for-recording-during-live-streaming/47302>\
**Category:** Wowza GoCoder SDK\
**Created:** [July 20, 2016, 1:22pm UTC](https://community.wowza.com/t/host-is-null-when-i-use-wzbroadcastconfig-for-recording-during-live-streaming/47302 "2016-07-20T13:22:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessio\_Roccasecca](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@Alessio\_Roccasecca](https://community.wowza.com/u/Alessio_Roccasecca)\
**Post date:** [July 20, 2016, 1:22pm UTC](https://community.wowza.com/t/host-is-null-when-i-use-wzbroadcastconfig-for-recording-during-live-streaming/47302/1 "2016-07-20T13:22:07Z")

</div>

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:

```auto
     // 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:

```auto
    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.

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [July 28, 2016, 8:06am UTC](https://community.wowza.com/t/host-is-null-when-i-use-wzbroadcastconfig-for-recording-during-live-streaming/47302/2 "2016-07-28T08:06:19Z")

</div>

Hi,

Do please try generating [error log output](https://www.wowza.com/resources/gocodersdk/docs/1.0/dev-guide-platform-logging-error/) 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](https://www.wowza.com/support/open-ticket) so that you can send us the complete log information.

Michelle
