Giter Site home page Giter Site logo

youtube-dl's Introduction

Hi there, im Ludo👋
Welcome to my profile!

About me:

🧑🏼‍🎓studiying Applied Computer Science @ Ruhr-University Bochum



python java javascript html css c cpp csharp typescript json mysql

astro vue fastapi flask firebase figma putty qt raspberrypi selenium ssh nextjs

Some projects:


PokeDex Topspot proxy-settings youtube-dl Security-Cam BirdCam


Stats:


From: 23 January 2023 - To: 15 July 2024

Total Time: 958 hrs 3 mins

Python           207 hrs 47 mins ⣿⣿⣿⣿⣿⣦⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   21.69 %
JavaScript       190 hrs 59 mins ⣿⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   19.94 %
HTML             102 hrs 58 mins ⣿⣿⣶⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   10.75 %
unity            85 hrs 52 mins  ⣿⣿⣄⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   08.96 %
CSS              73 hrs 41 mins  ⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   07.69 %
C#               50 hrs 14 mins  ⣿⣤⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   05.24 %
Java             47 hrs 50 mins  ⣿⣄⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   04.99 %
Astro            36 hrs 2 mins   ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   03.76 %
Markdown         35 hrs 42 mins  ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   03.73 %
C++              21 hrs 15 mins  ⣦⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   02.22 %
C                19 hrs 13 mins  ⣦⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   02.01 %
Text             17 hrs 1 min    ⣦⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   01.78 %
MDX              14 hrs 17 mins  ⣤⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   01.49 %
TypeScript       13 hrs 53 mins  ⣤⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   01.45 %
XML              11 hrs 40 mins  ⣤⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   01.22 %
Other            7 hrs 42 mins   ⣄⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.80 %
JSON             7 hrs 23 mins   ⣄⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.77 %
Git Config       2 hrs 57 mins   ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.31 %
Lua              2 hrs 5 mins    ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.22 %
Bash             1 hr 50 mins    ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.19 %
CSV              55 mins         ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.10 %
Git              48 mins         ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.08 %
TOML             33 mins         ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.06 %
Kotlin           30 mins         ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.05 %
Groovy           28 mins         ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   00.05 %

I'm an Early 🐤

🌞 Morning      828 commits       ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   60.26 % 
🌆 Daytime      266 commits       ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   19.36 % 
🌃 Evening      242 commits       ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   17.61 % 
🌙 Night         38 commits       ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   02.77 % 

📅 I'm Most Productive on Wednesday

Monday         250 commits       ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   18.20 % 
Tuesday        217 commits       ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   15.79 % 
Wednesday      272 commits       ⣿⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   19.80 % 
Thursday       261 commits       ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   19.00 % 
Friday         251 commits       ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   18.27 % 
Saturday        75 commits       ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   05.46 % 
Sunday          48 commits       ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   03.49 % 

📊 This Week I Spent My Time On

⌚︎ Time Zone: Europe/Berlin

💬 Programming Languages: 
JavaScript               21 hrs 39 mins      ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀   71.18 % 
TypeScript               5 hrs 24 mins       ⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   17.77 % 
HTML                     59 mins             ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   03.24 % 
CSS                      58 mins             ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   03.18 % 
MDX                      26 mins             ⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   01.47 % 

🔥 Editors: 
VS Code                  30 hrs 25 mins      ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿   100.00 % 

I Mostly Code in Python

Python                   16 repos            ⣿⣿⣿⣿⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   33.33 % 
JavaScript               6 repos             ⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   12.50 % 
C#                       5 repos             ⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   10.42 % 
HTML                     4 repos             ⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   08.33 % 
ShaderLab                4 repos             ⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀   08.33 % 

Last Updated on 17/07/2024 08:33:59 UTC

counter

youtube-dl's People

Contributors

infinitel8p avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

youtube-dl's Issues

convert to mp3

use line 92 raise ValueError( f"[ Error ] : {subtype_menu.get()} subtype not available for this video.") to instead convert the audio file:

from pytube import YouTube
from pydub import AudioSegment
import os

yt = YouTube("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

# Download the video in MP4 format
video = yt.streams.filter(file_extension='mp4').first()
video.download("path/to/save/mp4/file/")

# Open the MP4 file and convert it to MP3 format
audio = AudioSegment.from_file("path/to/save/mp4/file/original_audio.mp4", format="mp4")
audio.export("path/to/save/mp3/file/converted_audio.mp3", format="mp3")

# Delete the original MP4 file
os.remove("path/to/save/mp4/file/original_audio.mp4")

rewrite code base

import os
import pytube
import urllib.request
import logging
import tkinter as tk
from tkinter import filedialog
from moviepy.editor import VideoFileClip, ImageClip

import CustomTkinter as ct

# Set up the logger
logger = logging.getLogger()
logger.setLevel(logging.INFO)
log_format = logging.Formatter('%(asctime)s: %(message)s')

# Create a handler to display log messages in the GUI
class TkinterHandler(logging.Handler):
    def __init__(self, text_widget):
        logging.Handler.__init__(self)
        self.text_widget = text_widget

    def emit(self, record):
        self.text_widget.insert(tk.END, log_format.format(record))
        self.text_widget.see(tk.END)

# Create the GUI
root = tk.Tk()
root.title('YouTube Downloader')

# Set up the log output widget
log_output = ct.CustomText(root)
log_output.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)

# Add the TkinterHandler to the logger
handler = TkinterHandler(log_output)
logger.addHandler(handler)

# Set up the URL input widget
url_input = ct.CustomEntry(root)
url_input.pack(side=tk.LEFT)

# Set up the download button
def download():
    # Get the URL from the input widget
    url = url_input.get()
    logger.info(f'Downloading video from {url}')

    # Create a YouTube object
    yt = pytube.YouTube(url)

    # Get the first video available
    video = yt.streams.first()

    # Choose a file to save the video
    file_path = filedialog.asksaveasfilename(defaultextension='.mp4')
    logger.info(f'Saving video to {file_path}')

    # Download the video
    video.download(file_path)
    logger.info('Video downloaded')

    # Download the thumbnail image
    thumbnail_url = video.thumbnail_url
    thumbnail_path = file_path.replace('.mp4', '.jpg')
    urllib.request.urlretrieve(thumbnail_url, thumbnail_path)

    # Load the video and the thumbnail image into MoviePy
    video_clip = VideoFileClip(file_path)
    thumbnail_clip = ImageClip(thumbnail_path)

    # Add the thumbnail image as the cover image for the video
    final_clip = video_clip.set_cover(thumbnail_clip)

    # Save the modified video
    final_clip.write_videofile(file_path)
    logger.info('Cover image added')

    # Clean up
    os.remove(thumbnail_path)

download_button = ct.CustomButton(root, text='Download', command=download)
download_button.pack(side=tk.LEFT)

# Run the GUI
root.mainloop()
import os
import pytube
import tkinter as tk
from tkinter import filedialog

import CustomTkinter as ct

# Set up the logger
logger = logging.getLogger()
logger.setLevel(logging.INFO)
log_format = logging.Formatter('%(asctime)s: %(message)s')

# Create a handler to display log messages in the GUI
class TkinterHandler(logging.Handler):
    def __init__(self, text_widget):
        logging.Handler.__init__(self)
        self.text_widget = text_widget

    def emit(self, record):
        self.text_widget.insert(tk.END, log_format.format(record))
        self.text_widget.see(tk.END)

# Create the GUI
root = tk.Tk()
root.title('YouTube Downloader')

# Set up the log output widget
log_output = ct.CustomText(root)
log_output.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)

# Add the TkinterHandler to the logger
handler = TkinterHandler(log_output)
logger.addHandler(handler)

# Set up the URL input widget
url_input = ct.CustomEntry(root)
url_input.pack(side=tk.LEFT)

# Set up the download button
def download():
    # Get the URL from the input widget
    url = url_input.get()
    logger.info(f'Downloading video from {url}')

    # Create a YouTube object
    yt = pytube.YouTube(url)

    # Get the first video available
    video = yt.streams.first()

    # Choose a file to save the video
    file_path = filedialog.asksaveasfilename(defaultextension='.mp4')
    logger.info(f'Saving video to {file_path}')

    # Download the video
    video.download(file_path)
    logger.info('Video downloaded')

download_button = ct.CustomButton(root, text='Download', command=download)
download_button.pack(side=tk.LEFT)

# Run the GUI
root.mainloop()
import urllib.request
from moviepy.editor import VideoFileClip

# Download the thumbnail image
thumbnail_url = video.thumbnail_url
thumbnail_path = file_path.replace('.mp4', '.jpg')
urllib.request.urlretrieve(thumbnail_url, thumbnail_path)

# Load the video and the thumbnail image into MoviePy
video_clip = VideoFileClip(file_path)
thumbnail_clip = ImageClip(thumbnail_path)

# Add the thumbnail image as the cover image for the video
final_clip = video_clip.set_cover(thumbnail_clip)

# Save the modified video
final_clip.write_videofile(file_path)

# Clean up
os.remove(thumbnail_path)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.