curious onloooker

A few things, mostly technical notes...

Tuesday, November 22, 2011

the thin myth-tv frontend

Running a thin myth-tv frontend:
-------------------------------

Here's how to setup a thin frontend for mythtv with minimal config and filesets.

Install mythtv frontend and socat on your machine.


# apt-get install mythtv-frontend socat


Create a file called ~/bin/thin-myth.sh:
(in my case, the IP of my backend server is 192.168.1.100)


#! /bin/bash
log="~/myth-tv.log"

#set the IP of your backend server.
IP=192.168.1.100 

xrandr >> $log
socat -b 128000 -d -d -lmlocal2 TCP4-LISTEN:3306,fork,reuseaddr  TCP4:$IP:3306 &
socat -b 128000 -d -d -lmlocal2 TCP4-LISTEN:6543,fork,reuseaddr  TCP4:$IP:6543  &
/usr/bin/mythfrontend -l $log


Ensure that DBHostname in ~/.mythtv/config.xml and ~/.mythtv/mysql.txt is set to 127.0.0.1:

$ grep 127.0.0.1 config.xml mysql.txt
config.xml:        127.0.0.1
mysql.txt:DBHostName=127.0.0.1


Launch ~/bin/thin-myth.sh and enjoy.

How does it work?
-----------------
socat listens on 3306,6543 for mysql and mythbackend ports respectively and relays those onto your 
mysql and mythbackend ports on your backend server. 
 
 
more here.. 

Monday, February 07, 2011

Wifi recommendation for HD streaming

I stream HD media over wifi, lots and lots of it. I live in a rented apartment where there're no wired ports available. I tried Belkin Ethernet over power adapter to carry my HD traffic, it failed miserably. Then I tried to bridge my wireless G usb dongle along with my wired nic - it never worked.

Then I went onto buy a "NETGEAR WNDR3400-100NAS IEEE 802.11a/b/g/n 2.4/5GHz Simultaneous Dual Band N600 Wireless Router" and a "NETGEAR WNCE2001 Wireless 802.11b/g/n Ethernet Port Universal WiFi Internet Adapter" as my bridge.

Sadly the bridge is in 2.4Ghz spectrum, and is susceptible to interference, even to microwaves. (2.4Ghz is such a crowded space - microwaves, garage door openers, cordless phones all use it - compared to that, 5.x GHz spectrum is squeaky clean..!)

I returned the 2.4Ghz WNCE2001 bridge and got a "Cisco-Linksys WET610N Dual-Band Wireless-N Gaming and Video Adapter" from Amazon - as implied, this bridge can talk in the 5.x Ghz spectrum. It has been almost a month now, and my HD streaming is working smooth.

Gist: For HD streaming over wifi - go for Wireless N devices in the 5.x Ghz spectrum, you will be happy!

keywords: mythtv wifi recommendation, hd streaming over wifi

Monday, January 24, 2011

rsync delta-transfer algorithm

rsync delta-transfer algorithm is pretty cool, reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.


export alias scpr='rsync -av --partial --progress --rsh="ssh -c arcfour -o compression=no -o StrictHostKeyChecking=no"'

myhost:/tmp# ls -ltrh somefile
-rw-r----- 1 root root 2.3G Jan 24 11:53 somefile

myhost:/tmp# time scpr somefile somehost:/tmp/
somefile
2452194584 100% 67.76MB/s 0:00:34 (xfer#1, to-check=0/1)

sent 2452494012 bytes received 31 bytes 65399841.15 bytes/sec
total size is 2452194584 speedup is 1.00

real 0m37.408s
user 0m22.341s
sys 0m5.624s



append some data to somefile:

myhost:/tmp# dmesg >> somefile


myhost:/tmp# time scpr somefile somehost:/tmp/

somefile
2452249209 100% 137.71MB/s 0:00:16 (xfer#1, to-check=0/1)

sent 266589 bytes received 396255 bytes 20395.20 bytes/sec
total size is 2452249209 speedup is 3699.59

real 0m32.525s
user 0m16.521s
sys 0m0.484s
myhost:/tmp#


rsync just sends out the delta(!), 2452494012 bytes the very first time vs. 266589 to accomodate delta.

scp: transfer speed & compression

With compression:

$ time scp -c arcfour -C somefile somehost:/somewhere

real 47m30.974s
user 46m18.974s
sys 1m4.040s


Without compression:

$ time scp -c arcfour somefile somehost:/somewhere
real 10m41.195s
user 2m41.142s
sys 0m51.611s


details of somefile:

$ file somefile
somefile: MySQL MISAM compressed data file Version 1


Gist: if a file is already compressed, scp-ing with -C (compression) rightly slows down the transfer.

Friday, December 31, 2010

suggestion to shareholic/boxee

I use shareholic to add items to boxee, and have a suggestion to make:

currently shareholic cannot find boxee-able itmes in pages like http://www.asianetglobal.com/ShowVdo.aspx?GlHID=2008, but can be easily fixed.


if you look closely, from,


http://www.asianetglobal.com/flvplayer.swf?videoURL=http://videos.asianetglobal.com/flv/asianet/VdoGallery/KKandathum2712.flv&thumbURL=Images/VdoGallery/Kettathum%20Kandathum.jpg


you should be able to extract just the flv url fairly easily,

http://videos.asianetglobal.com/flv/asianet/VdoGallery/KKandathum2712.flv


I'd love to see this added to shareholic

Saturday, December 11, 2010

Microsoft LifeCam Cinema

http://ecx.images-amazon.com/images/I/41da5eR2zlL._AA300_.jpg


So far this has been the best webcam I've ever used. It's an HD webcam, 720p HD widescreen, even works on ubuntu (lucid) linux right away under uvcvideo. It also has a microphone, and the audio quality is very clear.


[ 26.861845] uvcvideo: Found UVC 1.00 device Microsoft® LifeCam Cinema(TM) (045e:075d)
[ 26.911241] input: Microsoft® LifeCam Cinema(TM) as /devices/pci0000:00/0000:00:0b.1/usb1/1-3/1-3:1.0/input/input6

$ lsusb |grep -i microsoft
Bus 001 Device 003: ID 045e:075d Microsoft Corp.

Above all, it is priced reasonably.

vital specs:
  • 720p HD Widescreen Video
  • Auto Focus
  • High-precision glass element lens
  • ClearFrame Technology for smooth, detailed video
  • Digital, noise-canceling microphone
more here..


tl;dr: here's a good HD webcam for almost all operating systems. works with skype and other IMs.

Tuesday, November 23, 2010

nokia sale shrinks in india - here's why

here's why: shown is a nokia cellphone right after 12 months of purchase, few days outside the warranty period. what you see is 2 ginormous black dots on its color lcd screen.

in case you didnt know it already nokia, we indians like products which are durable. stop stealing from us, stop dumping flaky stuff on indian markets.

Saturday, October 09, 2010

Microsoft Corp. LifeCam VX-7000



Microsoft Corp. LifeCam VX-7000 is an "OK" usb camera. here's the amazon.com page with more details



Technical Details
Model: CEA-00001
Audio Input: Built-in microphone
Video Capture Resolution: 1600 x 1200
Image types: JPEG
Image Capture Speed: 30 fps

here's the lsusb o/p against this webcam:

Bus 001 Device 003: ID 045e:0723 Microsoft Corp. LifeCam VX-7000 (UVC-compliant)

It also works on linux. I used Lifecam VX-7000 to make video calls on skype on linux. I start skype as shown below, and it works great:

$ cat /usr/bin/start-skype.sh
#! /bin/bash

bash -c 'LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype'

So in short, if you're looking to buy a good cam which would work in linux, go for VX-7000.

Sunday, September 26, 2010

hdhomerun single doing multirec

hdhomerun single doing mulirec (record multiple channels on the same DVB multiplex) on my lucid. (http://bit.ly/9hcBeo)

http://4.bp.blogspot.com/_BULfJPU7zAU/TJ7ZMHC_0gI/AAAAAAAAAW8/DFMtQk3BYQM/s1600/hdhr-mulirec.png


to setup this feature, do the following: (ref)

1. Exit the myth frontend.
2. Stop the myth backend (ALT-2)
3. Start mythtv-setup (ALT-s)
4. Select "2 Capture cards"
5. Select your capture card. Remember, it must be a digital tuner.
6. Hit the "Recording Options" button.
7. Increase "Max Recordings" from 1 to the number you want to allow.
8. Exit mythtv setup
9. Restart mythth backend (ALT-3)
10. Restart the front end (ALT-m)

Tuesday, September 07, 2010

Belkin 1000Mbps Gigabit Powerline HD Starter Kit review



So today i brought from Frys "Belkin 1000Mbps Gigabit Powerline HD Starter Kit for High Definition Video Streaming" - hoping that I get to watch HD mythtv recordings on my mythfrontend without the annoying pauses.

Needless to say, it gave me pain already, it would freeze up on me. I had to unplug the receiving end a couple of times to get past the hiccup.

Before returning it, I chose to attempt a f/w update against the latest and greatest from their web-page. I found this detailed instructions. When I run the thingy downloaded from the website, it seems like it downgraded my f/w version.

Before the "upgrade":

After the upgrade:


as you can see, i got downgraded to 2.0.9 from 2.2.0 although the svn branch got hiked to 25645 from 25122 -- looks like Belkin does not have much of a grip on cohesive version control.

Either way, for my own selfish sake, i hope this fixes the random hiccups i've been experiencing on these device.

Saturday, July 10, 2010

Enabling display acceleratiun on Lenovo ThinkPad T500 2242-CTO

So I got a Lenovo ThinkPad T500 2242-CTO running 64bit lucid. Boxee, and Hulu refused to run on it citing lack of acceleration/ direct rendering.

T500 2242-CTOs come with Integrated Intel GMA 4500MHD, also known as "Intel Mobile 4 Series" (http://bit.ly/9lU6Wp
)

Odd thing was despite having an Intel display adapter, the libGL.so.1 was linked to some nvidia nuisance (highlighted below)

$ ldd `which glxinfo`
linux-vdso.so.1 => (0x00007fff27fff000)
libGL.so.1 => /usr/lib/nvidia-current/libGL.so.1 (0x00007f6f64bb0000)
libm.so.6 => /lib/libm.so.6 (0x00007f6f6492d000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f6f645f6000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f6f643d9000)
libc.so.6 => /lib/libc.so.6 (0x00007f6f64056000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f6f63e43000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007f6f63c3d000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f6f63a3a000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f6f63833000)
libdrm.so.2 => /lib/libdrm.so.2 (0x00007f6f63628000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f6f63424000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f6f63207000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6f64e54000)
librt.so.1 => /lib/librt.so.1 (0x00007f6f62fff000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f6f62dfa000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f6f62bf4000)

That does not belong there, and here's how I fixed it:

# mv /usr/lib/nvidia-current/libGL.so.1 /usr/lib/nvidia-current/libGL.so.1.junk
# ln -s /usr/lib/libGL.so /usr/lib/nvidia-current/libGL.so.1


After a reboot, direct rendering is enabled:

$ LIBGL_DEBUG=verbose glxinfo | grep "direct rendering"
direct rendering: Yes



Also Ref:
[ubuntu] client glx version string: SGI with NVIDIA drivers?!? - Ubuntu Forums

Thursday, May 14, 2009

test

test post






vide here.

Tuesday, March 11, 2008

How NetGear Forum Saved me money.

I've two Linux PCs in my living room - among many roles, one is the myth backend, and the other is the F/E. The F/E is connected to my Samsung 32" LCD. They both are about 15m apart, and are "wired".

When I was installing the latter, I had the RJ45 cable in handy and decided just to use that cable. Of lately, I been toying with the idea of buying a USB Wireless adaptor, just for the heck of it.

I wanted to buy a NetGear USB adapter, which would have costed about $60.00.

Then I tumbled upon this post, in Netgear's Forum:





That saved me from blowing $60.00 something on NetGear USB adapter. Ah, the sweet feeling of not having to buy hardware which has no Linux support. (ndiswrapper, no thanks..!)

Suck it, NetGear...! As a buyer, I am glad I chose not to buy your crap, NetGear.

Saturday, March 08, 2008

Why one should not use globe7?

globe7 is a voip thingy for Linux.

Don't bother installing it, as they are yet to learn how to create a decent deb package which would not screw your linux system up.

Here's an example:


# dpkg -r globe7
(Reading database ... 124718 files and directories currently installed.)
Removing globe7 ...
dpkg - warning: while removing globe7, directory `/usr/local/share' not empty so not removed.
dpkg - warning: while removing globe7, directory `/usr/local' not empty so not removed.



globe7 - DO NOT USE THIS VOIP APPLICATION

.

Using Skype to call India

I like Skype - especially because Skype has Linux Clients, and they simply work, unlike Google Talk, Y messenger etc, on Linux. (In case you're interested to run Skype client on Linux, go for the latest Linux Beta Clients from this page)

But, what is preventing me from using Skype as my long distance/International Call Carrier?

Their rates, of course...!

Rates to India from Skype - 15.0 ¢ per minute
Rates to India from elsewhere - 6.2 ¢ per minute

Do the math...!

Skype rates:



Calling Card Rates:





Followers

സൂചിക::Index


Creative Commons License
This work is licensed under a Creative Commons License.