【正文】
d closed caption files.POST ContentType: application/json。Audience=urn%3aWindowsAzureMediaServicesamp。odata=verboseAccept: application/json。ExpiresOn=1326498007amp。 path=/。scope=urn%3aWindowsAzureMediaServicesclient_id: AccountName,帳戶名。odata=verboseAcceptEncodingGzip,deflate對資源,服務(wù)可能不壓縮而直接返回AcceptLanguage“en”人類可讀的語言AcceptCharsetCharset type like UTF8字符集,默認(rèn)UTF8XHTTPMethodHTTP Method通過隧道方式,允許通過GET方法實現(xiàn)防火墻等不支持的PUT/DELETE方法 ContentTypeContent type PUT/POST 中實體的類型clientrequestidString呼叫方定義的標(biāo)記本次請求,如有必要,返回時也可以帶此信息媒體服務(wù)支持的響應(yīng)頭部(可選):HeaderTypeValuerequestidString服務(wù)端產(chǎn)生的的代表本次操作的標(biāo)識clientrequestidString請求方帶來的標(biāo)識DateRFC 1123 date請求處理時的時間ContentTypeVaries響應(yīng)實體的類型ContentEncodingVariesGzip or deflate Identify Windows Azure Media Services EntitiesMedia Services的命名機(jī)制nb:type:scheme:SSID例子:nb:cid:UUID:0234c75e7b624d819373d869478a6643type: is the type of content idenetifier。應(yīng)用實例 2012年7月19日,PPTV網(wǎng)絡(luò)電視和微軟在上海簽署諒解備忘錄,利用Windows Azure平臺開發(fā)PPTV ATN(Asia TV Networks)電視云平臺。例如:現(xiàn)場編碼內(nèi)容,然后將其上傳到媒體服務(wù)以便轉(zhuǎn)碼為多種格式并通過第三方CDN交付。媒體服務(wù)的應(yīng)用場景building endtoend workflows 構(gòu)建端到端的工作流在云中構(gòu)建全面的媒體工作流。開發(fā)者可以利用從 Azure開發(fā)者網(wǎng)站上下載的REST、APIs、.net、或SDKs構(gòu)建自動上傳、編碼、發(fā)送視頻的工作流。和許多基于云計算的平臺 即服務(wù)(PaaS)一樣,Windows Azure Media Services旨在于使過程簡單化,于是,推出了視頻流服務(wù)。涵蓋具有 HTMLFlash 和 Silverlight 的 Windows Windows phone、Xbox、iOS 和 Android 設(shè)備。 10Ingesting Assets in Bulk with the REST API 16Process Asset with the Media Services REST API 19Manage Assets with the Media Services REST API 22Deliver Assets with the Media Services REST API 24AWS Digital Media API 27什么是AWS 27AWS提供的功能: 27Digital Media on AWS 28應(yīng)用實例 31windows Azure什么是windows Azurewindows Azure是為了管理微軟建設(shè)的數(shù)據(jù)中心的服務(wù)器,網(wǎng)絡(luò)和存儲資源而開發(fā)的一款windows server 操作系統(tǒng)。windows Azure提供的功能網(wǎng)站,虛擬機(jī),云服務(wù),大型數(shù)據(jù),媒體,移動服務(wù)。微軟Azure云計算流式視頻服務(wù)平臺 企業(yè)不必通過編碼或流媒體構(gòu)建架構(gòu)來分配視頻內(nèi)容。微軟Windows Azure官方宣傳 Guthrie表示,構(gòu)建一個媒體的分布式平臺,為不同設(shè)備和客戶端設(shè)置不同代碼和視頻流是非常復(fù)雜的任務(wù),需要軟、硬件的連接,配置和維護(hù)。在網(wǎng)站上,開發(fā)者可以瀏覽幫助文檔。從上傳媒體到分發(fā)內(nèi)容,媒體服務(wù)提供了一系列預(yù)生成,使用就緒,第一方和第三方組件,可以組合這些組件以滿足您的特定需求??赏ㄟ^標(biāo)準(zhǔn)REST API 單獨調(diào)用媒體服務(wù)以便于外部應(yīng)用程序和服務(wù)輕松集成。 PPTV ATN平臺能將世界各地的內(nèi)容商將自己的內(nèi)容上傳到ATN平臺上,并授權(quán)給各國/地區(qū)的服務(wù)運(yùn)營商使用,同時服務(wù)運(yùn)營商不需要昂貴的初期投入資本,就可以迅速整合各類視頻資源,快速實現(xiàn)內(nèi)容定制,定價及廣告運(yùn)作和收費電視的推送。內(nèi)容標(biāo)識符的類型scheme: is a Media Services recognized naming scheme. 命名方案SSID:schemespecific ID , is a string that corresponds with IDs in scheme, default UUID, RFC 4122.type:EntityContent Identifier TypeAssetcidAccessPolicypidLocatorlidAssetFilecidContentKeykidJobTemplatejtidTaskTemplatettidJobjidTasktidMediaProcessormpidIngestManifestmidIngestManifestAssetmaidIngestManifestFilemfidConnect To Media Services Using the Media Services REST API連接到媒體服務(wù)的REST APIWindows Azure Access Control Service: ACS , create the access token.連接Media Services 需要兩樣?xùn)|西:An access token and the URI of Media Services .step1. Getting an access token獲得訪問令牌獲得令牌的HTTP請求POST ContentType: application/xformurlencodedHost: ContentLength: 120Expect: 100continueConnection: KeepAlivegrant_type=client_credentialsamp。client_secret:AccountKey,密碼。 HttpOnlyXAspNetMvcVersion: XAspNetVersion: XPoweredBy: XContentTypeOptions: nosniffDate: Fri, 13 Jan 2012 22:40:07 GMTContentLength: 580{access_token:%3a%2f%%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=client_idamp。Issuer=%3a%2f%2f %2famp。odata=verboseDataServiceVersion: MaxDataServiceVersion: xmsversion: Authorization: Bearer %3a%2f%%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=youraccountnameamp。ExpiresOn=1335602357amp。odata=verboseAccept: application/json。Audience=urn%3aWindowsAzureMediaServicesamp。odata=verbose。XAspNetVersion: XPoweredBy: Date: Fri, 27 Apr 2012 22:39:18 GMT{d:{__metadata:{id:(39。),type:,actions:{$metadata:[{title:Publish,target:(39。)/Locators}},ContentKeys:{__deferred:{uri:(39。)/Files}},ParentAssets:{__deferred:{uri:(39。odata=verboseAccept: application/json。Audience=urn%3aWindowsAzureMediaServicesamp。odata=verbose。XAspNetVersion: XPoweredBy: Date: Wed, 02 May 2012 00:59:30 GMT{d:{__metadata:{id:(39。),type:},Id:nb:pid:UUID:94763883537a41c0a0974e3f755bbeab,Created:\/Date(1335920371136)\/,LastModified:\/Date(1335920371136)\/,Name:NewUploadPolicy,DurationInMinutes:300,Permissions:2}}step2. Get The Upload URL 獲得上傳的URL為了獲取真實上傳URL,必須創(chuàng)建一個定位器。urn%3aSubscriptionId=2f84471db1ae4e75aa09010f0fc0cf5bamp。Issuer=%3a%2f%%2famp。nb%3Alid%3AUUID%3A8002bf3ca2154602b4a42aac367f709e39。),uri:(39。)/AccessPolicy}},Asset:{__deferred:{uri:(39。Delete the upload Locator to revoke write access to your Asset’s blobstorage container。odata=verboseAccept: application/json。Audience=urn%3aWindowsAzureMediaServicesamp。nb%3Acid%3AUUID%3Ac80d312d7cb144aabb232c35d10c44bd39。urn%3aSubscriptionId=2f84471db1ae4e75aa09010f0fc0cf5bamp。Issuer=%3a%2f%%2famp。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。HMACSHA256=GxdBb%2fmEyN7iHdNxbawawHRftLhPFFqxX1JZckuv3hY%3dHost: ContentLength: 36Expect: 100continue{ Name : ExampleManifestREST }2. Create the AssetsAssets: is a container for multiple types or sets of objects in Media Services, including video, audio,images, thumbnail collections, text tracks and closed caption files. 文件夾。%3a%2f%%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=%3a%2f%%2famp。HMACSHA256=GxdBb%2fmEyN7iHdNxbawawHRftLhPFFqxX1JZckuv3hY%3dHost: ContentLength: 55Expect: 100continue{ Name : ExampleManifestREST_Asset, Options : 1 }3. Create the IngestManifestAssetsPOST ContentType: application/json。Audience=urn%3aWindowsAzureMediaServicesamp。odata=verboseAccept: application/json。ExpiresOn=1334275521amp。odata=verboseDataServiceVersion: MaxDataServiceVersion: xmsversion: Authorization: Bearer %3a%2f%%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=070500D0F35C4A5A9249485BBF4EC70Bamp。Issuer=%3a%2f%%2famp。odata=verboseAcc