The utility rtmpdump comes with a helper app called rtmpsrv that can intercept RTMP requests and save them to disk. Here’s how:
# set up iptables redirect
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT
# start the server
rtmpsrv
# stop redirect
sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT
# run the rtmpdump
rtmpdump -r "rtmp://tmphost.com:1935/cfx/st" -a "cfx/st" -f "LNX 11,2,202,411" -W "http://player.org/assets/swf/player.swf?programid=340179" -p "http://www.player.org" -y "mp4:trimmed/program/id/id/program.id.MP4-D20.mp4" -o program.340179.MP4-D20.flv
# use ffmpeg to cut video to part you want
ffmpeg -i 20140715085918001_hd.flv -ss 00:46:44 -to 00:48:53 -strict -2 output.mp4