# Cannot play s3 video with mediacache

**URL:** <https://community.wowza.com/t/cannot-play-s3-video-with-mediacache/49996>\
**Category:** Hire a Consultant\
**Created:** [October 25, 2017, 5:34pm UTC](https://community.wowza.com/t/cannot-play-s3-video-with-mediacache/49996 "2017-10-25T17:34:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dillibabu\_Kuppan](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Dillibabu\_Kuppan](https://community.wowza.com/u/Dillibabu_Kuppan)\
**Post date:** [October 25, 2017, 5:34pm UTC](https://community.wowza.com/t/cannot-play-s3-video-with-mediacache/49996/1 "2017-10-25T17:34:29Z")

</div>

I am trying to play a simple video stored in S3 using and a Wowza instance running on EC2. I have created an S3 bucket and uploaded a video file(Mersal.mp4). Then I launched “WowzaStreamingEngine-4.7.1” server that includes the vods3 application which is configured and given access & secret keys for amazon mediacache.

The problem is I couldnot able to play the video which throws Error code : 400  
Here are the server, bucket & media details given bellow.

**AMI :** Wowza Streaming Engine 4; Bring Your Own License Pro Edition (HVM)

**Wowza Application :** vods3 (configured with access & secret keys in mediacache property)

**Use Amazon S3 bucket name in domain:** true

**S3 Bucket :** vods3dev

**S3 Bucket Region :** ap-south-1

**Uploaded a Video in S3 :** [http://vods3dev.s3.amazonaws.com/Mersal.mp4](http://vods3dev.s3.amazonaws.com/Mersal.mp4) or [http://vods3dev.s3-ap-south-1.amazonaws.com/Mersal.mp4](http://vods3dev.s3-ap-south-1.amazonaws.com/Mersal.mp4)

**The bellow urls I have tested in VLC & JWplayer :**

1. [rtmp://35.154.105.211:1935/vods3/_definst_/mp4:amazons3/vods3dev/Mersal.mp4](http://35.154.105.211:1935/vods3/_definst_/mp4:amazons3/vods3dev/Mersal.mp4)

(Not working & error is not generated in log)

2 ) [http://35.154.105.211:1935/vods3/_definst_/mp4:amazons3/vods3dev/Mersal.mp4/playlist.m3u8](http://35.154.105.211:1935/vods3/_definst_/mp4:amazons3/vods3dev/Mersal.mp4/playlist.m3u8)

(Not working)

**Error Log:** WARN server comment 2017-10-24 19:48:04 - - - - - 0.117 - - - - - - - - MediaCacheItemBase.init: Item does not exist: amazons3/vods3dev/Mersal.mp4  
WARN server comment 2017-10-24 19:48:04 - - - - - 0.119 - - - - - - - amazons3/vods3dev/Mersal.mp4 MediaReaderH264.open[1]: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: amazons3/vods3dev/Mersal.mp4: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: amazons3/vods3dev/Mersal.mp4|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReader.open(MediaCacheRandomAccessReader.java:70)|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReaderFilter.open(MediaCacheRandomAccessReaderFilter.java:75)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:259)|at com.wowza.wms.httpstreamer.model.HTTPStreamerAdapterBase.doesFileExist(HTTPStreamerAdapterBase.java:1485)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onPlaylist(HTTPStreamerAdapterCupertinoStreamer.java:1552)|

**Access Log:** 2017-10-24 19:48:04 UTC comment server WARN 200 - MediaCacheItemBase.init: Item does not exist: amazons3/vods3dev/Mersal.mp4 - - - 0.539 - - - - - - - - - - - - - - - - - - - - - - - - -  
2017-10-24 19:48:04 UTC comment server WARN 404 amazons3/vods3dev/Mersal.mp4 MediaReaderH264.open[1]: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: amazons3/vods3dev/Mersal.mp4: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: amazons3/vods3dev/Mersal.mp4|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReader.open(MediaCacheRandomAccessReader.java:70)|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReaderFilter.open(MediaCacheRandomAccessReaderFilter.java:75)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:259)|at com.wowza.wms.httpstreamer.model.HTTPStreamerAdapterBase.doesFileExist(HTTPStreamerAdapterBase.java:1485)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onPlaylist(HTTPStreamerAdapterCupertinoStreamer.java:1552)| - - - 0.54 - - - - - - - - - - - - - - - - - - - - - - - - -

Kindly update me, What am I missing here?

---

<div class="post-metadata">

**Author:** ![Andrew\_Ramberg](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@Andrew\_Ramberg](https://community.wowza.com/u/Andrew_Ramberg)\
**Post date:** [October 26, 2017, 2:45pm UTC](https://community.wowza.com/t/cannot-play-s3-video-with-mediacache/49996/2 "2017-10-26T14:45:35Z")

</div>

Hello,

This looks like an issue with the playback URL request. If you enable the server, can you try using the following instead:

[http://35.154.105.211:1935/vods3/](http://35.154.105.211:1935/vods3/)_definst_/mp4:amazons3/Mersal.mp4/playlist.m3u8

It looks like you’ve included the bucket name in your MediaCache settings:

**Use Amazon S3 bucket name in domain:** true

**S3 Bucket :** vods3dev

If this is used, adding the bucket name to the playback URL shouldn’t be required.

You could try enabling the debugHTTPRequests for more information on the MediaCache transactions with S3. This is shown on page 28 of the [MediaCache Users Guide](https://www.wowza.com/resources/WowzaStreamingEngine_MediaCacheUsersGuide.pdf).

Best regards,

Andrew
