Uncategorized

BitTorrent

BitTorrent is a peer-to-peer file transfer protocol. It depends upon the clients to distribute the files, so there’s no server bottleneck. I’ve used the original in years past, but for kicks tried Azureus, a Java implementation.

Regardless of client, BitTorrent by default listens on a port in the range 6881 to 6889. These are tried in order and 6881 will be used unless it can’t bind to it. Of course, my default firewall setup was blocking it. To fix that, I defined the BitTorrent ports in /etc/services:

bittorrent_min 6881/tcp

bittorrent_max 6889/tcp


and added this rule to the firewall:

$IPTABLES -A INPUT -i $OUTSIDE -d 0/0 -p tcp --dport bittorrent_min:bittorrent_max -j ACCEPT

Uncategorized

Comments (0)

Permalink

GnuCash Transaction Report Problem

I use GnuCash for balancing my checkbook and keeping a budget. GnuCash was the program that let me be (almost) completely free of Windows. Until it was available, I ran Quicken (and before that, Managing Your Money).

It’s never given me any trouble until this morning when I tried to run a transaction report. GnuCash showed this message in the report window: Report error

An error occurred while running the report.


Running it from a command line prompt showed this message:

In /usr/share/gnucash/guile-modules/gnucash/main.scm:

245: 11 [catch ignore #<procedure #f ()> #<procedure #f (key . args)>]

?: 12* [#<procedure #f ()>]

In /usr/share/gnucash/guile-modules/gnucash/main.scm:

248: 13* [lazy-catch #t #<procedure #f ()> #<procedure dumper (key . args)>]

In unknown file:

?: 14* [#<procedure #f ()>]

In /usr/share/gnucash/guile-modules/gnucash/main.scm:

249: 15* [apply #<procedure #f ()> ()]

In unknown file:

?: 16 [#<procedure #f ()>]

In /usr/share/gnucash/scm/report.scm:

...

389: 17 (set! html (gnc:report-render-html report #t))

389: 18* [gnc:report-render-html # #t]

357: 19 (if (and # #) (begin #) (let # # doc))

364: 20 (let ((template #) (doc #f)) (set! doc (if template # #f)) doc)

367: 21* (set! doc (if template (let* # # # ...) #f))

367: 22* (if template (let* # # # ...) #f)

368: 23 (let* (# # # ...) (gnc:html-document-set-style-sheet! doc stylesheet) ...)

370: 24* [trep-renderer #]

In unknown file:

?: 25 (letrec (# # # # ...) (gnc:report-starting reportname) (let # # # ...))

In /usr/share/gnucash/guile-modules/gnucash/report/transaction.scm:

1087: 26 (let (# # # # ...) (if # # #) (gnc:report-finished) ...)

1111: 27* (if (not #) (begin # # # ...) (gnc:html-document-add-object! document #))

1112: 28 (begin # # # ...)

1145: 29* (if (string=? filter-mode "include") (begin (set! splits #)))

1145: 30* [string=? none "include"]

/usr/share/gnucash/guile-modules/gnucash/report/transaction.scm:1145:15: In procedure string=? in expression (string=? filter-mode "include"):

/usr/share/gnucash/guile-modules/gnucash/report/transaction.scm:1145:15: Wrong type argument in position 1 (expecting STRINGP): none

I don’t speak Guile and Google didn’t come up with anything. I was running 1.8.1, and the GnuCash site news mentioned bug fixes that might apply, so I tried the 1.8.8 RPM. Thank heavens it worked, ’cause I ain’t got time to learn Guile right now!

Uncategorized

Comments (0)

Permalink

Stale Subtitles

According to XSTE’s man page, a blank line should remove the previous subtitle from the screen. But I noticed the last subtitle on a chapter was still displayed on the next chapter. The output of XSTE included the .bmp file for the last non-blank line, but nothing for the blank lines. A workaround is to put in a line with just a period in it, generate the output, then edit the .bmp (with GIMP) for that line and erase the period. Then running submux-dvd creates the blank subtitle, effectively clearing the previous line.

Uncategorized

Comments (0)

Permalink

RPM Hangs

A friend asked for a copy of RedHat 9. XCDRoast wasn’t installed on my system, so I ran apt-get install xcdroast. It downloaded the package, ran RPM, then froze. Ctrl-C wouldn’t stop it. I ended up closing the command line window. Then this morning, I tried to run up2date and it just sat there. I also noticed my tripwire report wasn’t in my inbox. A ps aux | grep rpm showed a few stuck rpm processes (including last night’s install of xcdroast). I found Bugzilla reference 73097 about problem and tried the steps in comment #3:

  • run kill -9 on the affected rpm processes

  • rm -f /var/lib/rpm/__db*

  • rpm --rebuilddb

Then I got this message from rpm --rebuilddb:

error: db4 error(16) from dbenv->remove: Device or resource busy. This led me to Bugzilla reference 83281, which says, don’t worry about it. Sure enough, all seems fine now.

Uncategorized

Comments (0)

Permalink

KDE Development Libraries

KSubtile needs some KDE development libraries I didn’t already have loaded. These were aquired thusly:

apt-cache pkgnames kde to see what I had, then

apt-get install kdebase-devel

apt-get install kdelibs-devel
to get what I was missing.

Uncategorized

Comments (0)

Permalink

KSubtile Subtitler

While playing with Google’s Linux search engine, I found another subtitle editor. This one is called KSubtile. Yes, that’s KSubtile, not KSubtitle. No wonder it never turned up on searches before.

Anyway, this is a KDE app for creating subtitles in SRT format. I’ll probably get to playing with it this weekend. So far, the standout feature is that it integrates with MPlayer, so I’m hoping it can subtitle multiplexed MPEG files directly, rather than having to split them into separate audio and video streams.

Uncategorized

Comments (0)

Permalink

Update on Burning DVDs

The following options for burning a DVD solve the standalone player compatiblity problems I’ve had. They’re metioned below, but I keep forgetting to use the dvd-compat flag to growisofs. Maybe this post will help to remind me.

mkisofs -dvd-video -o dvd.iso dvdw

growisofs -dvd-compat -Z /dev/dvd=dvd.iso

Uncategorized

Comments (0)

Permalink

Automated DVD Creation

Tried dvdwizard. This is written for PAL, so it has to be modified for NTSC. Here are the changes necessary:

  • Change references to the PAL size of 720x576 to NTSC, which is 720x480

  • Change the frame rate parameter of the ppm2y4m commands from -F 25:1 to -F 30000:1001

  • Change the default for the variable tvsize from 635×535 to 635x439

  • Change the expression let offsetY=(576-$tvY)/2+1 to let offsetY=(480-$tvY)/2+1

Of course, I ran into other trouble, too. dvdwizard complained thusly:

**ERROR: [ppmtoy4m] Bad Raw PPM magic!

**ERROR: [mpeg2enc] Could not read YUV4MPEG2 header: system error (failed read/write)!

The mpeg2enc error was caused by te ppmtoy4m error. The former is piped into the latter. So the problem was with ppmtoy4m.

It seems there are several formats of PNM (portable anymap) files, including PPM (portable pixmap–color), PGM (portable greymap) and PBM (portable bitmap–monochrome). These are simple formats, and each has its own “magic number” at the start of the file which identifies which format it is. There are two variants of each format, ASCII and binary. The headers for these are:

P1
ASCII PBM (monchrome)

P2
ASCII PGM (greyscale)

P3
ASCII PPM (color)

P4
binary PBM (monchrome)

P5
binary PGM (greyscale)

P6
binary PPM (color)

The files being generated by convert had a header of P3, but ppm2y4m wanted P6. So, how to make convert output binary instead of ASCII? If I converted from PPM to PNG and back, that seemed to work. But then, while trying to diagnose problems with the VMGM menu, I started seeing P5 headers. This was my own fault. Instead of a picture background, I used a solid grey so as to make button locations stand out. Convert assumed I wanted a PGM instead of a PPM. Oops.

Another problem was that the convert -trim command failed saying the geometry was zero-sized. I switched to a resize command (convert -resize) instead.

The last problem was with mogrify. For some reason, it complained it couldn’t create files. I switched from mogrify to convert. The only difference between these programs is that mogrify modifies the given file and convert puts it changes in a different file. So whereever mogrify was used, I made this kind of change: mogrify -option $maskPic2 to convert -option $maskPic2 png:${maskPic2}-tmp; mv ${maskPic2}-tmp $maskPic2. The png: prefix to the temporary file name is required because convert uses the file suffix to determine the format. Since I’m creating a file ending in -tmp, I have to specify the format with the prefix. Most of the changes are to PNG files, but a few are PPM. Yeah, this is the cowardly way to fix it, but grandma’s 96th birthday is less than a month away and I gotta get these disks done.

Uncategorized

Comments (0)

Permalink

Borked MPEGs

The damnedest thing happened. dvdauthor had trouble with four of the files I exported from Kino:

STAT: Processing movie-01-mar-2003.mpeg...

WARN: System header found, but PCI/DSI information is not where expected

(make sure your system header is 18 bytes!)

WARN: Skipping sector, waiting for first VOBU...

WARN: Skipping sector, waiting for first VOBU...




WARN: Skipping sector, waiting for first VOBU...

STAT: VOBU 0 at 0MB, 1 PGCS



With a couple of them, dvdauthor crashed. With the others, it just stopped. I found if I re-exported them with the split option on, the trouble went away. But then I had multiple chapters for each video and the chapters="0" option didn’t seem to work.

So I tried to merge the parts together. Some information says you can cat them into one file, but others say that’s not good. mplayer played the catted file, but dvdauthor didn’t like it. I tried mpgtx. This is a tool to split and join MPEG files. Again, mplayer would play the file, but dvdauthor didn’t like it:

WARN: Skipping sector, waiting for first VOBU...



ERR: Audio pts moves backwards; please remultiplex input.

Finally, in searching for an answer I saw the -h option to mplex (which Kino uses as part of exporting). This makes mplex generate a system header in every pack rather than just in the first. This seems to fix the problem.

Uncategorized

Comments (0)

Permalink

DVD (Movie) Backup

I have youngin’s in the house who like to play with toys and gadgets. (I wonder where they get that from.) We’re on our second copy of the first Harry Potter DVD as a result of this “inquisitiveness.” This made me interested in DVD backups. The big problem here is DVD burners can create single layer (DVD-5) disks, which hold 4.7 GB, but many commercial disks are burned on dual-layer (DVD-9) media which hold twice a much. So the problem is how to squeeze all the extra bits on a DVD-5 disk? Here are some links to stuff I tried unsuccessfully:

Transcode

dvdbackup

DVD Transcoding Guide

StreamDVD

dvd::rip (apt-get install perl-Video-DVDRip; dvdrip)

Automatically transcoding DVD-9 to DVD-5 or how to backup a dual layer movie DVD.

To be fair, dvdbackup worked just fine–I just couldn’t get the rest of the way there in Linux. I was still able to use the files dvdbackup ripped. What I finally ended up using to shrink the files is a Windows program (gasp!) called DVD Shrink. I backed up the movie using dvdbackup, copied it to a fat32 partition, booted W2K and ran DVD Shrink on it. This created a new DVD directory layout (AUDIO_TS/… and VIDEO_TS/…). Then I booted back into Linux and created the ISO and burned the disk

mkisofs -dvd-video -udf -o /mnt/edit/shrunken.iso /mnt/dosedit/dvd-shrunken/

growisofs -dvd-compat -Z /dev/dvd=shrunken.iso
.

The disk played fine on the computer but was refused by both the standalone players in the house and my Thinkpad’s (1999 vintage i1472) DVD player. Once I realized that the DVD files were all in lower case (thank you, Windows), I upper-cased them, rebuilt the ISO and burned another disk which worked fine. I now am the proud owner of my first DVD+R coaster!

Uncategorized

Comments (0)

Permalink