1. Pedro Garcia
  2. Mp3ToTube





Mp3ToTube is a script for converting an image and audio to a video. Using only bash commands, this script allows you to generate a single music or an entire album in a format acceptable by Youtube.


Mp3ToTube is released under GPL version 2.


Mp3ToTube can be used on any UNIX-like system. However, some third-party programs are required. These programs are:

  • Bash. The shell must be the Bash, not Bourne shell (sh). In FreeBSD, for example, Bash is not distributed by default and needs to be installed as a third-party application.
  • ffmpeg. See more at http://www.ffmpeg.org/
  • ImageMagick. See more at http://www.imagemagick.org/

Download and Install

To install Mp3Totube, you just need to copy the script file mp3totube into a directory.

# cd /usr/local/bin
# hg clone https://bitbucket.org/kuraiev/mp3totube/
# chmod a+x /usr/local/bin/mp3totube/mp3totube

How to Use

Run the script using as input the chosen image, the audio file and the output video type (by extension).

Examples of usage:

  1. Convert a single wav audio file to a mp4 video:

$ mp3totube cover.jpg song_to_video.wav .mp4

The output will be the video "song_to_video.mp4". The image "conver.jpg" will be in all frames.

  1. Convert each .mp3 file in a directory to the correspondent .avi video:

$ mp3totube album_cover.png *.mp3 .avi

In this case, if the directory contains the "music1.mp3", "song2.mp3" and "track.mp3", the output will be "music1.avi", "song2.avi" and "track.avi". The image "album_cover.png" will be in all frames of these three videos.

How to contribute

If you want to contribute to this project, you can report bugs by mail sawp@sawp.com.br