Wowza Community

Not finding media outside of content directory

I’ve got a live application that runs a playist using the streamPublisher module. My media resides in a different path than the SMIL file. The SMIL file is in the normal place [install-dir]/content but my media is on ~/remotemediadrive/. I’m also using ModuleMediaListPathSelector to attempt to point Wowza to my media but this appears not to be working.

I see errors like this:

MediaReaderH264.open[live/MyApp]: Not found: /usr/local/WowzaStreamingEngine/content/~/remotemediadrive/sample.mp4.: java.io.FileNotFoundException: /usr/local/WowzaStreamingEngine/content/~/remotemediadrive/sample.mp4 (No such file or directory)|at java.base/java.io.RandomAccessFile.open0(Native Method)|at java.base/java.io.RandomAccessFile.open(Unknown Source)|at java.base/java.io.RandomAccessFile.(Unknown Source)|at java.base/java.io.RandomAccessFile.(Unknown Source)|at com.wowza.io.WowzaRandomAccessFile.(WowzaRandomAccessFile.java:12)|at com.wowza.io.DirectRandomAccessReader.open(DirectRandomAccessReader.java:236)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:262)|at com.wowza.wms.stream.publish.PublishingProviderMediaReader.a(PublishingProviderMediaReader.java:239)|at com.wowza.wms.stream.publish.PublishingProviderMediaReader.(PublishingProviderMediaReader.java:97)|at com.wowza.wms.stream.publish.Stream.a(Stream.java:957)|at com.wowza.wms.stream.publish.Stream.run(Stream.java:278)|at java.base/java.lang.Thread.run(Unknown Source)|

I have the ModuleMediaListPathSelector set up with the property:

pathSelectorPrefixes = /usr/local/WowzaStreamingEngine/content/

my understanding is that this should remove the unwanted prefix from the path name, leaving just the proper ~/remotemediadrive/sample.mp4 as the file path. But from the error, it looks like it’s got /usr/local/WowzaStreamingEngine/content/~/remotemediadrive/sample.mp4 as the file path, so the path name is not being affected by the ModuleMediaListPathSelector plugin.

The playlist SMIL file is set up like this:

<video src="mp4:~/remotemediadrive/sample.mp4" start="0" length="-1"/>

I’ve also tried to set up a MediaCache “file” source, but this gave me errors also.

I had the MediaCache source set to:
BasePath: ~/remotemediadrive/
Prefix: RemoteMediaDrive/

I then had my SMIL file media set up like this:
<video src="mp4:RemoteMediaDrive/sample.mp4" start="0" length="-1"/>

With this MediaCache approach, I’m seeing errors like this:

MediaReaderH264.open[1]: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: RemoteMediaDrive/sample.mp4: java.io.IOException: MediaCacheRandomAccessReader.open: Item not in cache: RemoteMediaDrive/sample.mp4|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReader.open(MediaCacheRandomAccessReader.java:75)|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReaderFilter.open(MediaCacheRandomAccessReaderFilter.java:75)|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.stream.publish.PublishingProviderMediaReader.a(PublishingProviderMediaReader.java:239)|at com.wowza.wms.stream.publish.PublishingProviderMediaReader.(PublishingProviderMediaReader.java:97)|at com.wowza.wms.stream.publish.Stream.a(Stream.java:957)|at com.wowza.wms.stream.publish.Stream.run(Stream.java:278)|at java.base/java.lang.Thread.run(Unknown Source)|

and

MediaReaderH264.open[live/MyApp]: Not found: /usr/local/WowzaStreamingEngine/content/RemoteMediaDrive/sample.mp4.: java.io.FileNotFoundException: /usr/local/WowzaStreamingEngine/content/RemoteMediaDrive/sample.mp4 (No such file or directory)|at java.base/java.io.RandomAccessFile.open0(Native Method)|at java.base/java.io.RandomAccessFile.open(Unknown Source)|at java.base/java.io.RandomAccessFile.(Unknown Source)|at java.base/java.io.RandomAccessFile.(Unknown Source)|at com.wowza.io.WowzaRandomAccessFile.(WowzaRandomAccessFile.java:12)|at com.wowza.io.DirectRandomAccessReader.open(DirectRandomAccessReader.java:236)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:262)|at com.wowza.wms.stream.publish.PublishingProviderMediaReader.a(PublishingProviderMediaReader.java:239)|at com.wowza.wms.stream.publish.PublishingProviderMediaReader.(PublishingProviderMediaReader.java:97)|at com.wowza.wms.stream.publish.Stream.a(Stream.java:957)|at com.wowza.wms.stream.publish.Stream.run(Stream.java:278)|at java.base/java.lang.Thread.run(Unknown Source)|

Between these two methods (MediaListPathSelector and MediaCache), I would think one or both of these should work.

How can I get Wowza to get to my media files in the proper place and which is the preferred method to do this?

Thanks,

Ron

Ok, method number three to pull media from another place…

Update the Application.xml file:
Change this line:
<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
To this:
<StorageDir>/root/remotemediadrive</StorageDir>

Also copied my SMIL file to /root/remotemediadrive/

Now I get this error:

MediaReaderH264.open[1]: java.io.IOException: MediaCacheRandomAccessReader.open: MediaCache source not found: sample.mp4: java.io.IOException: MediaCacheRandomAccessReader.open: MediaCache source not found: sample.mp4|at com.wowza.wms.mediacache.impl.MediaCacheRandomAccessReaderFilter.open(MediaCacheRandomAccessReaderFilter.java:77)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:262)|at com.wowza.wms.stream.publish.PublishingProviderMediaReader.a(PublishingProviderMediaReader.java:239)|at com.wowza.wms.stream.publish.PublishingProviderMediaReader.(PublishingProviderMediaReader.java:97)|at com.wowza.wms.stream.publish.Stream.a(Stream.java:957)|at com.wowza.wms.stream.publish.Stream.run(Stream.java:278)|at java.base/java.lang.Thread.run(Unknown Source)|

To recap, I now have three methods of pulling content from another place that don’t work:

  1. Using the MediaListPathSelector module
  2. Using a MediaCache file source
  3. Changing the <StorageDir> tag in Application.xml

Any ideas?

Thanks,

Ron

I finally figured it out. It seems that setting the read-access permissions of the media files can be important.