我正在研究一个使用Azure Media Services Python SDK(v3)的项目。我有以下代码,一旦相关联的实时事件运行,它将创建实时输出和流定位器:
# Step 2: create a live output (used to reference the manifest file)
live_outputs = self.__media_services.live_outputs
config_data_live_output = LiveOutput(asset_name=live_output_name,archive_window_length=timedelta(minutes=30))
output = live_outputs.create(StreamHandlerAzureMS.RESOUCE_GROUP_NAME,StreamHandlerAzureMS.ACCOUNT_NAME,live_event_name,live_output_name,config_data_live_output)
# Step 3: get a streaming locator (the ID of the locator is used in the URL)
locators = self.__media_services.streaming_locators
config_data_streaming_locator = StreamingLocator(asset_name=locator_name)
locator = locators.create(StreamHandlerAzureMS.RESOUCE_GROUP_NAME,locator_name,config_data_streaming_locator)
self.__media_services
是类型AzureMediaServices
的对象。当我运行上面的代码时,我收到以下异常:
azure.mgmt.media.models._models_py3.ApiErrorException: (ResourceNotFound) Live Output asset was not found.
问题::Azure Media Services为什么在创建资源的操作中抛出此错误?我该如何解决这个问题?
请注意,我已经成功使用服务主体对SDK进行了Azure媒体服务的身份验证,并且可以使用ffmpeg成功地将视频推送到现场活动。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。