I’m using the ami-5453a53d Amazon EC2 Amazon Machine Image ID.
In the startup package (based off the ‘startup_2.2’ provided example) I modify the “startup.xml” file:
wowza
I then create an “init.sh” file and place it at the same level as the “startup.xml” file and “wowza” and “tuning” directories. The “init.sh” file looks like this (with the XXXXXXXXXX being replaced with my Amazon AWS keys:
#!/bin/sh
mkdir /mnt/s3
/usr/bin/s3fs cogwareplayhouston.s3.amazonaws.com -o accessKeyId=XXXXXXXXXX -o secretAccessKey=XXXXXXXXXX -o default_acl=public-read /mnt/s3
I have an S3 bucket called “cogwareplayhouston” that sits at the top level of my S3 account. I’m assuming that “cogwareplayhouston.s3.amazonaws.com” is the correct way to point the script to this bucket, right?
I then used the instructions, as noted above by acropolis, found here: https://www.wowza.com/docs/how-to-use-the-fuse-based-file-system-backed-by-amazon-s3
I didn’t do the mkdir command or mount the S3 bucket from these instructions, since I assume those are handled by the “init.sh”
What I did was modify the Wowza application that records video. In my case, I’m using “rtplive” to stream live video.
I then added the following, exactly, to the end of the “Modules” list and the “Properties” list in the "Application.xml that sits in "conf/rtplive/. Since there were three “” areas I assumed it was the was the one right below the Modules list I just added to (just before “”). So, the final portion of the “Application.xml” looks like this:
ModuleMediaWriterFileMover
ModuleMediaWriterFileMover
com.wowza.wms.module.ModuleMediaWriterFileMover
fileMoverDestinationPath
/mnt/s3
fileMoverDeleteOriginal
false
Boolean
fileMoverVersionFile
true
Boolean
I use the LiveStreamRecord example Flash player to “Start Recording” and then “Pause Recording”. When I FTP into the server I can see the “myStream.sdp.flv” file that is recorded, as well as the temporary file being written if I am still ‘recording’. When I’m done recording the temporary file goes away as it becomes part of the “myStream.sdp.flv” file that resides in the “content” folder.
So, the file is correctly being recorded and saved to the “content” folder… but it’s not being moved to the s3 folder – in fact, when I FTP into the server I don’t see a “s3” folder anywhere, not even in the “mnt” directory.
In the “mnt” directory I see “lost+found”, “mediacache” and “WowzaMediaServer” as the only directories.
I’m not sure what I’m missing here. Any help would be greatly appreciated.