Closed mariobaldini closed 8 months ago
Trying with:
gst-launch-1.0 -v \
autovideosrc ! \
queue ! \
videoconvert ! \
x264enc bframes=0 key-int-max=45 bitrate=2000 ! video/x-h264,stream-format=avc,alignment=au,profile=baseline ! \
kvsplugin channel-name="xxx1" storage-size=512 aws-region="us-west-2" log-level=8 \
iot-certificate="iot-certificate,endpoint=xxxx.credentials.iot.us-west-2.amazonaws.com,cert-path=/xxx/aws-iot-cert.pem.crt,key-path=/xxx/aws-iot-cert.pem.key,ca-path=/xxx/aws-iot-cert-rootca.pem,role-aliases=KvsHubIoTRoleAlias,iot-thing-name=xxx"
Gives:
Setting pipeline to PAUSED ...
2023-03-27 03:29:22 ERROR blockingCurlCall(): Curl call response failed with http status 403
2023-03-27 03:29:22 ERROR initKinesisVideoStructs(): operation returned status code: 0x16000001
2023-03-27 03:29:22 ERROR gst_kvs_plugin_change_state(): Failed to initialize KVS structures with 0x16000001
ERROR: from element /GstPipeline:pipeline0/GstKvsPlugin:kvsplugin0: Could not initialize supporting library.
Additional debug info:
/host/temp/amazon-kinesis-video-streams-demos/gst/gst-kvs-plugin/src/GstPlugin.c(1296): gst_kvs_plugin_change_state (): /GstPipeline:pipeline0/GstKvsPlugin:kvsplugin0:
Failed to initialize with 0x16000001
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
I tested the certificates and auth endpoint and they work fine (token is generated successfully):
curl -H "x-amzn-iot-thingname:xxx" \
--cert /xxx/aws-iot-cert.pem.crt \
--key /xxx/aws-iot-cert.pem.key \
https://xxx.credentials.iot.us-west-2.amazonaws.com/role-aliases/KvsCameraIoTRoleAlias/credentials \
--cacert /xxx/aws-iot-cert-rootca.pem
{"credentials":{"accessKeyId":"ASIAxxxx","secretAccessKey":"feKtIxxxxx","sessionToken":"IQoJb3Jxxxxx","expiration":"2023-03-27T04:32:42Z"}}
And I also copied the https://www.amazontrust.com/repository/SFSRootCAG2.pem cert to /etc/ssl/cert.pem as indicated in https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/troubleshooting.html#troubleshooting-producer-curl
What is wrong in that pipeline?
Could someone please confirm if the kvsplugin
(kvs webrtc/signaling gstreamer plugin) provided by AWS is functional in the latest releases?
kvsplugin
appears to both send video to a signaling channel, and a video stream (multiple places). If you're looking for webrtc only, you can check this out.
My problem with kvsplugin
was that I couldn't get it working as is, from the samples. Specially when trying certificate based auth.
I'll retry latest version and confirm if this issue is still valid or got fixed.
Thanks for sharing gst-plugins-rs, that's gold! :star_struck: Definitely going to try to contribute with them.
Although we have usage samples on how to integrate the gstreams libs into a program, another common pattern is run directly as a
gst-launch-1.0
pipeline.Sending a mkv file directly to a video stream channel: (works)
What is the equivalent pipeline allowing a mkv video to be sent to a signaling channel? (based on kvsplugin -- for webrtc)
I've read many samples in the official docs or across the web but am having a hard time making it to work with
gst-launch-1.0
directly. (and found many others also struggling). Having a couple more samples based on gst-launch would be really nice.I can test and prepare a PR with more cases (ex: webcam->webrtc, other sources, etc), but need help figuring out one initial working case of how to get kvsplugin to send a file to webrtc.