Giter Club home page Giter Club logo

video-resizer-trimmer's Introduction

Fastify Video Processing API

This Node.js application built with Fastify and FFmpeg allows users to upload a video, trim it to a specified duration, and resize it to given dimensions.

Table of Contents

Introduction

This Fastify-based Node.js application uses FFmpeg to process video files. It provides API endpoints for uploading, trimming, and resizing videos.

Features

  1. Upload a video file.
  2. Trim a video based on start and end times.
  3. Resize a video to specified dimensions.

Getting Started

Prerequisites

  • Node.js

Installation

  1. Clone the repository:

    git clone https://github.com/ishakzail/Video-resizer-trimmer
  2. Install the dependencies

    cd Video-resizer-trimmer
    npm install
  3. Run the Project

    npm run start

Usage

Note โš 

  • Concerning the uploaded file in the resize-video and trim-video APIs, they are initially stored in a temporary file. After processing, these temporary files are deleted, and the trimmed/resized videos are then stored in the uploads. folder.
  • For the uploaded file in the upload-video API, it is directly stored in the uploads folder.

Video Uploading

Endpoint: /api/upload-video

  • Method: POST
  • Request Body:
    {
      "video": File,
    }

Example (POSTMAN)

upload-video

Video Resizing

Endpoint: /api/resize-video

  • Method: POST
  • Request Body:
    {
      "video": File,
      "height": {
        "value": "480",
        "type": "string"
      },
      "width": {
        "value": "640",
        "type": "string"
      }
    }

Example (POSTMAN)

resize-video

Video Trimming

Endpoint: /api/trim-video

  • Method: POST
  • Request Body:
    {
      "video": File,
      "startTime": {
        "value": "0",
        "type": "string"
      },
      "endTime": {
        "value": "60",
        "type": "string"
      }
    }

Example (POSTMAN)

trim-video

video-resizer-trimmer's People

Contributors

ishakzail 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.