Saturday, February 28, 2015

server dns issue

One of our servers at Dallas stopped sending us daily status emails. Mentioned it to PB. He checked the logs and found DNS not resolving. Checked the nameserver, found it was set to 4.2.2.2. Apparently that belongs to Level 3.

Asked Codero tech support, they said that for that data centre, the nameserver has to be some external one, like Google's and so on. Apparently just editing /etc/resolv.conf is not the answer, but have to edit /etc/network/interfaces and reboot. So P set it to Google's 8.8.8.8 and 8.8.4.4 and rebooted, problem solved. 

Thursday, February 26, 2015

slow shared server - my comments

One of our ashram websites was becoming very slow to respond, and one of us submitted a ticket to Nettigritty. I interjected with the following comments, when Nettigritty responded that they did not see any issue:

In general, these shared web servers will not be very responsive - you might have seen how slow the web control panel is. So, if the mysql server is also on a shared server, or on a shared network connection like our cyberoam, that may be the reason.

The solution may be to use asynchronous protocols instead of real time updates, or using larger time-out settings on the server, or using protocols which run over http/https like xml / soap. (But SOAP has been deprecated.) In general, it is very dangerous to directly leave the sql server open to the web.

Planetarium dome surface area

There was a request for estimate of Planetarium dome surface area for painting.

1. Looking at the dome, for eg. in the picture at our website, I estimate 45 4-sided figures visible from the front. Assuming 45 more from the back, and rounding off to 100, I would estimate 100x area of one 4-sided figure.

The 4-sided figure is made of 3 triangles and one trapezium, and its overall shape is like a big equilateral triangle of side approximately 3 metres as measured with a metre scale, an estimate which is likely to be a bit on the low side, would be sqrt(3)/4*3^2 x100,
3.9 sq. metres x 100 = 400 square metres (approx).

2. Another estimate is using the distance measured with my feet for radius, 10.75 metres, for the dome. That would make it 2*pi*r^2 = 725 square metres!

This is closer to being correct, because the estimate of 100 4-sided figures by looking at the picture is probably wrong. 

But this would be area if the hemisphere was smooth. Actually it is more like a series of pyramids. So, the actual area could be even double this estimate. 

(Eg. If a pyramid has 10m x 10m length and breadth, if it has 10m height also, google shows that its surface area would be around 350. Subtracting the base area of 100, that makes it 2.5 times the area of the base alone.)

Tuesday, February 17, 2015

znetlive hosting and folder permission changes

The CT web team wanted to change permissions for an image upload folder for a new site under construction. Changing through filezilla gave the error: SITE CHMOD [permissions] not understood - apparently IIS FTP server can't change permissions?

ZNET LIVE's user portal also couldn't change the permissions, "Error reading file/folder permissions".

Finally resolved by contacting their customer support and asking them to change the permissions. Luckily the difficulties experienced by these people or these were not faced by the CT team. 

Sunday, February 15, 2015

email ids for a new domain - Zoho mail

Google Apps free signup is no longer available. znet, where the website is hosted, offers a free email plan. But after creating there, mail sent from that account takes around 20 minutes to reach, and also goes to gmail's spam. Gmail has now stopped support for sending emails for other domains from their smtp servers. So the free email forwarding from godaddy, to a gmail id, and replying from gmail will not work. Free email hosting for domains from hotmail.com has also stopped.

Due to the delays and poor spam reputation of znet servers, S suggested moving to Zoho's free plan. So, migrated to Zoho, the experience so far is good. 

Monday, February 09, 2015

google earth for earth zoom-in movies

Now that google earth pro is available for free, creating google earth zoom in videos should now be easier I suppose.

Digitalurban describes a click and drag method as well as a zoom out and then reverse method.

And this hi-res movie making script method is nice for resolutions higher than 1080p.

Saturday, February 07, 2015

4d dicom file from renal scan

S had a student who had a problem with a 4-d dicom file from a renal scan. He wanted to display it on the screen and do some manipulations on it with matlab, but of course his routines expected 2D images and not 4-D data.

At first, I assumed the dicomread routine was wrongly reporting 4D data - 64x64x1x63 , and asked him to use squeeze to get rid of the extra dimensions. Then I read that the 4D is actually correct, and also a better treatment of the files rather than squeeze. In his code, there were some for loops, and using matlab's matrix methods are generally faster.

Sunday, February 01, 2015

experiences with google cardboard

Got an assembled Google cardboard from K - had ordered via TinyDeal.com for around $2. This reddit thread helped in getting to know some basic apps. My USP was two-fold. Try out immersive planetarium-style experience with VR Player, and to get a large screen experience for movie watching, normal flat screen movies. Phone used was the Xiaomi Mi3.

The magnet on the cardboard viewer was not fixed properly. This dodocase thread gave the pointer of testing with the app called Sensors for testing. Also, how to correctly assemble, from this video. But the magnet is not used in the apps I needed, below.

Planetarium show experience:
The only app I found which supported fulldome rendering was VR Player. It needs the video to be in mp4 AVC (H264) format with baseline profile in order to display without dropping frames! Have to re-encode with Handbrake for this - ensure zero cropping in the first screen - Picture tab, and choose H.264 Profile as baseline in the Video tab. With those settings, and choosing constant framerate and specifying an average bitrate of 6000 kbps, good results for me, and a 1.5 GB file for a half-hour planetarium show in 2K.

In the VR Player app, the default 110 degree FOV setting gives reasonably good results with the full dome projection. But the default number of slices - 32 - leads to somewhat wavy straight lines etc - distortions in the warping. Number of slices 100 gave much cleaner results. The Coverage setting was at 180, and Tilt at 0. Using this, by hitting the calibrate button at the bottom of the screen when onscreen controls are on (toggle on and off by touching the screen) an appropriate tilt of 30-40 degrees could be set.

I also needed to disable the Gestures in the settings - before that, the screen was getting tapped by the cardboard, and was calibrating again and again during the movie, causing the viewport to shift. Removing the magnet may also be necessary to prevent drift - I removed it, just to be safe.

The experience is somewhat like viewing the show in the dome through blinkers or through binoculars. Somewhat restricted field of view, somewhat distorted at the edges. Suggestions for settings tweaks are welcome.

For flat movie viewing, found that VR Cinema Pro was the best choice for me. It has an option to not track based on sensors, then the movie is shown on the centre of the screen. Choosing the + - buttons so that the movie is largest without being truncated, and choosing the pincushion/barrel distortion button to choose no distortion, side-by-side viewing gives a widescreen experience on Cardboard. Unfortunately the current version has a bug - every time a file is opened, it becomes thinner and thinner - squashed vertically.



After 3-4 times of open file, display becomes just a single line.

Rebooting the phone fixes it. Also, this app does not show up on the registered apps for viewing videos, so have to go through its own interface to open files, and then put on Cardboard.

Other apps with the same functionality, but more bells and whistles, have the unfortunate problem of needing mp4 video with baseline encoding for smooth playback, with other codecs causing dropped frames. Examples: Cmoar VR Cinema Pro, Fibrum VR CinemaVR Player, Side-by-side video player.

There are many other things which can be done with google cardboard, of course. Viewing photospheres with Orbulus, games, the official cardboard app, SBS (side-by-side) 3D youtube videos with VRTube and more.



Friday, January 23, 2015

using the web version of whatsapp

The instructions for using the web version are a bit terse: "simply open web.whatsapp.com in Chrome. You'll see a QR code — scan that inside of WhatsApp, and voila. Your phone will need to stay connected to the Internet for the Web client to work".

And how does one "scan that inside of WhatsApp"?

For scanning the QR code, you will need the latest version of WhatsApp on your phone. At this time, WhatsApp Web is available only for Android, Windows Phone, Nokia S60, BlackBerry and BB10 smartphones. With the latest version which supports the web client, if you go to the menu (on Android, by going to the chats screen and clicking on the ... on the top right corner) you will find a Whatsapp Web option. Choosing that option opens up the QR code scanning utility. Initial screen is a help screen which shows what is to be done, click past it and then just frame the QR code within the QR code scanning utility's bounding box. 

Tuesday, January 20, 2015

Li ion battery charging info

An interesting link forwarded by DJD, lots of info, but a bit old, and specific to removable device batteries:

http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries

problems with xiaomi mi3

The first problem with the phone has surfaced. Perhaps it is related to the inadvertent water treatment it received.  After a call which I put on speakerphone, when I switched back to earpiece, the earpiece did not work. At first I thought it must be a software problem, so I thought a factory reset, or if that fails, upgrading to a newer ROM (firmware) might solve it, as per this thread.

But no. Upgraded to the latest MIUI 6, but problem persisted.

According to this thread, if the hardware test fails, have to return for repair or replacement. So I dialled  *#*#64663#*#* and did the test, no sound.

Then I thought, if it is a hardware issue, it must be some sort of stuck relay or contact. Gave it a couple of hard whacks with the USB charger connected. And hey-presto - started working :)

Unfortunately the problem keeps resurfacing now, even when I do not put the phone in speaker-phone mode. Occasional hard taps are needed for the earpiece to start working. Sometimes irritating when receiving a call.


problem with virtualdub frameserver maybe due to avisynth directshowsource

When I warped a mov file using the virtualdub frameserver method and GL_warp2avi, found that the video had not completed till the end. Digging in, found that the output frame rate was 25 fps, while the input file had 30 fps. Looks like the directshowsource avisynth method does not correctly report frame rate for some files? Manually setting the frame rate to 30 fps in virtualdub, then creating the frameserver signpost seems to solve the issue.

Edit: The problem seemed to be with ffmpeg reading the Sorenson SVQ3 video codec. Had to use Avidemux to transcode to AVC (x264) and then use directshowsource etc. 

Sunday, January 18, 2015

xiaomi mi3 reboot loop

I wanted to downgrade the xiaomi mi3 phone to the firmware customized for India, which is MIUI v5, after the upgrade while trying to solve the earpiece issue. The MIUI 6 had too many China-specific defaults, and even seemed to not work with Airtel's *123# USSD service. When I just downloaded the firmware, copied it to the phone and tried to update using the phone's update tool, choosing the update file using the menu, the phone went into a reboot loop.

Apparently a complete system wipe is needed when downgrading - but not needed for upgrading.

Came out of the reboot loop using the reboot to recovery mode option, by pressing down the power and volume UP button. From there, chose to wipe entire phone, and then it gave option of booting to System 1 or System 2. Booting to System 1 gave a functional phone, but when I tried to install apps, found that it did not have google play services! System 2 was the MIUI 6.

Then I thought of using the update.zip method of updating the phone from recovery mode - copied the v5 firmware using USB to the phone's root directory, renamed as update.zip and used the recovery mode option to write update.zip to System 1. There were some hiccups due to loose contacts in the USB cable. Windows refused to recognize the device with the flaky cable, booted into Ubuntu and did the job.

So, finally back to MIUI v5, but the background and lock screen I had previously seems to be gone - maybe those were flipkart customizations? Anyway, loaded most of the apps I had before, and things seem OK now. 

Saturday, January 17, 2015

free transform tool in GIMP - perspective tool

The perspective tool is the equivalent of Photoshop's free transform. Had to use it to straighten some documents which had been photographed. Camscanner does this sort of thing automatically, very nicely too. Anyway, the perspective tool details were from

http://ubuntuforums.org/showthread.php?t=823364

http://ubuntuforums.org/showthread.php?t=1262679

Saturday, January 10, 2015

first fraudulent credit card transaction

I had my first fraudulent credit card transaction yesterday. Got a notification sms that some 1300 rupees had been paid to NICOLEBURNS. Immediately called up HDFC credit card customer care, they said if it is not done by me or by my auxiliary card holder, then I should hotlist via HDFC netbanking, and fill up a form for disputing the transaction.

Hotlisting and getting a new card will cost me Rs. 100, it will take a week or two to arrive. The transaction will be investigated, and if I am found right it will be credited back in 45-90 days, that is what the person said. Today I got a mail from HDFC saying that the amount was only authorized and not yet settled, so I will be not charged that amount by the end of the billing cycle. 

Thursday, January 08, 2015

iphone caveats

Caveats for an old jailbroken iPhone 3G which I wrote down for N:

So Skype cannot be installed. Other things to note:
  • If you sync with iTunes DO NOT upgrade the iOS version with iTunes when it says "Newer version available", upgrade will cause the jailbreak to fail. Check the box saying don't show me this again, and hit Cancel. 
  • If you sync with iTunes, if you connect to another computer with iTunes ans sync there, all your music files will be automatically deleted. So, DO NOT sync with other computers if you want to retain your music files.
  • If you wish to transfer files to and from the iphone, copy trans manager is a better iTunes alternative, will not automatically delete.
  • Change the screen time-out using Settings -> General -> Auto-Lock 
  • I used iTunes to change the Phone name, and uninstalled it after use. 

change iphone name

I was tasked with changing the name of an old iphone 3g, ios 4. iOS 5 and above allow direct editing from the phone's Settings -> About page. But for iOS 4, have to do it with iTunes.

Tried to avoid iTunes - my work laptop seems to be supplying less power, so the iPhone doesn't get detected with USB cable. Tried to do it via third-party apps like iFunBox, iSpirit with wifi sync etc - they did not seem to have the renaming phone option.

Tried to edit it via POSIX commands with an ssh shell - from
http://www.ducea.com/2006/08/07/how-to-change-the-hostname-of-a-linux-system/

tried
sysctl -w kern.hostname=NewName
Unfortunately the name did not remain on reboot. Checked some of the plist files, but could not find the appropriate place to edit. 

So, finally folded and used iTunes, USB cable to home laptop and edited. 

Monday, January 05, 2015

audition batch save regions

Reply to a query from AS:

In my version of cool edit pro, older version of adobe audition, the cue list window has a "batch" buttton at the bottom, which allows you to save all regions as files.
In audition, the sequence of steps seems to be like this, somewhat similar:
http://blogs.adobe.com/audition/2010/06/using_audition_to_save_section.html

And merge point markers to make range markers. 

Sunday, December 28, 2014

streaming live video from gopro

S asked me about streaming live video wirelessly from their GoPro Hero 3+ camera.

This article gives the steps in text form:
http://www.wikihow.com/Stream-Your-GoPro-to-Your-PC-Using-VLC-Media-Player

This youtube video shows in video form.
https://www.youtube.com/watch?v=-BByvuPSdms

EZcast dongle - wireless display - display mirroring over wifi

I recently got an EZCast dongle, which can handle MiraCast, Apple AirPlay and DLNA as well as output from it's own EZCast app. Things to take care while using:

  • Make sure that the USB port powering the dongle can supply sufficient power. Or use a good quality USB charger. Low quality chargers may have electrical noise issues. 
  • First set up using the EZCast app - that is the easiest way to get things going. Using an Android phone, for eg, install the app, then connect to the EZCast dongle's wifi access point SSID displayed on the initial setup screen. After that, run the app, it scans for the EZCast device, and the setup is fairly self-explanatory after that.
  • EZMirror - display mirroring using Miracast - requires the device to support it. Many cheaper devices don't.
Using the Xiaomi Mi3 with EZCast with EZMirror mode was similar to the youtube video demonstrating the Mi2 - but the menu item is in Settings -> More -> Wi-Fi Display
When the EZCast is set up in EZMirror mode, once you go to Settings -> More -> Wi-Fi Display and Enable Wifi display, the EZCast device will be displayed below it, and can be selected to start the screen mirroring.

About the quality - the video quality degrades a bit compared to a direct wired HDMI connection, due to the re-encoding with H.264 and depending on the setup, resolution of the video may also be changed. There is also a bit of latency, 5 frames or so in the case of mirroring on my phone.