公式のドキュメントを見ながらやると
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/docs/raspberry-pi.md
これだとうまくいかない
$ gst-device-monitor-1.0
$ gst-launch-1.0 v4l2src device=/dev/video0 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=MyKinesisVideoStream storage-size=128 access-key=”***” secret-key=”***” aws-region=”ap-northeast-1″
> The audio recording device is represented by hw:card_number,device_numer. So to use the second device in the example, use hw:3,0 as the device in gst-launch-1.0 command.
これだとOK
$ gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc bframes=0 key-int-max=45 bitrate=500 tune=zerolatency ! video/x-h264,stream-format=avc,alignment=au ! kvssink stream-name=MyKinesisVideoStream storage-size=128 access-key=”***” secret-key=”***” aws-region=”ap-northeast-1″
> if your camera supports outputting h264 encoded stream directly, then you can use this command:
h264エンコードがすごく大事なのね