walk through SketchUp large models in ARKit – perfect for home remodels and projects

I did it!

Take a SketchUp model into the new iOS ARKit. Using my SketchUp home remodel and Apple’s ARKit (beta) for augmented reality.

Goal: import a model (in this case, a remodel) to overlay onto existing real world that you can walk around and ‘experience’ and compare.

You can see the results in the youtube video as I step through the trickier setup parts and things that took the longest to sort out.

Overview, info, and more for ARKit:

ARKit beta excitement building

ARKit app idea beginning

I’m quite excited to have figured out so far how to:

  • update home machine to Sierra to run xCode 9 beta
  • start playing with xCode
  • borrow iPhone 7 with iOS 11 beta running on it
  • setup free provisioning for testing app
  • start with ARKit “hello world” type app demo from the amazing folks at Apple

ARKit possibilities are blowing me away!

(That’s the spaceship hoving in my office to left of my desk 😉

Now!  On to hacking and trying out my app idea…. 😀 😀 😀

“slide-responsively” — minimal standalone HTM/CSS/JS inspired by “sliding-door” from Wayne Connor

I made new “slide-responsively” for image menus, which is minimal standalone HTM/CSS/JS inspired by “sliding-door” from Wayne Connor

I’ve just kept the sliding door idea, and made it independent of a WordPress theme so it can be added to a site using another theme
(example site).

Try shrinking the width of the browser or rotating your mobile device.

View Source to see the minimal elements needed.

Just replace the 7 images and links and go!

my github repo of this plugin.

play motion-JPEG video using javascript (in browser, no plugins, minimal JS)

Motion JPEG test

play motion-JPEG video using javascript (in browser, no plugins, minimal JS)

click a button above to begin!

This extracts the JPEG frames, likely without the huffman compression tables (though chrome dont care 8-), found within the .avi bytestream, and then base64 encodes them so they can be easily inserted into a dynamic <img> tag.

Add in a short display timeout and keep overlaying images, and you have your "video", using <img> tags, like a flip book.

WORKS: [ chrome: yes ][ firefox: was yes but now not 8-( ][ safari/iOS: no ][ IE: i bet not ]

Originally created 2006 by Tracey Jaquith. minor updates to jQuery and simplifying 2013

Source (or "View Source"):

new “php-htm-mode” for emacs — intermixed PHP, HTML, JS, and CSS using multi-modes

I finally formalized, cleaned up, and packaged up my current emacs editing setup for files with intermixed PHP, HTML, JS/javascript, and CSS code all in the same file.  It uses an existing but rarely used technique called “multi-mode” and sets “trigger points” for switching the “major mode” of the buffer as your cursor moves through the code.

A nice thing about this approach is that you can always glance down anytime you are editing to see which mode you are in (or the emacs lisp code *thinks* you are in).  You can also fork/edit the single “.el” lisp file to add/update the triggers for various modes.



screenshot of php-htm-mode
screenshot of php-htm-mode

simple way to make h.264 mp4 web and iOS/mobile playable video mp4 files for linux and macosx using ffmpeg

Greetings video geeks! 😎

At my job, I’ve updated the process and way we create our .mp4 files that are shown on video pages on archive.org

It’s a much cleaner/clearer process, namely:

  • I opted to ditch ffpreset files in favor of command-line argument 100% equivalents. It seems a bit easier for someone reading the task log of their item, trying to see what we did.
  • I no longer need qt-faststart step and dropped it. I use the cmd-line modern ffmpeg “-movflags faststart”

Entire processing is now done 100% with ffmpeg, in the standard “2-pass” mode
As before, this output .mp4:

  • plays in modern html5 video tag compatible browsers
  • plays in flash plugin within browsers
  • works on all iOS devices
  • makes sure the “moov atom” is at the front of the file, so browsers can playback before downloading the entire file, etc.

Here is an example (you would tailor especially the “scale=640:480” depending on source aspect ratio and desired output size; change or drop altogether the “-r 20” option (the source was 20 fps, so we make the dest 20 fps); tailor the bitrate args to taste):

  • ffmpeg -y -i stairs.avi -vcodec libx264 -pix_fmt yuv420p -vf yadif,scale=640:480 -profile:v baseline -x264opts cabac=0:bframes=0:ref=1:weightp=0:level=30:bitrate=700:vbv_maxrate=768:vbv_bufsize=1400 -movflags faststart -ac 2 -b:a 128k -ar 44100 -r 20 -pass 1 -acodec aac -strict experimental stairs.mp4;
  • ffmpeg -y -i stairs.avi -vcodec libx264 -pix_fmt yuv420p -vf yadif,scale=640:480 -profile:v baseline -x264opts cabac=0:bframes=0:ref=1:weightp=0:level=30:bitrate=700:vbv_maxrate=768:vbv_bufsize=1400 -movflags faststart -ac 2 -b:a 128k -ar 44100 -r 20 -pass 2 -acodec aac -strict experimental -metadata title='”Stairs where i work” – lame test item, bear with us – http://archive.org/details/stairs’ -metadata year=’2004′ -metadata comment=license:’http://creativecommons.org/licenses/publicdomain/’ stairs.mp4;

Happy hacking and creating!

PS: here is the way we compile ffmpeg (we use ubuntu linux at work, but this script works on macosx, too).

deinterlacing 2323 telecine video into fields for visual analysis

Having some challenging fun working on trying to deinterlace some toughie clips
from my brother’s upcoming feature film.

His camera recorded in 24fps (24000/1001 to you fellow geeks 😎 and smartly
did a “2323” writing/stretching of it to 60i (60 half-frames).
After correcting back to 24fps progressive most of his clips, he’s found ~10-20%
are not able to be put back together visually properly even with CineTools
and manually specifying the “cadence” and sequence starting frames, etc…

I started with code that I wrote to take a small segment of a video
and split the interlaced frames into 1/2 height “fields” and then drop them
down to grayscale to compare them all to each other to find the best matches
(to verify the cadence is right and/or the fields aren’t “off by 1”, etc..)

It uses mplayer and ImageMagick (“convert” and “compare”) for pretty high-quality
extraction of frames from the source video into the 1/2 height “fields”.

So I just do about 0.3 seconds to get 10 frames, and thus 20 1/2 frame fields for analyzing.
It will output the best matches of frames. For example:

php lacer.php good.mov 0.5 0.8

I then extended it into a web page (screenshot above, where I’m left-shifting one field by 4 pixels for visual inspection)
PHP script <== try it out online! (source)
that uses some CSS cleverness (clip property is your BFF!) to interlace together a pair of fields.
It supports:

  • field swapping (move one 1/2 image to be the 1st, 3rd, 5th, etc. lines — if it was
    previously the 2nd, 4th, 6th, etc. lines)
  • left and right shifting a field
  • pairing arbitrary fields
  • showing a “raw” 60i telecined sequence
  • showing the 60i sequence as a “deinterlaced” 24P sequence

natively compiling ffmpeg, mplayer, mencoder on MacOS Lion (with x264!)

OK, I’ve revamped my script to compile these tools:

on MacOS Lion, using the heads of the trees, with direct encoding support for:
vpx / WebM


A nice recent update to ffmpeg is the ability to decode/read Apple ProRes, too!

natively compiling ffmpeg, x264, mplayer on mac (with builtin x264 and webm encoding)

i’m very pleased that after years of hacks here and there, all three heads of the current codebases pretty well build natively on mac (snow leopard) for

  • x264
  • ffmpeg
  • mplayer

here, i’m making sure that i compile in static version of libvpx (Webm) and libx264 (h.264) video packages so that the ffmpeg can easily make hiqh quality h.246 and webm transcoded videos.



So we can make nice (2 pass video) ~768 kb/sec 640×480 derivatives like so (alter “-r ” as appropriate):

# make WebM
ffmpeg -deinterlace -y -i 'camels.avi' -vcodec webm -fpre libvpx-360p.ffpreset -vf scale=640:480 -r 20 -threads 2 -map_meta_data -1:0 -pass 1 -an tmp.webm

ffmpeg -deinterlace -y -i 'camels.avi' -vcodec webm -fpre libvpx-360p.ffpreset -vf scale=640:480 -r 20 -threads 2 -map_meta_data -1:0 -pass 2 -acodec libvorbis -ab 128k -ac 2 -ar 44100 tmp.webm

mv tmp.webm 'camels.webm'


# make h.264

ffmpeg -deinterlace -y -i 'camels.avi' -vcodec libx264 -fpre libx264-IA.ffpreset -vf scale=640:480 -r 20 -threads 2 -map_meta_data -1:0 -pass 1 -an tmp.mp4

ffmpeg -deinterlace -y -i 'camels.avi' -vcodec libx264 -fpre libx264-IA.ffpreset -vf scale=640:480 -r 20 -threads 2 -map_meta_data -1:0 -pass 2 -acodec aac -strict experimental -ab 128k -ac 2 -ar 44100 tmp.mp4

qt-faststart tmp.mp4 'camels.mp4'

our preset files:

Nice things about the h.264 derivative:

  • plays on all iphones and ipads
  • browser video tag and/or flash plugin compatible
  • starts immediately, seeks immediately even before entire video is downloaded

hope this may be useful!

Sony P-Series running 10.10 Meerkat Ubuntu

Sony P-Series
(specifically: win7 era P788K, 8″ 1600×768 display, 2B RAM, GMA 500 graphics, 64GB SSD)

I got this supercute mini-laptop last year

I had been using Ubuntu linux Lucid (10.4) and just upped to Meerkat (10.10). (Both were Netbook Edition).
I’d never gotten video acceleration to work before and was stuck w/ ~1-5 fps video most of the time.

Doing the widely suggested:

sudo add-apt-repository ppa:gma500/ppa && sudo add-apt-repository ppa:gma500/fix && sudo apt-get update && sudo apt-get install poulsbo-driver-2d poulsbo-driver-3d poulsbo-config

bricked my vaio 8-( well, i mean, it gave me root login w/o X/windows ability but… 8-p)
but 2-3 apt-get remove, reinstalls, hunting google later, found the apparent saviour (I did 1000mb from 2000mb recommended here):

sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem=1000mb acpi_osi=Linux"
sudo update-grub

booted clean! *immediately* got ability to use proprietary vaio accessory to output VGA to external monitor (a first!) and brightness up/down hotkeys working. (brightness to work even at all!)
but best of all, video and appearance *and everything* (moving windows, starting applications) was *so much faster* visually!

cmd-line video playback with:
sudo apt-get remove mplayer
sudo apt-get install gnome-mplayer gecko-mediaplayer

so this is *all* i have done, aside from starting w/ vanilla install (with just a few changes to help w/ SSD instead of HD) of lucid upgraded to meerkat.
(personally, i’m still working on getting suspend/resume to work (seems to work but the display doesn’t come back on — been like this the whole time) and to get hibernate to work — prolly will go with some kinda memory stick to dump to)


suspend/resume working now with change to suggested “gma500 fix”

sudo add-apt-repository ppa:gma500/ppa && sudo add-apt-repository ppa:gma500/fix && sudo apt-get update && sudo apt-get install poulsbo-driver-2d poulsbo-driver-3d poulsbo-config

I think this additional suggestion may have fixed sleep/resume (but it’s possible it was just the gma500/fix related packages in live above:

sudo mv /usr/lib/pm-utils/sleep.d/99video /usr/lib/pm-utils/99video

Updated Site!


So after over a year of owning this site w/ little more than 10 posts and pages geared towards AIDS LifeCycle fundraising and training, I’ve finally merged my personal site into this site and updated it.  So now this is the

New home of Tracey Jaquith and Dumb Bunny Productions.

I’ve got new a new navigation layout and structure, updated CSS and style, and about 20 main info pages added.  I’ll be tweaking it a bit, but the biggest changeover is now live!  This site aims to blend blogging with a more traditional website.