|
| 1 | + |
| 2 | +## Components |
| 3 | + |
| 4 | +### Flask App (`flask_app/`) |
| 5 | +- **app.py:** Contains the Flask application code, handling API routes, and server setup. |
| 6 | +- **templates/:** Folder containing HTML templates for the frontend. |
| 7 | + |
| 8 | +### Video Processing (`video_processing/`) |
| 9 | +- **`__init__.py`:** An empty file, indicates that the folder is a Python package. |
| 10 | +- **`video_transcoder.py`:** Contains classes and methods for video transcoding using FFmpeg. |
| 11 | + |
| 12 | +## How to Use |
| 13 | + |
| 14 | +1. **Setup Instructions:** |
| 15 | + - Clone this repository. |
| 16 | + - Set up a virtual environment and install the required dependencies: |
| 17 | + ``` |
| 18 | + # Navigate to the project directory |
| 19 | + cd video_transcoder_project |
| 20 | + |
| 21 | + # Create and activate a virtual environment (optional) |
| 22 | + python -m venv venv |
| 23 | + source venv/bin/activate # Linux/Mac |
| 24 | + venv\Scripts\activate # Windows |
| 25 | + |
| 26 | + # Install dependencies |
| 27 | + pip install -r requirements.txt |
| 28 | + ``` |
| 29 | + - Follow the setup commands mentioned in the previous sections. |
| 30 | +
|
| 31 | +2. **Run the Flask App:** |
| 32 | + ``` |
| 33 | + # Navigate to the flask_app directory |
| 34 | + cd flask_app |
| 35 | + |
| 36 | + # Run the Flask app |
| 37 | + python app.py |
| 38 | + ``` |
| 39 | + Access the application in your browser at `http://127.0.0.1:5000/`. |
| 40 | +
|
| 41 | +3. **Usage:** |
| 42 | + - Upload a raw video file using the provided form. |
| 43 | + - The backend will transcode the video to a specified format (e.g., 1080p) and provide the download link for the transcoded file. |
| 44 | +
|
| 45 | +## Note |
| 46 | +This is a basic implementation; additional features like error handling, security measures, and frontend enhancements can be added for a more robust application. |
| 47 | +
|
| 48 | +Feel free to modify the code and folder structure according to your project requirements. |
0 commit comments