Skip to content

Arsybai/simply-media-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Feature

  • Remove background
  • Resize Image
  • Profile picture maker
  • Sharpen
  • Compress

Video Feature

  • Crop
  • Extract Audio
  • Trim

Any request feature allowed


Install

> pip install simply-media-tools
> pip install git+https://github.com/Arsybai/simply-media-tools.git

Or clone this repo and enter the following command

> pip install .

Usage

Image remove background

import mediaTools

mediaTools.image.remove_background(image_path='input.jpg', output_path='output.png')

The image path is the image that you want to remove the background. and the output must be .png

Image resize

import mediaTools

mediaTools.image.resize(image_path='input.jpg', width=512, height=512, output_path='output.png')

Profile picture maker

import mediaTools

mediaTools.image.profile_picture_maker(image_path='input.jpg', output_path='output.jpg')

Image sharpen

import mediaTools

mediaTools.image.sharpen(image_path='input.jpg', output_path='output.jpg')

Compress image

import mediaTools

mediaTools.image.compress(image_path='input.jpg', compression_level=70, output_path='output.jpg')

Crop video

import mediaTools

mediaTools.video.crop(video_path='input.mp4', x=100, y=100, w=100, h=100, output_path='cropped.mp4')

Extract audio

import mediaTools

mediaTools.video.extract_audio(video_path='input.mp4', output_path='extracted_audio.mp3')

Trim video

import mediaTools

mediaTools.video.trim(video_path='input.mp4', start=0, end=10, output_path='trimmed.mp4')

the start and end is in second


Donate

About

Simply do something with your media file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages