Skip to main content

A CLI application for converting audio files (.mp3, .wav, .flac, .aiff, etc) to mp4 file suitable for upload to social media sites like YouTube, Vimeo, etc.

Project description

mp3-to-mp4

A CLI application for converting audio files (.mp3, .wav, .flac, .aiff, etc) to mp4 file suitable for upload to social media sites like YouTube, Vimeo, etc.

Features

  • Batch folder rendering
  • Saved renderer defaults
  • Adjustable background color
  • Adjustable dimensions
  • Preset saved between renders.
  • Optional background image.
  • Automatic text creation if metadata is not provided.
  • High test coverage (74% as of current.)

Tools Used

  • Python 3.12.0
  • Typer 0.9.0
  • MoviePy 1.0.3
  • TinyTag 1.10.1
  • PyTest
  • Poetry (Dependency management)

Installation Guide

Distribution

  1. mp3-to-mp4 is available on pypi as mp3-to-mp4.
  2. Simply run pip install mp3-to-mp4 to install.

From Source

  1. Download the repository
  2. Ensure Python and Pip are installed on your system: python --v and pip --v
  3. If you do not have Python installed, install from the official distribution
  4. Check if you have Poetry installed for managing dependencies. poetry --version
  5. If you do not have Poetry, install it. You may also need Pipx.
  6. If you render any files that do not provide an image, ImageMagick will be required. It can be installed from here. Ensure that you select "Install legacy utilities" in the installation options.
  7. After installing Poetry the directory folder, run poetry install in the project directory to install the required dependencies & application.

Usage

mp3-to-mp4 is built with the intention of converting folders of tagged audio files to mp4 rapidly.

Conversion:

To convert an entire folder:

mp3-to-mp4 convert /c/my_folder/

Converting a single file and specific (optional) image:

mp3-to-mp4 convert /c/my_folder/my_music.mp3 --image /c/other_folder/image.jpg

NOTE: If your path includes parentheses, you may need to place it in single quotes to avoid bash errors. e.g. '/c/my path (with mp3s)'

Image Selection:

Image paths can be specified with the --image flag.

A background image path can be specified with the --bg-image flag.

If no image is specified, mp3-to-mp4 will try to grab the image from the file's metadata.

If no image is present in the metadata, it will search the folder for a suitable image and use the first one it finds.

At the moment, mp3-to-mp4 considers .png and .jpeg/.jpg files that match the following as suitable images.

folder, album_art, albumart, art

If there is no image available, text will be generated based on the artist and title ID3 tags, unless a join command has been given, where the album artist and album title tags will be used.

Configuration Flags:

All flags available under the config --help command.

Upcoming features

  • .exe distribution.
  • Text file with description & information output option.
  • Automatic YouTube Upload.
  • Waveform Visualization.
  • Custom progress log.
  • Custom file naming parameters.

Known Bugs & Issues

License & Copyright

© Henry Oberholtzer 2024

Original Code licensed under a GNU GPLv3

Packages & dependencies licensed as specified in their distributions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mp3_to_mp4-0.2.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

mp3_to_mp4-0.2.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file mp3_to_mp4-0.2.0.tar.gz.

File metadata

  • Download URL: mp3_to_mp4-0.2.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.0 Windows/10

File hashes

Hashes for mp3_to_mp4-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a58293b4ecb0df33b973e3a0476139f2ce8e367c467715f4860e4b5c2ea5463b
MD5 fac763b33477bbf50e592b4c9ab80dd7
BLAKE2b-256 afca451adf64ab7c1b0d2b2ed34c372f7b06fddb3e09770ebf5b2a1605d5b3db

See more details on using hashes here.

File details

Details for the file mp3_to_mp4-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mp3_to_mp4-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.0 Windows/10

File hashes

Hashes for mp3_to_mp4-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f058cd50f0b3662f3b3c98cfd325d9c2fd10f66d2bae1e6b125b1181eefdfae
MD5 08323f6c0063c878bf38edcb734bdee8
BLAKE2b-256 1dec169e74ed04ba7b8b492fcfdf6e8c231961be6e6f466c566192c9327cd24b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page