Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

How to use rtmpdump with rtmpsrv in Mac OS X

(http://stream-recorder.com/forum/showthread.php?t=7662)

any ANONYMOUS forum user 10-28-2010 01:29 AM

How to use rtmpdump with rtmpsrv in Mac OS X


 
rtmpsrv 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.

First of all you need compile rtmpdump, rtmpsrv for Mac. Or you can download a binary filed (which is compiled already).

How to use rtmpsrv in Mac OS X:
Configure your firewall to redirect RTMP traffic through a local port:
Code:

sudo ipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935
sudo ipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935 not uid RTMP

Note that you need to create the RTMP user before using redirecting traffic to it

Then just start rtmpsrv:
Code:

./rtmpsrv
rtmpsrv will be analyzing data from your local port. It will output an rtmpdump command that can be used to download videos.

When you get the rtmpdump command, press CTRL+C. This will stop rtmpsrv.

You may also delete the firewall redirect created above.

Since rtmpsrv produces rtmpdump command, the only thing you need to do is copy-paste it to download the video. Simple as it is :D

Skeeve 10-30-2010 03:53 PM

Re: How to use rtmpdump with rtmpsrv in Mac OS X


 
Okay... I tried that.

First question: What is the purpose of the "RTMP" user?

Second Question: Why do I get a "Bus error" as soon as the film starts?

jcj2002 12-25-2010 04:50 PM

Re: How to use rtmpdump with rtmpsrv in Mac OS X


 
Three questions:

- what signify creating a rtmp user?

- what is the syntaxis for deleting these two firewall rules?

- Are necesary all two rules or might work with only the second?

Thank you in advance

jcj2002 01-04-2011 06:56 PM

Re: How to use rtmpdump with rtmpsrv in Mac OS X


 
Quote:

Originally Posted by Skeeve (Post 22633)
Okay... I tried that.

First question: What is the purpose of the "RTMP" user?

Second Question: Why do I get a "Bus error" as soon as the film starts?

I also obtain a bus error with rtmpe (mac osx 10.6.5), but using other method for redirecting instead of changing firewall ipfw rules, by with terminal editing the hosts file as follows:

Terminal
$ sudo nano etc/hosts
change in window to:
#127.0.0.1 local host
127.0.0.1 <domain of your stream-server URL, e.g. sss.aaa.com, in my example rt.fms.visionip.tv>
Ctrl O + enter (save); Ctrl X (go out of editor)

Then run: $./rtmpsuck

After this editing, rtmpsuck (v. 2.3) works well when re-open the stream-video. I used a trick: in firefox one tab I left the video always running from before hosts file editing, in a second tab with same URL, I test with play and pause and rtmpsuck or rtmpsrv listening). In these conditions, rtmpsuck works well, but rtmprv give the bus error same of you.

I have tested as example with http://actualidad.rt.com/mas/envivo/...UkhfAodF0HskQ). RTMPSUCK gives all information you can need in rtmpdump

Quote:

e.g. rtmpdump -r "rtmp://rt.fms.visionip.tv/live/" -a "live/" -f "WIN 10,2,151,49" -W "http://actualidad.rt.com/swf/player.swf" -p "http://actualidad.rt.com/mas/envivo/?gclid=COfbgf7UkqYCPUkhfAodF0HskQ" -y "RT_Spanish_3" -o RT_Spanish_3.flv)
Note that after running rtmpsuck (or rtmpsrv), you must edit the hosts file to its original values (127.0.0.1 localhost without #) before running downloader rtmpdump.

Hope this help

jcj2002 01-04-2011 07:02 PM

Re: How to use rtmpdump with rtmpsrv in Mac OS X


 
Quote:

Originally Posted by Skeeve (Post 22633)
Okay... I tried that.

First question: What is the purpose of the "RTMP" user?

Second Question: Why do I get a "Bus error" as soon as the film starts?

I also obtain a bus error with rtmpsrv (mac osx 10.6.5), but using other method for redirecting instead of changing firewall ipfw rules, using terminal for editing the hosts file as follows:

Terminal
$ sudo nano /etc/hosts
change in window to:
#127.0.0.1 local host
127.0.0.1 <domain of your stream-server URL, e.g. sss.aaa.com, in my example rt.fms.visionip.tv>
Ctrl O + enter (save); Ctrl X (go out of editor)

Then run: $./rtmpsuck

After this editing, rtmpsuck (v. 2.3) works well when re-open the stream-video. I used a trick: in firefox one tab I left the video always running from before hosts file editing, in a second tab with same URL, I test with play and pause and rtmpsuck or rtmpsrv listening). In these conditions, rtmpsuck works well, but rtmprv give the bus error same of you.

I have tested as example with http://actualidad.rt.com/mas/envivo/...UkhfAodF0HskQ). RTMPSUCK gives all information you can need in rtmpdump

Quote:

e.g. rtmpdump -r "rtmp://rt.fms.visionip.tv/live/" -a "live/" -f "WIN 10,2,151,49" -W "http://actualidad.rt.com/swf/player.swf" -p "http://actualidad.rt.com/mas/envivo/?gclid=COfbgf7UkqYCPUkhfAodF0HskQ" -y "RT_Spanish_3" -o RT_Spanish_3.flv)
Note that after running rtmpsuck (or rtmpsrv), you must edit the hosts file to its original values (127.0.0.1 localhost without #) before running downloader rtmpdump.

Hope this help

jcj2002 01-05-2011 08:37 PM

Re: How to use rtmpdump with rtmpsrv in Mac OS X


 
Quote:

Originally Posted by any ANONYMOUS forum user (Post 22572)
rtmpsrv 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.

First of all you need compile rtmpdump, rtmpsrv for Mac. Or you can download a binary filed (which is compiled already).

How to use rtmpsrv in Mac OS X:
Configure your firewall to redirect RTMP traffic through a local port:
Code:

sudo ipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935
sudo ipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935 not uid RTMP

Note that you need to create the RTMP user before using redirecting traffic to it

Then just start rtmpsrv:
Code:

./rtmpsrv
rtmpsrv will be analyzing data from your local port. It will output an rtmpdump command that can be used to download videos.

When you get the rtmpdump command, press CTRL+C. This will stop rtmpsrv.

You may also delete the firewall redirect created above.

Since rtmpsrv produces rtmpdump command, the only thing you need to do is copy-paste it to download the video. Simple as it is :D

Three questions from your procedure:

1) Is it necessary only the second redirecting (sudo ipfw ... not uid RTMP") or are necessary both the two sudo´s of ipfw add´s?

2) From what of the two users (original-user OR RTMP-user) the command ./rtmpsrv is run?

3) From what of the two users the video (explorer, firefox, ....) is run?

I would appreciate very much the answers.

I have tryed with two terminal windows your procedure of rtmpsrv (one for each user) but the system hangs (Mac OSX 10.6.5). (Notes: ipfw configurations can be seen with: sudo /sbin/ipfw list; they are deleted with rebooting, or manually changing add by delete. Question: What signify the number 40 in this sudo?).

I have also tryed redirecting by editing /etc/host, as explained in my previous post in this thread, but only I get information from ./rtmpsuck (rtmpsrv gaves me a bus error).

Thanks in advance for answers.

Stream Recorder 01-06-2011 01:22 AM

Re: How to use rtmpdump with rtmpsrv in Mac OS X


 
Quote:

Originally Posted by jcj2002 (Post 24293)
2) From what of the two users (original-user OR RTMP-user) the command ./rtmpsrv is run?

3) From what of the two users the video (explorer, firefox, ....) is run?

In Linux rtmpsrv and rtmpsuck are run from the RTMP user. And web-browser is run from a regular user. Everything should be identical in Mac OS

jcj2002 01-07-2011 03:16 PM

Re: How to use rtmpdump with rtmpsrv in Mac OS X


 
Quote:

Originally Posted by Stream Recorder (Post 24299)
In Linux rtmpsrv and rtmpsuck are run from the RTMP user. And web-browser is run from a regular user. Everything should be identical in Mac OS

Thanks stream recorder for your info. I think linux and unix (mac osx - terminal) will not significantly differ for this task.

I am trying, but after sudo´s ipfw changes (and listening rtmpsrv from the second user), system hangs when reloading video from the main first user. I am working with two different terminal windows, in one the main user (ipfw configurations and browser), and a second window from the second user (listening rtmpsrv). What is wrong?.

I have also one doubt: the two sudo´s of ipfw´s are quite similar, the only difference is "... not uid second-user" at final. Are both necesary or only the second?

I would appreciate very much your answers. Perhaps explaining all the steps you make for succesful rtmpsrv listening in linux.

Many thanks in advance. Regards.

Stream Recorder 01-08-2011 07:00 AM

Re: How to use rtmpdump with rtmpsrv in Mac OS X


 
Quote:

Originally Posted by jcj2002 (Post 24340)
Perhaps explaining all the steps you make for succesful rtmpsrv listening in linux.

The following works just fine for me in Ubuntu 10.04 and 10.10:
How to use rtmpdump with rtmpsrv in Linux
How to use rtmpsuck in Ubuntu 10.04 Lucid Lynx

cyberscott 05-19-2011 09:07 AM

Getting rtmpsrv working on Mac OS X 10.6.7? Almost there.


 
Greetings,

What an excellent resource stream-recorder.com is! I've already learnt quite a large bit of info from here! Thanks to the administrators/moderators for helping spread the knowledge here!

After first following this thread:

http://stream-recorder.com/forum/use...s-x-t7662.html

and setting up a separate user (named RMTP as explained in the first post). Then configuring the OS X firewall with these ipfw commands:

Code:

sudo ipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935
sudo ipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935 not uid RTMP

Then logging into the RTMP account via:
Code:

sudo -u RTMP -s
and starting the rtmpsrv server:
Code:

./rtmpsrv
I see this:
Code:

RTMP Server v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935

I surf to the page with the video that I want to capture and watch the rtmpsrv output. Nothing happens but when I ctrl^c the server to stop it I see a bunch of lines like this:
Code:

ERROR: serverThread: accept failed
ERROR: serverThread: accept failed
ERROR: serverThread: accept failed
ERROR: serverThread: accept failed

Which inclines me to think I've misconfigured it.

Does any of this look familiar to anyone else who might have encountered this issue and solved it?

Thanks,

Scott


All times are GMT -6. The time now is 05:12 PM.