Skip to content

DoubleDebug/drag-n-crop-be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drag-n-Crop server

Drag-n-crop is an image and video cropping utility and a web server written in Rust.
The web server currently has 2 endpoints - one for cropping images and one for cropping videos.

Check out the Swagger documentation hosted here.
Learn more about this project here.

Peer dependencies

This project has 1 peer dependency - ffmpeg.
In order for the video cropping utility to work, your machine needs to have ffmpeg installed or ffmpeg.exe placed in the root of this project.

Limitations

File type Size Format
image 100MB jpg, jpeg, png, gif, bmp, webp, svg
video 1GB mp4, mkv, flv, avi, mov, wmv, webm

How to run locally

(Prerequisite) Install rust.
(Prerequisite) Install ffmpeg or copy ffmpeg executable to the root of this project.

  1. Clone this repository.
  2. Run cargo run in the root directory.
  3. Navigate to http://127.0.0.1:8000 to see the Swagger documentation.

Change log

  • version 1.1 ( ??? )
    • add support for uploading from URL
    • add support for longer videos
      • change crop-video endpoint to stream its progress instead of blocking the thread
  • version 1.0 (Jul 18, 2023)
    • crop image
    • crop video