 Re: Recording RTMP Webcams from cam4(HowTo record XXX/adult web-cam videos from cam4.
It's not really a secret and the majority of the people will have no idea how to do it. You won't be able to do it with a simple script or just rtmpdump, as far as I know.
Yes, you must first make a http request, which will give you an rtmp url. This rtmp url contains an IP address. Then you must connect to that IP address on port 1935 via sockets and implement the rtmp handshake (C0+C1, S0+S1+S2, C2 + 'Connect' request packet with broadcaster name and username).
The server will reply with "setStatus ok" and will also send you the connection id. Then send the 'requestVideoStream' packet with "sessions/<connectionId>" + "<broadcaster>/chat" + "users/0" to the server. These are all amf encoded messages. After you've done all these steps correctly, the server will send you the correct rtmp url.
It looks like xrtmp or yrtmp, but these are amf encoded messages, so the 2 bytes before 'rtmp' are the length of the rtmp url. When looking at the ascii table, 'x' = 0x78 and 'y' = 0x79. 0x00 0x78 converted to a two-byte integer value = 120. 0x00 0x79 converted to a two-byte integer value = 121.
So it's not a matter of simply doing a http request.
|