duration
duration · Recommended
Appears in
What is it?
duration specifies how long a video runs, expressed in ISO 8601 duration format. Google displays this value as the video length in video rich results, helping users decide whether to watch before clicking.
Why this matters for AEO
When a user asks "quick tutorial on Webflow forms," AI engines filter by duration to match the "quick" intent. A 3-minute video with duration set to PT3M ranks differently than a 45-minute deep dive. Without this field, the AI cannot assess whether the video length matches the user's time expectation. AI assistants that present video results display duration prominently to help users choose between options.
What the specs say
Schema.org: Duration or QuantitativeValue. The duration of the item (movie, audio recording, event, etc.) in ISO 8601 duration format. schema.org/duration
Google: Recommended. "The duration of the video in ISO 8601 format. For example, PT00H30M5S represents a duration of 'thirty minutes and five seconds'." Google Video Structured Data
How to find your value
- YouTube — Video page shows duration; YouTube Data API
contentDetails.durationreturns ISO 8601 - Vimeo — Video settings or API
durationfield (in seconds; convert to ISO 8601) - Wistia — Dashboard shows duration; API returns seconds
- Self-hosted — Use
ffprobeor media info tools to get exact duration from the file - Manual — Convert hours:minutes:seconds to ISO 8601: 1h 30m 5s =
PT1H30M5S
Format and code
Expected type: Duration (ISO 8601 string)
The format is PT[hours]H[minutes]M[seconds]S. Zero-value segments can be included or omitted.
{
"@context": "https://schema.org",
"@type": "VideoObject",
"name": "Complete Webflow CMS Course",
"duration": "PT1H45M30S",
"thumbnailUrl": "https://example.com/images/webflow-course-thumb.jpg",
"uploadDate": "2024-04-01T10:00:00Z",
"description": "Full course covering Webflow CMS from collections to dynamic pages"
}
Common formats:
- 30 seconds —
PT30S - 5 minutes —
PT5MorPT5M0S - 10 min 25 sec —
PT10M25S - 1 hour 30 min —
PT1H30M - 9 min 51 sec —
PT0H9M51SorPT9M51S
Both PT0H9M51S (with zero hours) and PT9M51S (omitting hours) are valid. Google parses either format.
Invalid: Human-readable strings like "10 minutes" or "1:30:00." The value must be ISO 8601 duration format.
Webflow implementation
Static pages
In Page Settings > Custom Code > Head Code, add the duration in ISO 8601 format to your VideoObject JSON-LD. Convert the video length manually.
CMS template pages
Create a Plain Text CMS field for duration. Content editors enter the ISO 8601 value (e.g., PT10M25S). Reference it in your JSON-LD:
"duration": "{{wf {"path":"video-duration","type":"PlainText"} }}"
Alternatively, store duration in seconds as a Number field and convert to ISO 8601 in your embed code, though this requires custom JavaScript.
In Schema HQ
The duration field formats duration values into valid ISO 8601 automatically. It accepts input in seconds, minutes:seconds, or hours:minutes:seconds and converts to the correct format.
Real examples
Hotstar includes zero hours in the format:
{
"@type": "VideoObject",
"name": "Action Recap: Pakistan vs India",
"duration": "PT0H9M51S"
}
Source: hotstar.com
TED Talks omits the hours segment:
{
"@type": "VideoObject",
"name": "The levitating superconductor",
"duration": "PT10M25S"
}
Source: ted.com
Related fields
- uploadDate · When the video was published
- thumbnailUrl · Preview image for the video
- contentUrl · Direct link to the video file
- embedUrl · URL of the video player
- name · Video title displayed in rich results
- transcript — text transcript of audio or video content
FAQ
What ISO 8601 format does Google expect for duration?
Google expects the PT prefix followed by hours (H), minutes (M), and seconds (S). Examples: PT30S for 30 seconds, PT10M25S for 10 minutes 25 seconds, PT1H30M for 1 hour 30 minutes. Zero-value segments can be included (PT0H5M0S) or omitted (PT5M).
How do I convert seconds to ISO 8601 duration?
Divide total seconds by 3600 for hours, then by 60 for remaining minutes, then the remainder is seconds. Example: 625 seconds = 10 minutes 25 seconds = PT10M25S.
Does duration affect video ranking in Google?
Google does not use duration as a direct ranking factor, but it displays the value in video rich results. Videos with duration specified earn richer search snippets. Duration also helps Google understand video content for queries with time-related intent (e.g., "quick tutorial" vs. "full course").