

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# CDN 和 MediaTailor 整合的測試工具和公用程式參考
<a name="testing-tools-reference"></a>

AWS Elemental MediaTailor 內容交付網路 (CDN) 整合測試需要各種工具，才能進行全面的驗證和偵錯。內容交付網路和 MediaTailor 整合測試中常用的工具參考指南。

`curl` - HTTP 請求測試  
測試資訊清單請求： `curl -v "https://your-cdn-domain.com/v1/master/hls/config/master.m3u8"`  
使用標頭進行測試： `curl -H "User-Agent: TestAgent/1.0" "https://your-cdn-domain.com/..."`  
使用參數進行測試： `curl "https://your-cdn-domain.com/...?aws.sessionId=test123"`

`ffprobe` - HLS 資訊清單驗證  
驗證 HLS 語法： `ffprobe -v quiet -print_format json -show_format "https://your-cdn-domain.com/master.m3u8"`  
檢查區段資訊： `ffprobe -v quiet -show_entries packet=pts_time "segment.ts"`

`mp4box` - DASH 資訊清單驗證  
驗證 DASH MPD： `mp4box -info "https://your-cdn-domain.com/manifest.mpd"`  
檢查區段計時： `mp4box -info segment.m4s`

瀏覽器開發人員工具  
在網路索引標籤中監控網路請求  
在主控台索引標籤中檢查 CORS 錯誤  
檢查請求/回應標頭  
分析時間和效能指標

**其他資源：**
+ [故障診斷 CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Troubleshooting.html) - 全面 CDN 故障診斷指南
+ [提高 CloudFront 快取命中率](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cache-hit-ratio.html) - 效能最佳化指引
+ [監控 AWS 資源](https://docs.aws.amazon.com/wellarchitected/latest/performance-efficiency-pillar/monitor-aws-resources.html) - 效能監控最佳實務