Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 07-16-2010, 02:07 PM
npadgett npadgett is offline
Junior Member
 
Join Date: Jul 2010
Posts: 2
npadgett is on a distinguished road
Default

Streaming to CDN


I am trying to use rtmplib via ffmpeg to stream my video to my CDN.

My CDN requires me to perform a handshake to retrieve a nonce. I am able to successfully request the nonce which is returned via AMF. However, because my CDN responds with a 403 response code, librtmp returns and error code of -1 and doesn't allow me to read the AMF response.

Is there a way for me to read the AMF response that was returned by my CDN via ffmpeg or librtmp?

The only solution I can think of would involve sending a rtmpt request outside of librtmp and scrape the response.

Thanks,
Nick
Reply With Quote
  #2  
Old 07-16-2010, 02:24 PM
npadgett npadgett is offline
Junior Member
 
Join Date: Jul 2010
Posts: 2
npadgett is on a distinguished road
Default

Re: Streaming to CDN


Below is the debug output of my request. I wish to retrieve the value for nonce. Which, in this case is 77ae1c63de6afd025208a6e2f13e4e48.

Parsing...
Parsed protocol: 0
Parsed host : ********************
Parsed app : ******
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer : 03
HandShake: Server Uptime : 1181242740
HandShake: FMS Version : 3.5.2.1
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=380, size=211
0000: 03 00 00 00 00 00 d3 14 00 00 00 00 ............
0000: 02 00 07 63 6f 6e 6e 65 63 74 00 3f f0 00 00 00 ...connect.?....
0010: 00 00 00 03 00 03 61 70 70 02 00 06 ** ** ** ** ......app...****
0020: ** ** 00 05 74 63 55 72 6c 02 00 41 72 74 6d 70 **..tcUrl..Artmp
0030: 3a 2f 2f ** ** ** ** ** ** ** ** ** ** ** ** ** ://*************
0040: ** ** ** ** ** ** ** 2f ** ** ** ** ** ** 2f 68 *******/******/h
0050: 61 70 70 79 3f 61 75 74 68 6d 6f 64 3d ** ** ** appy?authmod=***
0060: ** 26 75 73 65 72 3d ** ** ** ** ** ** 00 04 66 *&user=******..f
0070: 70 61 64 01 00 00 0c 63 61 70 61 62 69 6c 69 74 pad....capabilit
0000: c3 .
0000: 69 65 73 00 40 2e 00 00 00 00 00 00 00 0b 61 75 ies.@.........au
0010: 64 69 6f 43 6f 64 65 63 73 00 40 a8 ee 00 00 00 dioCodecs.@.....
0020: 00 00 00 0b 76 69 64 65 6f 43 6f 64 65 63 73 00 ....videoCodecs.
0030: 40 6f 80 00 00 00 00 00 00 0d 76 69 64 65 6f 46 @o........videoF
0040: 75 6e 63 74 69 6f 6e 00 3f f0 00 00 00 00 00 00 unction.?.......
0050: 00 00 09 ...
Invoking connect
RTMP_ReadPacket: fd=380
0000: 03 00 00 00 00 00 ce 14 00 00 00 00 ............
0000: 02 00 06 5f 65 72 72 6f 72 00 3f f0 00 00 00 00 ..._error.?.....
0010: 00 00 05 03 00 05 6c 65 76 65 6c 02 00 05 65 72 ......level...er
0020: 72 6f 72 00 04 63 6f 64 65 02 00 1e 4e 65 74 43 ror..code...NetC
0030: 6f 6e 6e 65 63 74 69 6f 6e 2e 43 6f 6e 6e 65 63 onnection.Connec
0040: 74 2e 52 65 6a 65 63 74 65 64 00 0b 64 65 73 63 t.Rejected..desc
0050: 72 69 70 74 69 6f 6e 02 00 71 5b 20 41 63 63 65 ription..q[ Acce
0060: 73 73 4d 61 6e 61 67 65 72 2e 52 65 6a 65 63 74 ssManager.Reject
0070: 20 5d 20 3a 20 5b 20 61 75 74 68 6d 6f 64 3d ** ] : [ authmod=*
RTMP_ReadPacket: fd=380
0000: c3 .
0000: ** ** ** 20 5d 20 3a 20 3f 72 65 61 73 6f 6e 3d *** ] : ?reason=
0010: 6e 65 65 64 61 75 74 68 26 75 73 65 72 3d ** ** needauth&user=**
0020: ** ** ** ** 26 6e 6f 6e 63 65 3d 37 37 61 65 31 ****&nonce=77ae1
0030: 63 36 33 64 65 36 61 66 64 30 32 35 32 30 38 61 c63de6afd025208a
0040: 36 65 32 66 31 33 65 34 65 34 38 00 00 09 6e2f13e4e48...
RTMP_ClientPacket, received: invoke 206 bytes
(object begin)
Property: <Name: no-name., STRING: _error>
Property: <Name: no-name., NUMBER: 1.00>
Property: NULL
Property: <Name: no-name., OBJECT>
(object begin)
Property: <Name: level, STRING: error>
Property: <Name: code, STRING: NetConnection.Connect.Rejected>
Property: <Name: description, STRING: [ AccessManager.Reject ] : [ aut
hmod=**** ] : ?reason=needauth&user=******&nonce=77ae1c63de6afd0 25208a6e2f13e4e4
8>
(object end)
(object end)
HandleInvoke, server invoking <_error>
rtmp server sent error
RTMP_ReadPacket: fd=380
0000: 03 00 00 00 00 00 12 14 00 00 00 00 ............
0000: 02 00 05 63 6c 6f 73 65 00 00 00 00 00 00 00 00 ...close........
0010: 00 05 ..
RTMP_ClientPacket, received: invoke 18 bytes
(object begin)
Property: <Name: no-name., STRING: close>
Property: <Name: no-name., NUMBER: 0.00>
Property: NULL
(object end)
HandleInvoke, server invoking <close>
rtmp server requested close
Reply With Quote
Reply Post New Thread
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 02:17 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons