Coder Social home page Coder Social logo

devfel / mp3-to-mp4 Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 2.0 7 KB

Efficiently transform MP3 audio files into MP4 videos with static imagery, perfect for content creators aiming to upload on platforms like YouTube. Simple and direct audio to video converter to run locally in your machine without the need to upload files.

Python 100.00%
audio-to-video content-creation mp3 mp3-converter mp3-to-mp4 mp4 mp4-converter python python3

mp3-to-mp4's Introduction

DevFel

๐ŸŽต MP3 to MP4 Converter ๐ŸŽฌ

Convert your favorite MP3 files into MP4 videos with static images, perfect for uploading to platforms like YouTube.

๐ŸŒŸ Features

  • Convert any MP3 file into an MP4 video.
  • Add a static image to your audio, ideal for music uploads on video platforms.
  • (Optional) Specify a start and end time to convert only a segment of your audio.

โš™๏ธ Installation and Setup

  1. Clone the Repository: Begin by cloning the repository to your local machine:

    git clone https://github.com/devfel/mp3-to-mp4.git
  2. Navigate to the Directory:

    cd mp3-to-mp4
  3. Install the Required Libraries: Ensure you have the required libraries installed:

    pip install moviepy pillow

๐Ÿš€ Getting Started

  1. Place your MP3 files and the desired image inside the input directory.
  2. Run main.py to initiate the conversion.
  3. Collect the converted MP4 files from the output directory.

๐Ÿ“– Usage Examples

  • Basic Conversion: Convert an entire MP3 file with a static image:

    mp3_to_mp4("sample.mp3", "background-image.jpg")
  • Segmented Conversion: Convert a specific segment of the MP3 file:

    mp3_to_mp4("sample.mp3", "background-image.jpg", "1:30:00", "1:35:00")
    mp3_to_mp4("sample.mp3", "background-image.jpg", "H:MM:SS", "H:MM:SS")
  • Entire Folder Conversion: To convert all MP3 files present in the input directory at once using a single background image, you can use the mp3_to_mp4_folder function:

    Simply call the mp3_to_mp4_folder function with the desired background image:

    mp3_to_mp4_folder("background-image.jpg")

    This will convert all MP3 files in the input directory using the specified image as the background, and save the resulting MP4 files in the output directory.

๐Ÿ”ฅ Execution

To run the program, navigate to the project's main directory and execute:

python main.py

๐Ÿ”ง Requirements

  • Python 3.x
  • moviepy library
  • Pillow (PIL)
  • (Optional) ImageMagick for advanced image processing.

๐Ÿ“‚ Directory Structure

  • input/: Place your MP3 and image files here.
  • output/: Find your converted MP4 files here.
  • main.py: Main script to run the conversion.

๐Ÿ™Œ Contribution

Feel free to fork the project, open issues, and provide pull requests.

๐Ÿ“œ License

This project is licensed under the MIT License.

mp3-to-mp4's People

Contributors

devfel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hzy005 ji4

mp3-to-mp4's Issues

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.