Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Akamai CDN: Getting RTMP URL From XML FileAkamai CDN: Getting RTMP URL From XML File
Where I work, my company uses Akamai as the CDN for all properties. Initially our company used non-RTMP downloadable URL from Akamai, but, later after some struggling (in May 2008 or so) I was able to figure out how to extract RTMP from Akamai's XML File. Akamai Provides two URLs for each File:
#1 is self-explanatory, when you visit that URL, you get the RAW FLV File. so, I will talk on #2. #2. Streaming URL: When you try visiting the streaming URL. It returns an XML File like below: Code:
<FLVPlayerConfig> <serverName>cp49576.edgefcs.net</serverName> <fallbackServerName>cp49576.edgefcs.net</fallbackServerName> <appName>ondemand</appName> <streamName> flash/streamfile/.uid.ManyRzefr9384ec84.anti </streamName> <isLive>false</isLive> <bufferTime>2</bufferTime> </FLVPlayerConfig> Code:
rtmp://[serverName]/[appName]/[streamName] Code:
rtmp://cp49576.edgefcs.net/ondemand/flash/streamfile/.uid.ManyRzefr9384ec84.anti I usually use PHP DomDocument and DomXPath to get the RTMP URL. The code would be simple and straight-forward like below: Code:
$dom = new DomDocument($akamaiURL); $xpath = new DomXPath($dom); $rtmpURL = 'rtmp://'.$xpath->query('/FLVPlayerConfig/serverName')->item(0)->nodeValue .'/'. $xpath->query('/FLVPlayerConfig/appName')->item(0)->nodeValue . '/' . $xpath->query('/FLVPlayerConfig/streamName')->item(0)->nodeValue; Please Note that: In this article, I didn't cover the Akamai URL that requires Authentication Token, which is a separate issue. |
#2
|
|||
|
|||
Re: Akamai CDN: Getting RTMP URL From XML FileHello,
Could you please point me in some direction regarding the Akamai Authentication system? From my limited understanding, does the player make an http request with the token as a string id, and then receives the url for the RTMP? How does this URL differ from the XML method mentiones above? Thank you very much for your time. |
#3
|
|||
|
|||
Re: Akamai CDN: Getting RTMP URL From XML FileTHAAAAAAAAAANK YOU VERY MUCH!
I was obtaining the 2nd type url. I tried to change "flash" to "download", to obtain the 1st one, and with that simple trick, I'm able to directly download the videos. I had tried a lot of programs and tricks in order to download the videos, and a simple advice solves everything THANKS, THANKS, THANKS AND THANKS AGAIN. |
Tags: akamai, akamai cdn, cdn, edgeboss, edgeboss net, edgefcs, edgefcs net, file, get, get rtmp url, getting, rtmp, url, xml, xml file |
Thread Tools | |
Display Modes | |
|
|