Friday, April 1, 2011

Possible Project: iPad + Canon camera

This is a wild idea and I don't know if its possible, but I'm putting it up here mostly so I remember to try this if I ever get some free time.

The idea is to write an iPad app that can connect to a Canon camera directly through the Apple camera connection kit USB interface. You'd have to reverse engineer the Canon USB control protocol, but these guys seem to have already done so and reimplemented the protocol for use on Arduino microcontrollers:

So I think this would be a matter of porting the USB control code to run on iPad, and then working on a GUI to control the camera with.

I'm not saying this will be easy, or if I'll ever have time to look into it. Add this to my pile of "DIY projects I would do if I had the time".

Thursday, January 27, 2011

Tutorial: Vevo to iTunes on Mac OS X, Video and Audio (Youtube and others too)

Vevo offers HD videos of your favorite music. Here is how to download them on Mac OS X. This procedure probably works for other sites too like youtube, and tons and tons more.

Getting the Video
  1. In Firefox, get the Video DownloadHelper add-on.
  2. Go to Vevo (or youtube or most any other tube site), and start watching your video in the resolution you want.
  3. Click the arrow next to the rotating DownloadHelper icon at the top of the browserBe careful of downloading the advertisement that plays. It should be pretty obvious (i.e. if an ad plays, don't click on the top file in the list, wait for the video to load and check the list again. Same goes for changing resolutions.)
  4. Choose the file you want. For high quality stuff on Vevo, you'll most often get the Apple-ish MP4 version (AAC+h264). For older or lower quality stuff, you'll have to get the flash format (FLV file). I'll assume MP4 video from here on out.
  5. If it was 720p (or lower) MP4, this should immediately drop into iTunes and be syncable on AppleTV2/iPhone4/iPad. Enjoy your video!
  6. If it was 1080p MP4 or FLV, use Handbrake to convert to iTunes friendly format.

Converting the Audio for iTunes
If you want just the audio ripped from such a file, you just have to remux the audio to the appropriate Apple container. I tried using Quicktime to make a MP4 movie with audio only in it; while that plays correctly in iTunes, its recognized as a video file, which annoys me. So use ffmpeg to remux just the audio to the right container.

  1. Get remux. This is a ffmpeg gui, but ships with a current build of ffmpeg, which is easier than installing it from source, fink, or macports, and is more up-to-date than ffmpegX which hasn't been updated in 3 years.
  2. Make a symlink to the ffmpeg that lives inside the remux application so you can call it from the command line. I called the link remux_ffmpeg to avoid potential naming conflicts with other tools on my system:
    sudo ln -s /Applications/ /usr/local/bin/remux_ffmpeg
  3. Use ffmpeg to get the audio out and remux to the right container. I had to RTFM to figure out exactly how to call it:
    remux_ffmpeg -i in_video.mp4 -vn -acodec copy out_music.m4a
    Just so you know, -vn says no video output, -acodec copy specifies the audio codec should be a passthrough/no re-encode.
  4. Now drop into iTunes, and there you go!

Tuesday, January 25, 2011

Rip Blu-rays with MakeMKV for Mac OS X

There is this cool multiplatform program called MakeMKV that strips DRM off of your Blu-ray collection, and it works natively for Mac. Its currently in beta, so you can use the following beta key (though I'm not sure how this is really different from the 30 day trial, since the beta seems to be running out soon):


It takes whatever is present on the disk and muxes it all into an MKV container without changing codecs. By default, it will copy the video, multiple audio tracks, and subtitles. There are a few problems with this kind of rip though:

  • The file size is HUGE, barely smaller than the original Blu-ray.
  • Only PCs or certain dedicated media streamers can play 1080p, MKV, or recognize multiple/multichannel audio and subtitles.

Re-encoding the video to 720p h264 and the audio to 2 channel AAC in an MP4 container simultaneously fixes all issues; this format is about 1/4 the file-size of the original video, and is supported on AppleTV2/iPad/iPhone4, and pretty much everything else. Here is my workflow for this process.

Use MakeMKV on a Blu-ray.
Use Handbrake on the resulting files.
Start with the high profile.
1280 x 720 resolution.
Turn off decomb and deinterlace
RF of 20
Check large file size
Remove extra audio passthrough
Drop into iTunes and sync with devices.

Of course, if you have terabytes upon terabytes of storage, forget the Handbrake re-encode, and just watch on your streaming/media box. Enjoy!

Wednesday, January 5, 2011

Jailbreak iOS 4.2.1 on iPhone 4 (with links)

Update 1: Bluetooth doesn't work as of this release, and neither does Skype. New redsn0w should fix it when it leaves beta status.

Update 2: Betas 5 and 6 have been released since I wrote this, which fix bluetooth and skype, respectively. The link to redsn0w has been updated. The Dev team also says on twitter that they are working on porting the untether to work with a 4.1 IPSW, instead of the 4.2b3 beta firmware only available to developers.

This link has the instructions you need. But the short of it is:

1. Jailbreak with redsn0w.
2. Boot tethered.
3. Update Cydia.
4. Boot tethered again.
5. Install openssh in Cydia.
6. Use jailbreak monte in redsn0w. Note that this requires the 4.2b3 restore file

Here are the files you'll need:

Don't pirate this. You should have joined Apple as a developer and downloaded it legitimately.

Enjoy! I'll probably be doing this with iPad, so I'll post another one of these when I do.

Wednesday, November 10, 2010

Galaxy S Tab: the (real) big iPod Touch?

Giz has a very unfavorable review of the Galaxy S tablet. But I point your attention to this image from that article:

That's an iPhone on top of a Galaxy S tablet on top of an iPad. For those saying the iPad was just a large iPod touch, I ask you to reconsider. Its a really good thing that Apple decided to get close to notebook proportions with the iPad and eschew the 7-inch form-factor, because otherwise you'd end up with what really is a big iPod touch in terms of use-cases / user-interaction.

Giz's review even points out that the UI of apps don't have to be changed at all to be usable instantly on the Galaxy S. Perhaps this class of devices (7-inch Android tablets) will be the iPod touch competitors Gruber keeps asking for. Maybe not though, since the media player type of device he wants would be sub $300.

Friday, October 1, 2010

Ars on HDCP Hack Implementation: "Pointless"

From Ars:

The software implementation should be able to decrypt a 1080p30 stream given a suitably fast dual-core processor and about 1.6GB of RAM. The poor performance is due to the nature of the algorithm. HDCP was designed to be cheap and fast for hardware manufacturers, but operations that are quick and easy in hardware are often slow and inefficient in software. In spite of this, the developers believe they have opportunities for further optimization and improvement, making real-time decryption on more modest hardware feasible.

Just wait until someone ports this to FPGA or custom ASIC, bearing in mind that Altera dev boards start at $200. Instant HDCP cracking. What's at stake here is pixel-for-pixel rips of ANY content that plays on your TV.

Friday, September 17, 2010

HDCP Utterly Broken, Intel Doesn't Care

I've been following this story for days now, and it appears Intel has responded saying that the master key that has been released is the real deal. From Ars:

Intel, unsurprisingly, said that it expected HDCP to remain effective. The spokesman told CNET, "There's a large install base of licensed devices including several hundred licensees that will continue to use it and in any case, were a [circumvention] device to appear that attempts to take advantage of this particular hack there are legal remedies, particularly under the DMCA [Digital Millennium Copyright Act]."

In other words, Intel and the media companies don't care that their encryption systems offer only token protection and consumer inconvenience; all that matters is that the encryption systems are sufficient to meet the DMCA threshold for a content protection system: the threat of legal action, rather than cryptography, is their real tool against unapproved uses of digital content.

My thoughts exactly; by using an encryption scheme they knew was easily breakable and easy to implement, they can still claim they tried to protect copyrights with this technology so the DMCA applies.

They are wrong about being protected though; its only a matter of time before someone programs a little custom microcontroller or FPGA to use the key to make perfect digital copies of any content over HDMI. Then of course, they make all the code and PCB designs available for free. Hobyists and grey market peddlers alike will start making these things, and probably selling them on eBay. In other words, once something like this gets out, legal action won't be enough to stop its proliferation.