Saturday, December 12, 2015

Hostgator dedicated server self-signed certificates

The self-signed certificates on a Hostgator dedicated server were nearing expiry, and notification emails like 'The SSL certificate for xxx on yyy.com will expire in less than 30 days' were starting to appear.

After going through domain verification on chat, found that they don't do SSL install support on live support.

Then, followed the WHM link given in the notification email sent by cPanel,
You need to install a new certificate as soon as possible. You can do this with WHM's Manage Service SSL Certificates interface at
https://yyy.com:2087/scripts2/manageservicecrts.

There was a button for 'Reset certificate' - just clicked that, and the self signed certificate was renewed for a year.

Sunday, November 29, 2015

sftp changes in batch mode

We have been using sftp in our scripts for uploads to servers etc and had configured automated emails listing the names of files uploaded. After a server upgrade to Ubuntu 14.04, the sftp emails did not display the filenames. After poking around a bit with -v etc, P found the solution:
Modified the scripts from
sftp -b  /path/to/putaudiofilesdl user@server.name.com 2>&1 |tee -a $MAIL_FILE
to
script -q -c 'sftp -b  /path/to/putaudiofilesdl user@server.name.com' |tee -a $MAIL_FILE
and later
cat $MAIL_FILE |tr '\r' '\n'| grep -v 'ETA' | grep -v 'sftp>' | grep -v 'Progress meter enabled' | sed -e /^$/d | sed 's/\/path\/backwards\/of file\///g' | sed 's/100%.*$//g' > /path/tmp/test.txt

and in the file putaudiofilesdl, adde the keyword
progress
before the put command, to enable the progress meter. 

This needs the terminal window to be wide enough to contain both the filename and the progress meter, or else the filename gets truncated. So I modified my Putty saved session - changed number of columns under the Window setting to 180. Then when the script is run with screen, the emails are as desired, with the filenames. 

Saturday, November 28, 2015

locale issues with ssh login from Mac

P reported this problem and solution - he uses a Mac to log on to our Linux servers.

Some commands are failing on ssh login and vnc login

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

They work with local login.
Changing the preferences of the Terminal solved the issue of ssh.

Sunday, November 15, 2015

firefox html5 not showing HD options

While checking out the radiosai live stream videos, found that firefox is not offering the HD options. Found that this is a common complaint. The solution seems to be to use an addon to force the flash player on firefox. Now the 720p option is available.

Thursday, November 12, 2015

using RichCopy to backup files

Used RichCopy to backup files to an external hard disk. Has the filters I need - copy if size is different, etc. This blog post is also illuminating - RoboCopy vs RichCopy vs SyncBack vs EMCopy vs XXCopy vs XCopy vs KillCopy.

Wednesday, October 14, 2015

shortcut for working with multi-language audio and channel configuration

When working with WAV to AC3 encoder, we can drag and drop files into the window instead of clicking on the MUX Wizard button and choosing the respective channels. WAV to AC3 encoder needs 48 k 16 bit mono wav files in the default configuration, and the file order is
L
R
C
SL
SR

This is also the order in which the MUX files are saved from within the MUX Wizard.

Our channel configuration order is
FL - speakers
FR - Hindi
C - Telugu
SL - English
SR - Malayalam / Tamil
SW - Not used / Kannada

Monday, September 21, 2015

google spreadsheets firefox issue

I had an irritating issue of google spreadsheets showing screen corruption when any cell was clicked. This issue started after the sheets update in which they introduced the "Explore" button on the bottom right.



One workaround is to click on the small downward arrow to the right of the column headers A, B, C, D etc. When the column menu comes up and we dismiss it by clicking again on the column header, the sheet seems to get cleaned up. But only temporarily. Waiting for Firefox or Sheets to get this fixed. 

Edit: 6 Jan 2016 - this seems to be fixed now.

Thursday, August 20, 2015

resizing matrices in Matlab

In my previous post, I'd mentioned processing 2-D matrices to put them into relevant rows and columns instead of just 5 numbers per line. This rearrangement of matrix elements uses the reshape function. In our case,
A_rz=reshape(A_rz',1,numel(A_rz));
A_rz=reshape(A_rz,30,30);
A_rz=A_rz';

using MCML - Monte Carlo light transport in multi-layered scattering media

is referenced in Wang and Wu's Biomedical Optics. Some points I noted for its usage are given below, in addition to the documentation available in the book as well as the included paper in the download.

  • I used Fabrice Bellard's Tiny C compiler to re-compile the code on Windows. It's only a 386 kB standalone download, as against gcc's MinGW and CygWin options which are installers which download more files.
  • After extracting the zip file, you can add its location to the path variable - Control Panel -> System ->  Advanced -> Environment Variables, and then restart the system, or add it to the commandline for a temporary session.
  • Compile, link and create executable with just
    tcc -o mcml.exe mcmlmain.c mcmlgo.c mcmlio.c mcmlnr.c
    Done in less than a second.
  • Incident light angle has direction cosines (0,0,1) by default, can change in mcmlgo.c
  • The output 2-D arrays of Tt_ra, Rd_ra, A_rz are formatted in the ASCII output file as 5 numbers per line(!) and not as lines and columns related to the 2-D array. This can be modified in mcmlio.c - or, of course, when the array is imported into something like Matlab, it needs further processing.
  • Large txt files are created by mcml in case large numbers are specified for dz, dr and da - these will need txt file editors which can handle large files. Files upto a few hundred MB were OK with PsPad, other options are gVim etc as noted here.
  • Section 3.5 of the Biomedical Optics book talks about overflow in the grid - we have to note this - that the last grid element in the direction of the overflow collects the weight - and have to discard that point. In reconstruction Fig 3.4, for eg, the first grid element reading has to be discarded - T_t(0). - or perhaps this is because the measured value is T_t (total transmittance) and what we need is T_d (diffuse transmittance). The angle a (or alpha) in R_d(a) is angle of reflection, so it goes from 0 to pi/2.
  • Section 3.5 also talks about how we should choose the grid size - numbers of da, dz and dr along with values of dz and dr - as a rule of thumb, each grid element should measure about 10% of penetration depth or transport mean free path.

Friday, August 14, 2015

free up space on C drive - MSOCache

Wanted to free up space on C drive. Found this superuser post about moving MSOCache folder to another drive. The mklink solution suggested there did not work, probably because I am on Windows XP and not Win7. But I did the registry editing technique, using advanced regedit to find and replace C:\MSOCache with D:\MSOCache

extracting data from open UDF session

We received some data on a DVD which had an open UDF session - DVD session had not been closed. On Mac and on Windows explorer, the disc displays as empty. Nero Burning Rom's Disc Info showed the open session, but my DVD writer has some writing issues, so I was unable to close the session with Nero 8. The writer which is working is on a machine which has Nero 6, which does not have the Finalize session option. Googled for closing UDF session, and videohelp forums pointed to ISO buster. I had ISO buster, which was able to extract the files with no issues.

Sunday, August 09, 2015

USB printer issues

A TVS MSP 345 dot matrix printer connected using a parallel to USB converter cable to the laptop's USB port did not print today. Tried re-installing the driver, still no go. Then, cycled through the three virtual printer ports in printer properties -> ports,  USB001, USB002 and USB003. It finally worked with USB003.



Friday, July 03, 2015

google transliterate bug and workaround

Using the "Input tools" on Google Docs, transliterating to Devanagari (Hindi) script - at time, the cursor disappears and input does not occur where we want it to go.



This seems to happen on Firefox when the choices drop-down is clicked with a mouse instead of using the keyboard shortcut.


So, the workaround is to use keyboard shortcuts, like 4 for Baahut above etc. 

In case it does get stuck, refreshing the page gets you back to where you were, and then you will need to re-select the input tools. A less troublesome recovery, which sometimes works, is to type some more, and when the choices drop-down appears, hit the escape key. 

Tuesday, June 30, 2015

fulldome short - 2015 - Year of Light

2015 YEAR OF LIGHT - the International Year of Light is a global initiative adopted by the United Nations to raise awareness of how optical technologies promote sustainable development and provide solutions to worldwide challenges in energy, education, agriculture, communications and health. In this short immersive film by Carl Zeiss, seven minutes of memorable visualisations highlight various significant aspects of light. Visible or invisible, light is everywhere. We are reminded of its omnipresence and how - amongst other things - light creates moods and emotions, is turned into electricity, is a manufacturing tool and is used for communications.
FILM TYPE - Science
Key Stages 2-5, General audiences
Length: 7 min

Available from British Fulldome Institute,

http://www.bfi.gb.com/

fulldome clip - GALACTIC JOURNEY

GALACTIC JOURNEY - fly your audience across immense regions of deep space with this accurate visualisation of 120,000 galaxies viewed from the southern hemisphere. Courtesy of the Anglo-Australian Observatory, Paul Bourke, Peter Morse & Glenn Rogers
FILM TYPE
Cosmology
Key Stages 3-5, General audiences
Length: 2.5 min


Available from BFI,


http://www.bfi.gb.com/

Monday, June 29, 2015

extracting audio from mov file

A quicktime video file (.mov) from eplanetarium displayed unknown input format in KMplayer, which did play it, but was not being recognized by directshow. Avidemux was able to extract the audio - chose audio output PCM and saved it as .pcm - then Cool Edit Pro could read it. 

Thursday, June 25, 2015

problems with Unicode fonts on QuickTime7 for Windows

Working with the eplanetarium team for Indian language subtitles, we ran into a road-block - the workaround seems to be only burnt-in subtitles.

The issue seems to be that QT7 on Windows - and MediaShow, which runs on QT - does not support Unicode for subtitles. Excerpts from my emails below:

... I tried this technique given here,
http://www.7tutorials.com/changing-display-language-used-non-unicode-programs

Unfortunately, the Hindi option does not even appear ... The reason seems to be that only ISCII Hindi (Devanagari script) is supported and not Unicode Devanagari, as seen in the code conversion tables. So, it may not be possible to display the Unicode Hindi characters using the current subtitling tool and playback tool combination on Windows. Unicode capable playback tools seem to be able to display, like KMPlayer ... One caveat for Indian languages is that many operating systems have limited support for complex scripts. We may have to check if your subtitle creation software as well as the subtitle display software have proper Indic support. If not, the script would be jumbled. ....


Tuesday, June 16, 2015

Assignments in Matlab

One of the students requested pointers for some assignments or mini projects he could do in Matlab. Here was my reply:

Since I'm not familiar with abstract math problems with Matlab, I'll have to suggest what I know about, and also what is got by googling. So, please take these only as vague pointers, discuss with your concerned teacher before proceeding further.
1. Visualizations. Matlab has got very nice built in plotting tools. Visualizations of fractals, chaotic system equations, other differential equations etc could be done. The Mandelbrot function is already implemented, you could play around with it to learn more, and implement other fractals.
http://in.mathworks.com/help/distcomp/examples/illustrating-three-approaches-to-gpu-computing-the-mandelbrot-set.html
If you make high-resolution circularly symmetric movies, you could also help the planetarium,
http://fractalfoundation.org/videos/
All sorts of value-added stuff can be done with visualizations - making guis for varying parameters, interactive graphs, etc etc.
2. Matlab has got a Symbolic Math toolkit. All sorts of higher level math can be modelled using this, like
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5191494
http://in.mathworks.com/products/symbolic/features.html#key-features
3. Linear Algebra problems, Manifolds and such are very much solvable with Matlab, so taking up some problems with these might be useful, eg.
http://www.manopt.org/and many more,
https://www.google.co.in/search?q=manifolds+with+matlab
4. Scilab and Octave are open source Matlab clones. If you are looking at the programming side, there are many small functions which can be written for Scilab and Octave for better Matlab compatibility. 

Thursday, June 11, 2015

dropped samples - clicks on Audition recordings

Found this issue of dropped samples - leading to clicks - on Audition recordings at Studio with the Audiogram interface. And maybe even with the Presonus too. The workaround was to record using Nuendo. S emailed with the solution as implemented by PB - 

The clicks problem recurred and PB has once again reset the Preferences/Audition folder.
Now it is fine. 

Finder/Go/Option key/Library/Pref/Audition -->Trash

Wednesday, June 10, 2015

full playback of downloaded youtube 1080p videos

In my earlier post, I had noted that the files repaired with mp4box -isma still would not play with DirectShow etc. Finally did a better analysis of the issue and found a solution.

As the mp4box documentation says, mp4box -info file.mp4 gives information about the file. Found that the downloaded youtube mp4 file, after the -isma fix, had three streams, like
Track # 1 Info - TrackID 201 - TimeScale 90000 - Duration 00:30:14.033
Track # 2 Info - TrackID 2 - TimeScale 90000 - Duration 00:00:01.000
Track # 3 Info - TrackID 1 - TimeScale 90000 - Duration 00:00:01.000

So, taking out only the genuine video track, in this case TrackID 201, made the file playable. In my case, I added the audio from the 360p file also, as below.

mp4box -add E1080p.mp4#201 -add E360p.mp4#audio E.mp4

So the output file E.mp4 contains the video track with TrackID 201 and the audio track from the second file - this file plays fine with DirectShow. 

Friday, June 05, 2015

recording tests with Zoom H1

The Zoom H1 I had sent for RK's Hindi voice-over has arrived here now. It can also work as a USB mic. Simplest way to record seems to be with Cool Edit Pro.

With Reaper, have to make sure that the sampling rate is set to the same sampling rate as on the H1, otherwise the recording comes out with breaks. File -> Project Settings -> Project Sample Rate, then Options -> Preferences -> Audio -> Device -> Audio System has to be set to ASIO and again the sample rate has to be set.

Noise floor is impressively low. A sample I recorded at the Studio on the Presonus digital mixer there, using a dynamic mic and with air-conditioning on had a noise floor of -50 dB. Compared to that, from my office room, with the computer, AC, fan etc turned off, the Zoom H1 with input level set to 40% had a noise floor of -63 dB! That was recording to the micro-SD card. With computer on and recording via USB - using the H1 as a USB mic - the noise floor was around -54 dB - mostly the computer fan noise. Bird sounds and outside traffic sounds were below -50 dB when the mic was next to my mouth,  input level set to 40%, covered with a foam windscreen (pop filter). With AC on, a floor of around -45 dB. 

Saturday, May 30, 2015

correct aspect ratio of mp4 file without re-encoding

I wanted to correct the aspect ratio of an mp4 file without re-encoding. Videohelp.com forums had this question answered. In my case, the video was 640x268 pixels, and was supposed to be 4:3.

x * 640 / 268 = 4/3 ; So  (1/x) = 640 * 3 / 268 * 4 = 160 / 89, approximately = 16/9

So, my commandline was

mp4box -add inputfile.mp4#1:par=9:16 -add inputfile.mp4#2 output.mp4

One caution - temp file seems to be created in the default Windows temp folder, or perhaps in the same folder as the input file - did not verify which. Overall operation takes as much time as two copy commands - "importing" and "writing" done separately.

Wednesday, May 27, 2015

dicom viewers

idoimaging.com lists a whole lot of DICOM and other image format viewers. Searching there for viewers which do 3D volumetric rendering, found 3dimviewer - capable and free. 

Tuesday, May 26, 2015

testing website before changing DNS

Testing websites before changing the DNS - this is something which I need to do often. I've relied on the Telnet based method in the past. But when the content needs to be checked, it's better to do the hosts file based method. Dreamhost has good documentation on this, and also on flushing DNS.

So, on Windows XP, edit C:\Windows\System32\Drivers\etc\hosts
and run
ipconfig /flushdns

Will need to restart browser after flushing dns cache, too. 

Tuesday, May 05, 2015

Oculus Rift trials

Finally a post on the Oculus Rift DK2. I had tried out Google Cardboard earlier, and wanted to see how much better the Rift is. Unfortunately the system specs needed are very steep. Smooth 70 fps+ framerates were obtained only on a machine with the following specs, which costs more than Rs. 2 lakhs:


A Mac Mini was not enough - the frame rate was 10 fps for the Tuscany Demo. A few of the Rift demos I sampled were the following:


Short notes:
VRSurgery - view is like a big screen tv with a wide field of view.
3d gallery - interesting and works OK.
HiyoshiJump - a simple demo
bungee - no hmd detected - probably this does not work with DK2
surface of mars - an OK demo
spacewalk - limited?
Malfunction - hmd?
mars walk - field of view not as good as "surface of mars"
chair in a room - an OK demo
earthvr - needs a good internet connection and good specs for the machine
roculus - a lo res demo
vrspacetunnel - wrong registration - probably doesn't work with DK2
Titans of space worked at 15 fps on the Mac Mini
Unity demo - at 10 fps on the Mac Mini
Trying a fisheye movie Cosmic Colors on liveviewrift - not very clear focus, equirec mode
vrplayer not available for Mac, so can't do a head to head comparison with Google Cardboard.
Edit - KolorEyes player is available for both Cardboard (Android) and Oculus. Renders well.

My conclusion of Rift vs Cardboard - Cardboard's strength is affordability -smooth display, no rendering lags on low cost hardware. With a powerful machine, Rift shines due to configurability, input methods, hand tracking possibilities, etc. 

Monday, April 06, 2015

Optoma projector HDMI quirk

While testing a VGA-to-HDMI converter box, came across this quirk with our Optoma TX1080 projector. It did not recognize the HDMI input if the HDMI signal was changed after the projector was powered on. The fail-safe workaround was to do a hard reboot of the projector, removing the power cord, and then putting on the projector with a valid HDMI signal present - then it detects, and is able to change resolution also if the HDMI resolution changes.

The VGA to HDMI box was able to convert almost any resolution which my PC output to HDMI, sending  720p, 1080p and even resolutions of 1600x1200, 1280x1024 etc - the aspect ratio setting on the projector could be set to original pixels or 16x9 or 4x3 etc, and a suitable picture resulted. 

Tuesday, March 31, 2015

Adobe Audition settings export

A wanted to export settings from Audition and import it on another machine. My reply was:

Here is the method for exporting and importing application settings from audition,
https://helpx.adobe.com/audition/using/customizing-saving-application-settings.html

Choose File > Export > Application Settings. Then specify a filename and location.

To reapply the settings at a later time, choose File > Import > Application Settings.

For exporting presets, this forum post  :
https://forums.adobe.com/thread/1042236
gives detailed instuctions on how to find the presets folder.

Then this page says, how to export mixdowns, sessions etc
https://helpx.adobe.com/audition/using/whats-new-cs6.html

Choose File > Export > Session As Template to create multitrack templates that speed up recurring projects requiring similar settings, tasks, and source files. To apply a template to a new session, choose File > New > Multitrack Session, and then choose a Template option.

To archive whole sessions or move them to other systems along with markers, metadata, and source files, choose File > Export > Session. In the Export Session dialog box, customize exported source files by selecting Save Copies Of Associated Files, and clicking Options. To change file format, select Convert Files. To export full or trimmed source files, choose Media Options.

Choose File > Export > Mixdown, and review the Mixdown Options section. Click Change to output tracks as separate files, or simultaneously output mono, stereo, and 5.1 masters.

Monday, March 09, 2015

players on Android for radiosai streams

Adapted from a support email to a listener who complained that radiosai on a Lenovo tablet worked sometimes and did not work sometimes.

The various options are listed at
http://radiosai.org/Pages/Streaming_Audio.htm#mobile
One way would be to try out the different apps listed there.

Unfortunately, we have found that various Android devices have various incompatibilities. Some players work on some devices while some don't. Apps like Tunein radio are very likely to work, since they have large installed bases.

Opera mobile browser plays our streams from the player linked from the home page radiosai.org when "Opera Turbo" is turned off. It does not seem to play the streams when Turbo is turned on. Chrome mobile browser plays too. 

Tuesday, March 03, 2015

fulldome clip - DNA flythrough

DNA FLY-THROUGH - A dramatic journey through the DNA double helix.

FILM TYPE
Biology
Key Stages 3-5, General audiences
Length: 1 min
Full preview: http://bit.ly/1tgKIGw
Available as: 1920px MOV
No User Agreement to complete.


From BFI,

http://www.bfi.gb.com/
 

free planetarium show - Astronomy Photographer of the Year 2014

ASTRONOMY PHOTOGRAPHER OF THE YEAR 2014 - the Royal Observatory Greenwich proudly presents selected images of the Astronomy Photographer of the Year 2014 competition. Exhibited in glorious 360˚ and showcasing incredible images of the sky, you will marvel at spectacles from both within our Solar System and from distant deep space. More photographs than ever of solar features, eclipses, aurorae, nebulae, star trails and much more were received as entries from around the world this year - and for the first time, even a photograph taken from the edge of Space!

FILM TYPE
Astronomy / Music / Art
Length: 12 min
Full preview: http://bit.ly/apy2014
Available as: 1024, 1080, 1536,1920px MOV


From BFI,

http://www.bfi.gb.com/
 

free planetarium show - Astro photographer of the year 2013

ASTRO PHOTOGRAPHER OF THE YEAR 2013 - imagine sitting comfortably in a dark planetarium. You look up at the 360˚ screen and the room explodes with images of the Universe. The Astronomy Photographer of the Year competition, run annually by the Royal Museums Greenwich, attracts the very best photographs of the Cosmos from around the world. Immerse yourself in the breathtaking beauty of the heavens, enjoying the spectacle with ambient background music.

FILM TYPE
Astronomy / Music / Art
Length: 12 min
Full preview: http://bit.ly/apy2013
Available as: 1920px MOV
 


Distributed by BFI,


http://www.bfi.gb.com/

free planetarium show - Clockwork skies

Another Ott planetarium show from BFI,

http://www.bfi.gb.com/
CLOCKWORK SKIES - explore the motions of the stars, Sun, Moon and planets - are they moving or are we? Learn about daily motion and the Earth's rotation; the Moon's monthly orbit of our planet and how the Earth takes a full year to travel around the Sun. The Solar System is like a giant celestial clock powered by gravity.

FILM TYPE
Length: 5 min
KS 1 - KS2
Full preview: http://bit.ly/ott_cs
Available as: 1080 / 1536 / 2048px MOV



free planetarium show - Space Shapes

One of the Ott planetarium movies, rendered and distributed by BFI,
BFI logo


SPACE SHAPES - what's the difference between a sphere and a disc? A ball and a pancake? Lift off in a rocket and find out! Fly to the Moon and discover an 'orbit'. Visit the planets to see if they are round like a ball or round like a pancake. What about the Solar System, is it round like a pancake or round like a ball?

FILM TYPE
Length: 9 min
Reception & KS 1
Full preview: http://bit.ly/ott_ss
Available as: 1080 / 1536 / 2048px MOV


free planetarium show - solar system adventure

The BFI lists this show,
with a short intro and more info,

SOLAR SYSTEM ADVENTURE - embark on a 12-minute adventure to explore the planets, moons and countless other objects orbiting our nearest star the Sun. Make a quick stop at each of the planets to examine its makeup. Enjoy an unforgettable cruise through the rings of Saturn as you zig-zag past countless pieces of ice. Discover the mystery and beauty of our planetary neighbourhood in this fast-paced, informative film.

FILM TYPE
Length: 12 min
KS 2-5, general audiences
Full preview: http://bit.ly/bfi-ssa
Available as: 1600px MOV in English, French & Italian
User Agreement to complete.
For your copy contact: free_int@bfi.gb.com

Short link to this page: http://bit.ly/bfi_ssa


BFI logo and link,  currently it goes to their facebook page,
http://www.bfi.gb.com/


link farming for bfi

The British Fulldome Institute has a very useful feature - not only do they list free shows, but they distribute them too! But they request a link for every show. So, the next few posts are going to be about each planetarium show I requested, and with a link to BFI!

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.