简体   繁体   English

无法从 VLC 中查看来自 AWS MediaLive 服务的实时流

[英]Live Stream from AWS MediaLive service not viewable from VLC

I am trying to build a custom live streaming service as documented here:我正在尝试按照此处记录的方式构建自定义实时流媒体服务:

https://aws.amazon.com/solutions/implementations/live-streaming-on-aws/ https://aws.amazon.com/solutions/implementations/live-streaming-on-aws/

I used the pre-provided cloudformation template for "Live Streaming on AWS with MediaStore" which provisioned all the relevant resources for me.我将预先提供的 cloudformation 模板用于“使用 MediaStore 在 AWS 上进行直播”,该模板为我提供了所有相关资源。 Next, I wanted to test my custom streamer.接下来,我想测试我的自定义流光。

I used OBS Studio to stream my webcam output to MediaLivePushEndpoint that was created during AWS cloudformation provisioning.我使用 OBS Studio 将我的网络摄像头输出流式传输到在 AWS cloudformation 配置期间创建的 MediaLivePushEndpoint。 OBS Suggests that it is already streaming the webcam stream to the rtmp endpoint to AWS MediaLive RTMP endpoint. OBS 建议它已经将网络摄像头流传输到 rtmp 终端节点到 AWS MediaLive RTMP 终端节点。

Now, to confirm if I can watch the stream, when I try to set the Input Nerwork Stream in VLC player to the cloudfront endpoint that was created for me (which looks like this: https://aksj2arbacadabra.cloudfront.net/stream/index.m3u8 ), VLC is unable to fetch the stream and fails with the following error message in the logs.现在,为了确认我是否可以观看流,当我尝试将 VLC 播放器中的 Input Nerwork Stream 设置为为我创建的 cloudfront 端点时(如下所示: https ://aksj2arbacadabra.cloudfront.net/stream/ index.m3u8 ),VLC 无法获取流并且失败并在日志中显示以下错误消息。 What am I missing?我错过了什么? Thanks!谢谢!

...
...
...
http debug: outgoing request: GET /stream/index.m3u8 HTTP/1.1 Host: d2lasasasauyhk.cloudfront.net Accept: */* Accept-Language: en_US User-Agent: VLC/3.0.11 LibVLC/3.0.11 Range: bytes=0- 
http debug: incoming response: HTTP/1.1 404 Not Found Content-Type: application/x-amz-json-1.1 Content-Length: 31 Connection: keep-alive x-amzn-RequestId: HRNVKYNLTdsadasdasasasasaPXAKWD7AQ55HLYBBXHPH6GIBH5WWY x-amzn-ErrorType: ObjectNotFoundException Date: Wed, 18 Nov 2020 04:08:53 GMT X-Cache: Error from cloudfront Via: 1.1 5085d90866d21sadasdasdad53213.cloudfront.net (CloudFront) X-Amz-Cf-Pop: EWR52-C4 X-Amz-Cf-Id: btASELasdasdtzaLkdbIu0hJ_asdasdasdbgiZ5hNn1-utWQ== 
access error: HTTP 404 error
main debug: no access modules matched
main debug: dead input
qt debug: IM: Deleting the input
main debug: changing item without a request (current 2/3)
main debug: nothing to play

  • Updates based on Zach's response:基于 Zach 回复的更新:

Here are the parameters I used while deploying the cloudformation template for live streaming using MediaLive (notice that I am using RTMP_PUSH):以下是我在使用 MediaLive 部署 cloudformation 模板以进行实时流式传输时使用的参数(请注意,我使用的是 RTMP_PUSH):

在此处输入图片说明

I am using MediaLive and not MediaPackage so when I go to MediaLive to my channel, I see this:我使用的是MediaLive而不是MediaPackage因此当我将MediaLive转到我的频道时,我看到:

在此处输入图片说明

Notice that it says that it cannot find the "stream [stream]" but I confirmed that the rtmp endpoint I add to my OBS is exactly the one which was created as an output for me from my cloudformation stack:请注意,它说它找不到“stream [stream]”,但我确认我添加到我的 OBS 的 rtmp 端点正是从我的 cloudformation 堆栈中为我创建的输出:

在此处输入图片说明

Finally, when I try to go to media store to see if there are any objects, it is completely empty:最后,当我尝试去媒体商店查看是否有任何对象时,它完全是空的:

在此处输入图片说明

Vader,维德,

Thank you for the clarification here, I can see the issue is with your settings in OBS.感谢您在这里的澄清,我可以看到问题在于您在 OBS 中的设置。 When you setup your input for MediaLive you created a unique Application Name and Instance.为 MediaLive 设置输入时,您创建了唯一的应用程序名称和实例。 Which is part of the URI, the Application Name is LiveStreamingwithMediaStore and the Instance is stream, in OBS you are going to want remove stream from the end of the Server URI and place it in the Stream Key portion, where you currently have a 1.这是 URI 的一部分,应用程序名称是 LiveStreamingwithMediaStore,实例是流,在 OBS 中,您需要从服务器 URI 的末尾删除流并将其放置在流密钥部分,您当前在该部分拥有 1。

OBS Settings: OBS 设置:

Server: rtmp://server_ip:1935/Application_Name/服务器:rtmp://server_ip:1935/Application_Name/

Stream Key: Instance_Name流密钥:Instance_Name

Since you posted the screenshot here on an open forum, which really helped determine the issue, but does expose settings that would allow someone to send to the RTMP input I would suggest that you change the Application Name and Instance.由于您在一个开放论坛上发布了屏幕截图,这确实有助于确定问题,但确实公开了允许某人发送到 RTMP 输入的设置,因此我建议您更改应用程序名称和实例。

Zach扎克

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM