# When smil and video exist in different directories

**URL:** <https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404>\
**Category:** Wowza Streaming Engine\
**Created:** [June 10, 2021, 1:32am UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404 "2021-06-10T01:32:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![byungho\_lee](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@byungho\_lee](https://community.wowza.com/u/byungho_lee)\
**Post date:** [June 10, 2021, 1:32am UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/1 "2021-06-10T01:32:40Z")

</div>

I wonder how to solve the case where the smil file and the video file exist in different directories in the same content storage. use media cache

As far as I know, the same path or smil file must be in the root path or in the same directory to be used. How do I use the smil file to manage it by putting it in a different directory in the same repository?

---

<div class="post-metadata">

**Author:** ![video\_streaming](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@video\_streaming](https://community.wowza.com/u/video_streaming)\
**Post date:** [June 10, 2021, 10:04pm UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/2 "2021-06-10T22:04:06Z")

</div>

There is a way to do this using **ModuleMediaListPathSelector**.

You are correct that the video assets normally must be stored in the same folder as the SMIL file that references them. The **ModuleMediaListPathSelector** module for Wowza Streaming Engine lets you store a SMIL file and the VOD assets it references in different locations.

Here is the doc on how to set it up:

> **[Use ModuleMediaListPathSelector](https://www.wowza.com/docs/how-to-use-different-locations-for-smil-files-and-vod-assets-modulemedialistpathselector)**
>
> Use the MediaListPathSelector Wowza Streaming Engine Java module to store SMIL files and associated VOD assets in different content directories.

And here is some sample code for you using this module on our GitHub page:

> **[GitHub - WowzaMediaSystems/wse-plugin-pathselector: Wowza Streaming Engine™ module that stores SMIL...](https://github.com/WowzaMediaSystems/wse-plugin-pathselector)**
>
> Wowza Streaming Engine™ module that stores SMIL files and associated VOD assets in different content directory paths.

  

Also, please feel free to send in a support ticket as we’ve helped many customers get this path defined properly with this module.

---

<div class="post-metadata">

**Author:** ![byungho\_lee](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@byungho\_lee](https://community.wowza.com/u/byungho_lee)\
**Post date:** [June 11, 2021, 5:14am UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/3 "2021-06-11T05:14:53Z")

</div>

This solution seems to help!  
But I need some help.  
I added the module and called the smil file, but it was still looking for images under the smil file.

![image](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/1X/f28ac5330cc712ef8dcdfc6c817fe694c4982d73.png)  
 →   
pcTomcat/1009/…mp4

I think I need to edit the pathSelectorPrefixes option  
I don’t know how to edit the smil file path to remove it when calling the video. I’m really sorry, but can you give me some examples of writing for the pathSelectorPrefixes option?

---

<div class="post-metadata">

**Author:** ![video\_streaming](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@video\_streaming](https://community.wowza.com/u/video_streaming)\
**Post date:** [June 11, 2021, 3:40pm UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/4 "2021-06-11T15:40:00Z")

</div>

I may be able to find one from when we helped a customer, but I’ll need to change some of the private info in it. Be back soon!

---

<div class="post-metadata">

**Author:** ![video\_streaming](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@video\_streaming](https://community.wowza.com/u/video_streaming)\
**Post date:** [June 11, 2021, 6:03pm UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/5 "2021-06-11T18:03:40Z")

</div>

This is an example set up by one our engineers named alex c. so please pay careful attention to the names used and change accordingly:

 ![Screen Shot 2021-06-11 at 10.18.53 AM](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/1X/feb24b68b70f61230b9fc2a3de27028ca4629c0a.png)

Media location:  
`https://s3-us-west-1.amazonaws.com/alexcwowz/Folder1/bigbuckbunny_450.mp4`  
`https://s3-us-west-1.amazonaws.com/alexcwowz/Folder2/bigbuckbunny_750.mp4`  
`https://s3-us-west-1.amazonaws.com/alexcwowz/Folder3/bigbuckbunny_1100.mp4`  
`https://s3-us-west-1.amazonaws.com/alexcwowz/Folder4/bigbuckbunny_1500.mp4`  
`https://s3-us-west-1.amazonaws.com/alexcwowz/FolderS/BigBuckBunnyS3.smil`

  

SMIL File:

```
<?xml version="1.0" encoding="UTF-8"?>
<smil title="Big Buck Bunny Test">
 <body>
  <switch>
      <video height="240" src="alexcwowz/Folder1/bigbuckbunny_450.mp4" systemLanguage="eng" width="424">
        <param name="videoBitrate" value="450000" valuetype="data"></param>
        <param name="audioBitrate" value="44100" valuetype="data"></param>
      </video>
      <video height="360" src="alexcwowz/Folder2/bigbuckbunny_750.mp4" systemLanguage="eng" width="640">
        <param name="videoBitrate" value="750000" valuetype="data"></param>
        <param name="audioBitrate" value="44100" valuetype="data"></param>
      </video>
      <video height="720" src="alexcwowz/Folder3/bigbuckbunny_1100.mp4" systemLanguage="eng" width="1272">
        <param name="videoBitrate" value="1100000" valuetype="data"></param>
        <param name="audioBitrate" value="44100" valuetype="data"></param>
      </video>
      <video height="900" src="alexcwowz/Folder4/bigbuckbunny_1500.mp4" systemLanguage="eng" width="1590">
        <param name="videoBitrate" value="1500000" valuetype="data"></param>
        <param name="audioBitrate" value="44100" valuetype="data"></param>
      </video>
  </switch>
 </body>
</smil>

```

  

Playback URL: http://[wowzaIP]:1935/s3Mediacache/_definst_/smil:alexcwowz/FolderS/BigBuckBunny.smil/playlist.m3u8

I hope this guides you in the right direction with setting up this module.

---

<div class="post-metadata">

**Author:** ![byungho\_lee](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@byungho\_lee](https://community.wowza.com/u/byungho_lee)\
**Post date:** [June 14, 2021, 2:13am UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/6 "2021-06-14T02:13:05Z")

</div>

I tried specifying the path as you suggested.

![image](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/1X/f37a57bd2068315403467f3bdabc2a81335d83f2.png)

media location  
/2021/2021.mp4

my smil

```
<smil title="Test">
	<body>
		<switch>
			<video src="2021/2021.mp4">
				<param name = "videoBitrate" value="3500000" valuetype="data"></param>
				<param name = "audioBitrate" value="128000" valuetype="data"></param>
			</video>
			<video src="2021/2021.mp4">
				<param name = "videoBitrate" value="2500000" valuetype="data"></param>
				<param name = "audioBitrate" value="128000" valuetype="data"></param>
			</video>
		</switch>
	</body>
</smil>

```

play url : http://[address]/abrTest\_pcTomcat/abrTest\_pcTomcat/_definst_/smil:pcTomcat/smil/2021.smil/playlist.m3u8

The set vod application is also the same as the address.  
Is there something I have set up incorrectly?

The streaming server’s error log is as follows:

`WARN server comment 2021-06-14 11:16:43 - - - - - 15.195 - - - - - - - pcTomcat/smil/2021/2021.mp4 MediaReaderH264.open[1]: java.io.IOException: MediaCacheRandomAccessReader.open: MediaCache source not found: 2021/2021.mp4: java.io.IOException: MediaCacheRandomAccessReader.open: MediaCache source not found: 2021/2021.mp4|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReaderFilter.open(MediaCacheRandomAccessReaderFilter.java:77)|at com.wowza.wms.plugin.pathselector.RandomAccessReaderMediaListPathSelector.open(RandomAccessReaderMediaListPathSelector.java:89)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:262)|at com.wowza.wms.httpstreamer.model.HTTPStreamerAdapterBase.doesFileExist(HTTPStreamerAdapterBase.java:1582)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onPlaylist(HTTPStreamerAdapterCupertinoStreamer.java:2295)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.serviceMsg(HTTPStreamerAdapterCupertinoStreamer.java:596)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.service(HTTPStreamerAdapterCupertinoStreamer.java:542)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.service(HTTPStreamerAdapterCupertinoStreamer.java:462)|at com.wowza.wms.server.ServerHandler.a(ServerHandler.java:669)|at com.wowza.wms.server.ServerHandler.a(ServerHandler.java:417)|at com.wowza.wms.server.ServerHandler.messageReceived(ServerHandler.java:533)|at com.wowza.wms.server.ServerHandlerThreaded.messageReceived(ServerHandlerThreaded.java:79)|at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(AbstractIoFilterChain.java:181)|at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:511)|`

If the smil file is located at the top  
It calls mp4 and plays normally.

---

<div class="post-metadata">

**Author:** ![video\_streaming](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@video\_streaming](https://community.wowza.com/u/video_streaming)\
**Post date:** [June 14, 2021, 5:35pm UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/7 "2021-06-14T17:35:19Z")

</div>

Ok so this is working for you then now?

---

<div class="post-metadata">

**Author:** ![byungho\_lee](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@byungho\_lee](https://community.wowza.com/u/byungho_lee)\
**Post date:** [June 15, 2021, 12:10am UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/8 "2021-06-15T00:10:22Z")

</div>

No I want to find and retrieve the mp4/test.mp4 file when I call the smil file in the smil/test.smil directory.

I set it up as you told me, but it failed, so I was wondering if there was a problem with the settings, so I replied.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [June 15, 2021, 4:13pm UTC](https://community.wowza.com/t/when-smil-and-video-exist-in-different-directories/93404/9 "2021-06-15T16:13:14Z")

</div>

We can help you, but to accurately diagnose, you’ll need to send in a support ticket. We can’t troubleshoot or debug in the forums without having access to your full configuration and logs. It’s just guessing otherwise in the forums and that doesn’t help you really. We’ll take a closer look in a ticket and see why it’s failing. You can zip and upload your files here.

> **[Open a Support Ticket](https://www.wowza.com/support/open-ticket)**
>
> Open a Wowza suppor ticket so our technical support engineers worldwide can help you succeed with your Wowza software and services.
