Skip to content

HectorPulido/Youtubers-toolkit

Repository files navigation

Youtubers toolkit

This is a toolkit for easy video editing for youtubers, it uses the newest technologies in the field of machine learning to detect silences in a video and cut it in the most efficient way. Also generate a transcript of the video and a subtitle file.

How to use

First you must to install all the dependences with the command

pip install -r requirements.txt

Then you can use the software using the command from the command line

Arguments

positional arguments:
 input_file   The video file you want modified

options:
 -h, --help   show this help message and exit
 --pipeline PIPELINE [PIPELINE ...]
      Functions to be applied to the video, trim_by_silence, denoise, transcript,
      subtitles, save_separated_video, save_join, save_video
 -c CLIP_INTERVAL, --clip_interval CLIP_INTERVAL
      The precision of the trimming
 -s SOUND_THRESHOLD, --sound_threshold SOUND_THRESHOLD
      Maximun amout of volume to be considerer as silence
 -d [DISCARD_SILENCE], --discard_silence [DISCARD_SILENCE]
      Discard silence clips

Example

This will generate a transcript of the video

python main.py vid_1.mp4 vid_2.mp4 --pipeline transcript

This code splits an SRT subtitle file into shorter segments, with a predefined number of words per segment, adjusting start and end times evenly. It then generates a new file with the split subtitles.

python split_srt.py test.srt 5

This will result in a merge the video with the subtitles

python main.py vid_1.mp4 --pipeline subtitles save_join

Separate audio from video

python separate_audio.py vid_1.mp4 vid_2.mp4

Join audio and video

python join_audio_with_video.py vid_1.mp4 

This will result in a merge of every non-silence part

python main.py vid_1.mp4 --pipeline denoise transcript subtitles trim_by_silence save_separated_video -c 1

This will generate a transcript of the video with the denoiser filter

python main.py vid_1.mp4 vid_2.mp4 --pipeline denoise transcript

This will add subtitles to the video and cut the video by silences, all of this with the denoiser filter

python main.py vid_1.mp4 --pipeline denoise subtitles trim_by_silence save_separated_video -c 1 

For automatic video translate

Note: Only available translation to English

If you want to clone your voice you can try this code

First you must to install all the dependences with the command

pip install -r dl_hardcore_requirements.txt

Generate the translation for the video

python voice_translator.py video_translation vid_1.mp4

Generate the video with the translation

python voice_translator.py audio_generator vid_1.mp4


Let's connect 😋

Hector's LinkedIn     Hector's Twitter     Hector's Twitch     Hector's Youtube     Pequesoft website