mcpogue
06-06-2010, 04:40 PM
Hello, I get the following error when attempting to start rtmpsuck:
ERROR: startStreaming, TCP bind failed for port number: 1935
ERROR: Failed to start RTMP server, exiting!
compiled from latest source 2.2e
created user rtmpsuck
redirected output with the following line:
iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner rtmpsuck -j REDIRECT
su to rtpmsuck
ran the server with -z option for debug output
got the error above
croques
06-07-2010, 01:52 AM
Ubuntu does not have a su account; as installed you can only sudo from your user account.
Create a su account to fix your problem. see http://stream-recorder.com/forum/install-rtmpsuck-linux-p17938.html#post17938
mcpogue
06-07-2010, 09:30 AM
I did as you said, same error...what am I doing wrong? even ran rtmpsuck with root privileges and did not work. Help?
walterk01
06-07-2010, 01:02 PM
This is how i go about using rtmpdump in ubuntu and it works for me in versions 9.04-10.04 of ubuntu.
Download the latest svn version.
Make sure you have all the dependencies
Compile (the latest svn version 2.2e now can be installed system wide)
Create a new user account so i can monitor the rtmp protocol
System->Administration->Users and Groups.
Create a new user/login account name it whatever you want.
Before getting the stream running within your browser setup your monitor rules and launch rtmpsrv.Open the terminal
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner user2 -j REDIRECT replace user2 with whatever name you have named the user account you created.
Next switch to that account within the terminal
sudo su user2
Next launch either rtmpsrv or rtmpsuck (if you use rtmpsuck make sure the folder you are going to save the file to is shared between your user accounts otherwise nothing will be downloaded/saved)
rtmpsrv
Now visit the site that has the stream or start playing the stream, rtmpsrv will generate the syntax needed to download using rtmpdump or if its rtmpsuck it will begin saving (ONLY if the folder you are currently in is shared) if you use rtmpsrv then you need to copy the syntax and return to your default user account
exit Dont close the terminal yet you need to cancel the monitoring rule as well as download using rtmpdump
sudo iptables -t nat -F
rtmpdump "syntax" -o Save.flv replace "syntax" with what you got from rtmpsrv and "-o Save.flv" is if you want to save the file under a different name and somewhere else, and thats it.
mcpogue
06-07-2010, 06:51 PM
Have now compiled this software on both fedora 13 and ubuntu 10.4 LTS using the command "make SYS=posix". I have OpenSSL 10.0.0a installed as well as zlib 1.2.5 all three compled without errors.
Have followed all instructions to the letter, I don't think the problem is the proxy itself.
According to the error, something is preventing the proxy from binding to it's port, ergo the proxy aborts and exits, what could cause this?
walterk01
06-07-2010, 07:34 PM
Cant see what the problem is myself.
Did you flush the previous monitoring rules?
With sudo iptables -t nat -F
Thats the only reason for that error i can see, try updating to the latest svn version of rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm)
Stream Recorder
06-07-2010, 11:22 PM
This is how i go about using rtmpdump in ubuntu and it works for me in versions 9.04-10.04 of ubuntu.
Download the latest svn version.
Make sure you have all the dependencies
Compile (the latest svn version 2.2e now can be installed system wide)
Create a new user account so i can monitor the rtmp protocol
System->Administration->Users and Groups.
Create a new user/login account name it whatever you want.
Before getting the stream running within your browser setup your monitor rules and launch rtmpsrv.Open the terminal
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner rtmp -j REDIRECT replace rtmp with whatever name you have named the user account you created.
Next switch to that account within the terminal
sudo su rtmp
Next launch either rtmpsrv or rtmpsuck (if you use rtmpsuck make sure the folder you are going to save the file to is shared between your user accounts otherwise nothing will be downloaded/saved)
./rtmpsrv
Now visit the site that has the stream or start playing the stream, rtmpsrv will generate the syntax needed to download using rtmpdump or if its rtmpsuck it will begin saving (ONLY if the folder you are currently in is shared) if you use rtmpsrv then you need to copy the syntax and return to your default user account
exit Dont close the terminal yet you need to cancel the monitoring rule as well as download using rtmpdump
sudo iptables -t nat -F
rtmpdump "syntax" -o Save.flv replace "syntax" with what you got from rtmpsrv and "-o Save.flv" is if you want to save the file under a different name and somewhere else, and thats it.
I downloaded rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) 2.2e and followed the instructions. When I launch rtmpsuck
./rtmpsuck
it starts without any problem.
But when I launch rtmpsrv
./rtmpsrv
I get the same error:
ERROR: startStreaming, TCP bind failed for port number: 1935
ERROR: Failed to start RTMP server, exiting!
Tried
sudo iptables -t nat -F
to no avail.
I use Ubuntu 10.04 Lucid Lynx.
This probably happens because you can't use both rtmpsrv and rtmpsuck, but may be I'm wrong.
I downloaded rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) 2.2e and followed the instructions. When I launch rtmpsuck
./rtmpsuck
it starts without any problem.
But when I launch rtmpsrv
./rtmpsrv
I get the same error:
ERROR: startStreaming, TCP bind failed for port number: 1935
ERROR: Failed to start RTMP server, exiting!
Tried
sudo iptables -t nat -F
to no avail.
I use Ubuntu 10.04 Lucid Lynx.
This probably happens because you can't use both rtmpsrv and rtmpsuck, but may be I'm wrong.
Only one program can listen on a TCP port at a time. If you started rtmpsuck then you have to stop it before you can run rtmpsrv.
Stream Recorder
06-08-2010, 03:09 AM
Only one program can listen on a TCP port at a time. If you started rtmpsuck then you have to stop it before you can run rtmpsrv.
thank you. how can I stop it? closing the terminal doesn't help.
walterk01
06-08-2010, 07:58 AM
To stop/kill any app via the terminal use "Ctrl+c" while the terminal window is open.
If its been closed it should stop but if not run system monitor (System->Administration->System Monitor or Alt+F2 then type "gnome-system-monitor" without the quotes) search for the process in the Processes tab and either Kill or End it, this is the linux version of windows Ctrl+Alt+Del
Theres also a cmd you can use from the terminal to end or kill processes that are already running but you need to know the exact process ID number and cant just kill it by app name "kill -9 process id" to get the exact id you can run from the terminal "ps aux" which will list every process currently running , and the user it belongs to. Its going to be a long list and the ID number will be next to the username.
Stream Recorder
06-08-2010, 08:47 AM
To stop/kill any app via the terminal use "Ctrl+c" while the terminal window is open.
If its been closed it should stop but if not run system monitor (System->Administration->System Monitor or Alt+F2 then type "gnome-system-monitor" without the quotes) search for the process in the Processes tab and either Kill or End it, this is the linux version of windows Ctrl+Alt+Del
Theres also a cmd you can use from the terminal to end or kill processes that are already running but you need to know the exact process ID number and cant just kill it by app name "kill -9 process id" to get the exact id you can run from the terminal "ps aux" which will list every process currently running , and the user it belongs to. Its going to be a long list and the ID number will be next to the username.
Thank you!
I've opened the system monitor and there are no rtmpsrv or rtmpsuck processes running.
Then I ran
sudo iptables -t nat -F
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner rtmp -j REDIRECT
sudo su rtmp
Then if I run
./rtmpsrv
or
./rtmpsuck
I get the same error:
ERROR: startStreaming, TCP bind failed for port number: 1935
ERROR: Failed to start RTMP server, exiting!
Any idea how to fix this without rebooting? What is the best way to close rtmpsrv / rtmpsuck? Is it CTRL+C?
walterk01
06-08-2010, 09:21 AM
yes even in your proxy user account ctrl+c should kill the process.
I still cant figure out why it wont bind though.
Even if you are running firewall gui frontends like firestarter or gufw it shouldnt be a problem something is using port 1935.
I cant remember the app or syntax you use to see what ports are being used by what apps at the moment
mcpogue
06-08-2010, 09:05 PM
the command you are looking for is:
netstat -nl
But I'm still having trouble getting rtmpsuck to bind myself too
if I run the above command, I see this:
tcp 0.0.0.0:1935 0.0.0.0
which simply means that the computer is listening for all incoming and outgoing tcp connections on port 1935, I wish that rtmpsuck and rtmpsrv had the option of giving an ip address to bind to, such as the loopback address or 192.168.1.100 as it stands now, it seems as if the server is trying to bind to ALL addresses on port 1935, that is bound to cause problems if it thinks that some other program is already listening on port 1935
mcpogue
06-08-2010, 09:30 PM
it is nice to see that stream recorder could duplicate my exact error so you fellas know I wasn't hallucinating and that I was being a good boy and following directions!
:p
mcpogue
06-10-2010, 01:16 AM
Finally got it to bind, however after redirecting with iptables and switching to special user, i run
./rtmpsuck
and i see
streaming on rtmp://0.0.0.0:1935
go to firefox and play the stream and...
nothing, just sits there...no output
any ideas?
walterk01
06-10-2010, 07:10 AM
Did you switch to the proxy account before using rtmpsuck?
Did you remember to make the directory it is saving to shared across both user accounts, yours and the proxy?
Are you sure its a rtmp/rtmpe stream?
It could be regular http flv/f4v stream and in that case the firefox addon DownloadHelper would be all thats needed.
If it is rtmp check the syntax used for the rule monitoring, remember to include "\!" without the quotes.
If you did all that and no stream try other rtmp sites see if theres no downloading what happens when you invoke rtmpsrv?
Does anything display?
mcpogue
06-10-2010, 09:46 AM
Did you remember to make the directory it is saving to shared across both user accounts, yours and the proxy?
How do I create a shared directory?
walterk01
06-10-2010, 04:58 PM
In your original account (not the proxy) in nautilus (the file browser for ubuntu) right click on the directory you would like to save files in or create it and then right click and select "Sharing Options"
Next make sure to check "Share this Folder" and "Allow others to create and delete files in this folder" then click "Create Share" and then ubuntu will take it from there either your folder will become shared or you will be notified via pop up that ubuntu needs to download and install some extra packages and after it has then the folder will be shared across all user accounts and now proxy via rtmpsuck will be able to save files to that folder.
I recommend after compiling rtmpdump you install it system wide with sudo make install because this way you dont have to be in the rtmpdump folder or point to it when you switch accounts to the proxy one, simply typing "rtmpsuck" when in the proxy account will work.
mcpogue
06-11-2010, 07:50 PM
any idea how to do that on Fedora? I switched from Ubuntu because the GUI keeps freezing up on me with a pink screen, no login or panels visible, and rebooting does not fix the problem. Anyway, I'm reaching a point of frustration now where I am almost ready to give rtmpsuck and rtmpsrv the office, because I have tried on two different distros to get them to work to no avail. rtmpdump is a great program but without one of the other two, it becomes very difficult to determine the hidden stream url without using a debbuger to pour over a memory dump of firefox.
At first I could not get either program to bind at all, causing the error at the top of this thread, now after finally getting rtmpsuck to bind, it just sits there grinning at me with "streaming on 0.0.0.0:1935" and no further output. And YES I did redirect the output with the owner match with iptables and no I did not forget the escaped negation operator /! in the line. When you mentioned creating a "shared folder" I assumed you meant a shared directory in linux where members of a certain group could read and write files to a common directory, and that is what I did. I had no idea you meant create a network share, which I have no idea how to do because this machine is not a member of a workgroup or domain, and I am not really sure that I should because of security risks to my pc. But if that is what is required to get these programs running then someone please help. By the way, the site I am trying to stream is hulu, but I have navigated to other sites to try fetching their urls, but with the same result..........nothing
walterk01
06-12-2010, 01:56 AM
You dont need to set up a workgroup etc since its not going to be samba but the proxy account will not be able to save anything on your main account unless theres a shared directory.
I guess what could be done is switch to or create a directory on the proxy account and have rtmpsuck download to that and you wouldnt have to worry about permissions and shared folders but of course you'd have to still move whatever files you saved to your main account anyway.
As for doing it on Fedora, like ubuntu Fedora's default gui is gnome so it should be exactly the same or similar.
Did you try running rtmpsrv?
If the syntax for downloading was generated, then it definitely is the lack of a shared directory, when i first tried rtmpsuck i was stumped as to why it wouldnt save anything while rtmpsrv was generating the syntax.
Lack of a shared directory was the problem.
I decided to stick with rtmpsrv, just use that to generate the syntax to download and after exiting the proxy ,canceling the monitoring rule invoke rtmpdump, rtmpsuck is really only supposed to be used as a last resort when rtmpdump fails at least according to the old 2.1 documentation maybe its changed, i havent read up on it.
Edit:
Heres what i discovered for 2.2e on my system.
rtmpsrv now generates the syntax and automatically begins downloading the file, if its invoked in shared folder/partition so rtmpsuck should not be necessary.
mcpogue
06-12-2010, 03:49 PM
I guess what I mean, to be clear is that I get no syntax, just streaming on 0.0.0.0:1935 and nothing else
walterk01
06-12-2010, 07:22 PM
you say its hulu?
What stream exactly?
mcpogue
06-14-2010, 12:01 AM
trying to dl he-man cartoons for my boys
I think it's their stream, meaning they aren't pulling it from another site.
walterk01
06-14-2010, 08:22 AM
Well something is definitely up, i suggest creating a shared folder.
I just visited hulu and downloaded Ep 01 Season 01 of he-man.
My syntax via rtmpsrv
user2@homeserver:/home/schenere/Public/flashstreams$ rtmpsrv
RTMP Server v2.2e
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL
Streaming on rtmp://0.0.0.0:1935
rtmpdump -r "rtmpe://cp47346.edgefcs.net:1935/ondemand?sessionid=937A5DF382AF15A43D7096C7DC2E12A B&auth=daEdfaoctaDcMcmcAdRb8btaic2brc_ahd2-bmfJOx-c0-1nJDACw0Izo&aifp=sll02152008&slist=content/53469/826/12466826/;hulufms3/47311/826/12466826/;.international=false" -a "ondemand?sessionid=937A5DF382AF15A43D7096C7DC2E12A B&auth=daEdfaoctaDcMcmcAdRb8btaic2brc_ahd2-bmfJOx-c0-1nJDACw0Izo&aifp=sll02152008&slist=content/53469/826/12466826/;hulufms3/47311/826/12466826/;.international=false" -f "LNX 10,1,53,64" -W "http://www.hulu.com/site-player/playback.swf?cb=3.0.0.61017" -p "http://www.hulu.com/watch/48639/he-man-and-the-masters-of-the-universe-diamond-ray-of-disappearance" -C Z: -y "mp4:hulufms3/47311/826/12466826/HuluTranscode_Backlog_51600_4762_H_264_650K_4x3_24 __Rc+Dfxc4O0aStz4Vj2rf9g.flv" -o HuluTranscode_Backlog_51600_4762_H_264_650K_4x3_24 __Rc+Dfxc4O0aStz4Vj2rf9g.flv
Closing connection... done!
RTMPDump v2.2e
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 8
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: duration 1301.87
INFO: moovPosition 36.00
INFO: width 480.00
INFO: height 360.00
INFO: videocodecid avc1
INFO: audiocodecid mp4a
INFO: avcprofile 100.00
INFO: avclevel 51.00
INFO: aacaot 2.00
INFO: videoframerate 23.98
INFO: audiosamplerate 48000.00
INFO: audiochannels 2.00
INFO: trackinfo:
INFO: length 31243212.00
INFO: timescale 24000.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype avc1
INFO: length 62489600.00
INFO: timescale 48000.00
INFO: language eng
INFO: sampledescription:
INFO: sampletype mp4a
My directory flashstreams is shared so switching to user2 within there and running rtmpsrv (which is installed system wide) does what you see above
mcpogue
06-21-2010, 01:00 PM
Works like a charm now!
2 issues caused the problem:
1) I failed to end the process with Ctrl-C before starting a new process, which caused a failure to bind.
2) The lack of a shared folder causes rtmpsrv/rtmpsuck to sit idle with the following message:
Streaming on 0.0.0.0:1935
I hope this thread helps someone, has certainly been an adventure for me...lol
walterk01
06-21-2010, 01:51 PM
Glad it finally worked out for you
mcpogue
06-22-2010, 11:37 PM
Indeed, but setting up a shared folder in Fedora is a royal pain compared to Ubuntu, guess it reflects the differences in design philosopies between the two distros.
vBulletin® , Copyright ©2000-2025, Jelsoft Enterprises Ltd.