a comprehensive toolkit for video processing, including subtitles, watermarks, trimming, thumbnails, and MP4 to HLS conversion move to: https://gitlab.com/alimiracle/vidtoolkit

alimiracle 31f73cfe53 move to codeberg пре 5 месеци
vidtoolkit 616b63996b vidtoolkit пре 6 месеци
LICENSE 616b63996b vidtoolkit пре 6 месеци
MANIFEST.in 616b63996b vidtoolkit пре 6 месеци
README.md 31f73cfe53 move to codeberg пре 5 месеци
setup.py 616b63996b vidtoolkit пре 6 месеци

README.md

Important Note:

this project has been archived and migrated to codeberg. To access the project on codeberg,

visit this Link

vidtoolkit

vidtoolkit is a comprehensive toolkit for video processing, including subtitles, watermarks, trimming, thumbnails, and MP4 to HLS conversion.

Installation

pip install vidtoolkit

Usage

Adding Subtitles

from vidtoolkit.video_subtitle import VideoSubtitle

video = VideoSubtitle('input_video.mp4')
video.add_subtitle('Hello, World!', 0, 5, position=(10, 10), fontsize=24, color='white')

Adding Subtitles from SRT

from vidtoolkit.video_subtitle import VideoSubtitle

video = VideoSubtitle('input_video.mp4')
video.add_subtitle_from_srt('subtitles.srt')

Adding Text Watermark

from vidtoolkit.video_watermarking import VideoWatermarking

video = VideoWatermarking('input_video.mp4')
video.add_text_watermark('Sample Watermark', position=('center', 'bottom'), fontsize=24, color='white')

Adding Image Watermark

from vidtoolkit.video_watermarking import VideoWatermarking

video = VideoWatermarking('input_video.mp4')
video.add_image_watermark('watermark.png', position=('right', 'bottom'))

Trimming Video

from vidtoolkit.video_trimming import VideoTrimming

video = VideoTrimming('input_video.mp4')
video.extract_frames(10, 50, with_audio=True)

Generating Thumbnail

from vidtoolkit.video_thumbnailer import VideoThumbnailer

video = VideoThumbnailer('input_video.mp4')
video.generate_thumbnail(100, save_path='thumbnail.jpg')

Converting MP4 to HLS

from vidtoolkit.mp4_to_hls_converter import MP4toHLSConverter

converter = MP4toHLSConverter('input_video.mp4', resolutions=['1920x1080', '1280x720'])
converter.convert()

License

This project is licensed under the LGPL License - see the LICENSE file for details.