Breaking YOUTUBE ALGORITHM with Python!

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024
  • Breaking RUclips ALGORITHM with Python!

Комментарии • 5

  • @PracticalCoding.
    @PracticalCoding.  8 месяцев назад

    I forgot
    from moviepy.editor import *
    import random2
    def change_background(word):
    special_characters = ['.', '!', '?']
    return any(char in word for char in special_characters)
    sentence = 'first. second. third.'
    words = sentence.split(' ')
    background_list = ['backgrounds_names']
    background_folder = 'backgrounds\\'
    background_extension = '.mp4'
    background = background_folder + random2.choice(background_list) + background_extension
    audioclip = AudioFileClip("background_music.mp3")
    sound = AudioFileClip("open.mp3")
    clip = VideoFileClip(background)
    logo = ImageClip("logo")
    logo.margin(top=20, left=20, opacity=0)
    logo.set_pos('left', 'top')
    name = 't'
    duration = 0
    res = len(words)
    video_clips = [clip]
    for word in words:
    duration += 0.3
    text_clip = TextClip(word, fontsize=150, font="Franklin-Gothic-Medium", color="white", stroke_width=5, stroke_color="black")
    text_clip = text_clip.set_start(duration)
    text_clip = text_clip.set_pos('center')
    text_clip = text_clip.set_duration(0.2)
    video_clips.append(text_clip)

    if change_background(word):
    duration += 0.7
    next_background = VideoFileClip(background_folder + random2.choice(background_list) + background_extension).set_start(duration)
    video_clips.append(next_background)
    video_clips.append(logo)
    duration += 0.3
    final_video = CompositeVideoClip(video_clips).set_duration(duration)
    final_video = vfx.fadeout(final_video, duration=0.6, final_color=[0, 0, 0])
    audio = CompositeAudioClip([sound, audioclip]).set_duration(duration)
    final_video = final_video.set_audio(audio)
    final_video.write_videofile("name.mp4")

  • @st4cchu1
    @st4cchu1 8 месяцев назад

    1:47 Polska moment

  • @NightWinner
    @NightWinner 8 месяцев назад

    cool

  • @Heavy_Lvy
    @Heavy_Lvy 5 месяцев назад

    the code is so messy aghhhh