Hi, in this tutorial we will see how we can easily get a RTMP link from a simple page and then you may use it stream live TV channels. I alert that i’ll not give examples of pages in this tutorial, if you understand this tutorial, you will be able to reproduce the steps correctly in any link that you may have in hands.
Very well, you’ll need the following:
- rtmpdump (it should include rtmpsuck)
- A page with a flash based object with the stream that you want to get the rtmp link
But before we start, do you know what is rtmp?
Real Time Messaging Protocol (RTMP) was initially a proprietary protocol developed by Macromedia for streaming audio, video and data over the Internet, between a Flash player and a server. |
Getting a rtmp link is fairly easy but you should be alerted that some times you may face some erros while trying to play a rtmp link, it generally means or your rtmp link is incomplete or wrong or then it is offline at the moment of test.
Let’s start then our hunt for rtmp links, I’ll use a Ubuntu 11.04 machine to do it, but it was confirmed to be working in Fedora 15.
1. Open the console of your distribution and type the following command as root:
Code:
On Ubuntu: sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner ! --uid-owner root -j REDIRECT
Code:
On Fedora (if you're not a sudoer): su -c 'iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner ! --uid-owner root -j REDIRECT'
This command is used to redirect RTMP traffic to a proxy server (since RTMP links use the port 1935) so we can use rtmpsuck next to get the links |
Code:
rtmpsuck
Code:
RTMP proxy server Streaming on rtmp://0.0.0.0:1935
3. Now it is time to visit a page with a stream using Flash (confirm rtmpsuck is running), once you are there wait a little to the video start reproduce, once it starts, go back to the console, you’ll now have some new lines, the last ones will be talking about the audio and video, go up a little so you can read the lines (<something> means what is written in your console, these fields change according to the streams):
Code:
app: <something> flashVer: <something> swfUrl: <something> tcUrl: <something> pageUrl: <something> Playpath: <something>
Let’s explain briefly what is each field of the above (there other fields that may show you talking about the video and audio, but we don’t need them for this):
app: This is the name of the application to connecto in order to run the RTMP, it is needed sometimes since sometimes the RTMP URL link parser can not find it by itself; |
5. Now we will write the final RTMP link that you need to stream it using Showtime, let’s use the following form (it is the form that I used for me), the fields that are between < > is one of the above fiels value:
Code:
<tcUrl>/<Playpath> swfUrl=<swfUrl> pageUrl=<pageUrl> swfVfy=true live=true tcUrl=<tcUrl>
Code:
app: live flashVer: LNX 10,0,32,18 swfUrl: http://example.com/player/player.swf tcUrl: rtmp://example.com/live pageUrl: http://otherexample.com/index.htm Playpath: file.flv
Code:
rtmp://example.com/live/file.flv swfUrl=http://example.com/player/player.swf pageUrl=http://otherexample.com/index.htm swfVfy=true live=true tcUrl=rtmp://example.com/live
When writing the RTMP link like this write it followed don’t change lines |
I hope you enjoyed my tutorial, it will be updated when problems or new solutions are found. Thanks for reading this. Now that you know how to get the RTMP links, you have the power to stream TV channels, use it in your responsability, the author of the tutorial does not take any responsability for the use that the user may give to it.
Post a Comment