> For the complete documentation index, see [llms.txt](https://docs.podigee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podigee.com/documentation/start-here/ai-agents/transfer-media-encode-and-publish/prepare-an-audio-or-video-file-for-upload.md).

# Prepare an audio or video file for upload

Check a local media file's name, type, size, quota, and podcast readiness before transfer.

Check the file and account before you create an upload session.

## Before you start

* Select the target Podigee account and podcast.
* Run the podcast readiness check.
* Confirm available storage and encoding allowance.

## Prepare the file

1. Confirm that the file plays locally and is complete.
2. Use a simple base filename with no path, control character, slash, or backslash.
3. Keep the filename at 255 bytes or fewer.
4. Use a supported audio extension: `.mp3`, `.m4a`, `.opus`, or `.ogg`, or a supported Podigee video extension.
5. Detect the actual media content type and make sure it matches the extension.
6. Record the exact byte size. Do not estimate it.
7. Confirm that the size is between 1 byte and 20 GiB.
8. Prepare one stable upload idempotency key.

The upload request uses the exact filename, byte size, content type, and idempotency key.

## Expected result

The file has a supported name and media type, its exact size fits the current limit, and the account has capacity for a new session.

## If the file is rejected

Do not change only the declared extension or content type. Confirm the actual format, export a supported media file when needed, and create a new upload request with accurate metadata.

## Next step

[Upload local media with the pdg CLI](/documentation/start-here/ai-agents/transfer-media-encode-and-publish/upload-local-media-with-the-pdg-cli.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.podigee.com/documentation/start-here/ai-agents/transfer-media-encode-and-publish/prepare-an-audio-or-video-file-for-upload.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
