-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
FastEdit is based on FFmpeg, meaning it must be installed on your machine before using FastEdit.
If pip
is installed on your machine, you can install FastEdit by typing the following command:
pip install fastedit
If you want a specific version of FastEdit via pip
, type the following command:
pip install fastedit==VERSION
If you want to install FastEdit from this GitHub repository, type the following command:
pip install git+https://github.com/ThomasMargnac/fastedit@main
Create a Python file, let's say tuto.py
where you will manipulate streams.
First, import the Video object and define a video:
from fastedit.Medias import Video
# Importing video
video = Video("input.mp4")
Then you can apply some methods to the video:
# From 30fps to 60fps
video.changeFrameRate(60)
# Saving clipped video to file system
video.save("output.mp4")
For more information about methods, you can use with a Video object, look at the Video API Reference.
First, import the Audio object and define an audio:
from fastedit.Medias import Audio
# Importing audio
audio = Audio("input.mp3")
Then you can apply some methods to the audio:
# Clipping audio from 0 to 10 seconds
audio_clipped = audio.clip(0, 10)
# Saving clipped audio to file system
audio_clipped.save("output.mp3")
For more information about methods, you can use with an Audio object, look at the Audio API Reference.
First, import the Image object and define an image:
from fastedit.Medias import Image
# Importing images
image = Image("input.jpeg")
Then you can only convert it to a video:
# Converting image to a 15 seconds video
video = image.toVideo(15)
For more information about the Image object, look at the Image API Reference.