# Record one stream to two different files

**URL:** <https://community.wowza.com/t/record-one-stream-to-two-different-files/39424>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [June 14, 2015, 8:58pm UTC](https://community.wowza.com/t/record-one-stream-to-two-different-files/39424 "2015-06-14T20:58:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxim\_Kozlov](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@Maxim\_Kozlov](https://community.wowza.com/u/Maxim_Kozlov)\
**Post date:** [June 14, 2015, 8:58pm UTC](https://community.wowza.com/t/record-one-stream-to-two-different-files/39424/1 "2015-06-14T20:58:10Z")

</div>

Hi.

I’m writing custom module using ILiveStreamRecordManager.

Function, that starts recording:

```auto
public void start(String filepath, String filename, String sourceStreamName, IApplicationInstance appInstance) {
        ILiveStreamRecordManager recordManager = appInstance.getVHost().getLiveStreamRecordManager();
        StreamRecorderParameters recordParams = new StreamRecorderParameters(appInstance);
        recordParams.fileFormat = IStreamRecorderConstants.FORMAT_MP4;
        recordParams.moveFirstVideoFrameToZero = true;
        recordParams.segmentationType = IStreamRecorderConstants.SEGMENT_NONE;
        recordParams.startOnKeyFrame = true;
        recordParams.outputPath = filepath;
        recordParams.outputFile = filename;
        recordParams.versioningOption = IStreamRecorderConstants.APPEND_FILE;
        recordParams.recordData = false;
        recordManager.startRecording(appInstance, sourceStreamName, recordParams);
}

```

For example, i start recording stream “livestream1” to file “a.mp4” calling function start().

Then i start recording same stream “livestream1” but to another file “b.mp4” - after this recording of “a.mp4” stopping.

Is it possible to record one stream to many files at one time?

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [June 15, 2015, 6:18am UTC](https://community.wowza.com/t/record-one-stream-to-two-different-files/39424/2 "2015-06-15T06:18:36Z")

</div>

Hello.

Here is a very similar question with answer and a work around (cheat)

Hope this helps. Regards,

Salvadore

---

<div class="post-metadata">

**Author:** ![Maxim\_Kozlov](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@Maxim\_Kozlov](https://community.wowza.com/u/Maxim_Kozlov)\
**Post date:** [June 15, 2015, 3:20pm UTC](https://community.wowza.com/t/record-one-stream-to-two-different-files/39424/3 "2015-06-15T15:20:03Z")

</div>

> Hello.
> 
> Here is a very similar question with answer and a work around (cheat)
> 
> Where?

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [June 15, 2015, 7:35am UTC](https://community.wowza.com/t/record-one-stream-to-two-different-files/39424/4 "2015-06-15T07:35:48Z")

</div>

Sorry, I forgot the link. [Here it is](http://community.wowza.com/t/-/43962)

Salvadore
