Reputation: 101
I want to ingest a m3u8 stream to kinesis video (MKV format). I compiled the kvssink plugin but gstreamer fails with unknown error.
Maybe I need to convert the stream somehow before sending to kvssink? Could someone comment on this point?
Command:
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>"
Error
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.
UPDATE
after small changes it works now with fakesink but still get an error for 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
[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:
Upvotes: 0
Views: 1286
Reputation: 101
problem solved, seems to be an issue in current kvssink version, with older commits it works
see https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/396
Upvotes: 0
Reputation: 109
The failure is in the HLS demux element. You could try to get your GStreamer pipeline working with the fakesink and once that's working, you can attempt to link the KVS GST plugin.
The KVS GST plugin related questions can be posted in GitHub issues in: https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues
Upvotes: 1
Reputation: 7383
video/x-h264, format=avc,alignment=au
I don't think you can just dictate caps in that way. It will just get in the way of auto-negotiating caps.
Also you don't seem to have a H.264 decoder in that pipeline.
Upvotes: 0