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.