Hi,
I’m setting up an Edge server using Wowza Streaming Engine 4.0.3 and I need to setup the Origin URL to “wowz://192.168.1.142/live/${AppInstance.Name}/${Stream.Name}”
However, when I configure it this way, Wowza cannot “find” the origin. In the logs, I get the following error: “java.net.URISyntaxException: Illegal character in path at index…”.
If I type a regular URL pointing to a pre-set known AppInstanceName and StreamName (say, wowz://192.168.1.142/live/clientName/video), then it works just fine. In other words, the origin/edge setup is OK - the problem is only in the path itself.
Is there a way I can use “${AppInstance.Name}” and “${Stream.Name}” on the Origin URL? I was able to do that in Wowza 3.6, but for some reason I cannot make it work at Wowza Streaming Engine 4.0.3.
Thanks in advance,
Helder
I was able to solve the issue with the following steps. I’m not sure it’s the best way to do it, but it works. I’d really appreciate if someone could point me in the right direction for an easier approach of this problem.
Here is what I did:
1. Downloaded ModuleStreamNameAlias (https://www.wowza.com/docs/how-to-get-the-streamnamealias-addon)
2. Added the module ModuleStreamNameAlias on the repeater application. Here are the parameters on its Application.xml
ModuleStreamNameAlias
ModuleStreamNameAlias
com.wowza.wms.plugin.streamnamealias.ModuleStreamNameAlias
aliasMapFileStream
${com.wowza.wms.context.VHostConfigHome}/conf/aliasmap.stream.txt
aliasMapFilePlay
${com.wowza.wms.context.VHostConfigHome}/conf/aliasmap.play.txt
aliasMapPathDelimiter
/
aliasMapNameDelimiter
=
aliasMapDebug
true
Boolean
3. Created file aliasmap.stream.txt at the Conf folder with the desired Origin URL:
*=wowz://originserver/live/${AppInstance.Name}/${Stream.Name}
4. Created file aliasmap.play.txt at the CONF folder with the following content:
*=${Stream.Name}
IMPORTANT: By using this method, any changes to the Origin URL must be made on the aliasmap.stream.txt file itself. It doesn’t matter what’s configured as Origin URL at Wowza’s Streaming Engine Manager.
You’re absolutely right, matt_y!
I undid everything I had done with the ModuleStreamNameAlias: deleted the .txt files, undid the modifications on the Application.xml.
Then, I simply used wowz://192.168.1.142/live as the OriginURL, without using the “${AppInstance.Name}/${Stream.Name}” suffix. It worked perfectly.
That’s so much easier than my previous solution! Thanks so very much! Hope this helps other people out there! Thanks, man!
Helder
I don’t think you’d need the variables when using OriginURL as it should be implied. If you left it at wowz://192.168.1.142/live it should make the request from the origin server with the given app instance and stream name. There isn’t anything wrong with using StreamNameAlias but if you’d like to use OriginURL try just using the wowz address I’ve listed.
Helder,
Great, I’m glad you got it working!
Matt