創建純音頻現場活動
簡介
純音頻直播流讓您可以進入龐大的音頻娛樂生態系統,包括播客和廣播。借助 Brightcove,您可以在沒有視頻組件的情況下攝取和直播特定音頻內容。Brightcove 的播放器技術已針對移動、網絡和聯網家庭設備的音頻進行了優化。您甚至可以獲得純音頻播放的相關分析。
純音頻播放器
約束條件
以下功能不適用於純音頻流:
- 流媒體到社交媒體
- 低延遲
- 實時攝取配置文件選擇
- 冗餘(備份流)
- 音軌
- 伺服器端廣告插入 (SSAI)
- 剪輯創作
- 縮放集成
需求
此功能是您帳戶的付費附加組件。聯繫您的客戶成功經理以啟用純音頻直播。
工作流程
要創建純音頻直播流,請按照下列步驟操作:
創建現場活動
創建純音頻直播活動。
- 在 Studio 中,打開 直播 模塊。
- 按一下「 」。
- 輸入直播活動的價值。
- 事件名稱 -事件的名稱;如果視訊儲存為視訊資產,則此名稱也會出現在「媒體」模組中 (最多 255 個字元)
- 簡短說明 -事件的摘要 (最多 250 個字元)
- 標籤 -要與事件關聯的標籤;如果視訊儲存為視訊資產 (最多 128 個字元和 1200 個標籤),則會將標籤指派給視訊
- 參考 ID -事件的參考 ID;必須是唯一的 (最多 150 個字元)
- 將顯示帳戶的任何必要自訂欄位。將值指派給自訂欄位。
- 選擇 創建純音頻事件。請注意以下選項顯示為灰色:
- 流媒體到社交媒體
- 實時攝取配置文件
- 在 “高級” 部分,以下選項顯示為灰色:
- 啟用服務器端廣告插入 (SSAI)
- 完成直播的其餘選項。
有關這些選項的詳細信息,請參閱 創建和管理實時事件 文檔。
- 按一下「 」。
設定您的編碼器
使用您選擇的編碼器流式傳輸您的純音頻事件。
要流式傳輸您的直播活動,請按照以下步驟操作:
-
在 Studio 中,返回音頻流的 控制室 。
- 複製以下內容:
- 流端點(RTMP URL)
- 姓名
- 將上面的值粘貼到編碼器的設置中並開始流式傳輸。
發布現場活動
要發布直播,請按照以下步驟操作:
- 在 Studio 中,返回到 Live 模塊。
- 在左側導航中,選擇 Publish and Embed 。
- 在 實時播放器選項 部分,選擇您的播放器。
-
複製 標准 或 高級 嵌入代碼,並將其粘貼到您的 HTML 頁面中。
- 在您的網頁中確認播放。
使用 API 創建直播活動
或者,您可以使用 Live API 創建純音頻直播活動。
查看以下文件:
請求主體範例
{
"live_stream": true,
"region":"us-west-2",
"reconnect_time": 1800,
"live_dvr_sliding_window_duration":600,
"audio_only": true,
"audio_only_storage_format": "mpeg-ts", //or "aac"
"outputs": [
{
"live_stream": true,
"segment_seconds": 6,
"audio_bitrate": 196
},
{
"live_stream": true,
"segment_seconds": 6,
"audio_bitrate": 128
},
{
"live_stream": true,
"segment_seconds": 6,
"audio_bitrate": 96
},
{
"live_stream": true,
"segment_seconds": 6,
"audio_bitrate": 64
},
{
"live_stream": true,
"segment_seconds": 6,
"audio_bitrate": 32
}
]
}
示例響應正文
{
"job": {
"created_at": "2022-02-21T13:49:30.512Z",
"finished_at": null,
"id": "d123456789a123456789b1",
"privacy": false,
"state": "standby",
"ssai_state": "none",
"sep_state": "waiting",
"submitted_at": "2022-02-21T13:49:30.512Z",
"test": false,
"updated_at": "2022-02-21T13:59:37.826Z",
"region": "us-west-2",
"stream_key": "alive",
"protocol": "rtmp",
"reconnect_time": 600,
"live_stream": true,
"low_latency": false,
"static": true,
"ad_insertion": false,
"metadata_passthrough": false,
"out_worker_bytes": 21010938,
"out_worker_bytes_rate": 0,
"channel_type": "event",
"state_history": [
{
"state": "standby",
"transition_timestamp": 1645451977826
},
{
"state": "disconnected",
"transition_timestamp": 1645451748246
},
{
"state": "processing",
"transition_timestamp": 1645451498407
},
{
"state": "waiting",
"transition_timestamp": 1645451386677
},
{
"state": "standby",
"transition_timestamp": 1645451370512
}
],
"state_history_is_truncated": false,
"account_id": "11a1234556789b1111ef",
"user_id": "bfe56cc6084f4136b168980010eaca39",
"pass_through": {
"stream_to_social_media": true,
"dvr": false
},
"job_videocloud_asset_id": "6298381216001",
"live_dvr_sliding_window_duration_ms": 0,
"live_sliding_window_duration_ms": 0,
"outputs": [
{
"live_stream": true,
"audio_bitrate": 196,
"label": "hls1080p",
"segment_seconds": 6
},
{
"live_stream": true,
"audio_bitrate": 128,
"label": "hls720p",
"segment_seconds": 6
}
],
"videocloud": {
"video": {
"name": "audio-only test",
"link": {},
"schedule": {},
"state": "ACTIVE",
"custom_fields": {}
}
},
"randomize_chunk_url": true,
"rtmp_outputs": [],
"playback_url": "https://bcovlive-a.akamaihd.net/d123456789a123456789b1/us-west-2/6243585733001/playlist.m3u8",
"playback_url_dvr": "https://bcovlive-a.akamaihd.net/d123456789a123456789b1/us-west-2/6243585733001/playlist_dvr.m3u8",
"playback_added_cdns": [],
"encryption": {},
"audio_only": true,
"audio_only_storage_format": "mpeg-ts",
"input_media_file": {
"audio_bitrate_in_kbps": null,
"audio_codec": null,
"audio_sample_rate": null,
"audio_tracks": null,
"channels": null,
"created_at": "2022-02-21T13:49:30.512Z",
"duration_in_ms": null,
"error_class": null,
"error_message": null,
"file_size_bytes": null,
"finished_at": null,
"format": null,
"frame_rate": null,
"height": null,
"id": "input-d123456789a123456789b1",
"md5_checksum": null,
"privacy": false,
"state": "standby",
"test": false,
"updated_at": "2022-02-21T13:59:37.826Z",
"video_bitrate_in_kbps": null,
"video_codec": null,
"width": null,
"total_bitrate_in_kbps": null,
"url": null
},
"stream": {
"created_at": "2022-02-21T13:51:38.407Z",
"finished_at": null,
"height": null,
"id": "stream-d123456789a123456789b1",
"name": "alive",
"protocol": null,
"state": null,
"test": false,
"updated_at": "2022-02-21T13:59:37.826Z",
"width": null,
"total_bitrate_in_kbps": null,
"duration": null,
"region": "us-west-2",
"url": "rtmp://d123456789a123456789b1.sep.bcovlive.io:1935/d123456789a123456789b1",
"location": {
"source": {
"latitude": null,
"longitude": null,
"location": null
},
"destination": {
"latitude": null,
"longitude": null,
"location": null
},
"distance": null
},
"in_worker_bytes": 12058775,
"in_worker_bytes_rate": 0
},
"output_media_files": [
{
"audio_bitrate_in_kbps": 196,
"audio_codec": "AAC",
"audio_sample_rate": null,
"channels": null,
"created_at": "2022-02-21T13:49:30.512Z",
"duration_in_ms": null,
"error_class": null,
"error_message": null,
"file_size_bytes": null,
"finished_at": null,
"format": null,
"fragment_duration_in_ms": null,
"frame_rate": null,
"height": null,
"id": "0-d123456789a123456789b1",
"md5_checksum": null,
"privacy": false,
"rfc_6381_audio_codec": null,
"rfc_6381_video_codec": null,
"state": "standby",
"test": false,
"updated_at": "2022-02-21T13:59:37.826Z",
"video_bitrate_in_kbps": null,
"video_codec": null,
"video_codec_profile": null,
"width": null,
"label": "hls1080p",
"total_bitrate_in_kbps": 196,
"keyframe_interval": null,
"keyframe_interval_follow_source": null,
"segment_seconds": 6,
"live_stream": true
},
{
"audio_bitrate_in_kbps": 128,
"audio_codec": "AAC",
"audio_sample_rate": null,
"channels": null,
"created_at": "2022-02-21T13:49:30.512Z",
"duration_in_ms": null,
"error_class": null,
"error_message": null,
"file_size_bytes": null,
"finished_at": null,
"format": null,
"fragment_duration_in_ms": null,
"frame_rate": null,
"height": null,
"id": "1-d123456789a123456789b1",
"md5_checksum": null,
"privacy": false,
"rfc_6381_audio_codec": null,
"rfc_6381_video_codec": null,
"state": "standby",
"test": false,
"updated_at": "2022-02-21T13:59:37.826Z",
"video_bitrate_in_kbps": null,
"video_codec": null,
"video_codec_profile": null,
"width": null,
"label": "hls720p",
"total_bitrate_in_kbps": 128,
"keyframe_interval": null,
"keyframe_interval_follow_source": null,
"segment_seconds": 6,
"live_stream": true
},
{
"playlist_type": "defaultS3",
"type": "playlist",
"filename": "playlist.m3u8",
"dvr_filename": "playlist_dvr.m3u8",
"playback_url": "https://bcovlive-a.akamaihd.net/d123456789a123456789b1/us-west-2/6243585733001/playlist.m3u8",
"playback_url_dvr": "https://bcovlive-a.akamaihd.net/d123456789a123456789b1/us-west-2/6243585733001/playlist_dvr.m3u8",
"playback_added_cdns": []
}
]
}
}