Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,4 +10,122 @@ pinned: false
|
|
| 10 |
license: unknown
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
license: unknown
|
| 11 |
---
|
| 12 |
|
| 13 |
+
|
| 14 |
+
# Video Combiner Tool
|
| 15 |
+
|
| 16 |
+
## Overview
|
| 17 |
+
|
| 18 |
+
The Video Combiner Tool is a web application that allows users to combine multiple videos from provided URLs into a single video file. The combined video is then uploaded to Vimeo, and a playable link is generated for easy sharing. This tool is built using FastAPI for the backend and Gradio for the user interface.
|
| 19 |
+
|
| 20 |
+
## Features
|
| 21 |
+
|
| 22 |
+
- Combine multiple videos from URLs into one video.
|
| 23 |
+
- Upload the combined video to Vimeo.
|
| 24 |
+
- Generate a shareable link to the combined video.
|
| 25 |
+
- User-friendly interface for adding video URLs.
|
| 26 |
+
|
| 27 |
+
## Technologies Used
|
| 28 |
+
|
| 29 |
+
- **Backend**: FastAPI
|
| 30 |
+
- **Frontend**: Gradio
|
| 31 |
+
- **Video Processing**: OpenCV
|
| 32 |
+
- **Video Upload**: PyVimeo (Vimeo API)
|
| 33 |
+
|
| 34 |
+
## Prerequisites
|
| 35 |
+
|
| 36 |
+
Before you begin, ensure you have met the following requirements:
|
| 37 |
+
|
| 38 |
+
- Python 3.7 or later
|
| 39 |
+
- Access to a Vimeo account with API access
|
| 40 |
+
- Installed required Python packages
|
| 41 |
+
|
| 42 |
+
## Installation
|
| 43 |
+
|
| 44 |
+
1. **Clone the repository**:
|
| 45 |
+
```bash
|
| 46 |
+
git clone https://github.com/yourusername/video-combiner.git
|
| 47 |
+
cd video-combiner
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
2. **Create a virtual environment (optional but recommended)**:
|
| 51 |
+
```bash
|
| 52 |
+
python -m venv venv
|
| 53 |
+
source venv/bin/activate # On Windows use `venv\Scripts\activate`
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
3. **Install required packages**:
|
| 57 |
+
```bash
|
| 58 |
+
pip install fastapi[all] opencv-python PyVimeo gradio requests
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
4. **Set up Vimeo API credentials**:
|
| 62 |
+
- Create a `.env` file in the root directory of your project and add your Vimeo API credentials:
|
| 63 |
+
```
|
| 64 |
+
VIMEO_ACCESS_TOKEN=your_access_token
|
| 65 |
+
VIMEO_CLIENT_ID=your_client_id
|
| 66 |
+
VIMEO_CLIENT_SECRET=your_client_secret
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## Running the Application
|
| 70 |
+
|
| 71 |
+
1. **Start the FastAPI server**:
|
| 72 |
+
Navigate to the directory containing `app.py` and run:
|
| 73 |
+
```bash
|
| 74 |
+
uvicorn app:app --host 0.0.0.0 --port 8080
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
2. **Launch the Gradio interface**:
|
| 78 |
+
In another terminal, navigate to the directory containing `main.py` and run:
|
| 79 |
+
```bash
|
| 80 |
+
python main.py
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
3. **Access the application**:
|
| 84 |
+
Open your web browser and go to `http://localhost:7860` to access the Gradio interface.
|
| 85 |
+
|
| 86 |
+
## Usage Instructions
|
| 87 |
+
|
| 88 |
+
1. **Add Video URLs**:
|
| 89 |
+
- Enter a valid video URL in the input box and click "Add URL".
|
| 90 |
+
- Repeat this step to add multiple video URLs.
|
| 91 |
+
|
| 92 |
+
2. **Combine Videos**:
|
| 93 |
+
- Once you have added all desired video URLs, click on "Combine Videos".
|
| 94 |
+
- The application will process your request, combine the videos, and upload them to Vimeo.
|
| 95 |
+
|
| 96 |
+
3. **View Combined Video**:
|
| 97 |
+
- After processing, an embedded Vimeo player will display your combined video.
|
| 98 |
+
- The direct link to your Vimeo video will also be shown below the player for easy sharing.
|
| 99 |
+
|
| 100 |
+
4. **Download Option** (if implemented):
|
| 101 |
+
- You can download the combined video directly if this feature is enabled.
|
| 102 |
+
|
| 103 |
+
## Troubleshooting
|
| 104 |
+
|
| 105 |
+
- Ensure that all provided URLs are valid and accessible.
|
| 106 |
+
- Check your Vimeo account settings if you encounter issues with uploading videos.
|
| 107 |
+
- Make sure all required packages are installed correctly.
|
| 108 |
+
|
| 109 |
+
## Contributing
|
| 110 |
+
|
| 111 |
+
Contributions are welcome! If you have suggestions for improvements or new features, please create an issue or submit a pull request.
|
| 112 |
+
|
| 113 |
+
## License
|
| 114 |
+
|
| 115 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
| 116 |
+
|
| 117 |
+
## Acknowledgments
|
| 118 |
+
|
| 119 |
+
- [FastAPI](https://fastapi.tiangolo.com/)
|
| 120 |
+
- [Gradio](https://gradio.app/)
|
| 121 |
+
- [OpenCV](https://opencv.org/)
|
| 122 |
+
- [Vimeo API](https://developer.vimeo.com/)
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
### Notes:
|
| 126 |
+
|
| 127 |
+
1. Replace `https://github.com/yourusername/video-combiner.git` with your actual GitHub repository URL.
|
| 128 |
+
2. Ensure that you create a LICENSE file if you mention licensing in your README.
|
| 129 |
+
3. Adjust any sections as necessary based on additional features or changes in your project structure.
|
| 130 |
+
|
| 131 |
+
This README provides clear instructions on how to set up, run, and use your Video Combiner Tool, making it easier for users to understand its functionality and get started quickly!
|