📸 Media Formats
Image specifications and recommendations
- Supported image media types: JPG, PNG, GIF, WEBP
- Image size <= 5 MB, animated GIF size <= 15 MB
Animated GIF recommendations
- Supported format: GIF
- Resolution should be <= 1280x1080 (width x height)
- Number of frames <= 350
- Number of pixels (width * height * num_frames) <= 300 million
- File size <= 15Mb
Videos
- Supported formats: MP4, MOV/QuickTime
- Frame rate must be 60 FPS or less
- Dimensions must be between 32x32 and 1280x1024
- File size must not exceed 512 mb
- Duration must be between 0.5 seconds and 140 seconds
- Aspect ratio must be between 1:3 and 3:1
- Must have 1:1 pixel aspect ratio
- Only YUV 4:2:0 pixel format is supported
- Audio must be AAC with Low Complexity profile. High-Efficiency AAC is not supported
- Audio must be mono or stereo, not 5.1 or greater
- Must not have open GOP
- Must use progressive scan
Recommended:
- Recommended Video Codec: H264 High Profile
- Recommended Frame Rates: 30 FPS, 60 FPS
- Recommended Video Resolution: 1280x720 (landscape), 720x1280 (portrait), 720x720 (square)
- Recommended Minimum Video Bitrate: 5,000 kbps
- Recommended Minimum Audio Bitrate: 128 kbps
- Recommended Audio Codec: AAC LC
- Recommended Aspect Ratio: 16:9 (landscape or portrait), 1:1 (square)
Checkout the complete twitter documention for media support here -> https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/uploading-media/media-best-practices