Wowza Community

Local smil with AWS S3 usage

Hello,

I have a setup in which I have a local smil file that is attempting to access an mp4 file from AWS S3. I can get the mp4 to stream from s3 using the VodEdge but I cannot seem to get streaming to work with my local smil file.

My S3 does use credentials which are stored in my MediaCache instance and again, I’ve validated that I can stream when attempting to access the mp4 file directly.

I read through much documentation and have mixed feedback on whether this can be done. It seems that this plugin (RandomAccessReaderMediaCacheLocalContent) is supposed to handle this exact circumstance: https://www.wowza.com/docs/media-cache-implementation-that-will-first-try-to-access-content-locally-before-getting-it-from-a-remote-source-mediacachelocalcontent#examples7

So, for example, I have a file living in S3 under /mybucket/path/to/value/1234.mp4

My smil file lives in my local conent directory (/usr/local/WowzaStreamingEngine/content) and looks like this:

<smil><body><switch><video begin="1.293" dur="3284.187" src="mp4:s3devtest/_definst_/mybucket/path/to/value/1234.mp4" audio-bitrate="196608"></video></switch></body></smil>

BUT NOTE: I have tried the following variations for the src value in the smil file:
mp4:mybucket/path/to/value/1234.mp4
mp4:s3/mybucket/path/to/value/1234.mp4
mp4:s3devtest/_definst_/s3/mybucket/path/to/value/1234.mp4

The error I’m receiving is:
java.io.FileNotFoundException: /usr/local/WowzaStreamingEngine/content/s3devtest/_definst_/s3/…

which shows that it is looking in my content directory where the smil file lives and not the s3 bucket.

I’m attaching a screenshot of my Media Cache setup (sans credentials) as well as a screenshot of my custom config values for the RandomAccessReaderMediaCacheLocalContent plugin

Try placing the SMIL in the S3 bucket in reference:
mybucket/path/to/value/myStream.smil
s3/mybucket/path/to/value/myStream.smil
s3devtest/definst/s3/mybucket/path/to/value/myStream.smil

1 Like

Hi,
First make sure you have setup MediaCache properly pointing to your S3 bucket. Play a video file from S3 first following the guide,
If the file plays it means S3 is setup correctly in meda cache.

Now keep your smil file in the S3 bucket where the video files are. Then in the playback URL instead of smil:smilfile.smil/playlist.m3u8, use
smil:s3/mybucketname/path/to/smilfile.smil/playlist.m3u8

where s3 is the Prefix name used in the Media Cache Sources (Server Settings-Media Cache).

Best of luck!
-Inderjeet

1 Like