Converting IrfanView Slideshow to Video to View Thousands of Photos

My cousins took 2,500 photos during an extended cross-country train trip. I wanted to see those photos, but did not want to press a key or click a mouse button 2,500 times to do so. The obvious solution was to put them into a slideshow.

In the first phase, I chose IrfanView for that purpose. In IrfanView, as partly explained in more detail by PD Pro, I went to File > Slideshow and filled out the various options. I chose “Automatic after 0.5 seconds,” indicating that I wanted to see the photos at a rate of two per second. Below that, I chose Show Text and used, I think, the $D $F $X options. On the right side of the Slideshow options screen, I navigated to the folder containing the desired image files. I could select the files I wanted to include and then click Add, or I could just click Add All to include everything in that folder. In the bottom left corner of the options dialog, I chose Play in Windows Mode (rather than Full Screen) and specified dimensions of 1920 x 1280. When this was all set up, I clicked “Save slideshow as EXE/SCR” > choose EXE.

That worked. With just those very few, fairly easy steps, I was able to view the photos at the desired rate, in great quality, with the specified text displaying in the upper left corner of each photo. This could have been useful in a project like the one described in a related post, where I might want to be able to find and extract specific files. (That other post arrived at PDF as a superior alternative in that case, albeit demanding much more disk space and more time to prepare.) The problem with an IrfanView slideshow was that I could only play or pause it. I couldn’t back up or skip ahead to a different point in the show (although later, in the material listed near the bottom of the F1 (Help) > Overview > Hotkeys feature of IrfanView, I would discover there were more slideshow navigation possibilities than I had realized). I also couldn’t display the resulting EXE file on YouTube. And the EXE file had a size penalty for all that image quality: about 1GB for about 20 minutes of play.

So those were the steps I took in the first phase. That was several years before I began writing this post. At this time, I returned to this project, with an intention of producing something better than that IrfanView slideshow: a smaller package, with at least as good a visual presentation, and with improved ability to back up, skip around, and point to specific pictures within the larger presentation.

At this point, I no longer had the original photos, only the IrfanView slideshow. It seemed that the solution I was looking for was to convert the EXE file to a regular video file. It took me two times to get this right. In my first try, I did that conversion the hard way: I used Debut to capture the full screen while running that slideshow, and then edited the resulting MP4 files in a video editor. For the latter, I used Adobe Premiere Elements (PE). (If I had wanted to extract individual images from the video, it appeared that I could have used PE’s Publish+Share > Image option, and then use something like DoubleKiller to delete duplicate slides.)

I had enjoyed almost invariably good screen capture results with Debut, but in this case I think Debut may have somehow been responsible for the fact that the slides were no longer displaying at a regular pace. Some lingered onscreen for a second or so; others flashed by almost instantly. Or possibly that wasn’t Debut’s fault; possibly my computer was just not supplying the resources needed for full-screen capture at that time. I didn’t have enough experience to know for sure; I almost always used Debut to capture just a window onscreen.

Second time around, instead of trying to screen-capture the IrfanView slideshow, I realized there might be a better way. A search led to Rob van der Woude’s list of IrfanView command line options. These did not include a command to extract images from an IrfanView slideshow. Another suggestion was to rename a copy of the EXE slideshow to make it a ZIP file, and then try opening it in an archiving program (e.g., 7-Zip). I used WinRAR. It said, “No archives found.” So that didn’t work. There were other possibly useful suggestions in that discussion. But the solution that worked for me was in the IrfanView FAQs: to play the slideshow, hit Pause, then hit E (short for Extract, I suppose) and designate an output folder. Within seconds, that put 2,556 image files — all of the photos in the slideshow, I assumed, with what appeared to be their original filenames — into the designated output folder, along with a list of extracted files named slideshow_list.txt. When that was done, the slideshow resumed playing, but I killed it; it had served its purpose.

These extracted JPGs were not large — averaging around 500KB, from the looks of it. I did not recall whether those were the sizes of the photos that I had incorporated into the slideshow originally, or whether IrfanView had shrunk the input files. It did appear that I had done something to them, before putting them into the IrfanView slideshow, because I could see color bands across the sky, in some photos, representing JPG compression artifacts that were surely not there originally. Spot checks with Windows Explorer > Properties > Details tab indicated that several had resolutions of 3264 x 2448, suggesting that neither IrfanView nor I had reduced the pre-slideshow images to the 1920 x 1280 dimensions of the slideshow. It seemed I could have reduced the size of the slideshow EXE file by using IrfanView’s  File > Batch Conversion/Rename tool to resize the images before combining them into the IrfanView slideshow.

There were other ways to improve the quality and reduce the size of the slideshow. One step would be to eliminate duplicates, using DoubleKiller, VisiPics, Awesome, and other tools discussed in another post. I did detect a few duplicates and near-duplicates turned up by those programs, but there were many more near-duplicates in this set. With an additional time investment, I could have manually compared and deleted the near-duplicates; but for this material, with many shots of familiar outdoor scenes (e.g., Grand Canyon), I decided that I liked the rapid-exposure approach, offering multiple images from different perspectives. I did scroll through the images manually in IrfanView, using R or L to rotate a few as needed, and Ctrl-S > Enter to save them after rotating. (Yes, by this point I had decided that I actually liked these photos, and was no longer in the mindset of just viewing them quickly once and being done with them. But I wasn’t so invested as to spend the large amount of additional time needed to sort all these photos by topic.)

Now I had 2,474 JPGs, and I faced the question of how to get them into Adobe Premiere Elements (PE), where I preferred to do my video editing. (Note: instead of PE, I could have used one of the slideshow tools discussed in a separate post.) I had previously seen that PE would balk at an attempt to import a large number of files, and now I confirmed that. When I attempted to add numerous JPGs, I got an error:

Add Media

There were too many files selected for the import operation. Please select fewer files and try again.

My searches did not turn up the specific maximum number of files I could import. It seemed perhaps I could combine the images in some other program, output the results to just one (or a few) files, and then import those into PE. A search led to several possibilities. One suggestion was to use Adobe Lightroom or Photoshop, neither of which was cheap. A SuperUser discussion offered numerous suggestions, among which the recommendation of Avidemux was most highly rated. I downloaded and installed Avidemux version 2.6.18. I didn’t see a menu option for importing, and the Quickstart document didn’t say anything about it, so I shelved Avidemux. Jeff Pulera suggested a way of importing still images as one frame per still in Premiere Pro, but either I didn’t understand his instructions or that option didn’t exist in PE — and, anyway, one frame per image would be too fast, and he wasn’t sure if slow-motion would work in that situation. Someone else suggested combining the photos in Windows Movie Maker 2012 (4.2 stars from 800 raters at Softpedia), though again I wasn’t sure it could handle so many files.

About this time, I realized that I had CyberLink PowerDirector 12, and that it might offer a solution. In fact, it did. It was able import all of the images; I was able to select them all and drag them to the timeline; and the result, at the apparent default of five seconds per image, was a video that would run for 3:26:02. Dividing it out, that came to 2,472.4 images. Close enough: it had worked. I clicked the Duration button and opted for a half-second (i.e., 15 frames, or 00;00;00;15) per image. That brought the total video runtime down to a much more manageable 20 minutes or so. I tried Produce > MPEG-4 2840 x 2160 (30p, 50 Mbps). That was on track to produce a stupidly large MP4 at an incredibly slow rate, so I canceled and tried again with MPEG-4 1920 x 1080 (30p, 16Mbps). Much better.

I was able to import the CyberLink MP4 output into Premiere Elements for further editing. One question was whether I wanted to display the video at a different speed. Both at the editing stage and in playback, this would be another advantage of a video over the IrfanView EXE, at least if I used a player that allowed playback speed adjustment (e.g., MPC). In PowerDirector, as noted above, I had set the slides to change every half-second; now, in PE, I shortened the video, to see if there was an optimal viewing pace. The problem with a quarter-second pace (i.e., four slides per second), I found, was that I would almost immediately space out when I tried to watch it. The transitions were too rapid to keep me engaged. The pictures did not have enough time to become interesting, as I viewed them; they became more like noise. Some people might feel that way about watching at a half-second pace. Yet I didn’t want the video to run any longer than it already was. In the end, I kept it at two slides per second.

There was the option of adding music. (Note that adding music was an option in the slideshow programs discussed in that other post.) I found good free music at several locations, including especially YouTube Audio Library (selectable by duration, which was valuable for this project), ccMixter, and Free Music Archive. Sometimes, with nothing but pictures, I might want intense instrumental music, vocal music, or otherwise something that would grab a person’s attention. But with the rapid pace of these slides, I figured viewers would need to concentrate. So I opted for a long, mellow piece of ambient New Age music.

Now it was a question of what output setting to use. Premiere Elements offered several. I played with different MPEG and Windows Media (WMV) options. I found the WMV was much better at preserving image quality at low bitrates (i.e., smaller filesizes). Since people would see each image for only a fraction of a second, I decided the main quality concern was just to avoid giving the impression of really poor images. A WMV bitrate of 1.5Mbps was too low to provide quality results, but at 3Mbps things looked OK. So my final settings were 1920×1280, framerate same as source, two encoding passes, variable unconstrained bitrate mode, 3000Kbps, maximum depth. The WMV could take twice as long as MPEG to render, and PE could be more of a resource hog in the process of rendering the WMV, but the results were superior to MPEG at comparable bitrates. The final 21-minute video looked good and consumed 515MB.

This entry was posted in Uncategorized and tagged , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s