MediaCache url and base64 encoding properties (urlDecodeStreamName, base64DecodeStreamName)

Some lesser known property names in MediaCache that are quite useful upon the need to pass parameters on file requests, are the ability to base64 and urldecode stream names.  To add urldecoding, you can simply add the following property to your MediaCacheSource->Properties:
<Property>
  <Name>urlDecodeStreamName</Name> 
  <Value>true</Value> 
  <Type>Boolean</Type> 
</Property>

If you had a request for your sample.mp4 file within your MediaCache source, then your playback URL might look like:

rtmp://[wowza-server]:1935/vod/_definst_/mp4:[mediacacheprefix]/path/to/sample.mp4%3Fusername%3Dtest%26password%3Dtest

Similarly, using base64 encoding on your source side, we can decode base64 by adding this property as well:

<Property>
    <Name>base64DecodeStreamName</Name> 
    <Value>true</Value> 
    <Type>Boolean</Type> 
</Property>

 

Note: Do not use both properties above in conjunction as it is a either/or use-case.


Comments are closed.