Video.Demonstration.webm
cd your-folder
git clone https://github.com/Arunesh-Tiwari/ClipCaption.git
Navigate to root directory and run.
docker-compose up --build
It may happen after running docker compose command migrations not happen and error is caused. To resolve this rerun below command.
docker-compose up --build
Visit http://127.0.0.1:8000/upload
in your web browser to view the project.
This guide will help you set up and run the Django project locally on your Windows machine. The project uses PostgreSQL 14 for the database and requires ffmpeg to be installed.
- Python: Ensure you have Python 3.8 or later installed on your machine.
- PostgreSQL 14: Install PostgreSQL 14 and set it up on your machine.
- ffmpeg: Install ffmpeg. Follow this guide to install it on Windows.
- pip: Ensure you have pip installed for managing Python packages.
Ensure ffmpeg is installed and added to your system PATH. You can verify the installation by running:
ffmpeg -version
create a your-folder
cd your-folder
git clone https://github.com/Arunesh-Tiwari/ClipCaption.git
cd videoprocessor
Create and activate a virtual environment to manage project dependencies:
python -m venv venv
venv\Scripts\activate
-
Create a Database:
- Open
pgAdmin
or usepsql
to create a new database. - Create a new user and assign it to the database.
- Open
-
Update
settings.py
:- Open
your_project/settings.py
and update theDATABASES
setting with your PostgreSQL database credentials.
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': os.environ.get('POSTGRES_DB'), 'USER': os.environ.get('POSTGRES_USER'), 'PASSWORD': os.environ.get('POSTGRES_PASSWORD'), 'HOST': 'db', 'PORT': 5432, } }
- Open
pip install -r requirements.txt
Ensure the requirements.txt
file includes the following dependencies:
asgiref==3.8.1
Django==4.2.16
ffmpeg-python==0.2.0
future==1.0.0
psycopg2-binary==2.9.9
python-dotenv==1.0.1
sqlparse==0.5.1
typing_extensions==4.12.2
Create a .env
file in the project root directory and add any necessary environment variables. For example:
POSTGRES_DB=your-db-name
POSTGRES_USER=your-db-user
POSTGRES_PASSWORD=your-db-password
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
- Database Connection Issues: Double-check the database credentials in
settings.py
. - ffmpeg Not Found: Ensure ffmpeg is installed and its path is added to the system PATH.
- Connection Error During Migrate
docker-compose up --build
: Rerundocker-compose up --build
ordocker-compose up
.
This project is licensed under the MIT License - see the LICENSE file for details.