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. 

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. 

Saturday, December 27, 2014

stream video from gopro camera

The Studio folks got a GoPro Hero3+ camera and they wanted to use it wirelessly. Showed them:

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

Unfortunately, a lot of delay in the video - so usefulness would be limited for live programs. The range of the wifi would also be a limitation. 

Tuesday, December 16, 2014

exporting anu fonts to unicode

At long last, found a web tool to convert anu fonts - used by the Telugu team to create pagemaker documents, exported to pdf - to unicode, for pasting in Wordpad and so on.

https://www.google.co.in/search?q=export+text+anu+fonts+telugu

http://crossroads.veeven.com/2010/11/15/converting-text-from-anu-to-unicode/

I used the second link, Dynamic Font to Unicode convertor, and got reasonably OK results. 

Monday, December 08, 2014

large file download and unzip

Just documenting the time taken etc. - downloading the 98 GB zip file from ESO's website,

  • On my machine with a single download segment, 3 Mbps, 3 days estimated, with our 10 Mbps network. 
  • On R's machine at college with their 1 Gbps network, Sat-night, Sun-morning, 4 segment download at around 15 Mbps. 1.5 MB per second. 15 hours. 10 segment download might have been faster. 
  • Copying from their NAS over their 1 Gbps internal network to the external hard disk - half an hour. 
  • Unzipping on my machine - around 4 hours with 7-zip. 

Friday, December 05, 2014

godaddy dns editing

One of my colleages needed some help with editing the DNS records on godaddy. The interface is not the easiest to navigate: In godaddy site -> expand domains by clicking the + sign to the left -> click Launch for the required domain -> Click on DNS Zone file tab, make edits there. 

Thursday, December 04, 2014

internet radio, AppleTV etc and possible local issues

The Logitech internet radio of our neighbour was "not working". Found that the radio had some issues connecting when their ip camera is streaming. If the internet radio is started before the camera, then it can play even when the camera is on. Possible mitigation by reducing the frame rate or resolution of the camera image for reducing its network usage.

In case they think of the Apple TV or Roku, the internet connection may need to be upgraded. Some Indian reviewers mention that Apple TV needed > 5 Mbps for smooth video. Apparently Apple TV does not support live streams. So, the live broadcasts can't be watched (without airplay and another apple device, of course) only after the program concludes can those programs be watched. Maybe support for live will come later, like for the iOS app.

Similarly, the Roku Youtube app also has limitations, it apparently works only in US, UK, Canada and Ireland.

Here is a nice review of many of the current set top boxes, but US-centric
http://thewirecutter.com/reviews/roku-3-best-streaming-box/

Wednesday, November 19, 2014

firefox caching iframes

Today, P asked me to do a website update by ftp. But after putting in the required file, the youtube video in the embedded iframe did not change when I checked with Firefox, so I wondered if the correct file had been modified. Even refreshing the page did not help. Safari showed the correct iframe, so I cleared the Firefox cache, and then the correct video appeared. 

Monday, November 17, 2014

video stutter issue

I needed to increase brightness and contrast in a video warped with GL_warp2Avi but when I just loaded the video into virtualdub and tried to do it, vdub was reading the video two frames forward, one back and so on. Not sure whether the problem is with the xvid codec used, or with GL_warp2Avi or with vdub. Anyway, the workaround was to make an avisynth avs file with just directshowsource("myfilename.avi") and use that as the source for vdub. That worked fine. 

Sunday, November 16, 2014

Airtel and Reliance speeds

P got USB dongles for M - Reliance and Airtel. The Reliance data plans are cheaper, but the speeds are lower. Airtel speeds are higher and the tariff is higher too.

Speedtest.net gave Reliance 0.9 Mbps up as well as down. Airtel got 2.5 Mbps down, 0.5 Mbps up. This was done in the afternoon around 2 pm, so the networks were probably not congested. 

Saturday, November 15, 2014

adventures with a Xiaomi Mi3 phone

Was gifted a Xiaomi Mi3 phone in mid October. Now that I've used it for nearly a month, can write a bit about it. As the reviews say, it's a very nice phone, looks very distinguished. The few disadvantages from my point of view are maybe the large size and the slippery feel of the metallic body. Also the audio quality of the built-in headset needs a bit of tweaking - too much bass, making conversations somewhat unintelligible sometimes. Privacy concerns may have been addressed by the firmware update which I have applied.

Just a day or two after I got it, it fell into water and was completely underwater for a second or two, during a power outage when I was using it as a torch. Switched it off as soon as I fished it out, and kept it for 24 hours in an airtight container with raw rice for drying it. Then kept it on top of a warm fridge voltage stabilizer for another 12 hours to ensure that it has dried, and then switched on. No damage to normal operations, except for a sort of water stain which can be seen on the screen when the screen is completely white.

The processor + GPU is more capable than my work computer in playing high bitrate high resolution videos. For eg. a 10 Mbps 2K video which played at 0.5x on my laptop played back perfectly on the phone, using ES File Explorer to read it over a shared volume. The phone's 1920x1080 screen is higher res than my laptop's 1280x720!

Skype, Viber, Youtube etc etc all work without a hitch, and the mobile browsing experience is really good. The touch response is iPad-esque, not skittery like the cheaper Samsungs. Another good point is that the lock screen swipe does not happen accidentally from the pocket, unlike my earlier HTC. Overall, very happy with it. 

Tuesday, November 11, 2014

automatic deletion of files

PB had set up a cron to automatically delete files from a shared folder two weeks after they were put there. But folders were not being deleted. Now, he updated his script.

Earlier it was

/usr/bin/find  /path/to/folder/expires/* -ctime +15 -exec rm -f {}  \;

Updated to

/usr/bin/find  /path/to/folder/expires/* -ctime +15 -exec rm -Rf {}  \;

Sunday, November 09, 2014

Traffic causes cloudflare issue

Due to Akhanda Bhajan traffic I assume, Cloudflare was showing radiosai.org/program and associated pages inside that folder as being offline, or timed out etc, probably due to high load. I have put in a page rule by logging in to cloudflare, bypassing everything, so that cloudflare will be bypassed, and the page will load, even though it may load slowly.


(Removed this rule after a week).

Wednesday, November 05, 2014

spindles of solar system exhibit

KR noted down the speeds of the spindles of our solar system exhibit, which run using worm gears. The worm gears slip, and need to be aligned exactly for the planets to rotate. The spindle speeds are 8, 12 and 90 seconds per rotation, in the order below:

90


               8


12

(technician inside)


Tuesday, November 04, 2014

New IP for Server with Reverse DNS

Once we set up the new IP address and Reverse DNS via the hosting control panel, we were supposed to set up signing emails with dkim like
https://hnsws.blogspot.in/2009/05/signing-emails-with-dkim.html

apt-get install dkim-filter
error'd out with 
Unable to locate package dkim-filter

Looking around,
https://askubuntu.com/questions/116553/what-package-replaces-dkim-filter-in-12-04
Opendkim is what was needed - 
https://www.exratione.com/2014/07/setting-up-spf-and-dkim-for-an-ubuntu-1404-mail-server/

Wednesday, October 22, 2014

audio video sync problems persist

Even after using the SDI audio for the streaming and recording, the streaming video on youtube continues to have audio video sync issues, video lags audio by a frame or two. According to this thread,
http://atemuser.com/forums/atem-vision-mixers/blackmagic-atems/audiovideo-not-lipsync-when-using-unsynchronized-sources
we probably need an audio delay box if the Panasonic AG-HMX100 does not have audio delay built in.

Searching in the advanced operating instructions at
http://www.panasonic.com/business/provideo/AG-HMX100.asp
there does not seem to be any audio delay setting in the AG-HMX100

Audio delay units are available, this one is available in India for Rs. 8500.

Wednesday, October 15, 2014

Adobe Audition save all files

My colleague wanted Adobe Audition CS6 to save all associated files in a project into a single folder, a la Reaper or Nuendo.

On my old version of Cool Edit Pro, when you open a sesssion file and then choose File-> Save Session As, in the dialog box, there is an option at the bottom, "Save copies of all associated files". If that is checked, audition will save all the files in the same folder which you choose for saving the ses file.

But he did not have this option. Then googled and found that the answer was probably
http://helpx.adobe.com/audition/using/saving-exporting-files1.html#id_2294

File -> Export -> Session
and select Save Copies of Associated files. 

Tuesday, October 14, 2014

sitelutions stopping free dns redirection

One of the sites which had a domain redirect stopped working, and found that sitelutions.com had stopped their free dns redirection. "In October, 2014, after offering free DNS and redirection for about 14 years, Sitelutions was forced to shutdown free DNS and redirection. Over the years, the free services began to attract a significant amount of abuse, including very large DDoS attacks. These attacks would impact the services being provided to paying customers, and were very expensive to properly mitigate."

Shifting some domains to nettigritty nameservers (which were purchased via nettigritty.com), some to freedns.afraid.org and some to cloudflare dns.

Sunday, October 12, 2014

google public dns failure

Yesterday evening, radiosai.org was returning SERVFAIL on google's public DNS servers 8.8.8.8 and 8.8.4.4 - suspected because of dnssec failure. 


http://dnssec-debugger.verisignlabs.com/radiosai.org

https://groups.google.com/forum/#!topic/public-dns-discuss/4KyD2HYYcVo

https://groups.google.com/forum/#!topic/public-dns-discuss/xBjI62Kz-sw


But today it seems to be resolving OK. Checking with Cloudflare support, they said that it would probably have just been a google public dns failure. 

Friday, October 10, 2014

Java problem on Windows 8 machine

The Windows 8.1 desktop at the SSSHos.SS office was unable to use the Income tax site's java based authentication. Checking, found that even the java test applet was not loading. At first I suspected that the network firewall and proxy were blocking all java applets. But later found that other machines on the same network were able to access java applets without problems, eg the one in JHos. So, I wrote,

The following points can be checked.
1. Verify that it is a 64-bit version of java which is installed, and it is a 64-bit version of the browser (IE or firefox). If browser is 32 bit, then you need to install 32 bit version of Java also.
2. Verify that Windows Defender and or any other antivirus is turned off while testing for Java (and turn it back on after doing the test). This person found that Kaspersky was blocking the java applets,
http://www.howtogeek.com/forum/topic/windows-8-and-java-problem

But even disabling Kaspersky did not solve the issue - maybe it needs to be uninstalled? Temporary workaround is to use the JHos computer for this job. 

Friday, September 19, 2014

using virtualdub frameserver for warping tool GL_warp2Avi

Finally found a workaround for the 2 GB and avi only input limitations of GL_warp2Avi using Virtualdub's frameserver and the Avifile client bundled with Virtualdub. (auxsetup.exe).

Earlier method with AVFS - which uses Pismo File Mount Audit package to mount - had limitations - GL_warp2Avi crashed with a 3.5 GB mp4 file used as directshowsource in avisynth avs file.

With the Virtualdub frameserver, just naming the signpost file with an avi extension was enough, after the Avifile client bundled with Virtualdub was installed. Tested with 20 minute pieces with no problems. 40,000+ frames.

But in the process, found a somewhat new issue - the menu items don't appear to be visible when the GL_warp2Avi window is moved to the secondary monitor. So at present I just run it from the primary monitor. Minimizing the window did not seem to have any ill effect. Re-sizing the window would cause the output video also to be re-sized, of course. 

Thursday, September 18, 2014

Ubuntu servers needed manual ntp install

Our new servers at Dallas and Phoenix needed a manual install of the ntp daemon.

PB mentioned that
Found that the time diff between the servers was about a minute.
Did the following as suggested here   
https://help.ubuntu.com/10.04/serverguide/NTP.html

root:~# ntpdate ntp.ubuntu.com

Then I suggested checking for ntp 

And PB did the install on both machines,
apt-get install ntp

Thursday, September 11, 2014

Google Webmaster Tools verification for a domain which has forwarding enabled

Our colleagues wanted Google Webmaster Tools verification for a domain which has forwarding enabled. The standard methods did not work - even the DNS TXT record method did not work since the DNS provider sitelutions.com did not allow TXT records to be created for domains which have forwarding enabled. So, disabled forwarding, created the TXT record, and after the verification, enabled forwarding again.

We might have to do this whole process again - according to google, the verification code should remain on the server. But since we have put back the redirect, the TXT dns record has gone. So we shouldn't be surprised if google webmaster tools asks us for verification once again. 

Tuesday, September 02, 2014

batch processing on Adobe Audition

G and S had a query - how to run multiple processing steps using Adobe Audition's batch processing. Their version is probably CS6, on Mac. This page probably has the solution. First create a favorite by going to Favorites -> Start Recording Favorite and Stop Recording Favorite. Then choose that favorite in the batch processing drop-down.

repairing broken php on Ubuntu 14.04

M reported php redirects on our website were not working. Returning the php code instead. Found that php5 was not present in the mods-available folder.
apt-get install php5
reported that php5 was already installed. Our reinstall of apache after a purge had probably broken it. So, did
apt-get purge libapache2-mod-php5 libapache2-mod-php5filter  php5-cgi   php5-fpm php5
and then
apt-get install php5

That solved the problem.