Tuesday, February 21, 2012

Pinboard and IFTTT to Twitter

A few weeks after Google 2.0 killed Google Reader Social, I decided I'd take the Twitter route.

My Twitter feed was active for about two months, but in time I gave up on Twitter (again). It didn't work as a memory management solution, I don't like the length limit and the lack of structure, and I don't expect Twitter to take better care of my data than Google. Worst of all, like Google, Twitter is free. I can't afford free.

Next I ran through PosterousandTumblr. They both failed, for different reasons. Worst of all, both are too expensive.

Lastly, I turned to Pinboard. I thought I'd use it restore access to my Google Reader JSON exports -- but that didn't work. I could have gotten my $10 back, but I like Pinboard's style, microblog post formats, export formats, import options, ownership, feed-focus, and bookmarklet -- and I really like the Reeder (and, via SendTo, Reader) integration. Most of all, I like paying for it. Oh, and it's Google-Free too [2].

So I've stayed with Pinboard. I tag my (all public) posts with 1 tap codes that are meaningful only to me - s for share, b for blogworthy, y for yammworthy. Each tag has its own stream. The 's' stream is really aimed at Emily, but anyone can consume it. It shows up in her copy of Reeder.app and on her iGoogle page.

No, it's not Google Reader Social. Then again, nothing is. I've come to think of GR Social as a future-fluke, a transient window into a future that might never be. Pinboard isn't GRS, but it's the best microblog/share platform in the mundane world. It beats the heck out of Twitter and (shudder) G+.

Except Twitter, despite my neglect, refuses to die. So I decided to try injecting my Pinboard shares into the Twitter stream. Pinboard doesn't support this, and they don't intend to. However IFTT supports both Pinboard and Twitter, so I now tweet from Pinboard via IFTTT (recipe) [1]

For example:

It mostly seems to work, though I don't know what happens if my Descriptions are too long.

For the moment then, I share the same items in two places:

[1] In my own task I have a colon between Title and Description, otherwise they run together in Twitter.
[2] Is it Google's ambition to be more disliked than AT&T?

Monday, February 20, 2012

iTunes Playlist havoc - where did they go?

(The moral of this story - be very careful about following old web recipes for iTunes hackery. The app has changed a great deal in recent releases.)

The original:

It's been a long time since iTunes caused me much trouble, but something's gone wrong recently. Several playlists were missing. I followed the standard procedure for playlist recreation (reference deleted, see [1]). I didn't recover anything, but now most of my many, many Smart Albums are broken.

Be interesting to find out if this is simply my bad luck or something went bad in a recent iTunes update.

Nothing for it but to slowly clean up, wistfully parting with more more hours feeding the beast. I'll try restoring from an a month old playlist XML file via Time Machine and see if I get better results.

I suspect they're not long for the world anyway. Apple is overdue to gut iTunes, and replace it with some simple app that will omit most of what I use.

Update: Oh, great. TIme Machine does not backup iTunes Library.xml. Good thing I have offsite backups using Carbon Copy Cloner. Did I mention Apple gives me hives? In theory we're not supposed to need it, but in this case without that file I have no Playlists at all. Certainly feels like something is broken....

[1] Updateb: It got worse. All my apps were missing too, and all my purchases. At that point I bailed. I pulled my CCC backup to protect it, then told Time Machine to restore iTunes Library, iTunes Library Extras.itdb and iTunes Library Genius.itdb from 1 hour before I started messing around. Things returned to normal; iTunes Library.xml was recreated as it should be. I'm still missing a couple of Playlists, but at least I haven't lost everything.

So I can't say what happened to a few of my ITunes Playlists, but I can say one should be very cautious about trying to recreate a playlist using the method of removing iTunes Library and importing from iTunes Library.xml.

Updatec: Looks like there's more material missing - including several audiobooks! .... Time Machine shows everything was there an hour ago. It's almost as though, when I was trying to restore my playlists, iTunes actually went and removed ... content. I've never seen anything quite like this. I am going to run some disk check software then try restoring my entire iTunes Library from last night's disk clone.

Updated: I think I figured out what happened to the Audiobooks -- and probably other content. It went something like this:

  1. During my ill-fated attempts to restore the wee missing Playlists, I caused iTunes to review all content without any genre settings I'd made.
  2. During the review iTunes decided that some old Audiobooks taken from CD and specified as audiobook, were in fact music. iTunes reorganized them into music (I found them there using Spotlight.)
  3. When I restored the iTunes database it didn't know about the new location, so the content went missing.

I finally restored from a backup of the previous night and brought everything back. I recreated the mysteriously lost playlists. The loss was never explained.

Sunday, February 19, 2012

iMovie 11 does not completely import iMovie HD projects

I was infuriated by the data loss during iPhoto to Aperture migration, but that's nothing compared to iMovie HD to iMovie 11 migration [1]. All titles and effects are lost.

This happened years before the better known debacle; Final Cut Pro X does not import Final Cut Pro 7 projects.

How does Apple get away with this?

It's not just a rhetorical question.

[1] Prior versions don't import at all, though you can dig the .DV files out of the Packages and import them by hand. Or open prior projects in iMovie HD, then save them then import.

MPEG Streamclip video converter as Compressor alternative

Squared 5 - MPEG Streamclip video converter for Mac and Windows
... MPEG Streamclip is a powerful free video converter, player, editor for Mac and Windows. It can play many movie files, not only MPEGs; it can convert MPEG files between muxed/demuxed formats for authoring; it can encode movies to many formats, including iPod; it can cut, trim and join movies. MPEG Streamclip can also download videos from YouTube and Google by entering the page URL....

Those are impressive features. The post claimed conversion quality equalled that of Apple's Compressor app.

Reading the release notes it's typical video software - somewhat flaky and tricky to use. Some functionality requires companion apps. It's not fully Lion compatible and OS updates may require app reinstallation. Some details on functionality (emphases mine)...

MPEG Streamclip lets you play and edit QuickTime, DV, AVI, MPEG-4, MPEG-1; MPEG-2 or VOB files or transport streams with MPEG, PCM, or AC3 audio (MPEG-2 playback component required); DivX (with DivX 6) and WMV (with Flip4Mac WMV Player). MPEG Streamclip can export all these formats to QuickTime, DV/DV50, AVI/DivX and MPEG-4 with high quality encoding and even uncompressed or HD video.

Video conversion is performed in the YUV color space; you can choose to scale video to any frame size using a professional 2D-FIR scaler (better than bicubic) but you can also leave it unscaled. Other optional video processing features include a powerful motion-adaptive deinterlacer, a field dominance converter, a chroma reinterlacer and an option to perform interlaced scaling instead of progressive scaling. Audio can be converted to uncompressed or to IMA, AAC, MP2 or AMR using the high-quality MP1/MP2/AC3/PCM built-in decoders of MPEG Streamclip; it is also kept in perfect sync with video using a timekeeping system.

MPEG Streamclip can save edited movies as MOV files, and (when possible) as AVI or MP4 files. Edited MPEG-1 or MPEG-2 files are saved as MPEG or TS files.

MPEG Streamclip (with or without the MPEG-2 Playback Component) can also convert MPEG-2 transport streams into muxed MPEG-2 files, for immediate burning at full quality with Toast 6 or 7 and Sizzle; it can also demux MPEG-1 and MPEG-2 files and transport streams with MPEG, AC3, PCM audio to M2V and AIFF (or M1A or AC3) files, for immediate burning at full quality with DVD Studio Pro or Toast 6 and 7. A special demuxing option is available for Final Cut Pro 4/5: this application does not work well with M2V files, but MPEG Streamclip can write a special "unscaled" M2V file that preserves full video quality when imported into Final Cut Pro.

MPEG Streamclip can handle files and streams larger than 4 GB, split in any number of segments, or with multiple audio tracks, and can also optionally handle timecode breaks. It is compatible with MPEG-1 and MPEG-2 video, MPEG layer 1/2 (MP1/MP2) audio, AC3/A52 audio, and PCM audio.

The player included in MPEG Streamclip lets you preview the files and transport streams before doing the conversion; it also lets you visually set the In and Out points for the conversion so you can convert just the part of the file you are interested in, and also cut commercials and other unwanted parts, or edit the stream and join two streams with Cut/Copy/Paste.

MPEG Streamclip supports batch processing: just drag some files in the batch list, choose a conversion and a folder, click the Go button and MPEG Streamclip will automatically convert all your files.

Reading between the lines I suspect it's sometimes used for non-approved editing of commercial products.

Saturday, February 18, 2012

Mac mass storage for video archiving - options

I'm in the midst of a bit of project from heck - assembling and managing our home video recordings. This comes to about 40 hours of analog Hi8 and a comparable amount of 2007 DV technology plus an array of camera files from pretty crummy to modern dSLR HD. I estimate the total archival store will be about 1TB -- mostly using DV-25 files (MPEG-2 codec) and similar acquisition formats. (There are no archival video formats in 2012. More on that in a separate post.)

This is too much data to fit my current backup system - a redundant mixture of Time Capsule and Carbon Copy Cloner with offsite rotation. Once the archive is created I don't expect a rapid expansion rate, so the key backup feature is offsite coverage. I don't think this will be on the same rotation schedule as my current backups.

So I think I'm looking at a completely independent system - at least until we can buy $10TB of storage for under $200 (2016?).

I would like to spend less than $1200. I'd like a RAID-1 solution that would allow me to take a drive off-site, bring the off-site drive onsite, and rebuild the mirror. I'd prefer Thunderbolt though it sounds like Firewire 800 may be good enough for what I want to do. I do want it to be fairly quiet, though in fact it needn't run very often.

This is the list of options I'm coming up with:

I may also opt for basic Firewire 800 drives and do the cloning using CCC (will take a while!)

Any suggestions or comments are welcome ...

Video: The state of compression is not good. Blame it on Congress.

The more I study analog to digital video conversion and export compression the more I see I've left civilization.

This is a domain of arcane knowledge and of unknown unknowns -- "experts" who really don't know what they're talking about. I'm sure there are real experts, but they're bored silly by the level of net discussion -- including Apple's own technical notes. It reminds me of my 1981 medical school lectures in renal physiology [1], or my @2002 research into color profiles.

In the absence of publicly accessible expertise I hope I'll have time to do my own experiments, such as creating a range of QuickTime 10.x exports with a span of export parameters. I'm afraid, however, that I don't have that much time.

Which means I probably need to give up on my idea of using .mp4 files the way I use .JPEG -- as an archival storage format [2].

So that means I need to buy more storage -- 2TB should do it. From that point on, given the amount of video we capture, I will just need to upgrade every 2-3 years (4, 8, 16, 32....). And I need to invest in either firewire 800 or thunderbolt.

So now I'm looking at the 1995 era ".dv" format [3]. Should be straightforward. Right?

Yeah, that's what I thought until I read this wikipedia article, which, as is usual for wikipedia, reads like a mixture of a true expert and some confusing amateurs [5] (but is still better than the alternative...):

DV - Wikipedia, the free encyclopedia

... The DV codec was launched in 1995 with joint efforts of leading producers of video camcorders...

... DV video employs interlaced video scanning with the luminance sampling frequency of 13.5 MH...

... One video frame is formed from either 10 or 12 such sequences, depending on scanning rate, which results in a data rate of about 25 Mbit/s for video [4] and an additional 1.5 Mbit/s for audio. This results in a compression rate of 5 to 1...

... All DV variants except for DVCPRO Progressive are recorded to tape within interlaced video stream...

... When video is captured onto a computer it is stored in a container file, which can be either raw DV stream, AVI, WMV or Quicktime. Whichever container is used, the video itself is not re-encoded and represents a complete digital copy of what has been recorded onto tape. If needed, the video can be recorded back to tape to obtain full and lossless copy of the original footage....

So even .DV covers a multitude of sins -- and is a significant compression from the original stream.

Even so, a mixture of .DV and Apple's proprietary professional formats seems the only way to go for now. I hope within a decade we'll have the standards and software to do better.

Or perhaps not. It's worth asking why progress has been so slow over the past decade -- and why the "standards" for still and video images date from the early 1990s. The answer seems to be something Congress and the USPTO did in 1996 ...

USPTO issued Final Computer Related Examination Guidelines stating that "A practical application of a computer-related invention is statutory subject matter. This requirement can be discerned from the variously phrased prohibitions against the patenting of abstract ideas, laws of nature or natural phenomena".

We may need legal reform before we have an archival video format. This is not a technology problem.

[1] After weeks of confident and contradictory statements from researchers and textbooks, I wondered whether they knew they were faking it, or if they'd fooled themselves. I never did find out.
[2] JPEG itself is a non-specific marketing term that hides a very wide range of codec tweaks and metadata "standards". Still, it's a recognized library of congress standard (TIFF is even less standard.). There isn't an image format today that has a comparable archival lifespan, so I use 99% (minimally compressed) JPEG and delete the RAW images -- holding my nose the whole time. Yes, I wish JPEG-2000 had succeeded. Our IP (patent) framework is intensely dysfunctional. 
[4] Now I know what the data rate setting in iMovie 11's QuickTime export parameter means.
[5] In particular there's confusion about DV handling during capture vs. how it's represented during editing/playback and confusion about what containers are. Of course, as a non-expert, I corrected that section.

Wednesday, February 15, 2012

iMovie 11 and analog to digital videotape conversion by passthrough

it's been six years since I've had much good to say about Apple's OS X software (we miss you Avie). So I'm mildly surprised to say something good about iMovie '11.

I haven't paid much attention to iMovie since the iMovie HD debacle, but after Final Cut Pro X and QuickTime Pro failed me I turned to my free copy of iMovie [1]. Short of Adobe Premiere, it was the last tool to use for my family video consolidation project ...

Gordon's Tech: How should I transcode my home analog video?:

... Emily picked this project for her Valentine gift, so we're off. I found a 300GB drive and LaCie firewire enclosure I'd forgotten about. So far video capture seems to be proceeding well from a 12 yo Hi8 analog tape; there's a thin sliver of artifact at base; I think capture frame is bit taller than the image frame. Setup at the moment:

  • SONY Hi-8 TRV65 (1997) with S-video and RCA audio out to ...
  • Canon Optura 50 (2004) with firewire out via secondary port on LaCie to ...
  • iMac i5 2.7GHz, 8GB RAM
  • Final Cut Pro X (trial version. There's no more academic pricing for Apple products distributed through app store. I expect I'll buy full version. So far this is the big expense) saving project to ...
  • External firewire LaCie drive (300GB)

I started with FCPX, but it only seemed to be capturing video. Video streamed to FCPX, but was not recorded. FCPX can't handle non-timestamped video streams:

So, after reading about 10GB import limits for QuickTime Pro, I tried iMovie 8 (iMovie '11). These were the steps I followed:

  1. Connected the Hi-8 camcorder via S-Video and RCA to the Optura
  2. Set Optura to Passthrough mode (most people now would use a Canopus device or the like to do A/D conversion - workflow is very similar)
  3. Turned off Time Machine -- I don't want the 30 GB videos going to my backup drive [2].
  4. Start iMovie. It's safest to create the Event (will hold the video, analogous to Events in iPhoto) first so you can choose what drive the event will go to (there's a small icon that lets you see how Events are distributed over media).
  5. Start Import in Manual mode and direct to the Event desired. Push Play on camera.
  6. iMovie will give you a few seconds to get the video in. It shows the Canon as no tape and displays 'Ready to Record'. If the stream doesn't start iMovie will quit.
  7. If recording is working the counter will increment and a small red dot will show. The 'Ready to Record' message never changes.
  8. When recording is done iMovie stops (1 minute delay)
  9. Then thumbnails are supposed to be created (but see below) ...
  10. After all is done, move the Event to an external drive (Cmd-Drag and drop within iMovie.)

I start the when I get home from work then let it run. A 1.5 hour tape produced a 25GB .DV file and 1.5 GB thumbnails.

To export to .m4v (MP4 variant) you first create a Project. I edit my .DV by selecting the parts I don't want and tapping the 'R' (remove) key. Use Shift-Command-A to undo select all; it's easy to select all and not clear how to undo. Study the keyboard shortcuts, I don't like iMovie's standard or context menus. Editing was easier than I'd expected, even for a project this size. I'm just getting rid of the obvious junk.

When done select all and drag to Project window. Then add a title slide.

After the Project is done choose Share and large size. On my iMac compression to 960x540 took about 1 hour and produced a 1.5 G .m4v (mpeg) file; it uses "270% of CPU". I'd prefer a bit less compression, maybe a 3GB output. I'm studying my options. It's ok to save the .m4v to an external drive.

I then move use iMovie to move the entire Event to an external drive for storage (see update, these directions are wrong). Empty trash and restart Time Machine.

The Events, for now, are staying on my external store (1TB+, so should handle about 8-9 of my media. I don't want to keep the .DV files, when I'm satisfied I can produce a high quality .mpeg movie with reasonable compression I'll store that alone. Three 1.0 TB drives should manage all of our video - one onsite, one offsite backup, one rotation [3].

Of course there are bugs ....

  • iMovie crashed twice (kernel exception -- it really doesn't like the cheap external drive I'm using until the better ones come along [3]
  • iMovie always hangs at the end of thumbnail generation, no matter how short the event. This is a replicable bug. I've tried deleting preferences; this may also be a sign these Project are too big for iMovie. I'm hunting around for an old copy of Final Cute Pro or Final Cut Express. (By Darwin, Apple screwed the video market.) [UPDATE: With my firewire drive unmounted, thumbnail generation does not hang.]

It's early days, but I'm less displeased than I'd expected. I think if iMovie fails I'll try Adobe Premiere Elements next.

[1] When Apple introduced the App Store, they also turned to iOS style licensing. iLife '11 came with my MacBook Air, and was registered with my Apple Store ID. That meant it showed up in "purchases" on my iMac and I could download and install it.

[2] Trick is to remember to turn it on again after the iMovie Event has been moved to an external drive. Streaming capture to my old external firewire enclosure did not work. Not only were frames dropped, but iMovie crashed as well.

[3] Future post pending on the external storage/backup system I'm going to use.

Update: Possible export options (ref)

  • MPEG-4
  • frame size: largest possible (when I set to be the source size however, the output still omits about 3% of the frame)
  • key frames: <10
  • data rate: DV data rate is 25Mbit/s for video and 1.5 Mbit/s for audio. The default on .mp4 is about 4Mbit/s.

There's surprisingly little quality information on these settings. Reading the Final Cut Pro 7 documentation makes me envious.

Update 2/17/2012: Apples directions for moving Event's are incorrect. If you drag and drop the Event is copied. To move you have to Cmd-Drag, just as in the file system.

Update 2/18/2012: I realized that, by accident, I was using a low end firewire 400 cable with a 400/800 converter to my external drive. That is a bad idea! I would expect it to cause issues. I switched to my LaCie 400/800 cable. I've also given up on the idea of using .MP4 as my archival format.

I've also experimented with capturing via QuickTime 10 at 'highest qualilty'. That created a .mov file that is almost exactly the same size as the .dv file that iMovie crated from the same source; at heart it's a DV file. There's a trick to get this to work with passthrough video. I had to start the stream, then click the record button. When I move these into an iMovie Event library iMovie simply moves the .mov file then creates thumbnails.

I've read FCPX will import these. I'm experimenting more with this.

Update 2/18/2012b: OK, the QuickTime method doesn't work with this particular video stream. I didn't run into any time limit, but there's no sound on playback -- even though there's sound during the capture process.

Update 2/19/2012: I was able to complete a video capture without the thumbnail hang. Two things were different. My external drive (firewire 400) was not mounted, and I stopped the stream manually rather than let it self-terminate when the video stream stopped. I have another post pending on why I gave up on the idea of .mp4 export. For now I'm collecting 30GB .DV files for each tape. Update: It's not the manual termination. it's that my firewire drive was accidentally unmounted. I've replicated this.

Update 2/20/2012: I tested importing one of the analog to digital projects I created in iMovie 11 into FCPX. FCPX seemed to import the modest project and very large clip without obvious problems.