{"id":333,"date":"2008-08-11T14:23:07","date_gmt":"2008-08-11T21:23:07","guid":{"rendered":"http:\/\/www.stevenbrown.ca\/blog\/?p=333"},"modified":"2008-08-11T14:23:07","modified_gmt":"2008-08-11T21:23:07","slug":"creating-a-dvd-slideshow-in-linux","status":"publish","type":"post","link":"https:\/\/www.stevenbrown.ca\/blog\/archives\/333","title":{"rendered":"Creating a DVD Slideshow in Linux"},"content":{"rendered":"<p>For my brother&#8217;s wedding, about a week ago, my sister wanted to do a slideshow for them.  She&#8217;s done this before and she&#8217;s known for spending lots of time making very nice, emotional slideshows with carefully chosen pictures and music.  Previously, she would count in her head while manually switch the slides with a traditional projector.  (We have a lot of great family photos that are only on slides.)  Anyway, she figured she&#8217;d use computers this time around and my assistance was &#8220;enlisted.&#8221;  I kept thinking, &#8220;If only I had a Mac, I&#8217;m sure this would be easy&#8230;.&#8221;  But it turns out there&#8217;s a reasonable command-line program available on Linux that is just a little cumbersome (mostly because it&#8217;s command-line tool for something that really needs to be visual) &#8211; but works quite well: <a href=\"http:\/\/dvd-slideshow.sourceforge.net\/\"><strong>dvd-slideshow<\/strong><\/a>.    I&#8217;m going to go over what I did, mention some quirks and how to work around them.<\/p>\n<p>First, install dvd-slideshow (a set of command-line tools).<\/p>\n<pre lang=\"bash\">\r\nsudo aptitude install dvd-slideshow\r\n<\/pre>\n<p>You may want to get the latest version from the webpage and manually install that.<\/p>\n<p><strong>Update<\/strong>: While writing this, I have since discovered &#8220;<a href=\"http:\/\/slcreator.sourceforge.net\/\">slcreator<\/a>&#8221; which looks like it would fill in the glaringly absent graphical component of dvd-slideshow.  Though it hasn&#8217;t been updated for quite a long time&#8230;. it&#8217;s definitely worth investigating before going through the manual process yourself.  <\/p>\n<h3>Step 1: Organize your digitized photos within a directory<\/h3>\n<p>Since my sister was the creative force behind this, she needed to see the photos as she was deciding on the order.  Nautilus thumbnails were good enough, so I simply showed her how to rename files and made suggestions for organizing them by name (like naming a photo &#8220;12a.jpg&#8221; if you want the photo to be in between &#8220;12.jpg&#8221; and &#8220;13.jpg&#8221;).  This worked in Nautilus, but in the next step, the ordering would be changed to 12a.jpg, 12.jpg, 13.jpg &#8211; which is probably a bug in dir2slideshow.  (You could work around this by always using a single letter after the number.)<\/p>\n<h3>Step 2: Generate input file from images directory and customize<\/h3>\n<pre lang=\"bash\">\r\ndir2slideshow -o output_directory -t seconds_per_picture -c crossfade_seconds images_directory\r\n<\/pre>\n<p>This will output a text file in the output_directory that contains all the images in the images_directory with specified transition and duration times.  The order of the pictures should be how it is listed by name in your file browser, minus the bug I mentioned earlier.  You can manually edit this file and then pass it to <code>dvd-slideshow<\/code>.  <\/p>\n<p><strong>Multiple Directories<\/strong>:<br \/>\nMy sister had arranged photos in multiple directories, each consisting of a theme (childhood, Halloween, travel, etc) and a specific song to go with it.  So I just generated multiple input files with appropriate names, worked on individual sections, and eventually copied them all into a master input file keeping the desired order.<\/p>\n<p><strong>Adding Music and Silence<\/strong>:<br \/>\nAnother bug I encountered was getting music to fade out at the correct time.  In the input file, the format for adding music is this: <code>audiofile:track:effect1:effect1_params:effect2:effect2_params <\/code>.  So I had <code>my_sad_song.mp3:1:fadein:0:fadeout:5<\/code> saying I wanted it to spend 5 seconds fading out.  Additionally, I wanted about 10 seconds of silence at the very end.  Your are supposedly able to specify <code>silence:duration_in_seconds<\/code> but at the end of the slideshow, it wasn&#8217;t forcing the song to fade out in time to include that amount of silence &#8211; it seemed to be ignoring it at the end if there was no more photos.  I got around this by creating a small file of silence, <a href='https:\/\/www.stevenbrown.ca\/blog\/wordpress\/..\/files\/2008\/08\/silence.wav'>silence.wav<\/a>, and using that instead of the built-in silence option.<\/p>\n<p><strong>Nice looking fonts<\/strong><br \/>\nAnother quirk I encountered was terrible looking fonts with the built-in <code>title:duration:thought_provoking_title<\/code>.  I didn&#8217;t want to spend too long looking at the cause of this, so I just created some title images in <a href=\"http:\/\/www.gimp.org\">the Gimp<\/a>.<\/p>\n<h3>Step 3: Generate the Slideshow<\/h3>\n<pre lang=\"bash\">\r\ndvd-slideshow -mp2 -nomenu -o tmp\/working -f tmp\/ALL.txt\r\n<\/pre>\n<p>The <code>mp2<\/code> option is required to avoid an error message and has worked on all DVD players I&#8217;ve heard of, so far.  The <code>nomenu<\/code> option is for creating a DVD with no menu &#8211; I just wanted it to start playing the slideshow when the disc is inserted into the player.  The <code>o<\/code> option specifies the output directory and the <code>f<\/code> option specifies the input file created earlier.  Once this finishes (it might take a while) you should have a DVD .vob (MPEG2) file and an xml file in the output directory.<\/p>\n<p><strong>Debugging:<\/strong><br \/>\nI like to see how the final product will look, so I chose not to use the <code>L<\/code> (low quality) option for debugging.  Instead, I created a smaller input file with specifically what I wanted to test.  When I was happy with the test, I copied the changes into my master input file.<\/p>\n<h3>Step 4: Create the DVD Filesystem<\/h3>\n<pre lang=\"bash\">\r\ndvd-menu -f tmp\/working\/ALL.xml -nomenu -mp2 -o tmp\/working-dvd\r\n<\/pre>\n<p>This will output a folder <code>dvd_fs<\/code> in the output folder (<code>tmp\/working-dvd<\/code>) containing <code>VIDEO_TS<\/code> and <code>AUDIO_TS<\/code> directories with the required files for a proper DVD.  <\/p>\n<p><strong>Adding Content:<\/strong><br \/>\nThis is where you optionally add more files to the DVD.  For me, I added two folders, <code>Music<\/code> containing the music used in the slideshow and <code>Photos<\/code> containing the photos used in the slideshow.  A good idea would also be to add the source file and commands used to create the DVD and then you are distributing the source.  \ud83d\ude09<\/p>\n<h3>Step 5: Make an ISO to burn<\/h3>\n<pre lang=\"bash\">\r\nmkisofs -dvd-video -udf -o ~\/Desktop\/slideshow.iso tmp\/working-dvd\/dvd_fs\r\n<\/pre>\n<p>This creates an ISO called <code>slideshow.iso<\/code> on the desktop.<\/p>\n<h3>Step 6: Burn the ISO<\/h3>\n<p>There&#8217;s many ways to burn an ISO, but just use Nautilus: right click on the icon on your desktop and select <em>Write to Disc&#8230;<\/em>.  That&#8217;s it!  Test it out in your DVD player.<\/p>\n<h3>References<\/h3>\n<p>Lots more info about specific commands and useful examples can be found at the dvd-slideshow&#8217;s <a href=\"http:\/\/dvd-slideshow.sourceforge.net\/wiki\/Documentation\">documentation page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For my brother&#8217;s wedding, about a week ago, my sister wanted to do a slideshow for them. She&#8217;s done this before and she&#8217;s known for spending lots of time making very nice, emotional slideshows with carefully chosen pictures and music. Previously, she would count in her head while manually switch the slides with a traditional&hellip; <a class=\"more-link\" href=\"https:\/\/www.stevenbrown.ca\/blog\/archives\/333\">Continue reading <span class=\"screen-reader-text\">Creating a DVD Slideshow in Linux<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3,11],"tags":[114,173,154,42,4,174,170],"class_list":["post-333","post","type-post","status-publish","format-standard","hentry","category-geek","category-projects","tag-audio","tag-dvd","tag-gimp","tag-how-to","tag-linux","tag-slideshow","tag-wedding","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4jEMb-5n","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/comments?post=333"}],"version-history":[{"count":0,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/333\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/media?parent=333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/categories?post=333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/tags?post=333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}