PDA

View Full Version : Rtmpdump fails half the way through


naskoboy
03-31-2014, 06:52 AM
Hi friends,

I spent few days trying to capture this stream and I am exhausted.
Pls take a look and let me know if you have any idea what is going on.
Original link of the stream is http://tv.bnt.bg/bnt1/16x9/
however it's restricted only on territory of Bulgaria which I managed to overcome via a socks proxy.

RTMPDUMP debug session is attached as a file.
RTMPSUCK output generated from within Bulgaria is enclosed below.

Help appreciated.


root:# iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root -j REDIRECT
root:# iptables -t nat -A OUTPUT -p tcp --dport 2020 -m owner \! --uid-owner root -j REDIRECT --to-ports 1935
root:# rtmpsuck

root:# rtmpsuck
RTMP Proxy Server v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935
WARNING: Trying different position for client digest!
Processing connect
app: fls
flashVer: LNX 11,2,202,346
swfUrl: http://cdn.bg/eflash/jwplayer510/player.swf
tcUrl: rtmp://lb.cdn.bg:2020/fls
pageUrl: http://cdn.bg
ERROR: WriteN, RTMP send error 9 (16 bytes)
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
Closing connection... done!

WARNING: Trying different position for client digest!
Processing connect
app: fls
flashVer: LNX 11,2,202,346
swfUrl: http://cdn.bg/eflash/jwplayer510/player.swf
tcUrl: rtmp://edge4.cdn.bg:2020/fls
pageUrl: http://cdn.bg
Playpath: bnt.stream?at=ccec759dde0db13acc7862d8b761f0ce
Saving as: bnt.stream
INFO: Metadata:
INFO: duration 0.00
INFO: width 720.00
INFO: height 576.00
INFO: videodatarate 500.00
INFO: framerate 25.00
INFO: videocodecid 7.00
INFO: audiodatarate 125.00
INFO: audiosamplerate 48000.00
INFO: audiosamplesize 16.00
INFO: stereo TRUE
INFO: audiocodecid 10.00
INFO: encoder Lavf54.59.106
INFO: filesize 0.00
WARNING: ignoring too small audio packet: size: 0
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
Closing connection... done!

hasomaso
03-31-2014, 10:38 AM
post original link from stream or video

naskoboy
03-31-2014, 05:06 PM
Hi hasomaso,

Thank you for your quick reply.
Original link is http://tv.bnt.bg/bnt1/16x9/
however server is restricting access only from within Bulgaria - that's why I use socks proxy.
Do you have access to proxy in BG ?
rtmpsuck output is enclosed above.

One detail which I hope shouldn't matter is that "rtmpsuck" was generated in within BG under Ubuntu whereas "rtmpdump" was executed outside BG on Win7 via proxy.

Thanks !

hasomaso
04-01-2014, 04:38 AM
i have test the streams with BG proxy and i could start all 3 streams without problems under rtmpdump

stream "bnt1" and "bnt2" use secureToken -T "B@1R1st1077"



and here all 3 streams with fullcode from rtmpdump

BNT1:

rtmpdump -v -r "rtmp://edge3.cdn.bg:2020/fls/bnt.stream?at=b397b371faf1b2347ebb6954893264f8" -a "fls" -W "http://cdn.bg/eflash/jwplayer510/player.swf" -p "http://cdn.bg/live/4eViE8vGzI" -y "bnt.stream?at=b397b371faf1b2347ebb6954893264f8" -T "B@1R1st1077" -o "bnt1.flv"

BNT2:

rtmpdump -v -r "rtmp://edge3.cdn.bg:2020/fls/bnt2.stream?at=b397b371faf1b2347ebb6954893264f8" -a "fls" -W "http://cdn.bg/eflash/jwplayer510/player.swf" -p "http://cdn.bg/live/ZBPbdxDHm7" -y "bnt2.stream?at=b397b371faf1b2347ebb6954893264f8" -T "B@1R1st1077" -o "bnt2.flv"


BNTWORLD:

rtmpdump -v -r "rtmp://193.43.26.22/live/livestream1" -a "live" -W "http://showww.bnt.bg/sat/myVideo.swf" -p "http://showww.bnt.bg/sat/" -y "livestream1" -o "bntworld.flv"


and here a few screenshots


http://img5.fotos-hochladen.net/uploads/cmdxdve608bj1.png (http://www.fotos-hochladen.net)

http://img5.fotos-hochladen.net/uploads/bnt16s89jedhz5.png (http://www.fotos-hochladen.net)

http://img5.fotos-hochladen.net/uploads/bnt2x40ysn1kbz.png (http://www.fotos-hochladen.net)

http://img5.fotos-hochladen.net/uploads/bntworldcsfjuigy14.png (http://www.fotos-hochladen.net)

naskoboy
04-01-2014, 06:08 PM
Hasomaso,
This totally works !!! Thanks a lot !!!
Still puzzled though how did you figure these out ? These parameters don't quite match "rtmpsuck" output I got. There is some magic going on...
Where rtmpUrl(edge3), stream-name and secureToken came from ?
Do you think I have incorrectly used rtmpsuck since I had to redirect non-standard port 2020 ?
Did you use only rtmpsuck or had to spy on TCP packets with Wireshark or something ?
If you could point me to any links/manuals would be appreciated.
At any rate, THANK YOU !