Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Recording TV LifestreamHey everyone,
I am new to this recording Stuff, but I spent quite some time working and learning Linux Stuff (wich is now my main OS). I recently found a site where I can watch eurosport (or eurosport 2) online: http://cricfree.sx/euro-sports-2-live-stream So, there is an iframe where the actual stream is embedded, wich is always nice (less code -> less errors): http://cricfree.sx/update/euro2.php First approach was with wireshark but that didn't work out at all (can go into detail, but that might get pretty much text and boring). So I read the rtmpdump-docs and some posts here in the forum and tried this next: # Stream is not started, no other tabs open in chrome # Code:
$ sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT $ rtmpsrv Code:
RTMP 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! rtmpdump -r "rtmp://31.220.2.148/redirect/" -a "redirect/" -f "LNX 17,0,0,188" -W "http://p.jwpcdn.com/6/12/jwplayer.flash.swf" -p "http://yotv.co/embedo.php?live=eu2&vw=620&vh=490" -y "eu2" -o eu2.flv Closing connection... done! RTMPDump v2.4 (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL Connecting ... INFO: Connected... Duplicate request, skipping. Closing connection... done! Caught signal: 13, cleaning up, just a second... ERROR: WriteN, RTMP send error 32 (42 bytes) ERROR: RTMP_ReadPacket, failed to read RTMP packet header So I removed the iptables rule: Code:
$ sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT tried the command that rtmpsrv gave me (plus the -V switch because it didn't work last time): Code:
$ rtmpdump -r "rtmp://31.220.2.148/redirect/" -a "redirect/" -f "LNX 17,0,0,188" -W "http://p.jwpcdn.com/6/12/jwplayer.flash.swf" -p "http://yotv.co/embedo.php?live=eu2&vw=620&vh=490" -y "eu2" -o eu2.flv -V RTMPDump v2.4 (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL DEBUG: Protocol : RTMP DEBUG: Hostname : 31.220.2.148 DEBUG: Port : 1935 DEBUG: Playpath : eu2 DEBUG: tcUrl : rtmp://31.220.2.148:1935/redirect/ DEBUG: swfUrl : http://p.jwpcdn.com/6/12/jwplayer.flash.swf DEBUG: pageUrl : http://yotv.co/embedo.php?live=eu2&vw=620&vh=490 DEBUG: app : redirect/ DEBUG: flashVer : LNX 17,0,0,188 DEBUG: live : no DEBUG: timeout : 30 sec DEBUG: SWFSHA256: DEBUG: b3 59 92 56 0e ae 15 22 60 d0 ff 65 76 ec d3 98 DEBUG: 58 4f 3a f2 46 ad bd a7 c6 8a a4 41 6e 9b cf 7d DEBUG: SWFSize : 404302 DEBUG: Setting buffer time to: 36000000ms Connecting ... DEBUG: RTMP_Connect1, ... connected, handshaking DEBUG: HandShake: Client type: 03 DEBUG: HandShake: Client digest offset: 430 DEBUG: HandShake: Initial client digest: DEBUG: a6 73 ae 53 1f c6 6f 8f 22 78 fa 50 bd cc d0 47 DEBUG: 67 69 8d b1 d0 2c cb 6c aa 9c fa 1b d1 82 71 13 DEBUG: HandShake: Type Answer : 03 DEBUG: HandShake: Server Uptime : 96850052 DEBUG: HandShake: FMS Version : 3.0.1.1 DEBUG: HandShake: Calculated digest key from secure key and server digest: DEBUG: 9e ed a0 e9 fc b3 3f d8 7e 08 1f 41 80 75 a1 bb DEBUG: a5 5c ec c1 5f 4c 3d f0 27 7f 69 ae b0 f9 45 47 DEBUG: HandShake: Client signature calculated: DEBUG: 80 bb f6 1c d1 ae 47 08 bd 0c d2 61 e3 28 bb 51 DEBUG: b0 e6 43 fd 0e 1e 21 93 27 80 78 65 ed 8e 53 86 DEBUG: HandShake: Server sent signature: DEBUG: bb 7e c8 53 9b ba 77 7e 84 4c f8 f5 40 b3 a0 e1 DEBUG: c0 89 15 ca 13 97 d7 4d 65 18 c0 e1 72 6c 97 50 DEBUG: HandShake: Digest key: DEBUG: 49 67 83 c1 cc 78 4f b1 71 03 b9 d4 00 51 aa ae DEBUG: a0 05 56 a5 d7 54 a5 12 1b fb 0e 9a a6 35 bf 18 DEBUG: HandShake: Signature calculated: DEBUG: bb 7e c8 53 9b ba 77 7e 84 4c f8 f5 40 b3 a0 e1 DEBUG: c0 89 15 ca 13 97 d7 4d 65 18 c0 e1 72 6c 97 50 DEBUG: HandShake: Genuine Adobe Flash Media Server DEBUG: HandShake: Handshaking finished.... DEBUG: RTMP_Connect1, handshaked DEBUG: Invoking connect INFO: Connected... DEBUG: HandleServerBW: server BW = 2500000 DEBUG: HandleClientBW: client BW = 2500000 2 DEBUG: HandleCtrl, received ctrl. type: 0, len: 6 DEBUG: HandleCtrl, Stream Begin 0 DEBUG: HandleChangeChunkSize, received: chunk size change to 4096 DEBUG: RTMP_ClientPacket, received: invoke 315 bytes DEBUG: (object begin) DEBUG: Property: NULL DEBUG: (object begin) DEBUG: Property: <Name: level, STRING: error> DEBUG: Property: <Name: code, STRING: NetConnection.Connect.Rejected> DEBUG: Property: <Name: description, STRING: Connection failed: Application rejected connection.> DEBUG: Property: <Name: ex, OBJECT> DEBUG: (object begin) DEBUG: Property: <Name: redirect, STRING: rtmp://185.63.255.18:80/live> DEBUG: Property: <Name: code, NUMBER: 302.00> DEBUG: (object end) DEBUG: Property: <Name: clientid, NUMBER: 1131397378.00> DEBUG: Property: <Name: secureToken, STRING: 17f1764c24537b99899ee23d86372705deb7eefd85e91feb8a29f6a072f4c43a3b84d26d> DEBUG: (object end) DEBUG: (object end) DEBUG: HandleInvoke, server invoking <_error> ERROR: rtmp server sent error DEBUG: RTMP_ClientPacket, received: invoke 18 bytes DEBUG: (object begin) DEBUG: Property: NULL DEBUG: (object end) DEBUG: HandleInvoke, server invoking <close> ERROR: rtmp server requested close DEBUG: Closing connection. So, I tried rtmpsrv, rtmpdump, time for rtmpsuck i guess ... Created a user called "proxy" as suggested in the rtmpdump docs, and changed the iptable rule to Code:
$ iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner proxy -j REDIRECT $ su proxy $ rtmpsuck Code:
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: redirect/ flashVer: LNX 17,0,0,188 swfUrl: http://p.jwpcdn.com/6/12/jwplayer.flash.swf tcUrl: rtmp://31.220.2.148/redirect/ pageUrl: http://yotv.co/embedo.php?live=eu2&vw=620&vh=490 ERROR: WriteN, RTMP send error 9 (16 bytes) ERROR: RTMP_ReadPacket, failed to read RTMP packet header Closing connection... done! Code:
$ iptables -t nat -D OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner proxy -j REDIRECT If you need any more information, let me know. And Thanks in advance! |
#2
|
|||
|
|||
Re: Recording TV Lifestreamhi
first need token Code:
rtmpdump -r "rtmp://31.220.2.148/redirect/" -a "redirect/" -f "LNX 19,0,0,207" -W "http://p.jwpcdn.com/6/12/jwplayer.flash.swf" -p "http://yotv.co/embedo.php?live=eu2&vw=620&vh=490" -y "eu2" -o "2016-01-16_05-40-59_eu2.flv" -T "%Zrey(nKa@#Z" second if it doesn't work with the version installed by the official repository you need compile the last patched KSV's version read first post Code:
http://stream-recorder.com/forum/customized-rtmpdump-binaries-patch-file-t16103.html |
#3
|
|||
|
|||
Re: Recording TV LifestreamOkay, first of all: Thanks for your reply!
Where did you get that Token from? I thought the Token was this: Code:
DEBUG: Property: <Name: secureToken, STRING: 17f1764c24537b99899ee23d86372705deb7eefd85e91feb8a29f6a072f4c43a3b84d26d> Code:
$ rtmpdump -r "rtmp://31.220.2.148/redirect/" -a "redirect/" -f "LNX 17,0,0,188" -W "http://p.jwpcdn.com/6/12/jwplayer.flash.swf" -p "http://yotv.co/embedo.php?live=eu2&vw=620&vh=490" -y "eu2" -o "2016-01-16_11-12-10_eu2.flv" -T "%Zrey(nKa@#Z" -V RTMPDump v2.4 (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL DEBUG: Protocol : RTMP DEBUG: Hostname : 31.220.2.148 DEBUG: Port : 1935 DEBUG: Playpath : eu2 DEBUG: tcUrl : rtmp://31.220.2.148:1935/redirect/ DEBUG: swfUrl : http://p.jwpcdn.com/6/12/jwplayer.flash.swf DEBUG: pageUrl : http://yotv.co/embedo.php?live=eu2&vw=620&vh=490 DEBUG: app : redirect/ DEBUG: flashVer : LNX 17,0,0,188 DEBUG: live : no DEBUG: timeout : 30 sec DEBUG: SWFSHA256: DEBUG: b3 59 92 56 0e ae 15 22 60 d0 ff 65 76 ec d3 98 DEBUG: 58 4f 3a f2 46 ad bd a7 c6 8a a4 41 6e 9b cf 7d DEBUG: SWFSize : 404302 DEBUG: Setting buffer time to: 36000000ms Connecting ... ERROR: RTMP_Connect0, failed to connect socket. 111 (Connection refused) DEBUG: Closing connection. |
#4
|
|||
|
|||
Re: Recording TV Lifestreamfind the token is the last step
before if you have the error Code:
ERROR: RTMP_Connect0, failed to connect socket. 111 (Connection refused) i think you forgot the step Code:
iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT i think you need compile your own version with KSV patch because the rtmpdump from the official repository of your distribution is too old Last edited by biezom : 01-16-2016 at 04:59 PM. |
#5
|
|||
|
|||
Re: Recording TV LifestreamOh yes, I actually did!
Thanks, worked now!The first frames I actually captured Could you teach me how to get that Token? I'd really want to learn that. Want to try some more stream-captures, maybe from other sites, and I guess that would be pretty handy. Thanks in advance! btw: that stream sometimes switches from "rtmp://31.220.2.148/redirect/" to "rtmp://31.220.2.148/live/" and I think it also switches IPs sometimes, ist that a problem? edit: I did, like I said |
#6
|
|||
|
|||
Re: Recording TV LifestreamQuote:
did you use a version compiled? your old version of rtmpdump does not support the redirect in blue is different because i add this option when i compiled with version compiled Code:
rtmpdump -r "rtmp://31.220.2.148/redirect/" -a "redirect/" -f "LNX 19,0,0,207" -W "http://p.jwpcdn.com/6/12/jwplayer.flash.swf" -p "http://yotv.co/embedo.php?live=eu2&vw=620&vh=490" -y "eu2" -o "2016-01-16_05-40-59_eu2.flv" -T "%Zrey(nKa@#Z" RTMPDump v2.4 KSV 11-12-15 (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL Connecting ... INFO: Connected... INFO: rtmp server sent redirect INFO: trying to connect with redirected url Starting download at: 0.000 kB INFO: Metadata: INFO: duration 0.00 INFO: width 640.00 INFO: height 360.00 INFO: videodatarate 390.62 INFO: framerate 29.97 INFO: videocodecid 7.00 INFO: audiodatarate 125.00 INFO: audiosamplerate 44100.00 INFO: audiosamplesize 16.00 INFO: stereo TRUE INFO: audiocodecid 10.00 INFO: encoder Lavf54.63.104 INFO: filesize 0.00 636.846 kB / 18.41 sec Edit "did you use a version compiled?" sorry you have already said yes twice Last edited by biezom : 01-16-2016 at 05:43 PM. |
#7
|
|||
|
|||
Re: Recording TV LifestreamQuote:
for this site you can download the source of the pageUrl with livestreamer Code:
livestreamer --http-header "Referer=http://cricfree.sx" "httpstream://http://yotv.co/embedo.php?live=eu2&vw=620&vh=490" best -o eu2.txt Code:
<body oncontextmenu="return false" style="margin: 0px; padding: 0px; background: #3c3c3c" > <div class="player_div" align="center"> <span> <div id="myElement">Loading the player...</div> <script type="text/javascript"> var playerInstance = jwplayer("myElement"); playerInstance.setup({ file: "rtmp://31.220.2.148/redirect/eu2", aboutlink: "http://yotv.co", abouttext: "Yotv", skin: "glow", width: "620", height: "490", autostart: "true", repeat: "true", rtmp: { securetoken: "%Zrey(nKa@#Z" } }); |
Tags: cricfree, rtmp, rtmpdump, rtmpsrv, rtmpsuck |
Thread Tools | |
Display Modes | |
|
|