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

# Upload videos in Python (video tutorial)

[githublink]: https://github.com/cloudinary-devs/python-cloudinary-video-upload

## Overview

Learn how to upload videos in Python using the Cloudinary Python SDK.

## Video tutorial

  This video is brought to you by Cloudinary's video player - embed your own!Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.

> **TIP**: :title=View the code

You can find the code from this tutorial in [GitHub][githublink].
## Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.### Introduction
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=00 :player=cld} | In this tutorial, you'll learn how to upload small and large videos to Cloudinary using the Python SDK, a crucial part of your workflow.

### Upload a small video from your local file system
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=13 :player=cld} | This tutorial assumes that you've already installed, imported and configured Cloudinary. If you need help with that, see [Configure the Python SDK](python_configuration_tutorial). To upload, make sure the `cloudinary.uploader` library is imported. Use the `cloudinary.uploader.upload` endpoint for the upload, pass the full path of the video as the first parameter and specify `resource_type` as `video` for the second. Print the `secure_url` from the response. Here's an example using a file named `videos/short_video.mp4`.

```python
file_name = "videos/short_video.mp4"

response = cloudinary.uploader.upload(file_name,
   resource_type = "video")

print(response["secure_url"])
```

### Run the script to upload a small video
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=1 :sec=01 :player=cld} | Execute your script to upload the video and display the secure URL from the response. Open the newly uploaded video in a browser using that secure URL.

### Upload a large video from your local file system
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=1 :sec=15 :player=cld} | Keep in mind that the `upload` method only supports files up to 100 megabytes. To upload larger videos, use the `upload_large` method, which has the same signature and options as `upload`. Pass the full path of the video as the first parameter and specify `resource_type` as `video` for the second. Break the video upload into 6 megabyte chunks. Here's an example using a file named `videos/long_video.mp4`.

```python
file_name = "videos/long_video.mp4"

response = cloudinary.uploader.upload(file_name,
   resource_type = "video",
   chunk_size = 6000000)

print(response["secure_url"])
```

### Run the script to upload a small video
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=1 :sec=34 :player=cld} | Uploading your large video might take a while depending on its size. Once the upload is done, the secure URL from the response JSON is displayed in the terminal. Open the newly uploaded video in a browser using that secure URL.

## Keep learning

> **READING**:
>
> * Learn more about [uploading images and videos using the Python SDK](django_image_and_video_upload).

> * Take a look at our [Upload guide](upload_images) to learn about uploading to Cloudinary in general.

> * Use the [Upload API reference](image_upload_api_reference) to find all the options and parameters available.

> * Watch more [Dev Hints videos](https://www.youtube.com/playlist?list=PL8dVGjLA2oMpaTbvoKCaRNBMQzBUIv7N8) on the [Cloudinary YouTube channel](https://www.youtube.com/cloudinary).

#### If you like this, you might also like...

  
  
  
    Configure the Python SDK
    Install and configure the Cloudinary Python SDK 
  

  
  
  
    Upload Images in Python
    Upload images to Cloudinary using the Python SDK 
  

  
  
  
    Manage Images in a Django App
    Use Django helper methods to upload, transform, and display assets. 
  

&nbsp;

&nbsp;Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.
&nbsp;
