如何使用 GetHLSStreamingSessionURL 从 kinesis 视频流获取 URL
我正在尝试使用 getHLSStreamingSessionURL 获取 URL 以在 kinesis 视频流上查看我的视频。
在邮递员上,我创建了一个对“https://endpoint/getHLSStreamingSessionURL”的 POST 调用
在邮递员上,我收到 200 响应,但响应正文是:
{
"Output": {
"__type": "com.amazon.coral.service#UnknownOperationException"
},
"Version": "1.0"
}
我希望响应返回 HLS url。
这是我的请求正文:
{
"ContainerFormat": "FRAGMENTED_MP4",
"DiscontinuityMode": "ON_DISCONTINUITY",
"DisplayFragmentTimestamp": "ALWAYS",
"Expires": 300,
"HLSFragmentSelector": {
"FragmentSelectorType": "PRODUCER_TIMESTAMP",
"TimestampRange": {
"EndTimestamp": 1646055362163,
"StartTimestamp": 1646055362143
}
},
"PlaybackMode": "ON-DEMAND",
"StreamName": "DEV_videoStreamTest"
}
任何人都可以建议我的 http 请求出了什么问题并解释这个响应到底意味着什么吗?
I am trying to get a URL to view my video on kinesis video streams with getHLSStreamingSessionURL.
On postman I have created a POST call to 'https://endpoint/getHLSStreamingSessionURL
On postman I get a 200 response but the response body is :
{
"Output": {
"__type": "com.amazon.coral.service#UnknownOperationException"
},
"Version": "1.0"
}
I expect the response to return a HLS url.
And here is my request body:
{
"ContainerFormat": "FRAGMENTED_MP4",
"DiscontinuityMode": "ON_DISCONTINUITY",
"DisplayFragmentTimestamp": "ALWAYS",
"Expires": 300,
"HLSFragmentSelector": {
"FragmentSelectorType": "PRODUCER_TIMESTAMP",
"TimestampRange": {
"EndTimestamp": 1646055362163,
"StartTimestamp": 1646055362143
}
},
"PlaybackMode": "ON-DEMAND",
"StreamName": "DEV_videoStreamTest"
}
Can anyone suggest what is wrong with my http request and explain what exactly this response means?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现这有点复杂,但你需要打电话给
首先 GetDataEndpoint 以获得正确的 API 端点 URL调用 获取HLSStreamingSessionURL。
AWS Github 上有一个很棒的完整示例,您可以使用它来尝试所有参数:
amazon-kinesis-video-streams-media-viewer
但简而言之,调用
返回类似这样的内容:
然后调用 getHLSStreamingSessionURL 替换您的基本 url:
我正在使用 boto3,所以这是我的简化示例 Python:
I found this a bit convoluted, but you need to make a call to
GetDataEndpoint first in order to get the correct API endpoint url to make the call to GetHLSStreamingSessionURL.
There's a great full example on the AWS Github, and you can use that to try out all the parameters:
amazon-kinesis-video-streams-media-viewer
But in short, the call to
returns something like this:
then you make the call to getHLSStreamingSessionURL replacing your base url:
I'm using boto3, so here's my simplified example in python: