I have been using this script for a little while. I have found it to work unless the site uses IP based server, in which case the "hosts" trick does not work.
github.com/svnpenn/dotfiles/blob/master/bin/rtmp-host.sh
Code:
#!/bin/sh
h=/c/Windows/System32/drivers/etc/hosts
p=plugin-container
say(){
echo -e "\e[1;31m$1\e[m"
}
# Kill plugin-container for a clean dump
ps -W | grep $p | cut -c-9 | xargs /bin/kill -f
# Get host
say 'Start video, then enter search string'; read
say 'Printing results'
# "pd.exe" does not capture all the memory
procdump -ma $p
strings $p* | grep "$REPLY"
# Edit hosts file
say 'Enter host 1'; read host_1
say 'Enter host 2'; read host_2
say 'Enter host 3'; read host_3
test $host_1 && echo "127.0.0.1 $host_1" >> $h
test $host_2 && echo "127.0.0.1 $host_2" >> $h
test $host_3 && echo "127.0.0.1 $host_3" >> $h
# Start monitoring
say 'Press enter to start RtmpSrv, then restart video.
After capture, press "q, enter" to quit.'; read
rtmpsrv | tee capture.sh
# Restore hosts file
echo > $h
# Run RtmpDump
dos2unix capture.sh
./capture.sh