# MediaCaster starting for already published streams

**URL:** <https://community.wowza.com/t/mediacaster-starting-for-already-published-streams/36335>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [May 7, 2014, 5:21pm UTC](https://community.wowza.com/t/mediacaster-starting-for-already-published-streams/36335 "2014-05-07T17:21:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Rafael\_Sobral](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@Rafael\_Sobral](https://community.wowza.com/u/Rafael_Sobral)\
**Post date:** [May 9, 2014, 5:43pm UTC](https://community.wowza.com/t/mediacaster-starting-for-already-published-streams/36335/3 "2014-05-09T17:43:42Z")

</div>

Hi Andrew,

The stream is not empty because is plays correctly on the player.

I use the methods bellow in a loop to add the content to the stream, just like in ModuleAddAudioTrack:

this.publisher.addAudioData(APacket.getData(), APacket.getData().length, APacket.getAbsTimecode() + offsetTimeCode);

…

this.publisher.addVideoData(VPacket.getData(), VPacket.getData().length, VPacket.getAbsTimecode());

I added the following statement in onConnect method of Module and it is not firing MediaCaster anymore.

client.setStreamType(“live”);

The following post was very helpfull to get closer to understand what is going on.

> [@LIVE vs RTPLIVE](http://community.wowza.com/t/-/35703):
>
> Okay, this may seem like a very basic/silly question, but it’s been bugging me for some time now. What, exactly, is the difference between streaming using LIVE vs streaming using RTPLIVE. Over a year ago I set up a test using RTPLIVE – basically, just to webcast a small music festival. It worked and I’ve continued using RTPLIVE from that point forward. But, I was reading through some of the documentation one day and saw that it recommended that I stream through LIVE for the type of streaming I …

I would like to know if it is the correct approach.

I would like to known too if it is possible to set it on stream basis and not on client connection basis as I did. To avoid it affect all stream in client connection.

Thanks.

Aloha,

Rafael Sobral

---

_[View the full topic](https://community.wowza.com/t/mediacaster-starting-for-already-published-streams/36335)._
