This Python web service, built using Django, provides functionalities for video processing, including audio extraction and video watermarking. It integrates FFmpeg for media processing and uses a SQLite database to store information about processed videos.
Clone the Repository
git clone https://github.com/gouravmohanty7070/vidyo.ai
Setup Virtual Environment
To ensure a clean and isolated environment for your application, it's recommended to use a virtual environment. Here's how you can set it up:
cd vidyo.ai
python -m virtualenv venv
Activating the Virtual Environment
venvScriptsactivate
source venv/bin/activate
Install FFmpeg
Download FFmpeg:
Go to the FFmpeg Official Website and download the latest build for Windows.
Extract the Files:
Extract the downloaded ZIP file to a location on your computer (e.g., C:FFmpeg).
Add FFmpeg to the System Path:
Right-click on 'This PC' or 'My Computer' and select 'Properties'.
Click on 'Advanced system settings' and then 'Environment Variables'.
Under 'System Variables', find and select the 'Path' variable, then click 'Edit'.
Click 'New' and add the path to the bin folder inside the extracted FFmpeg folder (e.g., C:FFmpegbin).
Click 'OK' to close all dialog boxes.
Verify the Installation:
Open Command Prompt and type ffmpeg -version to check if FFmpeg is installed correctly.
brew install ffmpeg
sudo apt install ffmpeg
Install Dependencies With the virtual environment activated, install the required dependencies using pip and the requirements.txt file:
pip install -r requirements.txt
Start the Application Navigate to the "vidyo" directory, which contains the application code:
cd vidyo
Run Migrations
python manage.py migrate
Run the following command to start the application:
python manage.py runserver
Access the Application
Open your web browser and go to http://127.0.0.1:8000/
Testing
Use tools like Postman or cURL to test the API endpoints.
Clone the Repository
git clone https://github.com/gouravmohanty7070/vidyo.ai
cd vidyo.ai
Build the Docker Image
docker build -t vidyo .
Run the Docker container
docker run -p 8000:8000 vidyo
Access the Application
Open your web browser and go to http://localhost:8000
Testing
Use tools like Postman or cURL to test the API endpoints.
Note
Audio Extraction Endpoint: POST /extract-audio
Video Watermarking Endpoint: POST /watermark-video
The service uses a SQLite database with the following tables and fields to store information about processed videos:
Video Table - This table stores information about both audio-extracted and watermarked videos.
Additional Tables:
Depending on your application's requirements, you may have additional tables, especially if we are implementing user authentication, logging, or other features.
Database Setup Instructions:
After setting up your Django project, run the following commands to create and apply migrations for your database schema:
python manage.py makemigrations
python manage.py migrate
This architecture is designed to optimize resource usage and maintain responsiveness under high load. By separating tasks based on their resource requirements and using a mix of optimized servers, the system can handle a large number of concurrent video processing requests efficiently.
vidyo.ai assignement demo video