Thursday, May 5, 2011

Creating the home video, revisited

For Mother's Day this year my wife and I decided to take all of the best, cutest videos of our daughter and compile them into a DVD for our mothers and grandmothers.  So we gathered together all of our favorite moments, all of which were a few minutes each and were taken on our cell phones (she has a Blackberry and I have an Android phone).

I used a USB cable to transfer the files to a folder called "raw_footage" on my desktop machine running Linux Mint 10.  That's when I noticed that every single video had an extension of 3GP.  I was able to play them in Totem, so no problems so far. 

I fired up PiTiVi, which has come a long way since the last time I blogged about it.  After adding files to the timeline at the bottom, I noticed that the video and audio tracks each have a horizontal red line going through them (the video has the line going across the top, the audio has the line going through the middle).  With this bar you can double-click to set a fixed point, then drag the line up or down to fade the audio or video in or out.  I used this feature to create fade in and fade out effects for each shot, and to turn up the volume on one of the clips that was too quiet to hear.  Sweet! 

Everything was coming along swimmingly until I went to render the project.  PiTiVi just kept crashing!  It would say it was rendering and just hang there, go unresponsive to input or it would start to render and the progress bar would never appear, all the while the estimated time remaining increased indefinitely.  Super frustrating!  I tried changing output formats but nothing worked.  Finally I removed all of the videos from the timeline and went through each video file individually to render it to Ogg Theora.  After that PiTiVi would render to whatever format I wanted.  Whew!

At this point I'm ready to be done with this project, but I was about to become the next Beowulf, just having defeated Grendel only to have to descend to the underworld to face Grendel's mother.

This next challenge came when I tried to add subtitles and create the DVD.  I used Jubler to create the file containing the subtitles, and I used DeVeDe to create the DVD image file itself (along with menus etc).  Both Jubler and DeVeDe use MPlayer as a back-end for multimedia support, which makes a lot of sense since MPlayer has been around forever and has a reputation for supporting every video and audio format known to man.  So I should have been safe since all of my files are in Ogg Theora now, right?  I mean, there's no way MPlayer is going to have difficulty with the most popular free and open source video format, right?

Wrong!

For reasons totally beyond my comprehension, the Gnome MPlayer default isntallation/configuration Ubuntu 10.10 and Linux Mint 10 is totally incapable of playing Ogg Theora out of the box. It failed with a generic error ("MPlayer interrupted by signal 11 in module decode video"), which I Googled for several hours and turned up empty-handed.  To this day I have no idea how to get MPlayer to play Ogg Theora files on two of the most popular Linux disros.  Totem was able to play them, which tells me that this has nothing to do with availability of codecs.  I think it's totally insane that there is nothing I can do to get one of the most popular media players, which serves as a back-end for a lot of A/V editing tools, to handle Ogg Theora.  It's Ogg Theora, people!  I thought Windows Media Player was the only utility that still couldn't play it!



For all that, the workaround I found wasn't all that bad:  I simply used PiTiVi to re-render my videos into MP4 (with the x264 video codec and Lame audio codec), which MPlayer was more than happy to play.  Once that was done it was pretty much smooth sailing: I fired up Jubler and created the .ass files that told DeVeDe where to put each subtitle and how long to display it (I used this post as a guide), then DeVeDe created the ISO without a hitch.