Skip to main content

No project description provided

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.

Technologies Used

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

Installation Guide

  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.

Basic:

To convert an entire folder:

poetry run mp3-to-mp4 convert /c/my_folder/

Converting a single file and specific (optional) image:

poetry run 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:

Images can be specified with the --image or -i 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 instead.

Configuration Flags:

Flags used under the config command.

Running initconfig will restore the config.ini file to defaults.

Flag Type Default Value Usage
--output, -o String (path) ~/mp3-to-mp4 Sets video output directory.
--bg-color, -bg String (Hex Code) #000000 Sets the color the image is rendered against.
--width, -w Integer (pixels) 1920 Sets the video width.
--height,-h Integer (pixels) 1080 Sets the video height.
--padding,-p Integer (pixels) 0 Sets a padding for the album art.
--sort-filename,-s Boolean True Determines if filenames should be used to sort albums --join command.

Upcoming features

  • Full Test Coverage.
  • Config output_path as typed path.
  • Changeable config location?
  • Default to in-folder image.
  • Blurred Background Image option.
  • Switch to PIL for text drawing.
  • .exe for no installation. (PyInstaller)
  • Adjustable bitrate for audio encoding.
  • Text file with description & information output option.
  • Automatic YouTube Upload.
  • Waveform Visualization.
  • Custom Progress Log
  • File name 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.1.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

mp3_to_mp4-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mp3_to_mp4-0.1.0.tar.gz
  • Upload date:
  • Size: 18.6 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.1.0.tar.gz
Algorithm Hash digest
SHA256 ff6778cfc3f758d37d752f77616e137d2473daee0c8f84dea16db72f0f3f4aad
MD5 cd9fb5f7c4e6c8b20a93e9ef0f6514e0
BLAKE2b-256 fe85ed569b41c36c55bc8f6b3a571eef0f9fde51d1f87dc99e2c0ffb9a476764

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mp3_to_mp4-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86945eacc263c627f2297d972ddd2fa7eb0877422c67750e3509fd992340083b
MD5 33de786a34bc985ee20e95c3bbeea68e
BLAKE2b-256 41350a726d94e2ca990fdf8cdb314ab248e0e2aa9c5a50f0c06bf11ca2b564a8

See more details on using hashes here.

Provenance

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