Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to use rtmpdump with rtmpsrv in Linuxrtmpsrv allows you to get all parameters that are required by rtmpdump. You don't need packet sniffers or complex analysis to use rtmpdump when using rtmpsrv. The only problem you may have is when a video consists of several segments (chapters). In such cases just skip to the next chapter.
How to compile rtmpdump with rtmpsrv and rtmpsuck in Linux: Code:
svn checkout svn://svn.mplayerhq.hu/rtmpdump/trunk rtmpdump cd rtmpdump make linux Configure your firewall to redirect RTMP traffic through a local port: Code:
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT Code:
./rtmpsrv When you get the rtmpdump command, press CTRL+C. This will stop rtmpsrv. You may also delete the firewall redirect created above: Code:
sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT Note: If you don't need the latest version, you can install rtmpdump, rtmpsrv, rtmpsuck in Ubuntu by running the following in the terminal Code:
sudo apt-get install rtmpdump |
#3
|
|||
|
|||
Re: How to use rtmpdump with rtmpsrv in LinuxThanks for the instructions they worked - to a point at least.
I can get rtmpsrv to give me a command but when I try run it I get a failure due to a type 9 header. Any ideas if there is a workaround? |
#4
|
|||
|
|||
Re: How to use rtmpdump with rtmpsrv in LinuxQuote:
|
#5
|
|||
|
|||
Re: How to use rtmpdump with rtmpsrv in LinuxThis looks rather tasty and simple most of all! Time to get myself acquainted with Linux! Will start off with the Desktop edition of Ubuntu as suggested by Stream Recorder in this post.
|
#6
|
|||
|
|||
How to dump RTMP streams under LinuxEDIT: I assume that everyone who has the bandwith to download RTMP streams has the bandwidth to view full images, so I didn't link to thumbnails. : )
So, in this tutorial, I'll show you how to download RTMP streams under Linux. In this tutorial, I'll going to be dumping a song from Napster (specifically, this one: hxxp://music.napster.com/london-symphony-orchestra,-antal-dor%C3%A1ti-music/album/enesco%3A-roumanian-rhapsody-no.1-_-liszt%3A-hungarian-rhapsodies-nos.1-6/12181167). The first thing to do is to install RTMPdump and gdb. You can do this with the package manager for your distro: Code:
#Arch Linux: pacman -Sy rtmpdump gdb #Ubuntu and Debian apt-get install rtmpdump gdb #Fedora (with ATRpms repository: http://atrpms.net) yum install rtmpdump gdb #Mandriva and Mageia urpmi rtmpdump gdb We are going to be using rtmpsrv to generate the command needed to download the file. For rtmpsrv to work, you need to redirect all outgoing TCP connections to port 1935 on localhost. I suggest closing all unnecessary tabs and downloading programs. It will slow down rtmpsrv. Use iptables to redirect the connections. As root, run: Code:
iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT Code:
rtmpsrv Code:
ps aux | grep flash Code:
kill 0000 Code:
iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT Now, you can close rtmpsrv by pressing Control C and then copying and pasting that huge command starting with "rtmpdump -r ..." to download the stream. What if that command fails? Well, in this case we can dump the memory of the flash player process and search for the "rtmp" URI. Run: Code:
ps aux | grep flash Now attach to the process with gdb (a free debugger): A lot of "Loading symbols" messages will fly by, and then you'll see this: Now type in "gcore" to perform a core memory dump of the process. It will create a file called core.PID. Exit gdb by typing "quit." Type in "y" when it asks if you want to detach from the process. Now, open the core dump in a hex editor. I recommend using Okteta if you use KDE since it handle large files very well. The core dump will be at least 100MB. So, open the file in a hex editor: and search for the string (in Unicode or UTF-8) "rtmp://": Voila! There's the RTMP stream: Then, run the command generated by rtmpsrv again, but this time, replacing the generated stream URI with the one you found: Success! But since I can't post 11 images: http://i.imgur.com/M0acF.png EDIT: Of course this all means nothing without proof: http://i.imgur.com/pqP6z.png Hope this helps! Last edited by chenxiaolong : 09-20-2011 at 12:45 AM. Reason: didn't finish post |
#7
|
|||
|
|||
Re: How to dump RTMP streams under LinuxWorks with RTMPE too! No more using Windows for downloading RTMPE!!
Screenshot: |
#8
|
|||
|
|||
Re: How to dump RTMP streams under LinuxIt is better to compile rtmpdump, rtmpsrv, rtmpsuck from the git, because the versions from the distro lack many updates.
|
#9
|
|||
|
|||
Re: How to dump RTMP streams under LinuxRather tasty tutorial there. THANKS!
Can you let me know please what Linux that is that you are running?? What version or name and where to get it? It looks pretty slick! Also, can I ask you some questions about the tutorial once I got the same Linux as you? Thanks again! This whole iptables will probably be THE reason for me to not only test but actually start running on a Linux OS. |
#10
|
|||
|
|||
Re: How to use rtmpdump with rtmpsrv in LinuxYou're an ***.
If you're on Linux then follow the directions in the README file for using iptables with a proxy user. None of this gdb / coredump / hex edit crap is necessary. |
Tags: how to, how to use, howto, linux, rtmpdump, rtmpsrv, ubuntu |
Thread Tools | |
Display Modes | |
|
|