Thursday, June 21, 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.
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.
Saturday, June 16, 2007
Preserving Closed Captions
Extract closed captions from your edited video:
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):
Convert edited-video.mpg to DVD format (See my other posts) called edited-video.vob.
Insert closed captions as subtitles:
Test with
$ 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):
<subpictures>This file is for NTSC. The defaults in the spumux man page are for PAL.
<stream>
<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"
force="yes"
/>
</stream>
</subpictures>
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
Thursday, June 14, 2007
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:
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:
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
TiVo to DVD: Summary
Here's the full procedure for making a DVD from something on your TiVo:
- Browse to https://your TiVo's IP address
- Download the show. We'll call it tvshow.TiVo
- Convert to MPEG
- Optional: Edit with Gopdit
- Transcode for NTSC DVD
- Create DVD Author file
- Create the DVD structure
- Check the DVD
- Burn the DVD
Log in with user=tivo and password=Your TiVo's MAK
tivodecode -m MAK -o tvshow-orig.mpg tvshow.TiVo
gopdit tvshow-orig.mpg
Save to tvshow.mpg
ffmpeg -i tvshow.mpg -target ntsc-dvd tvshow.vob
Make a file called tvshow-dvdauthor.xml that contains this:
<dvdauthor>
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="tvshow.vob" chapters="0,10:00,20:00,30:00,40:00,50:00" />
</pgc>
</titles>
</titleset>
</dvdauthor>
(This chapters list assumes a 1-hour show with chapters every ten minutes.)
dvdauthor -o dvd -x tvshow-dvdauthor.xml
mplayer dvd:// -dvd-device ./dvd
growisofs -dvd-compat -Z /dev/dvdrw -dvd-video ./dvd
Saturday, June 09, 2007
EXIF Data
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,
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.Subscribe to Posts [Atom]
BlogPhiles webring: Previous Site | Random Site | Next | Membership Guide | Site List