Rich Video Communication: Video messages enable dynamic visual storytelling with automatic video processing, thumbnail generation, and optimized delivery. Share everything from quick clips to detailed content with up to 1GB file support and automatic 480p optimization.

Video Messaging Overview

Video messages provide powerful multimedia communication capabilities, allowing users to share video content with automatic processing, thumbnail generation, and optimized delivery across all platforms.

Automatic Processing

Intelligent video handling
  • Automatic video compression to 480p
  • Thumbnail generation for previews
  • Format optimization for web delivery
  • Progress tracking during upload

Large File Support

Robust file handling
  • Up to 1GB file size support
  • Multiple video format compatibility
  • Efficient upload with resume capability
  • Background processing and optimization

Platform Implementation

Unified video handling with automatic uploadMobile SDKs provide streamlined video messaging with automatic upload processing and optimization, eliminating the need for separate upload steps.

Required Parameters

ParameterTypeDescription
subChannelIdStringTarget subchannel identifier for the video message
attachmentVideo/URILocal video file path or URI reference

Optional Parameters

ParameterTypeDescription
captionStringText description or caption for the video (max 1,000 characters)
fileNameStringCustom filename for the uploaded video
tagsArray<String>Message categorization and filtering tags
parentIdStringParent message ID for threaded conversations
metadataObjectCustom properties for extended functionality

Implementation Examples

// Create video message with local file
let videoUrl = URL(fileURLWithPath: "/path/to/local/video.mp4")
let options = AmityVideoMessageCreateOptions(
    subChannelId: "subChannel-123",
    attachment: .localURL(url: videoUrl),
    fileName: "team_presentation.mp4",
    tags: ["presentation", "team", "quarterly"],
    parentId: nil
)

do {
    let message = try await messageRepository.createVideoMessage(options: options)
    print("Video message sent: \(message.messageId)")
    
    // Access video details
    if let videoData = message.data as? AmityMessageVideoData {
        print("Video duration: \(videoData.duration)")
        print("Thumbnail URL: \(videoData.thumbnailUrl)")
    }
} catch {
    // Handle upload or creation error
    print("Failed to send video: \(error)")
}
Automatic Optimization: Mobile SDKs automatically compress videos to 480p maximum resolution and generate thumbnails for optimal performance and user experience.

Video Message Features

Implementation Strategy: Start with basic video messaging using platform-specific patterns (unified upload for mobile, two-step for web), then add features like captions, metadata, and threading. Always implement proper progress feedback and handle large file uploads gracefully with appropriate user feedback.