Older blog entries for connolly (starting at number 59)

30 Dec 2008 (updated 30 Dec 2008 at 18:39 UTC) »

woot! It works! Youtube videos on a $30 media player!

The AMV format was new to me; I found a HowToConvertToAMV recipe, but that lacks support for mp4a, the audio codec used by youtube (at least the videos I tested).

Then I found adding --enable-faad to ffmpeg (don't forget to make distclean) and presto:


$ clive
'http://www.youtube.com/watch?v=3pYN42YyWp0&feature=related'
clive 0.4.19 20080722  [Linux]
http://www.youtube.com/watch?v=3pYN42YyWp0&feature=related&fmt=
           100%
BrianReganWalkieTalkie.mp4                                 
              2.6MB
=> 1 (2.6MB), failed: 0, skipped: 0.
BrianReganWalkieTalkie.mp4                    100%    2.6MB
 109.2KB/s 00:00:24


$ ~/src/amv-codec-tools/AMVmuxer/ffmpeg/ffmpeg -i BrianReganWalkieTalkie.mp4 -f amv -s 128x90 -r 16 -ac 1 -ar 22050 -qmin 3 -qmax 3 BrianReganWalkieTalkie.amv FFmpeg version SVN-r589, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-libfaad libavutil version: 49.5.0 libavcodec version: 51.47.1 libavformat version: 51.17.0 built on Dec 30 2008 12:07:41, gcc: 4.3.2 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'BrianReganWalkieTalkie.mp4': Duration: 00:01:13.7, start: 0.000000, bitrate: 291 kb/s Stream #0.0(und): Audio: mpeg4aac, 44100 Hz, stereo Stream #0.1(und): Video: h264, yuv420p, 320x240 [PAR 0:1 DAR 0:1], 30.00 fps(r) PIX_FMT_YUV420P will be used as an intermediate format for rescaling Output #0, amv, to 'BrianReganWalkieTalkie.amv': Stream #0.0(und): Video: amv, yuvj420p, 128x90 [PAR 0:1 DAR 0:1], q=3-3, 200 kb/s, 16.00 fps(c) Stream #0.1(und): Audio: adpcm_ima_amv, 22050 Hz, mono, 64 kb/s Stream mapping: Stream #0.1 -> #0.0 Stream #0.0 -> #0.1 Press [q] to stop encoding frame= 1172 fps=343 q=0.0 Lsize= 3878kB time=73.2 bitrate= 433.7kbits/s video:3062kB audio:802kB global headers:0kB muxing overhead 0.376436%

Merry Christmas, Kyle!

It's not as nicely packaged as the Mac app Justin uses with his ipod, but it's cheaper and more free (I'm not sure if it's quite open source; I don't know the license details of the AMV code.)

See also: #swig chat, including notes on a mythv box.

tags: media, video

struggling to get my data out of Zope

I found a recipe for iterating over the contents of a Zope store. It looks promising, but I'm not wining yet. My zope instance was built with zope 2.7 but the debian server has 2.9 now; 2.7 doesn't even show up in an apt-cache search.

This job of migrating dm93.org from Zope was pending an alternative to Zope for family calendar storage. Now that my wife's laptop runs Leopard, google calendar works as a host.

Then I somehow lost root when poeple.w3.org was upgraded or something, and I just recently got around to asking thru channels to get it back.

Time to swap this job out, I think; here's my current state:


connolly@flanders:~$
INSTANCE_HOME=/var/lib/zope2.7/instance-dm93-disabled
PYTHONPATH=/usr/lib/zope2.9/lib/python python
Python 2.4.4 (#2, Oct 22 2008, 19:52:44) 
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> from Zope2 import app
>>> root=app()
/u2/connolly/dm93/Products/LocalFS/LocalFS.py:51:
DeprecationWarning: Using OFS.content_types is deprecated
(will be removed in Zope 2.11). Instead use
zope.app.contenttypes.
  from OFS.content_types import find_binary
No handlers could be found for logger "Zope"
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/zope2.9/lib/python/Zope2/__init__.py", line
51, in app
    startup()
  File "/usr/lib/zope2.9/lib/python/Zope2/__init__.py", line
47, in startup
    _startup()
  File "/usr/lib/zope2.9/lib/python/Zope2/App/startup.py",
line 46, in startup
    OFS.Application.import_products()
  File "/usr/lib/zope2.9/lib/python/OFS/Application.py",
line 685, in import_products
    import_product(product_dir, product_name,
raise_exc=debug_mode)
  File "/usr/lib/zope2.9/lib/python/OFS/Application.py",
line 723, in import_product
    raise sys.exc_info()
KeyError
>>> 

Have I tried this gnome blog thing before?

hmm... no blockquote? lame.

what about images/photos?

tried BloGTK; couldn't get it connected to the W3C Q&A blog.

I think the last blog editor I enjoyed was flock; maybe I'll give that another try.

25 Oct 2007 (updated 25 Oct 2007 at 01:16 UTC) »

Remembering Modula-3

Systems Programming with Modula-3 has been on my wishlist for years, but after reading the feedback from Tim Bray's Wide Finder project, I finally got my very own copy.

One of the reactions, Finding Lisp, observes:

Most popular programming languages have the same simple threads+locks paradigm that was popularized with pthreads and Java.

But Java made everything a monitor.

I learned pthreads while working on a big horrible C++/DCE project, Dazel (later bought by HP). One of the guys there (Jim W?) loaned me his copy of Systems Programming with Modula-3, where chapter 4 is a copy of An Introduction to Programming with Threads by Birrell. It's probably a good thing that we never followed thru on our dreams to rewrite the whole project in Modula-3, but it was good to know about partial orders on locks and such while taming the pthread libraries (... and the C++ exception runtimes; what a nightmare!)

And anybody who had studied the Modula-3 Thread and IO design would know better than to make everything a monitor.

A lot of good stuff from Modula-3 lives on in python, and some in Java, but DEC got bought by Compaq which got bought by HP, and a lot of the DEC SRC goodies seem to be disapearing from the net.

The wikipedia article on Modula-3 has a "This article does not cite any references or sources" tag since July 2006. That looks silly, since a number of books and articles are listed. I can see some unsupported claims, though, so I ordered my own copy of SPwM3 so I can separate some of the verifyable claims from the speculation.

I'd also really like to find a host (other than the wayback machine) for the hypertext version of the SRC Modula-3 sources; it's a gold-mine of software engineering theory and practice; for example, from Fingerprint.m3:

The original fingerprint interface offered at SRC did not include the procedure Combine. The Vesta configuration management project built a system that cached intermediate results for large software builds. Abstractly, this is a special case of the common subexpression problem mentioned previously, and the project used fingerprints as keys in the cache. It is instructive to learn what happened.

You might think that a simple way to solve the common subexpression problem without Combine would be to fingerprint the texts that result from printing the expressions represented by the nodes of the DAG. But if the DAG is not a tree, this is a serious error, since the length of the strings produced by printing a DAG can grow geometrically with its size, and therefore the probabilistic guarantee becomes useless even for quite small DAGs.

Avoiding this error, the Vesta group computed the fingerprint of a node by concatenating the node's label with the {\it fingerprints} of its children---treating these fingerprints as 8-byte texts--- and fingerprinted the resulting text. With this strategy, the number of texts fingerprinted is proportional to the number of nodes of the DAG, and the total length of these texts is proportional to the number of edges of the DAG. Thus the method appears efficient and sound.

Alas, the method is not sound. Recall that the probabilistic guarantee is valid only if the strings being fingerprinted are independent of the magic number. But fingerprints themselves are dependent on the magic number, so the probabalistic guarantee is invalid whenever fingerprints are fingerprinted. The Vesta group was soon debugging an unexpected collision.

The moral is simple: the procedure Combine is a convenience, but it is also much more than a convenience. It should be the only way that you ever generate a fingerprint from another fingerprint. In particular, never treat a fingerprint as text to be passed to FromText.

Maybe the python foundation would like to host it? I'm pretty sure Guido has a fondness for Modula-3.

I just discovered SocksiPy - A Python SOCKS client module via a httplib2 - 0.4.0 announcement.

I wonder how SocksiPy relates to the socksForPython module that I hacked together back in 1994. I suppose the clue Guido gave me might have been our first meeting.

Package management is a blessing when there’s integrated QA and support. apt-get is only one half of the equation; the Debian Bug Tracking system (and the people behind it) is the other.

Case in point: fink adds apt-get to the Mac OS, but the result is that updates from Apple and updates from fink compete/collide, and when there’s a problem, the natural result is finger-pointing rather than integrated QA.

Debian/ubuntu have scaled amazingly well, but they rely on quite a bit of trust. The MS Windows marketplace includes lots of mutually distrustful players, as does the Mac OS X marketplace. It’s not at all clear how apt-get and the debian bug tracking system (or ubuntu’s launchpad) can scale to support that sort of marketplace.

This is a comment I left on How package management changed everything by Ian Murdock, spotted in a Tim Bray tab sweep.

tags pending: software installation quality

22 Jun 2007 (updated 22 Jun 2007 at 21:25 UTC) »
Music Collections and Office Organization

It worked this time. I wonder why.

I have been trying to rip Paul Simon's Graceland using debian stuff for years. I was sure the CD was mangled beyond recognition, but soundjuicer on Ubuntu on this new HP pavilion just gave me a bunch of .flac files that sound fine.

I listened to this album all summer as I wrote 80,000 lines of HyperTalk code back in 1989. I think my copy was on tape at the time.

I wonder if the CD I ripped today is the same on I failed to rip so many times earlier or if this is a different CD.

This task is in my queue today because the music shelf in my office is poorly organized and overfull, and when I took my worship music binder off the shelf, this CD fell off the shelf. Rather than put it back on the shelf last night, I put it in my "in" box, GTD-style.

This wakes up all sorts of long-swapped-out jobs involving organizing my multimedia collection.

Mostly I don't do back-ups; I just send email and check stuff in using source code control (CVS for ages, but more recently hg... that's another story [@@delicious scm bookmarks]...). And I use google to find it again. But I don't have license to redistribute these flac files, so I have to manage them myself.

Part of me says: don't bother. If I'm going to fill my iPod (shuffle) with things to fill my head, they should be things that glorify God, and while Paul Simon's music is nothing nasty, I'm not sure it glorifies God. Plus, the whole recorded music oligarchy is an unstable marketplace just waiting for a revolution. "If you're whining about iTunes DRM, you're part of the problem," said a slashdot commentor that hit home for me. (@@todo: look it up and link it) much like a conversation with AaronSw about how songs and musicians have been around for a long time, even before you could get rich selling records; if the bottom falls out of the recorded music industry, humanity will go on.

MusicBrains solves the shared metadata problem for CDs pretty well, but Rhythmbox doesn't seem to automatically link to it like it used to. It does show album cover art...

In trying to figure out why, I looked in the help menu which led me to launchpad which links to IRC channels; those irc: links Just Work in Ubuntu. Yay! Except that xchat didn't realize that I was already logged into the Freenode network. Odd.

Better get back to other things... everything is so intertwingled I could go on and on...

tags: digial+media, music, sysadmin, ubuntu, debian, gtd

5 Jun 2007 (updated 5 Jun 2007 at 17:16 UTC) »

Not only does the nv driver not do 3D acceleration, it doesn't seem to do 1600x1050 resolution either.

The nvidia module in the debian non-free section blanked the screen and locked up so badly it required a reboot. When investigating options, that gets old real fast.

In #debian, the channel bot said:


<dpkg> from memory, nvidia_post_etch is update-pciids
&&
apt-get install module-assistant nvidia-kernel-source
&& m-a
prepare && m-a a-i nvidia && apt-get install
nvidia-glx &&
depmod -a && modprobe nvidia &&
dpkg-reconfigure xserver-xorg

But that produced the same symptoms.

Besides... debian fonts are ugly, and they seem to be chosen by a zillion different configuration options; it seems to be a full-time job just finding them all.

So I'm running Ubuntu now. I'm not sure how I feel about that.

I replaced the amd64 installation with the stock (quicken-friendly) i386 stuff.

It comes with evolution 2.10, I think. Slightly more polished. I wonder if subscribing to password-protected calendars works.

My code to print MS Word docs to PDF fell over; something about templates. So I'm trying to use OpenOffice instead. I almost got it working. Let's see if ubuntu support will help me out with this...

Bug #118789: trouble using ExportFormFields in uno API; PDF form controls are exported even when set to False

tags: office, debian, ubuntu, linux, hardware,

30 Apr 2007 (updated 30 Apr 2007 at 22:17 UTC) »

My desktop PC is a frankenstein, with parts from here and there. It has been crashing and hanging once a week or so since December, and I was getting clues in #hardware on FreeNode about how to diagnose power supply problems.

"Put the multimeter away and get yourself a new PC," the systems guys at W3C told me. Still, it wasn't until about a month of research on PC hardware that I outsourced the decision to Brian at the local Micro Center. "I want a quiet machine," I told him.

It came down to a choice between two HP Pavilion machines; the a6030n with AMD Live! (Athlon 64 X2 etc.) and the a6040n with Intel Viiv (Core 2 Duo etc.). I picked the AMD machine... partly because the cheaper CPU lets them include 2x the RAM for the same price or a little less... but partly because Intel is the market leader and I like to root for the underdog.

I didn't open the box right away when I got it home, because I wanted to research it just a bit more during the 7 day return period without risking a restocking fee. I had some buyer's remorse when I remembered that "at present the nv driver has no 3D acceleration."

I'm still wrestling with so many choices:

  • stick with debian or switch to Ubuntu for integration and support?
  • stick with debian sid or switch to a more stable release?

    I used to get a few dozen updates when I'd apt-get upgrade after my once-a-month business trip; now it seems that there are hundreds of updates every week; what's going on?

  • Install x86-64/amd64 packages or stick with i386?
  • stick with LVM or use the more typical fixed-size partitions?
  • stay with reiserfs or go back to ext3?

I picked Ubuntu and amd64, at least for starters. I didn't realize I needed the alternate CD image to do LVM until after I had downloaded the desktop image.

The live CD feature is pretty nifty, though it takes longer to come up than a text installer, which starts to add up if you're restarting the install as much as I am. I thought maybe a USB flash disk would be faster than a CD, but it doesn't seem to be. I guess speed varies quite a bit with those things, and the one I was using was a very cheap one.

I picked a goal of getting my Quicken-under-wine setup running as a way to get a feel for the amd64/i386 issue, and then I realized... Why am I still tied to quicken?. I have been noodling about Quicken, RDF, and JSON for a while; why hasn't anyone done an AJAX quicken work-alike yet? Of course, the diff/sync problem is interesting too. The IBM Boca system looks promising. I digress... that's probably a story for my semantic web research blog than this one.

On the other hand, the invited talk by the Mercurial lead developer probably belongs here as well as there.

Social standards and coding fugues

I got Cryptonomicon for Christmas; chalk one up for Amazon wish-lists. It walks the line between geek culture and popular culture in a way that makes me want people close to me to read it so they'll understand me a little better. This bit from p. 819 struck a chord...

"Who framed me, then?" Randy asks, kind of rhetorically. He was just in the middle of doing some pretty cool C++ coding when he got yanked out of his cell to have this surprise encounter with the Dentist, and is surprising himself with just how bored and irritated he is. He has reverted, in other words, back into a pure balls-to-the-wall nerdisim rivaled only by his early game-coding days back in Seattle. The sheer depth and involution of the current nerdism binge would be hard to convey to anyone. Intellectually, he is juggling half a dozen lit torches, Ming vases, live puppies, and running chainsaws. In this frame of mind he cannot bring himself to give a shit about the fact that this incredibly powerful billionaire has gone to a lot of trouble to come and F2F with him. And so he asks the above question as nothing more than a perfunctory guesture, the subtext being I wish you would go away but minimal standards of social decency dictate that I should say something.

In other news, Advogato does foaf, the Semantic Web social networking standard. Rock on, robogato!

50 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!