Sunday, July 24, 2011

Mencoder webcam grab for youtube

I have been looking for an easy way to grab the signal from a regular USB webcam and get something from it that is usable on youtube. In the newer versions of ubuntu the /dev/audioN has been dropped from the kernel, so you have to use the audio signal from the ALSA layer instead. Here is how:


mencoder tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0:forceaudio:alsa:adevice=hw.1:amode=1:channel=3:fps=30:audiorate=32000 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1500:keyint=25 -oac mp3lame -lameopts cbr:br=128:mode=3 -fps 30 -o webcam.avi


The output will be in mpeg4.

Saturday, July 9, 2011

Google hosting of services and djbdns

Introduction
I have just completed a clean up of the config on my local dns server running dns service on my local network. The one in my house behind the firewall. I left a lot of configuration residue from many configuration hacks / tweaks and so forth over the time.

I host the barnabas.dk domain internally on the LAN as well as on a public dns server, that lead you to this blog.

The advantage is, that I am able to let services resolve to different things internally and externally.

However, I spent a lot of time finding a solution to making http://blog.barnabas.dk resolve correctly from my internal server onto the Google hosting where it lives. With blogger.com.

Here is how:
I use the djbdns tools (tinydns / dnscache) for hosting dns on my LAN. It has a low footprint and is much much much easier to live with than bind. Also it runs perfectly with the supervise service setup.

This is the config:


#
# REVERSE ZONE
#
# (reverse) dns servers: primary and secondary
Z1.168.192.in-addr.arpa:ns.barnabas.dk:hostmaster.barnabas.dk::::::::

# NS records
&1.168.192.in-addr.arpa::ns.barnabas.dk:::

#
# FORWARD ZONE:
#
# SOA record: primary nameserver is ns.example.net and hostmaster
# mail address is hostmaster@example.net
# (the 'Z' configuration line is the only one that
# allows specifying the hostmaster mail address)
Zbarnabas.dk:bar.barnabas.dk:hostmaster.barnabas.dk::::::::

# NS records: primary nameservers
&barnabas.dk::bar.barnabas.dk:::

# ANAME records
=bar.barnabas.dk:192.168.1.2:3600::

# CNAME records:
Cfoo.barnabas.dk:bar.barnabas.dk:::
Cblog.barnabas.dk:ghs.google.com:::


Just simply add the entry for the Google service as a CNAME. I spent a lot of time trying to make it work with an ANAME record. You can, but you have to refer the IP address of the Google service. That could change if Google configure new setup so refering the ghs.google.com cannonical name is the best way to do it.

Tuesday, June 14, 2011

Spotify, Wimp and TDC Play - a comparison

Introduction

I am using a Logitech Squeezecenter setup at home for listening to music. My goal is to only store the music locally that i have in lossless format. All the mp3 I have bought online earlier is really only a waste of space on my local server. It is a much better idea to have your lossy music streamed to you through a cloud music service. By now the quality is probably better than the mp3's I have been storing for years, there is a lot of new music for listening.

So in order to describe what my opinion is here is a short description of my setup

Hardware Setup

Old server running FreeBSD 6 with a couple of disks and a Squeezecenter server version 7.5.4. The architecture is i386.

Wimp

Activation of a trial account is very very easy. All you need is an active mobile phone number in order to start your trial period. In Denmark Telenor is a Wimp reseller and if you have two products (eg. phone and internet) through Telenor you will get a 50% discount. The normal price is 99 DKK a month, and you will be able to get it at 49 DKK.

I have neither so for me the price is 99 DKK which I find to be ok for access to 9 million songs online with new added regularly.

The quality of the streamed music is OK, but not fantastic. The format is 256 variable bit rate MP3. I am a bit particular with the quality of my music, so for me it is OK for streaming to a phone / stereo for general listening purposes. There is no DRM on the streams you recieve which is really nice. I still prefer my lossless flac tracks to this any day.

The app for android / iPhone is really really great. Easy to use and everything is cross referenced. If you are a Telenor customer you can stream directly to your phone without an extra cost - otherwise see to it you have a flatrate data plan.

One major drawback of Wimp is the necessity to activate, once your 30 day trial is over, through their Adobe Air application. There is no way at all I am typing in my credit card details in anything Adobe took part in making.

So currently I am hoping they take my advice and produce a simple http/ssl webapp for the customers to supply their billing details sometime soon.

TDC Play

I currently have a TDC mobile phone with data plan. This gives me access to TDC Play without any extra cost. As far as I know you cannot use this service as a non TDC customer.

Unfortunately the format is a windows infected WMA with loads of DRM. Even on a windows pc you cannot move your downloaded tracks to a new folder without invalidating them - making it necessary to fetch them again. The sound quality is also significantly lower that Wimp and especially Spotify Premium. This is really only usable on a mobile device.

From my Squeezecenter TDC play is unusable. Their answer is "buy one of our data lines and use our hardware box". Useless. I already have a hw box thank you.

I have tried the TDC play app on my Android and must say their app is not very good. Difficult to search and very little cross referencing between tracks and artists.

Spotify

Perhaps the most hyped music service out there. But the trees do not grow into the heavens.

Activations is quite difficult in Denmark since Spotify do not support Danish customers. This is not really the fault of the Spotify People, but rather due to some very technology scared people at the Danish music agency KODA. The danish RIAA.

This is easily fixed by creating a Swedish paypal account and then using this creating an account with Spotify. Easy Peasy.

The price is very acceptable at 99 SEK making it comparable in price with Wimp at 99 DKK.

The music library is impressive. Around 12 million songs.

The quality on the Spotify premium is excellent. 384 kbit ogg vorbis. This is the reason I really looked forward to trying this with my Squeeze center setup. However this turned out to be not so easy anyway.

The Squeezecenter today is either one you run on your own server or you can use the one supplied på Logitech "in the cloud". If you add your spotify account to this, then you have to select the cloud server when using spotify. Making it impossible to search your locally stored music. And vice verca.

Wimp handles this beautifully. You use the plugin in your server and you can search, mix and make playlists of your own music and wimp music as you see fit. You cannot with Spotify.

A fix is using the spotify backend on your server enabling this. However this is restricted to a narrow set of platforms and only in 32 bit. This requires a local install of libspotify and perhaps also the spotifyd server executable. I cannot really tell. This can then be accessed though a third party plugin to Squeezecenter and used like Wimp.

This is a list of supported platforms. They state Intel/Arm, but the list is in fact much shorter since they also require specific operating systems.

http://developer.spotify.com/en/libspotify/overview/

On FreeBSD it is not really even an option I am afraid. There is really no need for a binary client at all. Spotify needs to open up its client as open source and let ppl (re)implement it where needed. At least for premium accounts.

So on my setup I can only listen to spotify when using Logitechs cloud service. Not when using my own server. Bummer.

Conclusion

At least seen from a Squeezecenter user on Unix.

To put is short: Wimp 1 - Spotify 0 - TDC Play : No Contest.

Now if only the Wimp People would get rid of that Adobe Air thing.. Even introduce paypal perhaps?

Friday, May 20, 2011

Land Rover - A borrowed car from the shop

A borrowed set of wheels..
I recently had my brakes done at the Land Rover dealer. After getting my car back I noticed a disturbing use of brake fluid, and I subsequently had to take the car back to have the brakes fixed for both front wheels.



Apparently the dealer got a faulty set of refurbished calipers, and after a short while they started leaking heavily. In fact so much that the car had complete brake failure.

The issue was fixed on the guarantee, so aside from some driving back and forth and time spent on this little was lost.

As a small bonus I got to drive a tricked up Defender for a day.

The car was a 90" soft top van with the new 2.5 TD5 power plant. Additionally the car was equipped with a bull bar, snorkel, lift kit and large wheels with BF Goodrich T/A Mud Terrain.

It was very windy the day I had it and I have to say this car is by far the noisiest thing i have EVER tried. Not even my own Discovery 3.9 EFI v8 with its exhaust broken right after the manifold comes even close.

In fact I think it is about the same amount of db in the cabin at 100 km / h as my dads old Massey Ferguson 165 at 2500 rpm at plowing.

The diesel is quite noisy in itself. But if you add to this that the tires are very noisy on road and that the soft top makes an extreme amount of flapping noise - especially on the highway of cause - It really put me off considering a soft top Defender. It is really only usable on the African savanna.

My suggestion is to buy a hard top or a pickup version.

Aside from that the car has a good engine. It was the first try of the Defender 2.4 for me.

And I have to admit it does look quite nice on my driveway. I really like this car in white.

Thursday, April 21, 2011

Forår i haven





Og en undskyldning for at prøve photo app Vigrette til Android

Location : Vesterenden 7, 8762 Flemming,