For a while now, I have been attempting to use the various popular video editing applications to create basic photo slideshows with music. However, I have recently discovered a tool called dvd-slideshow. This blog post is designed to serve mainly as a reminder and reference for myself by documenting what I did, but I hope that other people will also find it useful.
dvd-slideshow is available in the repositories, and you can install it with:
sudo apt-get install dvd-slideshow
First, you will want to use dir2slideshow (installed with dvd-slideshow) to add all of your photos to a txt file. The syntax for this command looks like this:
dir2slideshow -n 'My Slideshow' -t 3 -c 1 /home/me/Pictures
This will create a basic slideshow called ‘My Slideshow’ that contains all of the images in the /home/me/Pictures directory. Each image will be displayed for 3 seconds, and there will be a 1 second crossfade between pictures.
Adding music to the slideshow is simple. For my slideshows, I like to have a playlist of music playing in the background for the duration of the show. I don’t really care when they start and end, I just want them to play one after the other.
To do this, I added a few lines at the top of my txt file before any of my pictures.
/home/me/Music/song1.mp3:1:fadein:1:fadeout:1
/home/me/Music/song2.mp3:1:fadein:1:fadeout:1
/home/me/Music/song3.mp3:1:fadein:1:fadeout:1
This will cause song1.mp3, song2.mp3, and song3.mp3 to play in that order. The ‘1’ in the middle refers to audio track 1 (there are two audio tracks in case you want to include narrations on top of the music). I then have quick fadein/fadeout effects that each last 1 second.
I found that the volume levels of my audio files were quite different. To fix this, I installed mp3gain from the repositories and ran it with the -r option against all of my audio files.
When I created my first slideshow, I found that some of my pictures were rotated sideways even though they appeared correctly on my computer. To fix this, I modified my txt file to instruct dvd-slideshow to rotate the troublesome pictures:
/home/me/Pictures/badrotation.png:3::rotate:270
That will cause badrotation.png to be rotated 270 degrees clockwise. The ‘::’ is because I left the optional subtitle parameter blank. You can include some text between the colons if you want a subtitle to be displayed with the image.
Once you have your txt file prepared the way you want, you need to create your video file.
dvd-slideshow -n 'My Slideshow' -f 'My Slideshow.txt'
This will take your txt file and create a vob file called ‘My Slideshow.vob’. This vob file can be played in most Ubuntu media players, giving you the chance to preview your work.
At this point, I chose to use DeVeDe to create my menu and disc structure rather than the dvd-menu utility. My main reason for this was that I had used DeVeDe before and it worked quite well. I also did not want to have to convert the other video files that were being included on the disk to mpeg2. DeVeDe allowed me to create a title and simply specify the path to my .vob file.
You may have noticed that I mentioned that DeVeDe was being used to create my disc structure rather than an iso. The reason for this was that I wanted to create a DVD that people could play in a standard DVD player, but I also wanted to allow them to save copies of the pictures that were in the slideshow to their computer. DeVeDe created AUDIO_TS and VIDEO_TS folders. I simply dragged and dropped these folders to my DVD in nautilus. I then dragged and dropped my picture folder to the disc. After hitting the write button, I was left with a hybrid video and data dvd.
If you think you might be interested in using dvd-slideshow for your own project, I suggest that you check out their website. They have lots of great documentation and example files to help you get started.