When smil and video exist in different directories

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?

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:

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


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

1 Like

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

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?

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!

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:

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.

I tried specifying the path as you suggested.

image

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.

Ok so this is working for you then now?

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.

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.