June 2007

Amanda Backup

Currently, I use Bacula to back up my main Linux box. The problem is that it’s designed to work over a network and I’m only using it on one PC, so if that box goes down, I have to restore the file system and Bacula before I can restore. It’s the restoration of Bacula that worries me. It took me a long time to set it up and I’m worried that I might not be able to get it set up right for a restore. And Bacula’s backup files can’t be restored without Bacula. So I went looking for another solution.

I thought Amanda would work. It backs up to a format that can be restored with tar. The problem was, despite tutorials, I had trouble getting that to work too. It complained about the backup being too big to fit the virtual tapes (my target is DVDs, so the backup is to hard disk first). After I got that straightened out, I did a restore test. The root and boot partitions were fine, but the home parition was missing files. I checked the amrestore output and found that tar complained about bad files. The funny thing was, I could tar and restore the home partition manually and it was fine. What good is a backup you can’t restore? Right.


Comments (0)


Preserving Closed Captions

Extract closed captions from your edited video:
$ ccextractor -srt edited-video.mpg
This will create a text file called edited-video_1.srt that contains the captions.

Create the spumux configuration file (in this case called spumux.xml):

<textsub filename="edited-video_1.srt" characterset="ISO8859-1"
fontsize="24.0" font="arial.ttf" horizontal-alignment="left"
vertical-alignment="bottom" left-margin="60" right-margin="60"
top-margin="20" bottom-margin="30" subtitle-fps="29.97"
movie-fps="29.97" movie-width="720" movie-height="472"

This file is for NTSC. The defaults in the spumux man page are for PAL.

Convert edited-video.mpg to DVD format (See my other posts) called edited-video.vob.

Insert closed captions as subtitles:
$ spumux spumux.xml < edited-video.vob > edited-video-with-subs.vob

Test with mplayer dvd:// -dvd-device dvd -sid 0


Comments (0)


Dealing with Video Too Long for DVD

One of the movies I wanted to transfer from TiVo to DVD was too long to fit. In order to reduce its size, the bitrate must be reduced (see section 2b):

maximum-bitrate (bits/second) = 4,500,000,000 (bytes) * 8 (bits/byte) / video-length (seconds)

You can get the duration from the output of ffmpeg:

ffmpeg -i movie.mpg delete-me.vob -fs 1

This maximum bitrate gets split between audio and video. Use 256,000 for the audio and the rest for video. The new ffmpeg command is:

ffmpeg -i movie.mpg -target ntsc-dvd -b <video bitrate> -ab <audio bitrate> movie.vob


Comments (0)


TiVo to DVD: Summary

Here’s the full procedure for making a DVD from something on your TiVo:

  1. Browse to https://your TiVo’s IP address
  2. Log in with user=tivo and password=Your TiVo’s MAK

  3. Download the show. We’ll call it tvshow.TiVo
  4. Convert to MPEG
  5. tivodecode -m MAK -o tvshow-orig.mpg tvshow.TiVo

  6. Optional: Edit with Gopdit
  7. gopdit tvshow-orig.mpg

    Save to tvshow.mpg

  8. Transcode for NTSC DVD
  9. ffmpeg -i tvshow.mpg -target ntsc-dvd tvshow.vob

  10. Create DVD Author file
  11. Make a file called tvshow-dvdauthor.xml that contains this:

    <vmgm />
    <vob file="tvshow.vob" chapters="0,10:00,20:00,30:00,40:00,50:00" />

    (This chapters list assumes a 1-hour show with chapters every ten minutes.)

  12. Create the DVD structure
  13. dvdauthor -o dvd -x tvshow-dvdauthor.xml

  14. Check the DVD
  15. mplayer dvd:// -dvd-device ./dvd

  16. Burn the DVD
  17. growisofs -dvd-compat -Z /dev/dvdrw -dvd-video ./dvd


Comments (0)



JPG files from cameras contain EXIF data. This describes the picture, the camera, when the shot was taken, etc.

In order to read the EXIF data you need libexif. This is probably already installed. Another thing you need is exif. This doesn’t seem to be available in an RPM. You have to build it yourself with the usual, download, tar zxf (for tar.gz), ./configure, make, make install. There’s also a graphical version. You need to use the same incantation for libexif-gtk and gexif in that order.


Comments (0)