Class KrakenVideoHelper

java.lang.Object
com.github.twitch4j.kraken.util.KrakenVideoHelper

@Deprecated public final class KrakenVideoHelper extends Object
Deprecated.
Kraken is deprecated and has been shut down on Febuary 28, 2022. More details about the deprecation are available here.
  • Field Details

    • MAX_PIECE_LENGTH

      public static final int MAX_PIECE_LENGTH
      Deprecated.
      Max size of a video part byte array; avoids hitting 25MB.

      This is conservatively set to just over 18 MiB based on testing which values avoid peer connection resets.

      See Also:
    • MIN_PIECE_LENGTH

      public static final int MIN_PIECE_LENGTH
      Deprecated.
      Minimum size of a video part byte array, 5 MiB.
      See Also:
  • Method Details

    • uploadVideo

      public static CompletableFuture<KrakenVideo> uploadVideo(@NonNull @NonNull TwitchKraken api, String authToken, String channelId, @NonNull @NonNull String title, String description, String game, String language, List<String> tags, String viewable, Instant viewableAt, @NonNull @NonNull InputStream inputStream, int pieceLength, long sleepBetweenRequests)
      Deprecated.
      Uploads a video to the channel of an affiliate or partner.

      Helper function to automate the process of creating the video, uploading the parts, and marking the upload as complete.

      Videos with the following formats can be uploaded:

      • MP4, MOV, AVI and FLV file formats
      • AAC audio
      • h264 codec
      • Up to 10Mbps bitrate
      • Up to 1080p/60FPS
      There is a rate limit of 5 simultaneous uploads per user, with a maximum of 100 uploads in 24 hours.
      Parameters:
      api - Required: A TwitchKraken instance.
      authToken - Required: Auth Token (scope: channel_editor) that is authorized to upload to the specified channel.
      channelId - Optional: The id of the channel to upload to. If absent, it will use the user id associated with the auth token.
      title - Required: The title for the uploaded video (maximum 100 characters).
      description - Optional: A short description for the video.
      game - Optional: The name of the game in the video.
      language - Optional: Language of the video (for example, en).
      tags - Optional: Tags describing the video. Maximum: 100 characters per tag, 500 characters for the entire list.
      viewable - Optional: Specifies who can view the video. Valid values: public or private. Default: public.
      viewableAt - Optional: Date when the video will become public (if initially private).
      inputStream - Required: The stream of bytes containing the video. Must be encoded in a format supported by Twitch.
      pieceLength - Optional: The number of bytes of video for each video part to be uploaded. Invalid values will be clamped into the valid range.
      sleepBetweenRequests - Optional: The time to sleep after each video part upload. Invalid values will be treated as zero.
      Returns:
      a future wrapper around the uploaded video
      See Also: