Coder Social home page Coder Social logo

brahimakar / youtube-video-processor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 30 KB

A scalable YouTube video processing pipeline that seamlessly downloads YouTube videos, processes them with FFmpeg, and uploads the refined videos to Cloudinary ( Or api.video, S3, etc ..). This project uses Celery for distributed task processing and RabbitMQ as a message broker, ensuring an efficient and scalable workflow.

Dockerfile 4.03% Python 95.97%

youtube-video-processor's Introduction

YouTube-Video-Processor

A scalable YouTube video processing pipeline that seamlessly downloads YouTube videos, processes them with FFmpeg, and uploads the refined videos to Cloudinary ( or S3 etc ..). This project uses Celery for distributed task processing and RabbitMQ as a message broker, ensuring an efficient and scalable workflow.

Python Docker-Compose RabbitMQ Flask Cloudinary Celery

Key Features:

  • YouTube video downloading using Pytube
  • Video processing with FFmpeg for various resolutions
  • Uploading processed videos to Cloudinary with detailed logging
  • Scalable architecture with Celery and RabbitMQ
  • Containerized application setup with Docker and docker-compose
  • MongoDB integration for data storage and change streams monitoring

How to Run and Scale the Project ๐Ÿš€

Step 1: Setting Up Environment Variables

Before you start, ensure to configure necessary environment variables in the `.env` file. Use the `.env.example` as a template to create your `.env` file with the appropriate values.

Step 2: Building and Running the Project

Navigate to the project's root directory and execute the following command:

docker-compose up --build

Step 3: Scaling the Project

Scale the project and increase the processing by initiating more Celery worker instances using the `--scale` option:

docker-compose up --scale celery=3

Step 4: Sending API Requests

Once the application is running, you can send POST requests to the endpoint http://localhost:5000/process_video to initiate the video processing task. You can use the following curl command as an example to send a request:

curl -X POST -H "Content-Type: application/json" -d '{"video_url": "https://www.youtube.com/watch?v=RQBqBTUY9Hw","preferred_resolution":"720p"}' http://localhost:5000/process_video

Step 5: Monitoring and Managing the Queue

Manage and monitor the message queues by accessing the RabbitMQ management interface at `http://localhost:15672\` ( Default user and password are "guest").

Contribution ๐Ÿค

Feel free to fork the project, create a feature branch, and send me a pull request.

License ๐Ÿ“„

This project is licensed under the 0BSD License.

Contact ๐Ÿ“ง

For more information, feel free to contact me.

youtube-video-processor's People

Contributors

brahimakar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.