Skip to content

Python code to convert any YouTube video into downloadable audio file

Notifications You must be signed in to change notification settings

kamranferoz/youtube2audio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

image

This program is a YouTube Audio Downloader. It allows users to input a YouTube video URL and downloads the audio from the video. The program uses the pytube library to fetch the YouTube video and extract the audio stream.

The audio is saved as an MP4 file with a unique filename based on the current date and time. The file is saved in the same directory as the script. If the directory doesn't exist, the program creates it.

The program checks if the provided URL is a valid YouTube video URL. If the URL is invalid or the video cannot be processed, the program displays an error message.

The program uses gradio to provide a simple and intuitive user interface. The interface consists of a text input field for the YouTube URL and a download link for the audio file.

The program is designed to be robust and user-friendly, providing clear error messages and handling exceptions gracefully.

The sample app can be found at https://huggingface.co/spaces/kamranferoz/youtube2audio

About

Python code to convert any YouTube video into downloadable audio file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages