View Single Post
  #29  
Old 02-25-2016, 02:23 PM
j_cool j_cool is offline
Senior Member
 
Join Date: Feb 2016
Posts: 515
j_cool is on a distinguished road
Default

Re: What is rtmpsuck and rtmpsrv? When to use rtmpsuck and when rtmpsrv/rtmpdump?


This thread is 5 years old with 27 posts only.

The most senior member on this forum, HYC, has given his contribution as well.
He gave something to the world in his own way.

I will give something to the world in my way by writing within this forum's thread about rtmpsuck,
rtmpsrv and rtmpdump in a less technical language.

I use rtmpdump on a DAILY basis to download rtmp streams.

To use rtmpdump you must be comfortable with the use of command line in windows ( cmd ) or in unix ( bash ).

Rtmpdump makes request to a server to download a stream, and server requests from rtmpdump to provide some data
( parameters ) before allowing download to happen.

Rtmpsuck and rtmpsrv are programs that provide me with those parameters that server wants.
It is beyond me how rtmpsrv and rtmpsuck work, they give me parameters that I use with rtmpdump on command line to make server happy, and I download the stream.

It is easy to use rtmpdump.
You type on command line rtmpdump with parameters, press enter, and off you go.

It is not so with rtmpsuck and rtmpsrv.
They have to be set up in OS to run how they are supposed to run and give you parameters.

I read it here and there about how to set up rtmpsrv in windows and failed every time.
Ideal setup would be running rtmpsrv on ubuntu, it would give you all parameters for rtmp download at any time.
I use windows today for one reason, I use today what I know better today.

There is program called rtmpdumphelper and it sets up rtmpsuk or rtmpsrv for you.

Here is output from rtmpdumphelper's rtmpsuk and rtmpsrv from a website:



RTMPSUCK output from cmd window:
________________________________

RTMP Proxy Server v2.4 GIT-2015-12-14 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935
WARNING: Trying different position for client digest!
Processing connect
app : cams/sophialocke
flashVer : WIN 20,0,0,306
swfUrl : http://lvs.streamray.com/images/cams...wer_3_2_21.swf
tcUrl : rtmp://208.88.181.237/cams/sophialocke
pageUrl : http://rude.com/main/live_private/view/SophiaLocke/
live : no
Playpath : sophialocke
Saving as : 2016-02-25_12-22-02_sophialocke.flv
WARNING: ignoring too small audio packet: size: 0


RTMPSRV output from cmd window:
_______________________________

RTMP Server v2.4 GIT-2015-12-14 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935
WARNING: Trying different position for client digest!

rtmpdump -r "rtmp://208.88.181.237/cams/sophialocke"
-a "cams/sophialocke"
-f "WIN 20,0,0,306"
-W "http://lvs.streamray.com/images/cams/flash/CamsViewer_3_2_21.swf"
-p "http://rude.com/main/live_private/view/SophiaLocke/"
-C O:1
-C NB:isBounty:0
-C NB:showChatGroupMessage:0
-C NB:isTarget:0
-C NS:encodedUser:ZnJlZWxvYWRlcg==?=
-C NBartyChatAvailable:1
-C NN:chatType:1.000000
-C NB:inGroupshow:0
-C NS:encodedPass:Z3VpZC5leHBpcmVkLjE0NTAxNDEwMjEyNzI =?=
-C NB:isMobile:0
-C NS:realIp:
-C NS:streamName:SophiaLocke
-C NB:inMultiPrivate:0
-C NS:vsite:rude
-C NN:swfVersion:3.000000
-C NB:inTippingPrivate:0
-C NS:noSpam:undefined
-C NB:isInVoyMode:0
-C O:0
-y "sophialocke"
-o "2016-02-25_12-24-17_sophialocke.flv"

Closing connection... done!

RTMPDump v2.4 GIT-2015-12-14 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
WARNING: Trying different position for client digest!
Duplicate request, skipping.
Closing connection... done!

Starting download at: 0.000 kB
1146.252 kB / 12.20 sec



COMMAND.TXT
____________________
This is file saved by rtmpdumphelper showing parameters like rtmpsrv does, Thank you, Nir Sofer.



Here I observe 2 things:

Rtmpsuck returns fewer parameters than rtmpsrv. Rtmpsuck parameters are with librtmp switches
with CONN switches never present, many times crucial to server without which connection will be rejected.


Rtmpsrv returns full list of parameters with rtmpdump switches.

There is program urlhelper which will return some or rtmp parameters,
and wireshark which will return everything if you are good at it.
RTMPDUMP package gives us rtmpsrv, so I stop here writing about other programs.



Now about :


***************************

RTMPDUMP

***************************

Here is the result of download of pre-recorded documentary film from AlJazeera, rtmp stream:

Intel i7-6700K, 20 mega bit wired broadband:


VLC - 47 min

FFMPEG - 47 min

RTMPDUMP - 3 min 20 sec ( KSV ? )


URL:

http://www.aljazeera.com/programmes/...231487582.html


RTMP parameters from URL Helper 3.42:

rtmp://ajenglishfs.fplive.net:1935/ajenglish?videoId=2275599890001&lineUpId=&pubId=66 5003303001&playerId=1422553060001&affiliateId=
<playpath>mp4:665003303001/665003303001_2276117462001_WEB-SSS-EP1-1124-04.mp4?videoId=2275599890001&lineUpId=&pubId=66500 3303001&playerId=1422553060001&affiliateId=
<swfUrl>http://admin.brightcove.com/viewer/u...=1456430479335
<pageUrl>http://www.aljazeera.com/programmes/...231487582.html




vlc rtmp://ajenglishfs.fplive.net:1935/ajenglish/mp4:665003303001/665003303001_2276117462001_WEB-SSS-EP1-1124-04.mp4 --sout="#duplicate{dst=std{access=file,mux=flv,dst=' c:\7 sisters - EPISODE 1.flv'},dst=nodisplay}"


ffmpeg -i "rtmp://ajenglishfs.fplive.net/ajenglish app=ajenglish playpath=mp4:665003303001/665003303001_2276117462001_WEB-SSS-EP1-1124-04.mp4" -c copy "c:\7 sisters - EPISODE 1.flv"


rtmpdump -r "rtmp://ajenglishfs.fplive.net" -a "ajenglish" -y "mp4:665003303001/665003303001_2276117462001_WEB-SSS-EP1-1124-04.mp4" -o "c:\7 sisters EPISODE 1.flv"



Enjoy the documentary.

Last edited by j_cool : 02-25-2016 at 04:37 PM. Reason: filename may confuse reader, keep it synchronous
Reply With Quote