Mastodon Video Posts: Supported Formats and Length Limits
🔍 WiseChecker

Mastodon Video Posts: Supported Formats and Length Limits

Mastodon supports video uploads, but the platform enforces strict file format, size, and duration limits. Many users discover these limits only after a video fails to upload or plays incorrectly. The limits depend on the server your account belongs to because each Mastodon instance sets its own maximum file size and video length. This article explains which video formats Mastodon accepts, the default length limits, and how to check your instance’s specific rules.

Key Takeaways: Mastodon Video Upload Restrictions

  • Supported video file formats: MP4, WebM, Ogg, and MOV are accepted; H.264 and H.265 codecs work best for playback.
  • Default maximum video length: 40 minutes on most Mastodon instances, but your server admin may set a lower limit.
  • Instance-specific settings: Check your server’s max file size and video duration by viewing the server configuration page or asking your admin.

Mastodon Video Format and Size Specifications

Mastodon uses the same media handling code as the Pixelfed project, which relies on FFmpeg for video processing. The platform does not accept every video file type. Only specific container formats and codecs are guaranteed to work across different Mastodon clients and federated instances.

Accepted Container Formats

Mastodon accepts these video file containers:

  • MP4 (recommended) — most compatible across desktop and mobile clients
  • WebM — good for open-source workflows but not supported by all mobile apps
  • Ogg — primarily used for audio but also accepted for video
  • MOV — works but may generate larger files than MP4

Recommended Video Codecs

The video codec inside the container matters more than the container itself. Mastodon’s transcoding pipeline prefers H.264 for broad compatibility. H.265 is also supported but may cause playback issues on older clients. For WebM containers, use VP9. Avoid AV1 because most Mastodon instances cannot transcode it, and many clients lack hardware decoding support.

Default File Size and Duration Limits

The official Mastodon server software sets a default maximum file size of 40 MB for all uploads, including video. The default maximum video duration is 40 minutes. However, instance administrators can change both values. Smaller instances often reduce the limit to 10 MB or 15 minutes to save disk space. Large instances may increase the limit to 100 MB or 60 minutes.

How to Check Your Instance Video Limits

You must know your specific Mastodon instance’s limits before uploading a video. Follow these steps to find the information.

  1. Open the server about page
    Go to your instance’s homepage and click the server name or logo. On most instances, the URL is something like https://instance.name/about.
  2. Look for the media limits section
    Scroll down to find a section labeled “Server Rules” or “Server Configuration.” Some instances list the maximum file size and video duration directly on this page.
  3. Use the API endpoint as an alternative
    If the about page does not show the limits, open a new browser tab and go to https://instance.name/api/v1/instance. Replace instance.name with your server’s domain. Look for the max_media_attachments_size value in the JSON response. The number is in bytes. Divide by 1,048,576 to convert to megabytes.
  4. Ask your admin directly
    Send a direct message to your instance admin or check the server’s community forum. Many admins post configuration details in a pinned post.

Common Video Upload Problems and Their Causes

Knowing the limits helps you avoid the most frequent upload failures. Here are three common issues and how to solve them.

Video Upload Fails Without an Error Message

The file size exceeds your instance’s maximum. Open the server about page as described above and confirm the limit. Use a video editing tool like HandBrake to reduce the file size. Set the video bitrate to 2,000 kbps for 1080p or 1,000 kbps for 720p. This usually brings a 5-minute MP4 under 40 MB.

Video Plays but Has No Sound

Mastodon’s transcoder strips audio from video files that use unsupported audio codecs. Use AAC or MP3 audio inside your MP4 container. If you use a WebM container, use Opus audio. Re-encode the file with FFmpeg using the command ffmpeg -i input.mp4 -c:v libx264 -c:a aac output.mp4.

Video Shows a Black Screen on Mobile Clients

The video uses a codec or resolution that mobile browsers cannot decode. Stick to H.264 at 1920×1080 resolution maximum. Avoid 4K resolution and H.265 codec for general uploads. If you must upload 4K, resize the video to 1080p before uploading.

Mastodon Video Limits Compared to Other Platforms

Item Mastodon (default) Twitter / X
Max file size 40 MB 512 MB for verified users, 64 MB for unverified
Max video duration 40 minutes 2 minutes 20 seconds
Max resolution 1920×1080 recommended 1920×1080
Accepted containers MP4, WebM, Ogg, MOV MP4, MOV

Mastodon allows much longer videos than Twitter, but the file size limit is smaller. This means you must balance duration against quality. A 40-minute video at 1080p with H.264 can fit within 40 MB only if you use a very low bitrate, which reduces visual quality. For long videos, consider splitting the content into multiple posts or hosting the video externally and sharing a link.

If Your Video Still Fails After Adjusting Format and Size

Some Mastodon clients impose their own additional limits. The official web interface and the official mobile apps follow the server limits. Third-party clients like Tusky, Fedilab, and Mona may reject videos that the server would accept. If a video fails in your client, try uploading through the official Mastodon web interface in a desktop browser. If it works there, the issue is client-specific. Report the problem to the client developer with the server’s API response.

Video Stuck in Processing State

Mastodon transcodes every video upload on the server side. This process can take several minutes for long videos. If the video stays in “processing” for more than 10 minutes, the server may have run out of memory or disk space. Contact your instance admin and ask them to check the Sidekiq queue for stuck jobs. The admin can restart the transcoding worker process.

Federated Video Does Not Play on Other Instances

When you upload a video, your instance stores the file. Other instances fetch it only when their users view your post. If the remote instance has a smaller file size limit, it may refuse to download the video. The remote user will see a broken media icon. There is no fix for this on your end. The remote user must ask their admin to increase the file size limit. To avoid this problem, keep videos under 10 MB if you want them to reach the widest possible audience.

You now know exactly which video formats Mastodon supports and how to check your instance’s specific limits. Before uploading, verify your server’s maximum file size and duration. Use H.264 video with AAC audio inside an MP4 container for the best compatibility. For longer videos, reduce the bitrate or split the content into multiple posts. If you host your own Mastodon instance, consider increasing the max_media_attachments_size setting in the .env.production file to accommodate higher-quality video uploads for your users.