Tuesday, 26 July 2011

ssh login with public key

One of the Linux projects I'm working on requires a public key login via ssh.
Simple I thought and generated a key with  
ssh-keygen
Then copied it over with
ssh-copy-id 192.168.1.2
and tried to log in with the key. However, then I got this error message:
ssh error: agent admitted to failure to sign using the key
After endless googling I found out that it has something to do with ssh-agent.
This can be temporarily disabled by adding
SSH_AUTH_SOCK=0 ssh 192.168.1.2
in front of the ssh command and I'm able to log in. There's clearly something wrong with ssh-agent but this fixes the issue. I then started ssh-agent by hand on the server and client with ssh-agent bash and could then run ssh-add on the server to store the passphrase as well.

Monday, 25 July 2011

GH-1 hack GOP=5

I bought off a hackable GH-1 off ebay and optimised its firmware with the well known "ptool3".

Here is my configuration file for ptool3 which I called "setd.ini". Just copy this file in the same directory as the ptool and select profile D.

With GOP=5 the camera generates an intra frame every 5 frames instead of every 25 frames. The other important numbers are Video Bitrate FHD/SH=40000000 and Overall Bitrate=41000000. It seems to be important that both numbers are pretty high but that the overall bitrate must be a bit smaller.

The actual bitrate is much smaller as the number suggests in the config file. Here is a highly complex scene with loads of movement -- taken from the play "The Red Dress" which premieres at the Edinburgh Fringe 2011:

The bitrate averages at 22Mbps which is well above the 17Mbps of the original setting. Higher bitrates show occasionally up but only in high contrast clips (shooting having tree branches against the sky) but rarely go above 30Mbps.
I record on SDHC 10 cards with 18MB/s writing speed.

Converting mov to m2t for Sony Vegas

A friend captured from a Z7 with some Apple-flavour software (I think it was FCP). That's what in the mov:
  Duration: 00:23:11.36, start: 0.511854, bitrate: 26575 kb/s
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 1440x1080 [PAR 4:3 DAR
16:9], 25000 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 47.95 tbc
    Metadata:
      creation_time   : 2011-07-14 10:48:07
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Metadata:
      creation_time   : 2011-07-14 10:48:07
    Stream #0.2(eng): Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    Metadata:
      creation_time   : 2011-07-14 10:48:07
The streams themselves are completely compatible with Vegas but the container causes problems because it loads the quicktime DLLs and they won't like mpeg2 for some reason. Essentially not a Vegas problem but an Apple problem. I decided to convert to m2t with ffmpeg:
ffmpeg -i Boots.mov -vcodec copy -an boots_noaudio.m2t
Note "-an" means no audio. With audio added to the m2t file Vegas 10 locks up. I guess ffmpeg is not generating a fully compliant m2t file. Instead I exported the audio as separate tracks:
ffmpeg -i Boots.mov -acodec copy -vn -map 0.1 boots_audio1.wav
ffmpeg -i Boots.mov -acodec copy -vn -map 0.2 boots_audio2.wav
...and loaded the 3 files into Vegas and then grouped them.
I had quite a lot of problems with ffmpeg generated files but this workflow works at least and there is no loss through recompression.

How to create streamable video with Sony Vegas

I faced the problem how to create mpeg4 video clips which play instantly with a flash player.
Sony Vegas can generate high quality mpeg4 video but it's not streamable. When played with a flash player it won't play until all the content has been downloaded. The problem is the so called "MOOV atom" which is located at the end of the mpeg stream but needs to be at beginning of the stream.
The project GPAC has a very nice command line tool called MP4Box which moves the MOOV atom to the front of the stream:
MP4Box -inter 500 myMPEG4file.mp4
One note about bitrates: keep them below 1Mbit/sec. Some providers throttle the bitrates of videos to 1Mbit/sec. So, if you want to be sure your video plays keep it below 1Mbit/sec.
In Vegas I usually use two pass modes:
Examples of stremable videos are here:

ME88 preamplifier

The ME88 is a pretty ancient shotgun mic from Sennheiser. It comes with a passive supply module which has just too little output power for most camcorders.
So, I built an active supply module instead:
I've just built it on a matrix board. The circuit is inspired by the transformer less amplifier of the AKG microphones:
I used the microphone on a couple of shoots with very good results, esp in the jogging scene of "Fried" and also on Joe McArdle's "A Mug's game".

Intro

Hi all,
this blog will be mainly technology related and will act as a communal storage space for anything I find out or find useful for others.
/Bernd