I forgot to mention that when using rtmp.dll from 8.8.21, the index of the saved .flv file will be off. This may cause playability issues with some .flv players.
You can
remux the file into a .mp4 file quickly without any transcoding, and the index will be correct.