Encoding 5d mII video

The 5d mark II shoots rather high quality videos. Using ffmpeg it’s possible to view the specifics of the original file during encoding. For my example file I’ve been seeing the following:

  Duration: 00:02:24.50, start: 0.000000, bitrate: 41087 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 1920x1088, 39674 kb/s, 30 fps, 30 tbr, 3k tbn, 6k tbc
    Stream #0.1(eng): Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s

This shows the two parts of the file’s stream (#0.0 and #0.1) are divided between video (#0.0) and audio (#0.1). The video part is encoded using the h264 codec, which is a nice high quality / highly compressed video codec with a bit rate of 39,674Kb/s, so close to 40Mb/s. The audio is also a fairly high quality capture, using the uncompressed, 16bit (bit depth), little-endian, PCM format at a fairly high rate of 1,411Kb/s.

Recently I wanted to post up some videos I took of Niilo Smeds playing and the above clip is 2:24 seconds worth of video, which consumes 708Mb (yes ~one CD-R worth of data). This makes uploading to a free Vimeo account rather difficult due to the 500Mb per week limit.

I’ve turned to recoding the videos to a lower bit rate so that I can post and have the knowledge that I still have the original 1080p version to play with more later.

I found that mp4 was one of the few container formats that I could easily convert to from videos using the older firmware (that I’m currently upgrading). The older firmware captured at exactly 30 frames per second (not 29.97/sec), which seems to cause havoc for other container formats (like mpeg), but mp4 seems to be quite happy. I’m interested to see if the newer firmware, which allows some choice in frame rate will allow for converting to other containers or if the problem is actually localized to the open source libraries that are used for conversion.

For audio I would have liked to use the original audio (I am recording a guitar player after all) and there is the -acodec copy option to ffmpeg, but again the mp4 container format didn’t like the raw pcm audio. Instead I chose MP2, which didn’t have as much sound degradation as MP3.

After much playing with options my simple script to encode videos from the 5dMII for Vimeo is as follows:

#!/bin/bash

# Copyright Elliott Johnson 2010
# Distributed under the GPL-3.0
#    http://www.gnu.org/licenses/gpl.html

# For encoding video from my 5D into a high quality,
# small file format suitable for vimeo.

THREADS=7 # tune this to your number of execution units - 1

function help() {
  echo "$0: infilename outfilename"
}

INPUTFILE=$1
OUTPUTFILE=$2

ffmpeg -i $INPUTFILE \
       -b 14515.5kb \
       -s 960x544 \
       -r 30 \
       -threads $THREADS \
       -acodec mp2 \
       -ab 256kb \
       -ac 2 \
       $OUTPUTFILE

The joys of pdf conversion

As part of the oacdp I convert a sections of manuals into pdfs.  I’ve been using imagemagick for a while to batch convert. To take any number of images and convert them to a single pdf it’s a simple one line command:

convert *.png -density 100% some.pdf

An annoying feature of imagemagick is that it pulls all the images (in the above case the png files) into memory, converts them in memory to a 16bit (per color channel) representation and then when it’s all assembled writes the content out to disk. Normally this isn’t too bad since I’ve got 6Gigs of memory and 12Gigs of swap and if it takes 3Gigs to process one document I can deal with it.

In working on a type1 manual, the 8th section is 317 images I found it impossible to deal with. I enlarged the amount of swap space, but the load on my system would rise above 15 and eventually the process or my machine would crash.

Andrew Whitlock, who was the previous maintainer of the oacdp confirmed that this happened to him in the past and that he had swapped over to a windows machine to use some application with a reasonable algorithm to convert to PDF. I on the other hand don’t have a windows install, so I began researching online.

Firstly in digging around I found an imagemagick based project called graphicsmagick that is written specifically for multi-core machines like I have. I tried this out, but it uses similar algorithms as imagemagick for processing PDF’s, so really wasn’t an answer, but was an improvement in processing times… it basically made things crash faster.

A little more searching revealed this thread, which describes converting each image to individual pdf’s and then assembling them using pdfjoin of the like. pdfjoin is fast, only taking a handful of seconds to process all 317 pages using pdflatex. The results are what I’d expect imagemagick could do.

It would be nice if imagemagick would get their pdf processing up to snuff, but at least for now I have a work around. Hopefully this can help some other people convering pdf’s using command line tools like imagemagick/graphicsmagick/pdfjoin.

Slowly building strength

My practice mute arrived today with a few other “ointments” for the horn.  I bought a nice Denis Wick practice mute for my roommates sanity sake and so I moistened the mute’s cork with my breath and put it in.  After a few notes it was obvious that I’m not even at the level to need the mute yet.  Slow and quiet long tones are still where I am and it’s really hard to focus on the quality of the sound when it’s muted.

The biggest thing that the long tones are helping with is relaxation.  I’ve noticed periodic muscle twitches in my right arm and face.  In the back of my mind I got the idea that it’s muscle memory trying to do what it was capable of 11+ years ago.  I had to just stop and relax a few times with deep breaths.  There is this in-tenseness I’ve acquired from the last few years of typing that I need to learn to get over.

I’m still working on buzzing with the mouth piece on and away from my face.  I can do it only for a few moments before fatigue sets in.  Before when the need of practicing complex pieces over weighed the desire to retrain my self to not use pressure I would just give up and go on.  It’s really nice to go back to the attitude I had when I first began playing (wow 20 years ago) and just focus on playing without expectations other than my own.

practicing trombone

For the first time in about 11 years I decided to start practicing trombone again. At one point I was really serious about the trombone, practicing for a few hours a day… everyday. It’s really relaxing when done properly, almost a meditation that you can feel throughout the core of your body. I felt the incredible warmth that comes from the combination of deep breathing, vibration, and focus on sound. I’m really happy about adding this back into my life even just for daily long tones.

Eventually I’d it would be nice to get to the point of playing duets again and I found out a few weeks ago a friend of mine, Alexander, is a classically trained tuba player, so maybe that’s something to look forward to once I’m back in shape.

Speaking of getting into shape, I took it slowly today. Buzzing with and without a mouthpiece to try and overcome the common crutch of too much lip pressure. I can feel how weak my lips are, they kind of waver periodically and hopefully with time my abdomin and lip muscles will strengthen, relax, and create a steady tone.

2010

It’s pretty obvious that I’ve fallen behind in both progress on my bus and on this blog. It seems that in part I haven’t been progressing because I end up visiting with friends and family when I travel to work on it and also in part because it’s cold in that garage. I’ve thought about a space heater, but there are certain dangers that come with using one in a confined space with various chemicals.

So far since September I’ve:

  • pulled the engine and wrapped it up until I deal with the oil leaks
  • pulled the gas tank, drained it, and have it stored with a POR15 refurb kit for when the time comes
  • got a new wiring harness from Bob Novak at wiring works.. yet to install it
  • Pulled out the old hardlines and installed a whole new kit from wolfsburg west
  • Installed new rear axle seal kits on both rear axles
  • refilled the reduction gear boxes with 0.25L of 90w gear oil
  • Drained the transmissions gear oil and cleaned out a medium amount of gunk (no metal chunks) from the drain plugs
  • POR15’d the drum brake backing plates
  • media blasted the engine compartments rusty areas (battery tray, above the driver side rear wheel well, and the slot for the engine seal) and painted with some silver Eastwood rust encapsulator spray paint. If I had a larger air compressor I’d have done the whole thing, so I focused on the really bad areas. Everything is solid so far.
  • got a set of notched rear cargo door rods from a 56 bus off of http://thesamba.com for cheap
  • degreased various areas under the car especially around the transmission and reduction gear boxes, which were totally caked with a thick gear oil and dirt mixture.

So looking back I have gotten quite a bit done, just not what I expected to do over the last 11 weekends.

Sept 4th 2009

Madalynn and I drove down to Fresno this time.  She dropped me off and I got some visiting time in before checking out what the mail had brought.

My main mission for this weekend was to drop the engine and prep for removing tar.  On the way Madalynn and I picked up some xylene to help removing it.  Quite a few boxes arrived.  One big one from Wolfsburg West with a complete stock exhaust setup.  Another flat box, which was the decklid I found.  It’s in pretty bad shape.  A couple of drill holes that should be easy to fill, but a medium sided dull dent, which is probably a bit harder to get out.  A tach/dwell from a store on Amazon and a small box from Wolfgang Int with slave cylinders and reduction box gaskets.

So first things first I needed to finish testing from two weeks before when a bad sound started coming from the engine.  I removed the engine tin and fired it up.  There still was the sound.  My dad and I tried a few different variables and found that it’s loudest at low rpms and sort of evens out as it revs up.

Since it isn’t a simple problem I’ll need to have it checked out and after a little food I decided to pull off the old muffler and prep for tomorrow.  The bus came with a peashooter bug muffler and I ordered the entire bus setup to replace it.  Taking off the peashooter pipes it was obvious that the engine was running rich by the thick layer of black soot inside.  The muffler itself was pretty rusty and I’d like to find a good paint to ensure the new parts I bought will hold up.  In unbolting the manifold’s passenger side top bolts one twisted apart like butter.  Luckily the bolt snapped off in the old muffler instead of the manifold, so it wasn’t too big of a deal.

Once the muffler was off it was cool to look at the push rod tubes more directly.  The rear most passenger side tube is actually patched by the previous owner.  The patch is a hunk of rubber that is held on by a hose clamp.  A bunch of oil had sprayed every were and it’s been slowly leaking.since it’s at my Dad’s house.  Pretty amasing that he ran it that way.

Akismet

After having this blog up for a month or two it’s been around long enough for bots to locate the comment sections.  When I get legitimate comments I get a notification on my phone, so it’s been pretty noisy with spam emails.  Funny thing that while watching the President on TV being spammed during a town hall by some wing nut I happened to get three in a row.  It’s interesting the similarity of the tactics of spammers and the ultra-right extremists.  BTW – Did you know that the President is a Kenyan and needs your help in depositing $1billion into your bank account?

I noticed that Akismet, one of WordPress’ default plugins was designed to control spam.  Fully setting it up involved signing up for a wordpress account and copy and pasting in the API identifier that is associated with my account.  Pretty easy.  Since last night it’s already classified about 10 bogus comments and saved me from being bothered.  Well worth the 20 seconds of setup time.

Thanks Akismet and WordPress devs!

August 23rd, 2009

Woke up late as per my normal Sunday routine.  I got up and ate some pancakes and made arrangements with my Dad to buy a replacement battery and some oil.  I bought my return ticket online and researched a bit settling on a battery with terminals on top as well as using 15w/40 oil. I also found a tack – dwell meter for $24 on Amazon.  We set out to get him a fishing license and me the battery and oil.  We headed over to Sebring and grabbed the oil and battery.  We took a while at Big5 for the fishing license and window shopping before heading back home.

At home I set the gaps on the new bosch spark plugs between 0.025″ and 0.028″.  Looking at the engine tin I decided to clean it up.  Using some carb cleaner as a degreaser I scrubbed off the muck and a lot of the paint has been burned off in places that’ll need redoing.  It’ll be nice to media blast and repaint the engine tin along with the rest
of the engine compartment.  It’s the tar of the engine compartment that scares me.

I fit the spark plugs hand tight with enough tugging of a socket wrench to seat the gaskets and got the plug wires + seals back on.  Fit the engine tin back on, rear apron, air cleaner, and fired it up.  It had a hard time starting and idling.  The starter was turning good and it would start, but there was a wailing sound coming from the engine
compartment.   After reving it a bit it would idle and I pulled the tin away from the crank pulley and the engine seems to rev a bit more, but the sound didn’t go away.  Tugged on the shroud like I saw VolksFire when his bug was making a strange sound and no effect, so it seems like it isn’t coming from the fan.  When I put my head in the compartment it sounds louder in some places than others.  Putting my head under the rear of the car the found is very muffled.  It could be the generator belt or the engine tin rubbing, so I considered pulling the engine tin again, but my time was getting low and I wasn’t looking
for a repeat of missing the train like last time.

I cleaned up, took a shower, grabbed some dinner and a beer and jumped on the train.  I’m planning on coming back in two weeks to finish up.

August 22nd, 2009

Woke up at my usual time and wanted to investigate a mystery I had been wondering about.  In identifying the bus of this year there are three critical pieces of info in the engine compartment (engine number, VIN number, and Chassis plate) and one in the cab (m-plate).  There is also a chassis number in the cab, but that only was used
internally to vw and doesn’t line up with the VIN number at all.  So these data points can be used to ensure that a bus is not hacked togeather from a bunch of different bus’ or a covered up stolen bus.  So far I’d found and decoded the m-plate (see the first post on this blog), found the vin number that is stamped just to the right of the engine where the apron
meets the chassis and found that the engine number doesn’t exist on the replacement case that my engine has.

The only one of these datapoints that should be there that I hadn’t seen was the Chassis plate.  For a 1963 it should on the right side of the engine compartment bulkhead.  In photos of my bus’ engine compartment I looked around this area and only saw the voltage regulator.  I looked on other bus’ and saw that their voltage regulator was put more to the right (closer to the wheel well) than mine.  When going to bus fest I talked with VolksFire and looked over a lot of this 1960 panel (the shasta rollover bus) and saw that his was missing the chassis plate and so I was wondering if mine could be missing as well.  On the train ride down to Fresno I read quite a few chapters out of the Idiot’s guide and saw that he lists the voltage regulator as being either on top of the generator or placed in the engine compartment.  Seeing this I grabbed my photos again and looked to find the ones of the spare parts that the previous owner had in the bus, one of which was the old generator.  The photo shows the original voltage regulator on it, so now I know why mine has a different placement.  The real question was why did they mount it where the chassis plate was?

Looking in the bus near this area with my head lamp on I didn’t see anything like the chassis plate.  Behind the voltage regulator was black paint and there was an odd backing plate under this paint, but I should be able to see some lettering through the paint and I couldn’t see much of anything.  I got out the right sized ratchet to pull the
grounding strap, then the right size to pull the voltage regulator and
behind the voltage regulator was indeed some sort of plate.  Using a
screwdriver I was able to remove the plate and it was indeed the chassis plate covered not with paint, but some sort of thick tar substance.

My Dad had some goof off (paint remover) and steel wool that I used to uncover the details on the chassis plate.  It took a suprising amount of elbow grease to get the tar stuff off, but the plate did clean up nice with only one sheet metal screw drilled through it.

My goal beyond researching this plate was to do a full 3,000 mile tune up.  I had read the chapter for the tune up the night before on the train, so it was still fresh in my mind.  I also made a list of different parts that we’d need, so a trip to Sebring West was in order.  We pulled a spark plug as well as a bad 8v fuse to take with us.

We also started going over the routine for checking the valve clearances, which are pretty important to having a healthy engine.  We had a hard time figuring out the position of the different cylinders, but looked around enought to see that they are printed on the case.
In looking I may have found a part number for the case, which is madein Mexico.  I’ll need to get the photo from my Dad, but the part number ended in 101-101A and it was stamped under the heads for the cylinders 3 & 4 (left side of the car).  We pulled off the distributor
cap and checked out how to get the first cylinder to line up at top dead center (TDC).

This bus has an older crank pully than the ones that VolksFire had, which were marked with degrees off of TDC.  This one has the 0 (TDC), 7.5 and 10 degree notches on it.  When the crankcase pully is spun the first and third pistons reach the apex of their travel at the 0 degree notch and the second and fourth cylinder reach their apex 180 degrees
off of top dead center.  Why they didn’t put a notch at 180 degrees beats me, so following John Muir’s advice I “grabbed a paint stick”(really a twig dipped in Whiteout) and marked 0 degrees.  Using a plumbob that my dad has we were able to hang it from TDC lined up with the crank case and mark 180 degrees very acuratly.  It took a lot of effort to get just right, but will be very useful in future valve jobs.

This also required taking off engine tin to get access to the bottom part of the crank pulley.  The engine tin was really greasy and it gave me a good chance to look at the heater/fresh air system,which I’ll need to buy a new bus muffler for.  I grabbed a few photo’s for reference while I had the tin out.

One of the items on my list was a tach-dwell meter and my Dad thought Kragen might have a tach dwell meter cheaper than other places, so we headed there first.  The sales person said he’d just seen one at a yard sale, but didn’t carry one.  He pointed us to Harbor Freight, but we were getting toward 4pm and Sebring wouldn’t be open much longer, so we headed there.

Sebring had a lot of stuff that I needed.  I got the following:

1) Bosch spark plugs
2) Valve cover gaskets (empi semi cork ones)
3) points & condenser (John Muir recomends replacing both at once).
4) generator pulley
5) 8v & 16v fuses
6) fuel line.

While we were waiting in line the sales person, Rod, kept asking my questions to the guy behind me, who was about my age if not a bit older.  With the fuel line he asked what year my bus was and I said 63.  He asked where I got it and I mentioned that the previous owner was a fire-fighter and his grandfather was the original owner.  He asked if it was a blue panel and I said yes.  He asked how much I got it for and said he looked it over.  He and my dad went outside and talked for a bit as I finished up the sale.

I met up with him outside where he was showing my dad his 67 squareback, with a roof rack that he proudly found for cheap.  I asked him about any bus groups in town and he said that the Madera show was the only group he was involved with.  It wasn’t a club with
memberships or anything, just a group of volunteers like NAG or most of the opensource user groups that I’ve been apart of and I like that. I’d like to talk with him a bit more about my bus to see if he knows anything more about its history.

We said goodbye and headed over to Harbor Freight since Sebring didn’t have a tach – dwell.  Harbor Freight didn’t have one either, so my dad found a nice tarp and we took off.  They also had different blasting medium, which will come in handy when I get to that stage.  We got back and my Cousin Mike was there having roast beef dinner that my Mom had repaired.  It was delicious.

After visiting with Mike, I decided to go treasure hunting and pulled out the passenger seat to see how the previous owner padded it out.  There is burlap over the springs and possibly horsehair (coconut husk actually) with a large layer of foam on top of that.  I can remove it, but it’ll take removing the large wire staples around the perimeter pulling out the foam and then re-stretching the leatherette to fit the seat.  It shouldn’t be too hard just like all the other easy stuff that’ll “just buff out”.  After looking over the seat I used it to
prop open the door as I removed the passenger kick panel and peaked behind it.  There was a wrinkly old paper that I grabbed with my little claw grabber and a emblem clip that I left down there as it was hard to reach.  There is some damage to the front kick panel and
it’s being held on with sheet metal screws (man this guy loves his sheet metal screws, must of had a whole box of them).
The driver’s side kick panel reveled nothing of interest except for the electrical components hidden behind it.  There is also some slight damage to this kick panel as well.  It would be nice to get some wood ones created for it by Josh Ganshorn (Abel & Baker wood work and construction).

After putting back the panels I grabbed a few razor blades and finished up the inside of the rear window.  It cleaned up pretty nice and reveled some scratching on the other side that either was there before or we added last time I was in town.  After cleaning them well
I went into the the cab and cargo area and got the divider panel’s window cleaned up as well.  It had splashes of different paint on it as well as what looks like epoxy.  I still need to look at the rough (epoxied?) spots to see if I can clean them up.  Maybe steel wool or jeweler’s rouge.

At that point it was nearing midnight and I crashed for the evening.  I’m wondering how these guys on thesamba.com get the energy to work on a bus all night, sleeping on site to drive bus’ out… oh wait energy drinks :)