# get_video_from_path

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/media_utils/get_video_from_path)

Read and encode a video file from disk.

## Signature

```python
get_video_from_path(
    path: pathlib.Path,
) -> VideoData | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `path` | `pathlib.Path` | Yes | Path to the video file. |

## Returns

`VideoData | None`

`VideoData` when the file is a valid video, otherwise `None`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/d1c6946218b4f0f86ab7b02b6bb6af1e4b75cede/libs/code/deepagents_code/media_utils.py#L201)