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

# Camel.toolkits.video download toolkit

<a id="camel.toolkits.video_download_toolkit" />

<a id="camel.toolkits.video_download_toolkit._capture_screenshot" />

## \_capture\_screenshot

```python theme={"system"}
def _capture_screenshot(video_file: str, timestamp: float):
```

Capture a screenshot from a video file at a specific timestamp.

**Parameters:**

* **video\_file** (str): The path to the video file.
* **timestamp** (float): The time in seconds from which to capture the screenshot.

**Returns:**

Image.Image: The captured screenshot in the form of Image.Image.

<a id="camel.toolkits.video_download_toolkit.VideoDownloaderToolkit" />

## VideoDownloaderToolkit

```python theme={"system"}
class VideoDownloaderToolkit(BaseToolkit):
```

A class for downloading videos and optionally splitting them into
chunks.

**Parameters:**

* **working\_directory** (Optional\[str], optional): The directory where the video will be downloaded to. If not provided, video will be stored in a temporary directory and will be cleaned up after use. (default: :obj:`None`)
* **cookies\_path** (Optional\[str], optional): The path to the cookies file for the video service in Netscape format. (default: :obj:`None`)

<a id="camel.toolkits.video_download_toolkit.VideoDownloaderToolkit.__init__" />

### **init**

```python theme={"system"}
def __init__(
    self,
    working_directory: Optional[str] = None,
    cookies_path: Optional[str] = None,
    timeout: Optional[float] = None
):
```

<a id="camel.toolkits.video_download_toolkit.VideoDownloaderToolkit.__del__" />

### **del**

```python theme={"system"}
def __del__(self):
```

Deconstructor for the VideoDownloaderToolkit class.

Cleans up the downloaded video if they are stored in a temporary
directory.

<a id="camel.toolkits.video_download_toolkit.VideoDownloaderToolkit.download_video" />

### download\_video

```python theme={"system"}
def download_video(self, url: str):
```

Download the video and optionally split it into chunks.

yt-dlp will detect if the video is downloaded automatically so there
is no need to check if the video exists.

**Parameters:**

* **url** (str): The URL of the video to download.

**Returns:**

str: The path to the downloaded video file.

<a id="camel.toolkits.video_download_toolkit.VideoDownloaderToolkit.get_video_bytes" />

### get\_video\_bytes

```python theme={"system"}
def get_video_bytes(self, video_path: str):
```

Download video by the path, and return the content in bytes.

**Parameters:**

* **video\_path** (str): The path to the video file.

**Returns:**

bytes: The video file content in bytes.

<a id="camel.toolkits.video_download_toolkit.VideoDownloaderToolkit.get_video_screenshots" />

### get\_video\_screenshots

```python theme={"system"}
def get_video_screenshots(self, video_path: str, amount: int):
```

Capture screenshots from the video at specified timestamps or by
dividing the video into equal parts if an integer is provided.

**Parameters:**

* **video\_path** (str): The local path or URL of the video to take screenshots.
* **amount** (int): the amount of evenly split screenshots to capture.

**Returns:**

List\[Image.Image]: A list of screenshots as Image.Image.

<a id="camel.toolkits.video_download_toolkit.VideoDownloaderToolkit.get_tools" />

### get\_tools

```python theme={"system"}
def get_tools(self):
```

**Returns:**

List\[FunctionTool]: A list of FunctionTool objects representing
the functions in the toolkit.
