# Is there a way to tell Wowza to execute a program after a file write is complete?

**URL:** https://community.wowza.com/t/is-there-a-way-to-tell-wowza-to-execute-a-program-after-a-file-write-is-complete/44259
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [November 13, 2014, 3:45pm UTC](https://community.wowza.com/t/is-there-a-way-to-tell-wowza-to-execute-a-program-after-a-file-write-is-complete/44259 "2014-11-13T15:45:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Lenny\_Sibaja](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@Lenny\_Sibaja](https://community.wowza.com/u/Lenny_Sibaja)
#### Post date: [November 13, 2014, 3:45pm UTC](https://community.wowza.com/t/is-there-a-way-to-tell-wowza-to-execute-a-program-after-a-file-write-is-complete/44259/1 "2014-11-13T15:45:19Z")

</div>

Hi,

I want to upload a video file to my S3 input bucket –as soon as a Wowza file write is complete- so the Amazon Elastic Transcoder can transcode the file.

**Is there a way to tell Wowza to execute a program after a file write is complete?**

I found the [IMediaWriterActionNotify](https://www.wowza.com/docs/how-to-use-imediawriteractionnotify-to-programmatically-move-and-rename-recordings-of-live-streams) and I did the following:

1. Installed Wowza IDE

2. Followed the Project and Module Class Creation (from [here](https://www.wowza.com/uploads/developers/WowzaIDE_UsersGuide.pdf)) to create a Wowza Media Server Project

3. At this point, if I run/debug the sample code, onAppStart, onAppStop, etc. are not being called.

4. Then I edited the MyFirstModule class and pasted the example code from [IMediaWriterActionNotify](https://www.wowza.com/docs/how-to-use-imediawriteractionnotify-to-programmatically-move-and-rename-recordings-of-live-streams)

But for some reason, the onFLVAddMetadata and onWriteComplete are not being called. Does anybody know what I am missing here?

Thanks!!

---

<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: [November 13, 2014, 3:34pm UTC](https://community.wowza.com/t/is-there-a-way-to-tell-wowza-to-execute-a-program-after-a-file-write-is-complete/44259/2 "2014-11-13T15:34:32Z")

</div>

Hello there and welcome to the Wowza support forum.

Did you add your module to the application?

[Configure modules](https://www.wowza.com/docs/how-to-get-started-as-a-wowza-streaming-engine-manager-administrator#configModules)

If so, do you see any indication of the problem in the logs?

Kind regards,

Salvadore

---

<div class="post-metadata">

### Author: ![Alejandro\_Ferrari](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Alejandro\_Ferrari](https://community.wowza.com/u/Alejandro_Ferrari)
#### Post date: [December 10, 2014, 12:13pm UTC](https://community.wowza.com/t/is-there-a-way-to-tell-wowza-to-execute-a-program-after-a-file-write-is-complete/44259/3 "2014-12-10T12:13:58Z")

</div>

Hi I recommend if need upload from Wowza to S3 use Java SDK with MultipartUpload, try to don’t use s3fs, the performance is terrible! I start one project using s3fs and we has many issuel uploading, after move to AWS Java SDK upload, the performance is impressive 20mb in 1 sec.

On the other hand can use the New AWS Lamda service to run events after a new s3 object be created in you bucket, and send them to ElasticTranscode.

hope this help!

Alejandro

---

<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: [November 13, 2014, 3:38pm UTC](https://community.wowza.com/t/is-there-a-way-to-tell-wowza-to-execute-a-program-after-a-file-write-is-complete/44259/4 "2014-11-13T15:38:30Z")

</div>

Sorry, I forgot to mention the built-in file mover module that you might be interested in trying as well:

[How to move recordings from live streams (ModuleMediaWriterFileMover)](https://www.wowza.com/docs/how-to-move-recordings-from-live-streams)

Salvadore

---

<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: [November 17, 2014, 1:50pm UTC](https://community.wowza.com/t/is-there-a-way-to-tell-wowza-to-execute-a-program-after-a-file-write-is-complete/44259/5 "2014-11-17T13:50:42Z")

</div>

That’s great news. I am glad you got this worked out and happy I could help.

Kind regards,

Salvadore

---

<div class="post-metadata">

### Author: ![Lenny\_Sibaja](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@Lenny\_Sibaja](https://community.wowza.com/u/Lenny_Sibaja)
#### Post date: [November 17, 2014, 2:08pm UTC](https://community.wowza.com/t/is-there-a-way-to-tell-wowza-to-execute-a-program-after-a-file-write-is-complete/44259/6 "2014-11-17T14:08:27Z")

</div>

Hi Salvadore,

Thank you for you reply. I followed the Configure modules link you provided and it is working now!

Thank you!!
