Extract and trim audio from videos or trim audios.
Project description
Audio Extract
Extract and trim audio from videos or trim audios.
Description
Audio Extract allows you to extract audio from video files and trim the audio according to your needs. It supports various video and audio formats and has a simple and user-friendly interface.
It can also be used to trim audios.
Installing
pip install audio-extract
Executing the program
Extract full audio
import audio_extract as audio_extract
audio_extract.run(input_path="./video.mp4", output_path="./audio.mp3")
This will create a mp3 file called audio.mp3
that contains the full audio of the video file video.mp4
.
Extract sub clip audio
import audio_extract as audio_extract
audio_extract.run(input_path="./video.mp4", output_path="./audio.mp3", start_time="00:30")
This will create a mp3 file called audio.mp3
that starts after the first 30 seconds of the video file video.mp4
.
Extract sub clip audio with custom duration
import audio_extract
audio_extract.run(input_path="./video.mp4", output_path="./audio.mp3", start_time="00:25", duration="01:15")
This will convert video file video.mp4
to a mp3 file starting from 00:25
to 01:15
called audio.mp3
that will have a duration of 00:50
.
Trim audio
import audio_extract
audio_extract.run(input_path="./audio.mp3", output_path="./new_audio.mp3", start_time="00:05", duration="01:15")
This will trim the audio.mp3
file starting from 00:05
to 01:15
to a mp3 file called new_audio.mp3
that will
have a duration of 01:10
.
Authors
Riadh Azzoun - @riad-azz
License
This project is licensed under the [MIT] License - see the LICENSE.md file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for audio_extract-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17a4db47073dbffe52d0f449d750aff8eabd46b2f96a500a3b2dda8a7f1c5ca5 |
|
MD5 | b31b551eb4f5ec785a19c3ab08d0fc92 |
|
BLAKE2b-256 | 8fca268b044c6068e7135984d9eece3aceb178322a461f555623321eaa29d433 |