Skip to main content
Share video content with support for multiple videos, captions, and metadata. Video posts support up to 10 videos per post with automatic thumbnail generation and rich text descriptions.

Multi-Video Support

Upload up to 10 videos per post with automatic thumbnails

Large File Support

Support for videos up to 2GB and 2 hours duration each

Overview

Video posts combine visual storytelling with descriptive text:
  • Multiple Videos: Up to 10 videos per post
  • Rich Captions: Text descriptions with mentions and hashtags
  • File Size Limit: Up to 2GB per video
  • Duration Limit: Maximum 2 hours per video
  • Format Support: Wide range of video formats
  • Parent-Child Structure: Each video becomes a child post
  • Structure Type: Pure video posts have structureType = 'video'
Want to combine videos with other media types (images, audio, or files)? Check out Mixed Media Posts which support up to 10 mixed attachments of any type.
RequirementLimitNotes
File SizeUp to 2GB per videoPlatform may have lower limits
DurationMaximum 2 hoursPer individual video
Video CountMaximum 10 videosPer single post
File Formatsmp4, mov, avi, mkv, webm, flv, 3gp, wmv, vob, ogv, 3g2, f4v, m4vPlatform dependent
HDR video format uploads are not supported on iOS platform.
Videos must be uploaded first before creating the post. See Video Handling for upload instructions.
1

Upload Videos

Use the File Repository to upload your video files and get file IDs
2

Create Post

Use the file IDs in your post creation request with captions
3

Handle Response

The post will contain parent and child posts for each video
4

Monitor Progress

Track video processing and thumbnail generation status

Parameters

ParameterTypeRequiredDescription
textStringCaption text (max 20,000 characters)
videos/videoFilesArrayVideo files or uploaded video data
targetTypeEnumTarget type (user or community)
targetIdStringTarget ID (userId or communityId)
metadataObjectCustom metadata
func createVideoPostExample(videos: [AmityVideoData], text: String) async {
    // Build your post structure
    let builder = AmityVideoPostBuilder()
    builder.setText(text)
    builder.setVideos(videos)
    // Create a post from the builder
    do {
        let post = try await postRepository.createVideoPost(builder, targetId: nil, targetType: .user, metadata: nil, mentionees: nil)
    } catch {
        // Handle error here
    }
}

Troubleshooting

Problem: Video uploads fail or timeout during uploadSolutions:
  • Check file size (must be under 2GB per video)
  • Verify supported format (mp4, mov, avi, etc.)
  • Ensure stable internet connection for large files
Problem: Videos appear low quality or take long to loadSolutions:
  • Upload videos at optimal resolution (1080p recommended)
  • Use appropriate bitrate (2-5 Mbps for 1080p)
  • Choose efficient codecs (H.264 recommended)
  • Consider adaptive bitrate streaming for large videos
Problem: HDR videos not uploading on iOSSolution: HDR video formats are not supported on iOS platform. Please convert to standard format.
// Check for HDR and convert if needed
if (Platform.OS === 'ios' && videoInfo.isHDR) {
   convertToStandardFormat(videoFile)
     .then(convertedFile => {
       // Proceed with converted file
     })
     .catch(error => {
       console.error('HDR conversion failed:', error);
     });
}
Problem: Video thumbnails not generating or appearing incorrectSolutions:
  • Wait for video processing to complete before displaying
Problem: Videos exceed 2-hour duration limitSolution: Validate duration before upload and provide trimming options
// Validate video duration
const validateDuration = (duration) => {
  const maxDuration = 2 * 60 * 60; // 2 hours in seconds
  if (duration > maxDuration) {
    throw new Error('Video duration exceeds 2-hour limit. Please trim the video.');
  }
};

Common Use Cases

  • Video Sharing: Share personal videos and memories
  • Tutorials: Create step-by-step instructional content
  • Live Updates: Share real-time event footage
  • Product Demos: Showcase products in action
  • Entertainment: Share funny clips and entertainment content
  • Educational Content: Distribute learning materials and lectures