alibabacloud-liverecord-diagnosis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Alibaba Cloud Live Recording Diagnostic Skill

阿里云直播录制诊断Skill

Scenario Description

场景说明

This skill provides comprehensive diagnostic capabilities for Alibaba Cloud ApsaraVideo Live recording issues. It helps identify and troubleshoot problems related to:
  • Live stream not being recorded
  • Recording files not generated
  • Recording files not meeting expectations (missing audio/video, wrong format, etc.)
  • Recording callbacks not received or incorrect
  • Other live recording-related issues
Architecture: ApsaraVideo Live + OSS/VOD + Recording Configuration + Callback Configuration
本Skill为阿里云ApsaraVideo Live录制问题提供全面诊断能力,可帮助识别并排查以下相关问题:
  • 直播流未被录制
  • 录制文件未生成
  • 录制文件不符合预期(缺失音视频、格式错误等)
  • 未收到录制回调或回调内容错误
  • 其他直播录制相关问题
架构:ApsaraVideo Live + OSS/VOD + 录制配置 + 回调配置

Diagnostic Scope

诊断范围

Within Scope:
  1. Live stream not being recorded
  2. Recording files not generated or incomplete
  3. Recording files missing audio or video tracks
  4. Recording callback issues (not received, incorrect data)
  5. Recording configuration validation
  6. Stream quality issues affecting recording
Out of Scope:
  • Issues unrelated to live recording (use Alibaba Cloud official AI assistant)
  • Writing/modifying user configurations (user must modify via console or CLI themselves)

包含范围
  1. 直播流未被录制
  2. 录制文件未生成或不完整
  3. 录制文件缺失音轨或视频轨
  4. 录制回调问题(未收到、数据错误)
  5. 录制配置验证
  6. 影响录制的流质量问题
排除范围
  • 与直播录制无关的问题(请使用阿里云官方AI助手)
  • 编写/修改用户配置(用户需自行通过控制台或CLI修改)

Installation

安装

Pre-check: Aliyun CLI >= 3.3.3 required
Run
aliyun version
to verify >= 3.3.3. If not installed or version too low, see references/cli-installation-guide.md for detailed installation instructions.
Pre-check: Aliyun CLI plugin update required
[MUST] run
aliyun configure set --auto-plugin-install true
to enable automatic plugin installation. [MUST] run
aliyun plugin update
to ensure that any existing plugins are always up-to-date.
Install Live Plugin:
bash
aliyun plugin install --names live

前置检查:需Aliyun CLI >= 3.3.3
运行
aliyun version
验证版本是否 >= 3.3.3。若未安装或版本过低,请查看 references/cli-installation-guide.md 获取详细安装说明。
前置检查:需更新Aliyun CLI插件
[必须] 运行
aliyun configure set --auto-plugin-install true
启用自动插件安装。 [必须] 运行
aliyun plugin update
确保现有插件始终保持最新版本。
安装Live插件:
bash
aliyun plugin install --names live

Authentication

身份验证

Pre-check: Alibaba Cloud Credentials Required
Security Rules:
  • NEVER read, echo, or print AK/SK values (e.g.,
    echo $ALIBABA_CLOUD_ACCESS_KEY_ID
    is FORBIDDEN)
  • NEVER ask the user to input AK/SK directly in the conversation or command line
  • NEVER use
    aliyun configure set
    with literal credential values
  • ONLY use
    aliyun configure list
    to check credential status
bash
aliyun configure list
Check the output for a valid profile (AK, STS, or OAuth identity).
If no valid profile exists, STOP here.
  1. Obtain credentials from Alibaba Cloud Console
  2. Configure credentials outside of this session (via
    aliyun configure
    in terminal or environment variables in shell profile)
  3. Return and re-run after
    aliyun configure list
    shows a valid profile

前置检查:需阿里云凭证
安全规则:
  • 严禁读取、回显或打印AK/SK值(例如
    echo $ALIBABA_CLOUD_ACCESS_KEY_ID
    是禁止操作)
  • 严禁要求用户在对话或命令行中直接输入AK/SK
  • 严禁使用字面凭证值执行
    aliyun configure set
  • 仅允许使用
    aliyun configure list
    检查凭证状态
bash
aliyun configure list
检查输出是否包含有效配置文件(AK、STS或OAuth身份)。
若无有效配置文件,请在此处停止操作。
  1. 阿里云控制台 获取凭证
  2. 在本次会话外配置凭证(通过终端执行
    aliyun configure
    或在Shell配置文件中设置环境变量)
  3. aliyun configure list
    显示有效配置文件后,返回并重新执行

RAM Policy

RAM权限策略

The following RAM permissions are required for this diagnostic skill. See references/ram-policies.md for the complete policy document.
Required Actions:
  • live:DescribeLiveDomainMapping
    - Query domain mappings
  • live:DescribeLiveStreamRecordContent
    - Query recording content
  • live:DescribeLiveStreamRecordIndexFiles
    - Query recording index files
  • live:DescribeLiveRecordConfig
    - Query recording configuration
  • live:DescribeLiveRecordVodConfigs
    - Query VOD recording configuration
  • live:DescribeLiveRecordNotifyConfig
    - Query callback configuration
  • live:DescribeLiveStreamsOnlineList
    - Query online streams
  • live:DescribeLiveStreamsPublishList
    - Query stream publish history
  • live:DescribeLiveCenterStreamRateData
    - Query stream rate data
  • live:DescribeLiveRecordNotifyRecords
    - Query callback records
[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:
  1. Read
    references/ram-policies.md
    to get the full list of permissions required by this SKILL
  2. Use
    ram-permission-diagnose
    skill to guide the user through requesting the necessary permissions
  3. Pause and wait until the user confirms that the required permissions have been granted

使用本诊断Skill需要以下RAM权限。完整策略文档请查看 references/ram-policies.md
所需操作权限:
  • live:DescribeLiveDomainMapping
    - 查询域名映射
  • live:DescribeLiveStreamRecordContent
    - 查询录制内容
  • live:DescribeLiveStreamRecordIndexFiles
    - 查询录制索引文件
  • live:DescribeLiveRecordConfig
    - 查询录制配置
  • live:DescribeLiveRecordVodConfigs
    - 查询VOD录制配置
  • live:DescribeLiveRecordNotifyConfig
    - 查询回调配置
  • live:DescribeLiveStreamsOnlineList
    - 查询在线流
  • live:DescribeLiveStreamsPublishList
    - 查询流推流历史
  • live:DescribeLiveCenterStreamRateData
    - 查询流码率数据
  • live:DescribeLiveRecordNotifyRecords
    - 查询回调记录
[必须] 权限失败处理: 若执行过程中任何命令或API调用因权限错误失败,请遵循以下流程:
  1. 查看
    references/ram-policies.md
    获取本Skill所需的完整权限列表
  2. 使用
    ram-permission-diagnose
    Skill引导用户申请必要权限
  3. 暂停操作,等待用户确认所需权限已授予

Parameter Confirmation

参数确认

IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., domain names, stream names, application names, time ranges, region IDs, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval. Note that Alibaba Cloud Live API or CLI may UTC timezone. Convert the time from user local zone when calling API/CLI.
Required Parameters:
Parameter NameRequired/OptionalDescriptionDefault Value
live-stream-url
RequiredThe live stream URL to diagnose (used to extract DomainName, AppName, StreamName)N/A
issue-description
RequiredDescription of the recording issueN/A
time-range
OptionalTime range for diagnosis (format: YYYY-MM-DD HH:mm:ss, user local zone)Past 1 day (expand to 7 days if no data)
biz-region-id
OptionalBusiness region IDDefault region from CLI config

重要提示:参数确认 — 在执行任何命令或API调用前,所有用户可自定义参数(如域名、流名称、应用名称、时间范围、地域ID等)必须与用户确认。不得在未获得用户明确许可的情况下假设或使用默认值。注意阿里云Live API或CLI可能使用UTC时区,调用API/CLI时需将用户本地时区时间转换为UTC时间。
必填参数:
参数名称必填/可选描述默认值
live-stream-url
必填待诊断的直播流URL(用于提取DomainName、AppName、StreamName)
issue-description
必填录制问题描述
time-range
可选诊断时间范围(格式:YYYY-MM-DD HH:mm:ss,用户本地时区)过去1天(若无数据则扩展至7天)
biz-region-id
可选业务地域IDCLI配置中的默认地域

Core Workflow

核心工作流程

At the start of the Core Workflow (before any CLI invocation): [MUST] Enable AI-Mode — AI-mode is required for Agent Skill execution. Run the following commands before any CLI invocation:
bash
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-liverecord-diagnosis"
在核心工作流程开始时(执行任何CLI调用前): [必须] 启用AI模式 — 执行Agent Skill需要AI模式。 在执行任何CLI调用前运行以下命令:
bash
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-liverecord-diagnosis"

Step 1: Identify User Intent and Validate Information Completeness

步骤1:识别用户意图并验证信息完整性

1.1 Validate Diagnostic Scope
Check if the issue is within the diagnostic scope:
  • Live stream not recorded
  • Recording files not generated
  • Recording files not meeting expectations
  • Callback issues
  • Other recording-related problems
If out of scope, politely inform the user to contact Alibaba Cloud support or use the official AI assistant.
1.2 Extract Required Information
From the live stream URL (e.g.,
rtmp://example.com/live/stream123
), extract:
  • DomainName: The main playback domain (e.g.,
    example.com
    )
  • AppName: The application name (e.g.,
    live
    )
  • StreamName: The stream name (e.g.,
    stream123
    )
1.3 Determine Time Range
  • If user provides time range, use it. Default year is current year if not specified
  • If not provided, default to past 1 day
  • If no data found in 1 day, expand to 7 days
1.4 Confirm Parameters with User
Present extracted parameters to user for confirmation:
Diagnostic Parameters:
- Domain: play.example.com
- Application: live
- Stream: stream123
- Time Range: 2026-01-20T00:00:00Z to 2026-01-21T00:00:00Z

Please confirm these parameters are correct before proceeding.

1.1 验证诊断范围
检查问题是否在诊断范围内:
  • 直播流未录制
  • 录制文件未生成
  • 录制文件不符合预期
  • 回调问题
  • 其他录制相关问题
若超出范围,请礼貌告知用户联系阿里云支持或使用官方AI助手。
1.2 提取所需信息
从直播流URL(例如
rtmp://example.com/live/stream123
)中提取:
  • DomainName:主播放域名(例如
    example.com
  • AppName:应用名称(例如
    live
  • StreamName:流名称(例如
    stream123
1.3 确定时间范围
  • 若用户提供时间范围,则使用该范围;若未指定年份,则默认使用当前年份
  • 若未提供时间范围,默认使用过去1天
  • 若1天内无数据,则扩展至7天
1.4 与用户确认参数
将提取的参数呈现给用户确认:
诊断参数:
- 域名:play.example.com
- 应用:live
- 流:stream123
- 时间范围:2026-01-20T00:00:00Z 至 2026-01-21T00:00:00Z

请确认这些参数正确后再继续。

Step 2: Query Domain Mapping and Recording Results

步骤2:查询域名映射和录制结果

MUST execute steps in this section to verify user's issues.
2.1 Query Domain Mapping
First, query the domain mapping to get the main playback domain:
bash
aliyun live describe-live-domain-mapping \
  --domain-name <DomainName>
See Expected Output for response format. Extract the main playback domain (Type: vhost) for subsequent queries.
2.2 Query Recording Content
MUST execute this step regardless of previous step results. Query recording content for the specified time range.
bash
aliyun live describe-live-stream-record-content \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime>
See Expected Output for response format.
2.3 Query Recording Index Files (OSS)
If recording to OSS, query index files:
bash
aliyun live describe-live-stream-record-index-files \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime>
See Expected Output for response format.
2.4 Verify User's Issue
Compare the query results with the user's reported issue:
  • If recordings exist but user says no recordings → Issue may be with access or playback
  • If no recordings found → Proceed to Step 3 to check configuration
  • If recordings exist but incomplete → Check stream quality in Step 5

必须执行本节步骤以验证用户问题。
2.1 查询域名映射
首先,查询域名映射以获取主播放域名:
bash
aliyun live describe-live-domain-mapping \
  --domain-name <DomainName>
响应格式请查看 预期输出。提取主播放域名(类型:vhost)用于后续查询。
2.2 查询录制内容
无论上一步结果如何,必须执行此步骤。查询指定时间范围内的录制内容。
bash
aliyun live describe-live-stream-record-content \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime>
响应格式请查看 预期输出
2.3 查询录制索引文件(OSS)
若录制至OSS,查询索引文件:
bash
aliyun live describe-live-stream-record-index-files \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime>
响应格式请查看 预期输出
2.4 验证用户问题
将查询结果与用户报告的问题对比:
  • 若存在录制文件但用户表示未录制 → 问题可能出在访问或播放环节
  • 若未找到录制文件 → 进入步骤3检查配置
  • 若存在录制文件但不完整 → 进入步骤5检查流质量

Step 3: Query Recording Configuration

步骤3:查询录制配置

The recording to VOD/OSS configuration may have wildcard (*) matches for app name, stream name. Use the best matching configuration if there're multiple ones.
3.1 Query Recording to OSS Configuration
bash
aliyun live describe-live-record-config \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName>
See Expected Output for response format.
OnDemand flag in the recording configuration affects whether the record task can be started. Values are as below:
  • 0: auto record
  • 1: call OnDemandUrl in notify configuration to determine if record should be started
  • 7: manual record, user needs to call RealTimeRecordCommand OpenAPI to manual start/stop recording
Validation Checklist:
  • ✅ Configuration exists for the stream
  • ✅ OssBucket and OssEndpoint are correct
  • ✅ RecordFormat includes desired formats (m3u8, flv, mp4)
  • ✅ OssObjectPrefix is properly configured
3.2 Query Recording to VOD Configuration
bash
aliyun live describe-live-record-vod-configs \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName>
See Expected Output for response format.
Validation Checklist:
  • ✅ Configuration exists for the stream
3.3 Diagnostic Conclusion
  • If no configuration exists: Inform user to create recording configuration before starting the stream. See: https://help.aliyun.com/live/user-guide/live-stream-recording
  • If configuration is incorrect: Identify the specific issue and advise user to update via console or CLI.
  • If configuration is correct: Proceed to check callback configuration.
  • If OnDemand is 7: Process to check live stream information, if there're streams, remind user to call RealTimeRecordCommand OpenAPI.

录制至VOD/OSS的配置可能对应用名称、流名称使用通配符(*)匹配。若存在多个配置,使用最佳匹配的配置。
3.1 查询录制至OSS配置
bash
aliyun live describe-live-record-config \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName>
响应格式请查看 预期输出
录制配置中的OnDemand标志会影响录制任务是否能启动,取值如下:
  • 0:自动录制
  • 1:通过通知配置中的OnDemandUrl确定是否启动录制
  • 7:手动录制,用户需调用RealTimeRecordCommand OpenAPI手动启动/停止录制
验证清单:
  • ✅ 该流存在对应配置
  • ✅ OssBucket和OssEndpoint配置正确
  • ✅ RecordFormat包含所需格式(m3u8、flv、mp4)
  • ✅ OssObjectPrefix配置合理
3.2 查询录制至VOD配置
bash
aliyun live describe-live-record-vod-configs \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName>
响应格式请查看 预期输出
验证清单:
  • ✅ 该流存在对应配置
3.3 诊断结论
  • 若无配置存在:告知用户需在启动流前创建录制配置。查看:https://help.aliyun.com/live/user-guide/live-stream-recording
  • 若配置错误:识别具体问题并建议用户通过控制台或CLI更新
  • 若配置正确:继续检查回调配置
  • 若OnDemand为7:检查直播流信息,若存在流,提醒用户调用RealTimeRecordCommand OpenAPI

Step 4: Query Callback Configuration

步骤4:查询回调配置

Skip this step if the user question is NOT about callback.
4.1 Query Recording Callback Configuration
bash
aliyun live describe-live-record-notify-config \
  --domain-name <PlaybackDomain>
See Expected Output for response format.
Validation Checklist:
  • ✅ NotifyUrl is configured (required for callbacks)
  • ✅ NeedStatusNotify is enabled (for status callbacks)
  • ✅ OnDemandUrl is configured (for on-demand recording)
4.2 Diagnostic Conclusion
  • If NotifyUrl is missing: Inform user to configure callback URL.
  • If NotifyUrl exists but NeedStatusNotify is false: Advise enabling NeedStatusNotify for status callbacks.
  • If configuration is correct: Proceed to check stream information.

若用户问题与回调无关,跳过此步骤。
4.1 查询录制回调配置
bash
aliyun live describe-live-record-notify-config \
  --domain-name <PlaybackDomain>
响应格式请查看 预期输出
验证清单:
  • ✅ 已配置NotifyUrl(回调必填)
  • ✅ 已启用NeedStatusNotify(用于状态回调)
  • ✅ 已配置OnDemandUrl(用于按需录制)
4.2 诊断结论
  • 若缺少NotifyUrl:告知用户配置回调URL
  • 若存在NotifyUrl但NeedStatusNotify为false:建议启用NeedStatusNotify以接收状态回调
  • 若配置正确:继续检查流信息

Step 5: Query Live Stream Information

步骤5:查询直播流信息

5.1 Query Online Streams
Check if the stream is currently online:
bash
aliyun live describe-live-streams-online-list \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName>
See Expected Output for response format.
5.2 Query Historical Stream Publish Records
Check historical publish records:
bash
aliyun live describe-live-streams-publish-list \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime>
See Expected Output for response format.
5.3 Query Stream Rate Data (Audio/Video Frame Rates)
If there are online/publish stream records, check audio and video frame rates to identify quality issues:
bash
aliyun live describe-live-center-stream-rate-data \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime>
See Expected Output for response format and analysis guidelines.
5.4 Diagnostic Conclusion
  • If no publish records found: Inform user to verify the stream is being pushed to the correct URL:
    rtmp://<push-domain>/<app-name>/<stream-name>
  • If stream quality issues detected (e.g., AudioFrameRate=0): Advise checking the streaming source for proper audio/video encoding.
  • If stream information is normal: Proceed to check callback records.

5.1 查询在线流
检查流当前是否在线:
bash
aliyun live describe-live-streams-online-list \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName>
响应格式请查看 预期输出
5.2 查询历史流推流记录
检查历史推流记录:
bash
aliyun live describe-live-streams-publish-list \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime>
响应格式请查看 预期输出
5.3 查询流码率数据(音视频帧率)
若存在在线/推流记录,检查音视频帧率以识别质量问题:
bash
aliyun live describe-live-center-stream-rate-data \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime>
响应格式和分析指南请查看 预期输出
5.4 诊断结论
  • 若无推流记录:告知用户验证流是否推送到正确URL:
    rtmp://<push-domain>/<app-name>/<stream-name>
  • 若检测到流质量问题(例如AudioFrameRate=0):建议检查推流源的音视频编码是否正确
  • 若流信息正常:继续检查回调记录

Step 6: Query Recording Callback Records

步骤6:查询录制回调记录

6.1 Query Recording Callback Events
Query callback records to identify recording issues.
MUST query callback records if the user question is about record callback regardless of previous step results.
bash
aliyun live describe-live-record-notify-records \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime> \
  --page-size <PageSize, e.g. 20> \
  --page-number <PageNumber, e.g. 1>
See Expected Output for response format.
6.2 Analyze Callback Events
Recording Event Types:
  1. record_started - Recording started successfully
  2. record_paused - Recording paused/stopped
  3. record_error - Recording error occurred
  4. transformat_error - Transcoding error (for MP4/FLV)
For detailed error codes, resolution steps, and diagnostic conclusions, see references/error-codes.md.
6.3 Diagnostic Conclusion
Based on callback events, identify the error code and follow the resolution in references/error-codes.md.
If no errors found:
✅ No recording errors found in callback records.

If you're still experiencing issues, please provide more details about the specific problem.

6.1 查询录制回调事件
查询回调记录以识别录制问题。
无论之前步骤结果如何,若用户问题涉及录制回调,必须查询回调记录。
bash
aliyun live describe-live-record-notify-records \
  --domain-name <PlaybackDomain> \
  --app-name <AppName> \
  --stream-name <StreamName> \
  --start-time <StartTime> \
  --end-time <EndTime> \
  --page-size <PageSize, e.g. 20> \
  --page-number <PageNumber, e.g. 1>
响应格式请查看 预期输出
6.2 分析回调事件
录制事件类型:
  1. record_started - 录制成功启动
  2. record_paused - 录制暂停/停止
  3. record_error - 录制发生错误
  4. transformat_error - 转码错误(针对MP4/FLV)
详细错误码、解决步骤和诊断结论请查看 references/error-codes.md
6.3 诊断结论
根据回调事件识别错误码,并遵循 references/error-codes.md 中的解决方案处理。
若无错误发现:
✅ 回调记录中未发现录制错误。

若您仍遇到问题,请提供更详细的问题描述。

Step 7: Generate Diagnostic Report

步骤7:生成诊断报告

After completing all diagnostic steps, generate a comprehensive report using the template in references/diagnostic-report-template.md.
The report should cover:
  1. Stream Information (domain, app, stream, time range)
  2. Diagnostic Results for each step (domain mapping, recording content, configuration, callback, stream, quality, events)
  3. Root Cause summary
  4. Action Required items
  5. Recommended Next Steps
[MUST] Disable AI-Mode at EVERY exit point — Before delivering the final response for ANY reason, always disable AI-mode first. This applies to ALL exit paths: workflow success, workflow failure, error/exception, user cancellation, session end, or any other scenario where no further CLI commands will be executed. AI-mode is only used for Agent Skill invocation scenarios and MUST NOT remain enabled after the skill stops running.
bash
aliyun configure ai-mode disable

完成所有诊断步骤后,使用 references/diagnostic-report-template.md 中的模板生成综合报告。
报告应包含:
  1. 流信息(域名、应用、流、时间范围)
  2. 各步骤诊断结果(域名映射、录制内容、配置、回调、流、质量、事件)
  3. 根因总结
  4. 需执行的操作
  5. 推荐后续步骤
[必须] 在所有退出点禁用AI模式 — 在任何情况下交付最终响应前,务必先禁用AI模式。这适用于所有退出路径:工作流成功、工作流失败、错误/异常、用户取消、会话结束或任何其他不再执行CLI命令的场景。 AI模式仅用于Agent Skill调用场景,Skill停止运行后必须禁用。
bash
aliyun configure ai-mode disable

Success Verification Method

成功验证方法

After completing the diagnostic workflow:
  1. Verify Recording Configuration: Check that recording config exists and is correct
  2. **Verify Callback Configuration (optional) **: Check that callback URL is configured if the user question is about callback or necessary
  3. Verify Stream Status: Check that stream has been published
  4. Verify Callback Records: Check for any error events
  5. Verify Recording Files: Check that files exist in OSS or VOD
For detailed verification steps and commands, see references/verification-method.md.

完成诊断工作流程后:
  1. 验证录制配置:检查录制配置是否存在且正确
  2. 验证回调配置(可选):若用户问题涉及回调或必要时,检查回调URL是否已配置
  3. 验证流状态:检查流是否已推流
  4. 验证回调记录:检查是否存在错误事件
  5. 验证录制文件:检查OSS或VOD中是否存在文件
详细验证步骤和命令请查看 references/verification-method.md

Cleanup

清理

This diagnostic skill does not create any resources, so no cleanup is required.
Note: This skill is read-only and does NOT modify any configurations. If configuration changes are needed, users must update them via console or CLI.

本诊断Skill不会创建任何资源,因此无需清理操作。
注意:本Skill为只读模式,不会修改任何配置。若需更改配置,用户需通过控制台或CLI自行更新。

Best Practices

最佳实践

  1. Always verify domain mapping first - Ensure you're querying the correct playback domain
  2. Use appropriate time ranges - Start with 1 day, expand to 7 days if needed
  3. Check recording configuration before stream starts - Recording config must be created before pushing the stream
  4. Enable status callbacks - Set NeedStatusNotify=true to receive detailed recording events
  5. Monitor callback events regularly - Check for error events to identify issues early
  6. Verify OSS permissions - Ensure ApsaraVideo Live has access to the OSS bucket
  7. Check stream quality - Monitor audio/video frame rates to ensure proper encoding
  8. Use the correct domain type - Recording APIs require the main playback domain, not ingest domain
  9. Wait for recording segments to complete - Recordings are written after the segment duration (e.g., 3600 seconds)
  10. Test with a simple stream first - Use a basic stream to verify configuration before testing complex scenarios

  1. 始终先验证域名映射 - 确保查询的是正确的播放域名
  2. 使用合适的时间范围 - 从1天开始,必要时扩展至7天
  3. 在流启动前检查录制配置 - 录制配置必须在推流前创建
  4. 启用状态回调 - 设置NeedStatusNotify=true以接收详细录制事件
  5. 定期监控回调事件 - 检查错误事件以尽早识别问题
  6. 验证OSS权限 - 确保ApsaraVideo Live有权访问OSS Bucket
  7. 检查流质量 - 监控音视频帧率以确保编码正确
  8. 使用正确的域名类型 - 录制API需要主播放域名,而非推流域名
  9. 等待录制分段完成 - 录制文件会在分段时长后写入(例如3600秒)
  10. 先使用简单流测试 - 在测试复杂场景前,先用基础流验证配置

Reference Links

参考链接

Reference DocumentDescription
references/ram-policies.mdComplete RAM permissions required for this skill
references/related-commands.mdComplete list of CLI commands used in this skill
references/verification-method.mdDetailed verification steps and commands
references/error-codes.mdComplete list of recording error codes and resolutions
references/cli-installation-guide.mdAlibaba Cloud CLI installation and configuration guide
references/api-response-examples.mdAPI response format examples for diagnostic commands
references/diagnostic-report-template.mdDiagnostic report template and example

参考文档描述
references/ram-policies.md本Skill所需的完整RAM权限
references/related-commands.md本Skill使用的完整CLI命令列表
references/verification-method.md详细验证步骤和命令
references/error-codes.md完整录制错误码及解决方案
references/cli-installation-guide.md阿里云CLI安装和配置指南
references/api-response-examples.md诊断命令的API响应格式示例
references/diagnostic-report-template.md诊断报告模板及示例

Additional Resources

额外资源