Skip to main content
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

  • Mobile SDKs (iOS/Android/Flutter)
  • TypeScript SDK
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

Automatic video enhancement and optimizationCompression & Quality
  • Automatic Compression: Videos automatically compressed to 480p maximum resolution
  • Quality Balance: Optimal balance between file size and visual quality
Thumbnail Generation
  • Automatic Creation: Thumbnails generated automatically from video frames
  • Smart Frame Selection: Intelligent selection of representative frames
Technical Specifications
  • Maximum File Size: Up to 1GB per video file
  • Resolution Limit: Automatic downscaling to 480p maximum
  • Supported Formats: MP4, MOV, AVI, MKV, and other common formats
Real-time upload feedback and comprehensive status trackingUpload Stages
  • Uploading: Active upload with progress percentage
  • Processing: Server-side video processing and compression
  • Complete: Upload finished, message created successfully
  • Failed: Upload or processing failed, retry available
Progress Tracking
  • Upload Progress: Real-time percentage (0-100%) during file transfer
  • Processing Status: Server-side processing stage indicators
User Experience
  • Visual Indicators: Progress bars and status messages
  • Background Upload: Continue upload while app is backgrounded
  • Cancellation: Allow users to cancel ongoing uploads
  • Retry Options: Easy retry for failed uploads
Rich text support for video descriptions and contextCaption Capabilities
  • Character Limit: Up to 1,000 characters for video captions
  • Rich Text: Support for emojis, formatting, and special characters
  • Multilingual: Full Unicode support for international content
Content Organization
  • Descriptive Captions: Provide context and summary for videos
  • Keywords: Include relevant keywords for searchability
  • Timestamps: Reference specific moments in longer videos
  • Context: Explain video purpose and key takeaways
Accessibility Support
  • Screen Readers: Captions provide context for accessibility tools
  • Content Summary: Brief description of video content
  • Alternative Text: Description for users who cannot view videos
  • Search Optimization: Searchable text content for video discovery
Best Practices
  • Concise Descriptions: Clear, informative captions under character limit
  • Action Items: Include relevant action items or next steps
  • Hashtags: Use consistent hashtags for content categorization
  • Professional Tone: Maintain appropriate tone for business communication
Example: Rich Video Caption
const videoMessage = {
  subChannelId: 'team-updates',
  dataType: MessageContentType.VIDEO,
  fileId: uploadedFileId,
  caption: `🎯 Sprint Review - Week 12 Summary
  
Key Achievements:
• Feature X deployment successful ✅
• User engagement up 25% 📈
• Zero critical bugs reported 🐛

Next Week Focus:
• Performance optimization
• Mobile app testing
• Client feedback integration

@team-leads please review and share feedback by Friday!

#sprint-review #team-update #weekly-summary`,
  tags: ['sprint-review', 'weekly-update', 'achievements'],
  metadata: {
    sprint: {
      number: 12,
      achievements: 3,
      next_focus_items: 3,
      review_deadline: '2024-01-19'
    }
  }
};
Efficient video handling and delivery optimizationUpload Optimization
  • Chunked Upload: Large files uploaded in chunks for reliability
  • Compression: Client-side compression before upload when possible
  • Background Processing: Upload continues in background
  • Resume Support: Resume interrupted uploads automatically
Playback Optimization
  • Adaptive Streaming: Quality adjustment based on network conditions
  • Progressive Download: Start playback while download continues
  • Thumbnail Preloading: Load thumbnails for quick preview
  • Cache Management: Intelligent caching for frequently viewed videos
Network Efficiency
  • Bandwidth Detection: Adapt upload/download based on connection speed
  • Quality Selection: Allow users to choose video quality
  • Offline Support: Cache videos for offline viewing
  • CDN Integration: Leverage content delivery networks for global access
Memory Management
  • Lazy Loading: Load video content on-demand
  • Memory Cleanup: Automatic cleanup of video resources
  • Efficient Decoding: Optimize video decoding for device capabilities
  • Resource Pooling: Reuse video processing resources efficiently
Mobile Considerations
  • Battery Optimization: Minimize battery usage during video operations
  • Storage Management: Monitor device storage for large video files
  • Network Awareness: Pause uploads on metered connections
  • Background Limits: Respect platform background execution limits
Example: Optimized Video Handling
class VideoMessageManager {
  static const int MAX_CACHE_SIZE_MB = 100;
  static const int MAX_CONCURRENT_UPLOADS = 2;
  
  Future<void> uploadVideoOptimized(File videoFile) async {
    // Pre-upload validation
    if (await getFileSize(videoFile) > 1024 * 1024 * 1024) {
      throw Exception('File too large');
    }
    
    // Check network conditions
    final networkInfo = await getNetworkInfo();
    if (networkInfo.isMetered) {
      final userConsent = await askUserConsent();
      if (!userConsent) return;
    }
    
    // Optimize upload based on network
    final uploadConfig = networkInfo.speed > 10 
      ? UploadConfig.highSpeed() 
      : UploadConfig.lowSpeed();
      
    await uploadWithConfig(videoFile, uploadConfig);
  }
}
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.