Media Analysis
One of the features introduced to improve the reliability of the social media posting feature is the analysis of media to verify that they comply with the requirements of social media providers. When a user wants to post a photo or a video, the application first verifies that the media provided complies with the requirements imposed by the selected social media platform for that particular video or image.
Hard and soft requirements
We distinguish between two different types of requirements: hard and soft.
A hard requirement is a requirement whose violation will inevitably result in a post failing. On most social media platforms, hard requirements are typically imposed only on two media attributes: file size and video duration.
Almost all other requirements are soft, meaning that the social media platform recommends them for better visuals. Violations of these requirements do not necessarily cause a post to fail.


| Attribute | Type of media | Description |
|---|---|---|
width | image, video | The width of the media in pixels |
height | image, video | The height of the media in pixels |
formats | image, video | The format of the media |
fps | video | The frames per second of the video |
videoBitrate | video | The video bitrate, expressed in bytes per second |
audioBitrate | video | The audio bitrate, expressed in bytes per second |
videoCodec | video | The video codec of the video |
audioCodec | video | The audio codec of the video |
Media analysis workflow and consequences
Each time a user attaches a media file to a social media content object, the application calls the /verify endpoint of the Social Media Service to verify that all attributes of the media comply with the requirements imposed by the social media provider expected to host the post. There are three possible outcomes:
- All attributes are compliant — the post can be created by the user.
- One or more attributes violate a hard requirement — the user cannot create a post until they provide compliant media.
- One or more attributes violate a soft requirement — the user is allowed to create a post, but only after accepting via a dialog confirmation that the post may not succeed.
