Yet Another Music Video Generator (and more)
First of all, this page was just thrown together, please don't judge the design, thanks. :)
Yamvgen is a simple Linux tool for auto-generating cover art images and "video clips" with a basic visualizer. Here is an example of what it is capable of.
You can get the latest version here: https://github.com/zynskeywolf/yamvgen
After downloading it, simply run install.sh
as root. No need to compile anything, it's just bash.
Some dependencies, please make sure you have these installed:
For bug reports and feature requests, please use GitHub issues.
yamvgen-cover COMMAND [PROFILE] [OPTIONS]
Command | Description |
---|---|
help | Display a brief help and exit. |
cover | Renders a raster image by substituting variable content into a predefined SVG template. This can be used for generating cover artworks that follow a unified branding. |
vid | Generates a video with the specified audio track. The video content can be either a simple still image or one generated from an SVG template. Optionally you can also add a minimalistic waveform display. |
Specifies a custom configuration file to use. See the "Profiles and templates" section.
Option | Description |
---|---|
-a | Input audio file. The stream is copied to the output video file without any conversions. Metadata from this file is used if '-artist' or '-title' is omitted. |
-o | Name of the output image or video file. The format is implicitly set by the file extension. If omitted, generating file name from the specified metadata. |
-i | SVG image containing the overlay template. The appropriate placeholder strings will be replaced with the specified values by the program. If omitted, using the background image as is. |
-bg | Background image on which everything else is overlaid. Please note that the program does NOT do any compositing by itself, so the placeholder must be correctly referenced within the SVG. |
-artist , -title | Override artist name and title to be displayed. Use the $artist and $title variables in the SVG. |
Option | Description |
---|---|
-c , -b , -r | Codec, bitrate, and frame rate of the output video. These parameters are passed directly to ffmpeg. |
-fin , -fout | Length of fade-in and fade-out at the beginning and the end of the video in seconds. If only -fin is specified, using it for both fade-in and fade-out. |
-keeptmp | Keep temporary files in /tmp/ after execution, mostly for debugging. |
Option | Description |
---|---|
-wmask | Specifies a (preferably grayscale) image to be applied to the waveform as an alpha mask. The size of this image sets the size of the waveform display at maximum amplitude. Although color images are accepted, they will be treated as grayscale. If omitted, no waveform is rendered. |
-wx | X position of the waveform's left edge. |
-wy | Y position of the waveform's zero level. If omitted, the waveform will be vertically centered. |
-wblur | Make the waveform more visible on high resolutions. This is done by blurring the waveform and pushing the brightness up to make it thicker. This looks pretty ugly tho tbh lol lmao xd. |
/etc/vid-default.conf
is the default configuration, and /etc/vid-static.conf
provides a minimal setup for a static background. To create a custom profile, copy the default config to your home directory and make changes as required. These files are basically shell scripts that get sourced to set some variables. Remember that command line arguments can always override these settings. Using empty quotes (""
) after an option removes its value set by the profile.
The default SVG templates are located at /usr/share/yamvgen/
. Custom templates can be created by any SVG editor (e.g. Inkscape) by using the following placeholders in the document:
Variable | Description |
---|---|
$artist | Artist name |
$title | Track title |
$bg | Full path of the background image file (even if it was specified as a relative path by the user) |
When not using an SVG template, the output video size is determined directly by the background image size. Otherwise the output image and video inherits the dimensions of the SVG file and the background is scaled according to the template's setting.
When using stereo or multi-channel audio files, all channels will be displayed on a separate graph on top of each other.
When the waveform rendering takes place, the audio gets resampled so that each frame of the video displays data from the interval it's being shown for. This means that using different frame rates will affect the horizontal stretching of the waveform in order to maintain sync between audio and video.
If you use a still image without waveform display, it's still recommended to not go under 15 fps, otherwise YouTube can do weird things.