0

我想将 m3u8 流摄取到 kinesis 视频(MKV 格式)。我编译了 kvssink 插件,但 gstreamer 失败并出现未知错误。

也许我需要在发送到 kvssink 之前以某种方式转换流?有人可以评论这一点吗?

命令:

gst-launch-1.0 souphttpsrc  location=http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8 ! hlsdemux ! video/x-h264, format=avc,alignment=au ! h264parse ! kvssink stream-name="my-stream" storage-size=128 access-key="<key>" secret-key="<secret>"

错误

Stream is ready
Pipeline is live and does not need PREROLL ...
Got context from element 'souphttpsrc0': gst.soup.session=context, session=(SoupSession)NULL, force=(boolean)false;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstHLSDemux:hlsdemux0: Internal data stream error.
Additional debug info:
gstadaptivedemux.c(2531): _src_chain (): /GstPipeline:pipeline0/GstHLSDemux:hlsdemux0:
streaming stopped, reason not-negotiated (-4)
[INFO ] [05-04-2020 10:44:30:735.727 GMT] stopKinesisVideoStreamSync(): Synchronously stopping Kinesis Video Stream 000055d1f527ef50.

更新

经过小的更改后,它现在可以与 fakesink 一起使用,但仍然会出现 kvssink 错误

gst-launch-1.0 souphttpsrc location=http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8 ! hlsdemux !  tsdemux ! queue ! video/x-h264 ! h264parse !  kvssink stream-name="my-stream" storage-size=128 access-key="<key>" secret-key="<secret>"

错误

[ERROR] [05-04-2020 18:33:57:145.773 GMT] Failed to get the size of the buffer for hex decoding the codec private data with: 3
ERROR: from element /GstPipeline:pipeline0/GstKvsSink:kvssink0: GStreamer encountered a general stream error.
Additional debug info:
/home/ubuntu/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-gstreamer-plugin/src/gstkvssink.cpp(947): gst_kvs_sink_handle_sink_event (): /GstPipeline:pipeline0/GstKvsSink:kvssink0:
4

3 回答 3

1

故障出现在 HLS demux 元素中。您可以尝试让您的 GStreamer 管道与 fakesink 一起工作,一旦工作正常,您可以尝试链接 KVS GST 插件。

KVS GST 插件相关问题可以发布在 GitHub 问题中:https ://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues

于 2020-04-05T18:25:53.493 回答
0

问题已解决,似乎是当前 kvssink 版本中的一个问题,使用较旧的提交它可以工作

https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/396

于 2020-04-05T21:34:52.290 回答
0

video/x-h264, format=avc,alignment=au我认为您不能以这种方式指定大写字母。它只会妨碍自动协商上限。

此外,您似乎在该管道中没有 H.264 解码器。

于 2020-04-05T17:59:58.073 回答