Check out the AfterAudio YouTube Channel to see the final results. All of my album playlists used this process to create YouTube videos from the master .wav files and the album cover file.
Okay, just to let you know, this post gets pretty technical.
I've been looking for a way to create a simple music video that has a still image of my album cover so I can upload it to YouTube (or your favorite social media site). I use Distrokid and they are amazing for automating the process of uploading my music to many of the online stores. It's a simple and easy process.
The one problem that I found is that YouTube creates a video that I have no control of. The channel name is the dreaded "Various Artists - Topic".
The description of the video is
Provided to YouTube by DistroKid
Song Name · Artist Name
Album Name
℗ Record Label
Released on: yyyy-mm-dd
Auto-generated by YouTube.
You can't update the video title or description to include your information. I researched this for several months and could not find anything about how to fix this.
So I said screw this! I'll figure out how to do it myself and upload the videos to my own YouTube channel.
I looked into finding a way to code the video creation process so it could be automated.
I ended up finding FFMPEG a tool that can be installed. To download and install it just search for the latest instructions. (I used the wikihow link instructions)
google.com/search?q=ffmpeg+windows
Once installed you can run a command using a source audio file and a source picture file fullpath to create a video file. I noticed that the default codec setting did not encode the audio with the best compression. I ended up finding YouTube's suggested settings for video files.
Recommended audio bitrates for uploads
Stereo 384 kbps
So I ended up using the following line to create the video (you will need to manually enter the input files)
ffmpeg -loop 1 -i "full path to the image file" -i "full path to the audio file" -tune stillimage -shortest -b:a 384k C:\Users\$user\Desktop\$name.mp4
Now I could have stopped here, but I wanted to automate this more, so I ended up using Windows Powershell.
Here are my final scripts that can be run in powershell ise or powershell. The first one will process a single video from a single audio and album cover file. The second one will process videos for an entire folder of audio files with a single album cover file.
Single Video File Script
#google.com/search?q=ffmpeg+windows
#Run as Admin
#You may need to set the execution policy in Windows to run the script
#Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
start "https://afteraudio.com"
$user = $env:UserName
$image = read-host "Enter the fullpath to the IMAGE file"
$audio = read-host "Enter the fullpath to the AUDIO file"
$name = read-host "Enter the NAME of the output video file"
ffmpeg -loop 1 -i $image -i $audio -tune stillimage -shortest -b:a 384k C:\Users\$user\Desktop\$name.mp4
Full Album Video Files Script
##google.com/search?q=ffmpeg+windows
#Run as Admin
#You may need to set the execution policy in Windows to run the script
#Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
start "https://afteraudio.com"
$user = $env:UserName
$date = get-date -Format "MM-dd-yyyy-hhmm"
$image = read-host "Enter the fullpath to the IMAGE file"
$audio = read-host "Enter the fullpath to the folder that contains all the AUDIO files"
$audio = $audio -replace '"',''
$base = (get-item $audio).basename
$folder = "$base-$date"
$album = get-childitem -Path "$audio" -Force -recurse
New-Item -Path "C:\Users\$user\Desktop" -Name "$folder" -ItemType "directory"
$album | % {
$song = $_.fullname
$name = $_.basename
ffmpeg -loop 1 -i $image -i $song -tune stillimage -shortest -b:a 384k C:\Users\$user\Desktop\$folder\$name.mp4
$song
$name
}