Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Amazon Kinesis Video Streams Media Interface provides abstract interfaces for board specific media APIs. This repository also contains boards sensors/encoder implementations for Amazon Kinesis Video Streams Producer and WebRTC with out-of-box samples.

License

NotificationsYou must be signed in to change notification settings

aws-samples/amazon-kinesis-video-streams-media-interface

filev4l2GstreamerQCS610ingenic-t31fullhan-fh8626v100anyka-ak3918amlogic-c302eeasy-sv82x

Introduction

Amazon Kinesis Video Streams Media Interface provides abstract interfaces for board specific media APIs. This repository also contains boards sensors/encoder implementations for Amazon Kinesis Video Streams Producer and WebRTC with out-of-box samples.

Supported Boards

NameDescriptionCMake ParameterStatus
FILEDummy boards that can capture fromsample frames-DBOARD=FILEfile
x86/x64Capture from V4L2 device or capture fromsample frames-DBOARD=V4L2
or-DBOARD=FILE
v4l2file
Raspberry PiCapture from V4L2 device or capture fromsample frames-DBOARD=V4L2
or-DBOARD=FILE
v4l2file
GstreamerCapture from Gstreamer pipeline-DBOARD=GSTREAMERgstreamer
Qualcomm QCS610IPC SoC designed by Qualcomm-DBOARD=QCS610qualcomm-qcs610
Ingenic T31IPC SoC designed by Ingenic-DBOARD=T31ingenic-t31
Fullhan FH8626V100IPC SoC designed by Fullhan-DBOARD=FH8626V100fullhan-fh8626v100
Anyka AK3918IPC SoC designed by Anyka-DBOARD=AK3918anyka-ak3918
Amlogic C302IPC SoC designed by Amlogic-DBOARD=C302amlogic-c302
Eeasy SV82xIPC SoC designed by Eeasy-DBOARD=SV82xeeasy-sv82x

Getting started with out-of-box KVS WebRTC sample

  1. Prepare the AWS credentials
    • If you want to use AWS access key id/access key secrets, you can generate AWS credentials by AWS IAM console.
    • Alternatively if you want to use AWS IoT Certificate, you can generate AWS credentials by using thisscript
  2. Clone the code:
git clone https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface.git
  1. Copy SoC SDK dependencies into3rdparty/$BOARD/. See3rdparty/README.md.
  2. Build the code:
export CC=${YOUR_C_TOOLCHAIN}export CXX=${YOUR_CXX_TOOLCHAIN}cd amazon-kinesis-video-streams-media-interfacemkdir build;cd build; cmake .. -DBOARD=${YOUR_BOARD_NAME}make
  1. Upload built artifacts(i.e kvswebrtcmaster-static) atamazon-kinesis-video-streams-media-interface/build/samples/webrtc/ to your board.

  2. Setup AWS credentials in environment variables.

    • If you want to use AWS access key id/access key secrets, use following commands to setup environment variables:
    export AWS_KVS_LOG_LEVEL=2export AWS_DEFAULT_REGION=us-east-1export AWS_KVS_CACERT_PATH=rootca.pemexport AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxexport AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    Replace AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY with your own credentials

    You can use Root CA inresources/certs/rootca.pem, or you can download it fromAmazon Trust Services

    • Alternatively if you want to use AWS IoT Certificate, turn onIOT_CORE_ENABLE_CREDENTIALS inSamples.h and using following commands to setup environment variables:
    export AWS_KVS_LOG_LEVEL=2export AWS_DEFAULT_REGION=us-east-1export AWS_KVS_CACERT_PATH=rootca.pemexport AWS_IOT_CORE_THING_NAME=your_camera_nameexport AWS_IOT_CORE_CREDENTIAL_ENDPOINT=xxxxxxxxxxxxxx.credentials.iot.us-east-1.amazonaws.comexport AWS_IOT_CORE_CERT=your_camera_certificate.pemexport AWS_IOT_CORE_PRIVATE_KEY=your_camera_private.keyexport AWS_IOT_CORE_ROLE_ALIAS=your_camera_role_alias

    You can use Root CA inresources/certs/rootca.pem, or you can download it fromAmazon Trust Services

  3. Make sure your the system time on your board has been synchronized. You may set it manually or use ntp client.

  4. If you are using access key id/access key secret, execute sample with channel name as parameter:./kvswebrtcmaster-static your_channel_name. If you are using AWS IoT Certificate, execute sample on your board directly:./kvswebrtcmaster-static.

  5. Check WebRTC live stream via AWS console orAWS WebRTC test page

    Browser should work as viewer mode during test.

Getting started with out-of-box KVS Producer sample

  1. Clone the code:
git clone https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface.git
  1. Copy SoC SDK dependencies into3rdparty/$BOARD/. See3rdparty/README.md.
  2. Build the code:
export CC=${YOUR_C_TOOLCHAIN}export CXX=${YOUR_CXX_TOOLCHAIN}cd amazon-kinesis-video-streams-media-interfacemkdir build;cd build; cmake .. -DBUILD_WEBRTC_SAMPLES=OFF -DBUILD_KVS_SAMPLES=ON -DBOARD=${YOUR_BOARD_NAME}make
  1. Upload built artifacts(i.e kvsproducer-static) atamazon-kinesis-video-streams-media-interface/build/samples/kvs/ to your board.
  2. Setup AWS credentials.
  • If you want to use AWS access key id/access key secrets, use following commands to setup environment variables:
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxexport AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxexport AWS_DEFAULT_REGION=us-east-1
#defineENABLE_IOT_CREDENTIAL           1
export AWS_KVS_LOG_LEVEL=2export AWS_DEFAULT_REGION=us-east-1export AWS_KVS_CACERT_PATH=rootca.pemexport AWS_IOT_CORE_THING_NAME=your_camera_nameexport AWS_IOT_CORE_CREDENTIAL_ENDPOINT=xxxxxxxxxxxxxx.credentials.iot.us-east-1.amazonaws.comexport AWS_IOT_CORE_CERT=your_camera_certificate.pemexport AWS_IOT_CORE_PRIVATE_KEY=your_camera_private.keyexport AWS_IOT_CORE_ROLE_ALIAS=your_camera_role_alias
  1. Make sure your the system time on your board has been synchronized. You may set it manually or use ntp client.
  2. Execute sample on your board:./kvsproducer-static $YOUR_STREAM_NAME
  3. Check DASH live stream viaAWS KVS test page
  4. Download video clips via AWS console.

In current stage, browser doesn't support G.711 via HLS/DASH. To verify audio content in G.711 formats, user must download video clips.

Getting started with out-of-box save frame sample

  1. Clone the code:
git clone https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface.git
  1. Copy SoC SDK dependencies into3rdparty/$BOARD/. See3rdparty/README.md.
  2. Build the code:
export CC=${YOUR_C_TOOLCHAIN}export CXX=${YOUR_CXX_TOOLCHAIN}cd amazon-kinesis-video-streams-media-interfacemkdir build;cd build; cmake .. -DBUILD_WEBRTC_SAMPLES=OFF -DBUILD_SAVE_FRAME_SAMPLES=ON -DBOARD=${YOUR_BOARD_NAME}make
  1. Execute sample on your board:./saveframe-static $FILE_NAME

Cross compile FILE board

To cross compileFILE board sample, user need to setupCC,CXX,USE_MUCLIBC andBOARD_DESTINATION_PLATFORM.

For ARM boards with uclibc:

export CC=${YOUR_C_TOOLCHAIN}export CXX=${YOUR_CXX_TOOLCHAIN}cd amazon-kinesis-video-streams-media-interfacemkdir build;cd buildcmake .. -DBOARD=FILE -DUSE_MUCLIBC=ON -DBOARD_DESTINATION_PLATFORM=arm-unknown-linux-uclibc

If board is using glibc, use cmake commandcmake .. -DBOARD=FILE -DUSE_MUCLIBC=OFF -DBOARD_DESTINATION_PLATFORM=arm-unknown-linux-gnu instead.

For MIPS boards with uclibc:

export CC=${YOUR_C_TOOLCHAIN}export CXX=${YOUR_CXX_TOOLCHAIN}cd amazon-kinesis-video-streams-media-interfacemkdir build;cd buildcmake .. -DBOARD=FILE -DUSE_MUCLIBC=ON -DBOARD_DESTINATION_PLATFORM=mips-unknown-linux-uclibc

If board is using glibc, use cmake commandcmake .. -DBOARD=FILE -DUSE_MUCLIBC=OFF -DBOARD_DESTINATION_PLATFORM=mips-unknown-linux-gnu instead.

Platform Implementation Guide

To adapt other platforms SDKs withAmazon Kinesis Video Streams Media Interface, you need to implement interfaces ininclude/com/amazonaws/kinesis/video/capturer/VideoCapturer.h,include/com/amazonaws/kinesis/video/capturer/AudioCapturer.h andinclude/com/amazonaws/kinesis/video/player/AudioPlayer.h:

  • VideoCapturer.h: abstract interfaces defined for video capturer sensor/encoder.
  • AudioCapturer.h: abstract interfaces defined for audio capturer sensor/encoder.
  • AudioPlayer.h: abstract interfaces defined for audio playback sensor/encoder.

The implementations of those interfaces should be put intosource/${BOARD_NAME} and follow the name rules:

  • ${BOARD_NAME}VideoCapturer.c
  • ${BOARD_NAME}AudioCapturer.c
  • ${BOARD_NAME}AudioPlayer.c

After implementation, you also need to create a platform specific CMake file inCMake named as${BOARD_NAME}.cmake:

if(BOARDSTREQUAL"BOARD_NAME")    set(BOARD_SDK_DIR${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/${BOARD})# Add board related SDK sources here    set(BOARD_SRCS    )# Add board related SDK header here    set(BOARD_INCS_DIR${BOARD_SDK_DIR}/include/${BOARD_SDK_DIR}/samples/libimp-samples/    )# Add board related SDK lib here    set(BOARD_LIBS_SHARED    )    set(BOARD_LIBS_STATIC    )endif()

Documentations

Documentations

Contributing

Contributing Guide

Code Of Conduct

Code Of Conduct

License

Apache 2.0

About

Amazon Kinesis Video Streams Media Interface provides abstract interfaces for board specific media APIs. This repository also contains boards sensors/encoder implementations for Amazon Kinesis Video Streams Producer and WebRTC with out-of-box samples.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors10


[8]ページ先頭

©2009-2025 Movatter.jp