> ## Documentation Index
> Fetch the complete documentation index at: https://www.openpmm.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube media guidelines

> See the video limits that OpenPMM applies to YouTube Destinations and uploads.

YouTube accepts one video for each post. A Short has additional limits. The
Asset `kind` is always `video`. Set `destination_options.youtube.kind` to
`video` for a regular upload or `short` for a Short. Read [Media
guidelines](/docs/media/overview) for the general rules.

## Media per post

A YouTube post needs exactly one video. It does not accept an image.

## Video limits

| Property  | Limit                                                                                     |
| --------- | ----------------------------------------------------------------------------------------- |
| File type | MP4, MOV, or WebM. YouTube accepts more containers, but OpenPMM uploads only these three. |
| Duration  | 12 hours maximum                                                                          |
| File size | 500 MiB. YouTube permits more, but the OpenPMM limit is lower.                            |

## Short limits

A Short is a post with `destination_options.youtube.kind` set to `short`.

| Property | Limit                                                           |
| -------- | --------------------------------------------------------------- |
| Shape    | Square or vertical. The width must not be more than the height. |
| Duration | 3 minutes maximum                                               |

## Select a thumbnail frame

Set `destination_options.youtube.thumbnail_timestamp_ms` to select a video
frame. The value is an integer number of milliseconds. It must be less than
the video duration.

OpenPMM extracts the frame and sends it to YouTube as a custom thumbnail. This
setting works with a regular video or a Short. Omit the field or use `null` to
let YouTube select the thumbnail.

For example, use `1000` to select the frame at 1 second:

```json theme={null}
{
  "youtube": {
    "kind": "short",
    "privacy_status": "private",
    "category_id": "22",
    "self_declared_made_for_kids": false,
    "contains_synthetic_media": false,
    "notify_subscribers": false,
    "thumbnail_timestamp_ms": 1000
  }
}
```

YouTube can reject a custom thumbnail when the channel does not have
permission. OpenPMM retries a temporary failure up to three times. Thumbnail
failure does not block the video. OpenPMM records the video as published.

## Recommended encoding

YouTube recommends these values. OpenPMM gives advice for a different value, but it does not block the post.

* MP4 container with fast start
* H.264 video codec
* YUV 4:2:0 pixel format
* Progressive scan
* Closed group of pictures (GOP)
* AAC audio at 48 kHz

## Limits that OpenPMM cannot check

YouTube needs a verified account for a video that is longer than 15 minutes. OpenPMM cannot read the verification status of your channel. Verify the channel in YouTube before you publish a long video.

## Provider documentation

[YouTube supported formats](https://support.google.com/youtube/troubleshooter/2888402), [recommended encoding](https://support.google.com/youtube/answer/1722171), and [thumbnail requirements](https://developers.google.com/youtube/v3/docs/thumbnails/set)
