Arodicus
02-07-2008, 09:13 PM
I'm having trouble connecting to a RTMP video stream over the Akamai CDN, which works a little differently than normal RTMP connections, in that it piggybacks an XML file along with the RTMP stream. When using the FLVPlayback component, everything works fine, but my client requires the XML data as well, which necessitates a custom video playback utility (which they also provided).
But it doesn't work! the XML file provided by Akamai cannot be found, and the video never streams! It seems like a lot of people in Googledom are having the same problem, and a definitive explanation of how Akamai works would be most welcome. As I understand the process, Akamai takes an rtmp request, parses it, and converts it into an http request to grab an XML file:
_identXML.load("http://"+_hostName+"/fcs/ident");
which contains the "real" rtmp address to use, among other things. In the snippet above, "_hostName" is calculated (somehow) from the URL which is supplied in the code as "mediaPath" and "mediaFile". As I understand it from googling around, "mediaPath" is the PHYSICAL Akamai server url, while "mediafile" is the VIRTUAL PATH on that server, minus the "flv" extansion... not just the file itself. Some examples I've seen (none of which work) also include "@71" which I think means "71 seconds into the stream.
The url provided by our client is "rtmp://cp34544.edgefcs.net/ondemand/34545/nfl.com/prod/static/nfl8_demo/gb_dal_full_broadcast_600k.flv". I've tried breaking that url up in numerous ways to populate both mediaPath and mediaFile, but I keep getting the same error: It cannot find the XML file. For example:
mediaPath = "rtmp://cp34544.edgefcs.net/ondemand/34545/nfl.com"
mediaFile = "prod/static/nfl8_demo/gb_dal_full_broadcast_600k";
Error opening URL 'http://rtmp://cp34544.edgefcs.net/ondemand/34545/fcs/ident'
Error - number:5 description: No xml returned by Akamai IDENT
And the video never runs. My guess is that I'm missing some part of the equation; perhaps the client needs to create the XML file, or maybe I'm parsing the data incorrectly, or I'm outright missing a critical URL. Does this Akamai "fcs/ident'" thing really exist, is it a cgi function, or a file, or what?
If anyone can please explain Akamai's unusual protocol, it would be greatly appreciated!
But it doesn't work! the XML file provided by Akamai cannot be found, and the video never streams! It seems like a lot of people in Googledom are having the same problem, and a definitive explanation of how Akamai works would be most welcome. As I understand the process, Akamai takes an rtmp request, parses it, and converts it into an http request to grab an XML file:
_identXML.load("http://"+_hostName+"/fcs/ident");
which contains the "real" rtmp address to use, among other things. In the snippet above, "_hostName" is calculated (somehow) from the URL which is supplied in the code as "mediaPath" and "mediaFile". As I understand it from googling around, "mediaPath" is the PHYSICAL Akamai server url, while "mediafile" is the VIRTUAL PATH on that server, minus the "flv" extansion... not just the file itself. Some examples I've seen (none of which work) also include "@71" which I think means "71 seconds into the stream.
The url provided by our client is "rtmp://cp34544.edgefcs.net/ondemand/34545/nfl.com/prod/static/nfl8_demo/gb_dal_full_broadcast_600k.flv". I've tried breaking that url up in numerous ways to populate both mediaPath and mediaFile, but I keep getting the same error: It cannot find the XML file. For example:
mediaPath = "rtmp://cp34544.edgefcs.net/ondemand/34545/nfl.com"
mediaFile = "prod/static/nfl8_demo/gb_dal_full_broadcast_600k";
Error opening URL 'http://rtmp://cp34544.edgefcs.net/ondemand/34545/fcs/ident'
Error - number:5 description: No xml returned by Akamai IDENT
And the video never runs. My guess is that I'm missing some part of the equation; perhaps the client needs to create the XML file, or maybe I'm parsing the data incorrectly, or I'm outright missing a critical URL. Does this Akamai "fcs/ident'" thing really exist, is it a cgi function, or a file, or what?
If anyone can please explain Akamai's unusual protocol, it would be greatly appreciated!