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