This is a simple MP4 to MP3 converter that works for both YouTube and non-YouTube video links. It is built using Python and the following libraries:
streamlit
: for creating the user interface.moviepy
: for converting audio from video files to MP3 format.pytube
: for downloading YouTube videos.
To use the converter, follow these steps:
- Enter the URL of the MP4 video you want to convert in the text input field.
- If the URL is a YouTube link, the video details such as title, duration and views will be displayed to the user.
- Click on the "Convert to MP3" button to start the conversion process.
- If the conversion is successful, a success message will be displayed along with a download button for the converted MP3 file.
- Click on the download button to download the MP3 file.
To run the converter on your machine, follow these steps:
- Install the required libraries by running
pip install -r requirements.txt
in your terminal. - Clone the repository using
git clone https://github.com/your-username/mp4-to-mp3-converter.git
. - Navigate to the project directory using
cd mp4-to-mp3-converter
. - Run the converter using
streamlit run app.py
. - The converter will open in your default web browser.
You can see a live demo of the MP4 to MP3 converter here.