Most probably it returns the same host and app parameter for all urls. if it is the case then use these two parameters statically and parse other parameters from html file. if server returns different url for other streams then parse the output of rtmpdump to get host and app parameter.
if you know programming it will be better to modify rtmpdump to handle redirects automatically.
