# Possible to split live stream recordings?

**URL:** <https://community.wowza.com/t/possible-to-split-live-stream-recordings/36368>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [April 9, 2011, 3:46pm UTC](https://community.wowza.com/t/possible-to-split-live-stream-recordings/36368 "2011-04-09T15:46:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_vincent](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jason\_vincent](https://community.wowza.com/u/jason_vincent)\
**Post date:** [April 9, 2011, 3:46pm UTC](https://community.wowza.com/t/possible-to-split-live-stream-recordings/36368/1 "2011-04-09T15:46:09Z")

</div>

Hi

I’ve just started using Wowza and I am using the live-record and the ModuleMediaWriterFileMover module to record all live streams and move them to a different location when the stream is stopped.

I’d prefer to have several files of the event rather than one large file when it’s finished.

However, I’ve just realised that if I stop the stream in order to split the recordings up I will disconnect the viewers from the live stream.

I’ve just converted from using [Ustream.com](http://Ustream.com) where the interface has separate ‘Broadcast’ and ‘Record’ buttons to accomplish this. Is there anything similar that I can accomplish using Wowza and some server-side magic?

I’m thinking that I could implement a server-side module and some sort of client side admin interface to do this?

Anyone has any alternative ideas on how this could be done?

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 9, 2011, 3:49pm UTC](https://community.wowza.com/t/possible-to-split-live-stream-recordings/36368/2 "2011-04-09T15:49:49Z")

</div>

Take a look at LiveStreamRecord example package:

[https://www.wowza.com/docs/how-to-record-live-streams-httplivestreamrecord](https://www.wowza.com/docs/how-to-record-live-streams-httplivestreamrecord)

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 11, 2011, 1:54pm UTC](https://community.wowza.com/t/possible-to-split-live-stream-recordings/36368/3 "2011-04-11T13:54:39Z")

</div>

You can do something like this:

```auto
public void isItLive(IClient client, RequestFunction function,
			AMFDataList params) {
		
		String streamName = getParamString(params, PARAM1);
		Boolean streamExists = false;
		
		List publishedstreams = client.getAppInstance().getPublishStreamNames();
		
		Iterator iter = publishedstreams.iterator();
		
		while(iter.hasNext())
		{
			String name = (String)iter.next();
			if (name.equalsIgnoreCase(streamName))
				streamExists = true;
		}
		
		sendResult(client, params, streamExists);
}

```

client-side:

```auto
nc.call("isItLive",new flash.net.Responder(function(itIsLive:Boolean):void
			{
				trace(itIsLive);
			}),"myStream");

```

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 12, 2011, 12:04pm UTC](https://community.wowza.com/t/possible-to-split-live-stream-recordings/36368/4 "2011-04-12T12:04:04Z")

</div>

Sounds great.

Richard

---

<div class="post-metadata">

**Author:** ![jason\_vincent](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jason\_vincent](https://community.wowza.com/u/jason_vincent)\
**Post date:** [April 11, 2011, 7:16am UTC](https://community.wowza.com/t/possible-to-split-live-stream-recordings/36368/5 "2011-04-11T07:16:13Z")

</div>

Hi Richard

Thanks for that. It’s really helpful. A good compromise.

One other thing I was wondering was if there is a current API or call I could utilise to tell me whether a particular stream is live or not.

I was looking at the connectioncounts call, but that doesn’t seem to have the right info. Is there anything else already programmed or would I have to get my hands dirty and make something?

Thanks

---

<div class="post-metadata">

**Author:** ![jason\_vincent](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jason\_vincent](https://community.wowza.com/u/jason_vincent)\
**Post date:** [April 12, 2011, 8:49am UTC](https://community.wowza.com/t/possible-to-split-live-stream-recordings/36368/6 "2011-04-12T08:49:00Z")

</div>

Many thanks for that, Richard.

If there’s nothing currently available I think I’ll implement it similar to the connectioncounts module to return XML as I don’t know how to do AS or have any client available to interact with Flash.

On the client side Javascript would work better for me, so the module’s ability to return the result in XML would good, so I’ll do it that way.

I’ll be doing a simple check to display “We’re Live” or not depending on the status of the stream, and my existing page is HTML and JS so it’ll be easier to implent it as above.

Thanks for the help
