Skip to content

Commit f949911

Browse files
Merge pull request Mrinank-Bhowmick#678 from shashaaankkkkk/main
Initializing Video Transcoding Projects
2 parents 814a2e3 + 918f638 commit f949911

File tree

5 files changed

+55
-1
lines changed

5 files changed

+55
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,3 @@ cython_debug/
158158

159159
#.DS_Store
160160
.DS_Store
161-
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
- **`video_editor.py`:** Contains classes and methods for video transcoding using FFmpeg.
10+
11+
## How to Use
12+
13+
1. **Setup Instructions:**
14+
- Clone this repository.
15+
- Set up a virtual environment and install the required dependencies:
16+
```
17+
# Navigate to the project directory
18+
cd video_transcoder_project
19+
20+
# Create and activate a virtual environment (optional)
21+
python -m venv venv
22+
source venv/bin/activate # Linux/Mac
23+
venv\Scripts\activate # Windows
24+
25+
# Install dependencies
26+
pip install -r requirements.txt
27+
```
28+
- Follow the setup commands mentioned in the previous sections.
29+
30+
2. **Run the Flask App:**
31+
```
32+
# Navigate to the flask_app directory
33+
cd flask_app
34+
35+
# Run the Flask app
36+
python app.py
37+
```
38+
Access the application in your browser at `http://127.0.0.1:5000/`.
39+
40+
3. **Usage:**
41+
- Upload a raw video file using the provided form.
42+
- The backend will transcode the video to a specified format (e.g., 1080p) and provide the download link for the transcoded file.
43+
44+
## Note
45+
This is a basic implementation; additional features like error handling, security measures, and frontend enhancements can be added for a more robust application.
46+
47+
Feel free to modify the code and folder structure according to your project requirements.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class main():
2+
def __init__(self):
3+
self.hello="hello"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Flask==2.0.2
2+
ffmpeg-python==0.2.0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class VideoTranscoder():
2+
def __init__(self, input_file):
3+
self.input_file = input_file

0 commit comments

Comments
 (0)