Audio/video stream recording forums

Free Tutorials: How to Capture Streaming Video/Audio Step by Step
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 > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 06-22-2009, 03:09 AM
any ANONYMOUS forum user any ANONYMOUS forum user is offline
any user of the forum who preferred to post anonymously
 
Join Date: Jan 2009
Posts: 147
any ANONYMOUS forum user is on a distinguished road
Default

Akamai CDN: Getting RTMP URL From XML File


Akamai 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. Downloadable FLV URL
    Returns the actual FLV File. The URL Format of this file is:
    Code:
    http://[your_company_name].edgeboss.net/download/[your_company_name]/[path_to_file]/
  2. Streaming URL
    Returns an XML File. The URL Format of this file is:
    Code:
    http://[your_company_name].edgeboss.net/flash/[your_company_name]/[path_to_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>
To get the RTMP URL, all you need to do is concat the node value of serverName, appName and streamName. That's it. So, basically:
Code:
rtmp://[serverName]/[appName]/[streamName]
So, for the above case, the rtmp URL would be:
Code:
rtmp://cp49576.edgefcs.net/ondemand/flash/streamfile/.uid.ManyRzefr9384ec84.anti
Now the above RTMP URL can be used on popular Flash Players like JWPlayer.

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;
I hope it helps.

Please Note that: In this article, I didn't cover the Akamai URL that requires Authentication Token, which is a separate issue.
Reply With Quote
  #2  
Old 08-08-2009, 02:29 PM
markitoxs markitoxs is offline
Junior Member
 
Join Date: Aug 2009
Posts: 1
markitoxs is on a distinguished road
Default

Re: Akamai CDN: Getting RTMP URL From XML File


Hello,

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.
Reply With Quote
  #3  
Old 10-22-2009, 12:07 PM
hetchel hetchel is offline
Junior Member
 
Join Date: Oct 2009
Posts: 1
hetchel is on a distinguished road
Thumbs up

Re: Akamai CDN: Getting RTMP URL From XML File


THAAAAAAAAAANK 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.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
rtmpdump.com - freeware RTMP stream downloader (MacOS X, Linux, Windows) Stream Recorder rtmpdump 22 11-17-2009 08:08 AM
rtmp vs http web radio url ntrm Streaming servers 1 10-23-2009 01:29 AM
How to record rtmp:// flash video .flv stream from embedded Adobe Flash Player Stream Recorder Video stream recording 26 07-07-2009 07:29 AM
Unable to save RTMP stream in proper format!Does the file already exist in the storag any ANONYMOUS forum user Video stream recording 1 06-23-2009 11:49 PM
Real Time Messaging Protocol (RTMP) for broadcasting FLV, MP4 video and MP3 audio Stream Recorder Streaming servers 0 05-04-2009 07:58 PM


All times are GMT -6. The time now is 09:25 PM.


Powered by All-streaming-media.com; 2006-2009