Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Run and verify the code

Focus mode
Run and verify the code - Amazon Kinesis Video Streams

To run the Java test harness for the Java producer library, do the following.

  1. Choose DemoAppMain.

  2. Choose Run, Run 'DemoAppMain'.

  3. Add your credentials to the JVM arguments for the application:

    • For non-temporary AWS credentials: "-Daws.accessKeyId={YourAwsAccessKey} -Daws.secretKey={YourAwsSecretKey} -Djava.library.path={NativeLibraryPath}"

    • For temporary AWS credentials: "-Daws.accessKeyId={YourAwsAccessKey} -Daws.secretKey={YourAwsSecretKey} -Daws.sessionToken={YourAwsSessionToken} -Djava.library.path={NativeLibraryPath}"

  4. Sign in to the AWS Management Console and open the Kinesis Video Streams console.

    On the Manage Streams page, choose your stream.

  5. The sample video will play in the embedded player. You might need to wait a short time (up to ten seconds under typical bandwidth and processor conditions) while the frames accumulate before the video appears.

The code example creates a stream. As the MediaSource in the code starts, it begins sending sample frames to the KinesisVideoClient. The client then sends the data to your Kinesis video stream.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.