How can i publish a stream to an other application?

I want to publish a stream from my application ‘test’ to an other application ‘copytest’. I tried the following code, i could play the stream from ‘copytest’, but it was no video and no audio.

           
IVHost vhost = VHostSingleton.getInstance(VHost.VHOST_DEFAULT);
                    
publisher = Publisher.createInstance(vhost, "copytest");

//publisher.publish("video");
publisher.publish("video", "live");
                    
                    
long startTime = System.currentTimeMillis();
provider = new PublishingProviderLive(publisher, startTime, "myStream");
//provider = new PublishingProviderMediaReader(publisher, startTime, "mp4:sample.mp4");
provider.setRealTimeStartTime(startTime);

What can i do?

Hello,

Thanks for contacting the Wowza Community. Here is an article on duplicating streams to another application. Can you review this article and setup your environment this way?

https://www.wowza.com/docs/how-to-duplicate-streams-to-another-application-instance-moduleduplicatestreams

regards
Jermaine