I dont know why this works, but it does. Happy hunting.
Code:
#!/bin/sh
host_file='C:\Windows\System32\drivers\etc\hosts'
echo '127.0.0.1 media.hocmai.vn' > $host_file
# Start monitoring
cat <<EOF
Press enter to start RtmpSrv, then start video.
After capture, press "q, enter" to quit.
EOF
read
rtmpsrv > capture.sh
# Restore hosts file
echo > $host_file
# Run RtmpDump
dos2unix capture.sh
./capture.sh