Wowza Community

Media Cache. Spaces in filename.

I am having an issue using media cache when pulling file names with spaces. They work fine with vod applications. But when I use a vod-Edge application with a media cache soure, it will not recognize a file name with a space in it. The error in the log shows it is trying to read (ex: test%20test). With our windows servers, we aren’t able to use the http source, so I am using the “Add File Source”, with a unc path to the content (ex: \server\content\mediafile.mp4). Media cache works fine with file names that have NO spaces, the problem is with the ones that HAVE spaces. Been stuck on this for over a week. Any help is appreciated.

Hello there,

You may be able to utilize the StreamNameAlias AddOn to overcome this situation:

How to get the StreamNameAlias AddOn

I hope this comes in handy and helps you along.

Salvadore

Hi,

In your Media Cache configuration, there is a setting called urlEscapeStreamNameSpaces which will automatically replace spaces with %20. By default, this setting is enabled. You may need to set it to false (disabled) so that spaces are preserved.

You can do this using the Manager if using Wowza Streaming Engine or directly in the MediaCache.xml file if using an earlier version.

Roger.

Hi,

The property is already set as a top level property in the main MediaCache section of the MediaCache.xml file. You don’t need to add it to the MediaCacheSource section.

YOu just need to change the value from TRUE to FALSE and then make sure you restart the server after saving the file.

Roger.

Another option would be to use .play files, /content/playme.play

These would be plain text files containing the name of a media file.

Example, “mediaFile1.play” may contain “mp4:media[space]file[space]1.mp4” or “mp4:media file 1.mp4”

Then you would use “mediaFile1.play” as the stream name.

Salvadore

These two methods are essentially the same. With StreamNameAlias AddOn you would use the aliasmap.play.txt file, or you would use a .play file in the /content folder. But you can only use one method or the other.

Salvadore

Please refer to ticket

#94174

I tried the .play files, and it works fine with vod applications, but it doesn’t work with the cache applications. It could be because of the prefix. On the streaming engine, when creating a cache source, it makes you put in a prefix. When I add the prefix into the mediaFile1.play file (mp4:wod/media file 1.mp4), the player says “Failed to play mediaFile1.play; stream not found”. I also tried putting “wod/mediaFile1.play” inf for the stream and that didn’t work either.

I added the property but still not working. Someone on the forum said something about StreamNameAlias AddOn? Would that possibly work? If so, how do we add that?

ma000xsvid08

File

ma000xsvid08 cache

//ma000xsvid08/wowzacontent

wod

com.wowza.wms.mediacache.impl.MediaCacheItemFileImpl

1M

864000000

172800000

true

30

false

fileReadRetries

3

Integer

urlEscapeStreamNameSpaces

false

Boolean

That worked. Thanks.