Wednesday, March 20, 2013

ubuntu panel disappearing

V tried to install the Nvidia accelerated driver on the Toshiba AC100 Smartbook running Ubuntu 12.04, and his desktop panel disappeared, though clicking in the relevant place still opened the correct apps. He did not want to change to 12.10 since he preferred the Unity interface to the Lubuntu interface on 12.10.

Problem and solution seems to be described here.
http://askubuntu.com/questions/162854/launcher-icons-invisible-still-work-in-12-04

But it gets stuck as given below,
http://askubuntu.com/questions/146456/cant-restore-unity-desktop

So I just re-flashed and re-installed 12.04.

Saturday, March 16, 2013

migration of codeigniter-based site to godaddy

Successfully migrated a site based on the codeigniter framework from a generic server with CPanel to Godaddy. Went smoother than expected, though both servers were Linux servers.

While exporting database, the information_schema database is actually not supposed to be exported or imported. One has to choose the other database and then export. On godaddy, the database has to be created first, and godaddy's control panel fixes that the superuser name (of the db) and the dbname have to be the same. After this was done, came across this "No input file specified" error. The answer, via stackoverflow, was in the github docs. Followed those steps of changing the config file (in two places - in the public folder as well as the admin folder) and changing the htaccess file, choosing to save it in Unix LF style using PsPad, and problem fixed.

Edit: The admin area was broken. To fix it, had to modify the htaccess file in the admin folder, change
RewriteRule ^(.*)$ /index.php?$1 [QSA,L]
to
RewriteRule ^(.*)$ /admin/index.php?$1 [QSA,L]

and also change the admin/config/config.php file, had to set the URI protocol to Auto in order for auth to work.
$config['uri_protocol']    = 'AUTO';

Monday, March 11, 2013

Microsoft WorldWide Telescope for fulldome

The Microsoft WorldWide Telescope has planetarium features - fulldome projection, warped view as well as fisheye, and the option to use custom warp files in Paul Bourke's format. Unfortunately the tours are bandwidth hungry, and render on the fly, so that many landscapes etc are seen blurry and partly downloaded when played. The "Render to video" feature for the Tours has an option to "wait for downloads to complete" but the feature seems buggy. When I try to render a dome master, it shows the files being written, but no files are seen in the chosen folder. When I try to render low res files, like 640x480, the files do render, but apparently the file write is not able to keep up with the video being played in realtime, so the app crashes instead of doing an async render. This test was done with version 3.0.76.1

This version also crashed on my WinXP machine when doing full screen in full dome fisheye format. But later, after a system restart, full-screen mode did not crash. But it does show visible "stitch boundaries" - quite spoils the night sky look!


Since my main interest in checking out MS WWT was to try and render fulldome masters, and it does not seem to be doing that for me, I'll uninstall it for now.

Sunday, March 10, 2013

online resources for fulldome production

Tried out a few options of the many many resources available on the internet, like the ones mentioned in the Small Planetarium Yahoo Group.

  1. Tried the dome-masters available at spacetelescope.org - unfortunately, only one of them is a bonafide animation - others seem to be just a single hubble image rotated around the centre of the dome. I can do simple rotations myself!
  2. The Science on a Sphere program links to many hi-res movies - 2048x2048 on the public ftp site ftp://public.sos.noaa.gov - these movies are generally suitable only for projection on the sphere as designed, but some parts of some of the movies can perhaps be adapted for fulldome, like animations of LCROSS hitting the surface of the moon etc. In most cases, such animations may be available for fulldome from other sources, so it may not be worth the hassle to try this out. An interesting sidelight while downloading deserves a separate post.
  3. Some youtube videos like the ones from jakimsuk are available in 720p and seem to be prewarped for 4x3 projection. But the material is probably copywrited, like Spitz trailers and so on.

Saturday, March 09, 2013

downloading large files over ftp

When downloading files from ftp://public.sos.noaa.gov the connection was timing out, and the server did not seem to resume downloads correctly. So I tried downloading from our dedicated server, and then transferring from there to our machine using sftp. Worked like a charm. A 1.3 GB file downloaded in 6 minutes - 40 Mbps! Later, sftp transfer to our local machine took 3 hours or so.

1535001090 bytes received in 359.52 secs (4169.5 kB/s)

Sunday, March 03, 2013

using stellarium screenshots in planetarium shows

Tried out various options on the dome -
  1. taking screenshots from within stellarium using the Ctrl-S shortcut key or using scripting
  2. saving screen-grabs as movies using Fraps and Taksi
The difference in quality is glaring. The best quality is seen with the screenshots captured from withing Stellarium without warping. That is, when the Spheric mirror distortion option is chosen, the quality degrades.
So, I will have to go with first creating screenshots in fisheye mode, then cropping them and distorting them.

Tuesday, February 12, 2013

smooth edits without re-encoding - Avidemux

Avidemux succeeded where Virtudaldub failed.

more flipflops before finally opting for Lubuntu

I removed the Linux install from the Toshiba AC100 and restored Android in order to watch videos with hardware graphics acceleration - without acceleration, HD videos were not watchable. The saved Android backup on DVD did not work! But this post (if that page is blocked, archived version is here) saved the day, with links to working saved partitions from this location. The actual restore really takes only 5 minutes.

Installing Lubuntu once again (12.10, from the instructions here) took around half an hour after the flashing, since the installer needs to run from the tarball in the USB mem key and set up all the files onto the install partition. And why did I go back to Lubuntu? Because V wanted to buy the machine to use as a portable work-horse, and wanted to use OpenOffice etc.

Friday, February 08, 2013

smooth edits without re-encoding - failed with virtualdub

Tried to get smooth edits with fades without re-encoding the entire video using the following:
  • Cut the required portions in Virtualdub by choosing start - end points on keyframes and choosing Direct Stream Copy mode.
  • Made avisynth files for the portions where fades are required
  • Used Virtualdub to encode the avisynth files to avi with the same bitrate settings
  • Used Virtualdub "Append video segment" to add the files together and save the result using Direct Stream Copy mode.
Unfortunately, this does not work. The files got with Direct Stream copy and the freshly re-encoded fade bits don't work with each other, Virtualdub complains "The video streams do not share a common sampling rate" - it detects one frame rate as 30 and the other as 30.00003 fps.

Tried installing Adobe Premiere Pro CS2 - that also does not work without re-encoding (except for DV files etc.) "Smart encoding is a feature enabled in CS6."

Edit: 12 Feb - Tried Boilsoft Video Joiner  for joing the clips. Gives exactly the same error, so probably it uses vdub as the backend! But Avidemux succeeded in doing the job.

Sunday, January 27, 2013

flash player archive page

Quite useful for getting Flash for Android devices and for old versions of MacOS etc - here is the link.

Sunday, January 20, 2013

installing ubuntu on an old machine which can't boot from CD or USB

Here is a guest post by V:

Installing Ubuntu on an old machine

 
The Dell Inspiron laptop had 384MB RAM and a 30GB HDD. It was running Windows XP and was predictably very sluggish. So I thought installing ubuntu would give it a new lease of life.
 
Constraints:
  • CD drive does not work
  • BIOS does not have option to boot from USB drive 
Installation:
  • Removed the HDD from the laptop  
  • Connected the HDD as a external drive using IDE-USB connector  
  • Created two partitions on the HDD using 'Disk utility': 1GB (FAT32) and 29GB (Free space)  
  • Setup the 1GB partition for Ubuntu 8.04 install using 'Startup Disk Creator' (Lubuntu 12.04 / Lubuntu 12.10 are too heavy for the system) 
  • Plugged in the HDD back into the laptop 
  • Selected 'Try Ubuntu without installing' option 
  • In Live Mode, selected 'Install Ubuntu' (on the top right corner of the screen) 
  • Answered the questions on Language, Location and Keyboard Layout 
  • Selected 'Manual' option for partitioning the drives (as against options for 'Guided' partitioning) 
  • Followed instructions given in http://www.linuxbsdos.com/2011/05/23/install-ubuntu-11-04-on-external-hard-disk/
And that's it!

Wednesday, January 09, 2013

AmazonGlobal's free shipping - but not duty-free

Recently I got an email from Amazon - FREE AmazonGlobal Shipping on Orders of $125 or More - now available for India. But checking it out, K told me that import duties are levied at checkout, making it not so attactive. Also, only very few items are available for this free shipping to India. Import duties came to roughly 30% of the value of the product for a few which I tried out. Eg. item cost Rs. 17,000, shipping = Rs. 350 (and if we choose free shipping we save this Rs. 350) and import fees = Rs. 5000. So really not worth it. Family and friends can get small items for personal use through customs for free, this is a much more viable option.

Friday, December 14, 2012

cyberoam traffic management and QoS - solved

In an earlier post, I had mentioned how excessive "other" usage was causing issues with live audio streaming. Finally we seem to have hit upon a solution which does not need manual intervention or restarts of cyberoam.

The trick was to add a rule to reject all traffic at the Live times below the rule which allows traffic at the Live times on applying QoS rule of lower priority. There were a few hiccups due to the Live time schedule info changing during a Cyberoam upgrade - after the upgrade, we are able to set it only in intervals of 15 minutes instead of 1 minute intervals. But still, the rule appears to work fine now. I had set the traffic to be limited to 1 Mbps, and the traffic graph reflects it.

Now probably I can relax the rule to allow upto 4 Mbps traffic, but keep the QoS rule of lower priority for other traffic and higher priority for the live audio streaming.

Wednesday, December 12, 2012

more about making fulldome images from panoramas

My earlier observation about the panoramic image needing to be stretched 2.5 times vertically as a rule of thumb seems to be valid only for those pans which have exactly the same field of view as that particular pan! Trying out more panoramas, found that if the image appears vertically compressed after making the panorama, we need to crop the initial image by cutting off some of the top and bottom to make it more strip-like, then resize with stretching to a square shape, and then polar distort. The resizing to make a square is actually not essential, but it allows us to standardize on the image size as 2048x2048 etc. And conversely, if the image appears vertically stretched, add more sky at the top if cropping is not desired.

Then the pre-processing of the pans - the pan can be made straight with the help of the ruler by dragging it down in Gimp as mentioned at this page.

Tuesday, December 11, 2012

more details of rotating Pans on the dome

As mentioned in my earlier post, I'm using blender to rotate Panoramic images made into fisheye fulldome frames. By trial and error, got some insights on what looks good on our dome. A rotation from -30 degrees to +30 deg in 10 seconds is too fast. A 30 second clip seems desirable, and with only -15 deg to +15 deg of rotation.

For creating keyframes in blender, shortcut key is I (i, not L). In 3D view, select the object by right-clicking, N for numerically entering location/size values, press I after entering the desired values. Move to the next required keyframe, repeat the above. The rotations speed up and slow down at begin and end points by default - some sort of spline for velocity changes. Click on the Start and End frame to edit number of frames.

To delete a keyframe, one way is to go to Dope Sheet view, select the keyframe by right-clicking on it, and hitting the X key, or Key -> Delete Keyframes menu item.


Monday, December 03, 2012

bounce processing - flush file if too large

Bounce processing is one thing which keeps failing in the Sai Inspires list. And if the bounces are not processed, more emails will get bounced due to Yahoo and others thinking that we're spamming, and that makes the whole thing a mess.


I have been manually checking at the eventlog in phplist for the bounce processing messages. But instead of that, thought I would write a script to automatically check if the bounces file is too large - it will be large if it has not been processed, and then the processing will continue to fail, so we have to flush the file and start retrieving fresh emails as given at
http://hnsws.blogspot.in/2011/04/bounce-processing-cleanup.html

So, have written a script to run as root cron, testbouncesfile.sh, with inspiration from this post, something like this:

CURRENT_DATE=`date +%Y-%m-%d' '%H:%M:%S`
find $FILE_TO_FLUSH -size +2k

while read file; do


  echo "$file is too large = $(stat -c%s "$file") bytes, flushing it with rm   and touch." > $MAIL_FILE

  mail -s "Automatic Bounce message check at $CURRENT_DATE" -c $MAIL_COPY $MAIL_DESTINATION < $MAIL_FILE

  rm $FILE_TO_FLUSH
  touch $FILE_TO_FLUSH
  chown therelevantmailaccount:mail $FILE_TO_FLUSH
  chmod 660 $FILE_TO_FLUSH

done

The cron runs as root for the permissions required. I'd tested it with a dummy mail file which I tried making bigger / smaller etc. Today, 6 days after I made the script and put it in the cron, I got a mail from root with /var/mail/relevantfile is too large = 9209549 bytes, flushing it with rm and touch.

Virtualdub audio filter graph manipulation

Googled for help in manipulating the graphs in Virtualdub audio filters. Found this page which explains how to add and remove connections.
"To connect filters together, drag from an input pin of one node to the output pin of another. (Counter-intuitive, eh?) .... As with nodes, connections may be selected and deleted."

Sunday, December 02, 2012

f4v post-processor for playing f4v files

B wanted the audio from some f4v flash video files. Though I had flash video directshow codecs, the files were not opening in Virtualdub using AviSynth. Googled and found this page which guided me to the Adobe download site, where this explanation is given:
"Adobe Flash Media Server version 3.5 and later and Adobe Flash Media Live Encoder 3 can record content in MPEG-4 (F4V) format using an industry-standard recording technology known as "fragments" or "moof atoms." Some MPEG-4 compatible tools and players do not support moof atoms, and therefore cannot recognize files recorded by Flash Media Server. The F4V Post Processor tool aggregates the information from all the moof atoms into a single moov atom and outputs a new file. Use the F4V Post Processor tool to prepare F4V files for editing in Adobe Premiere® Pro, delivery over HTTP, or in video players that support H.264 and AAC formats, including Adobe Media Player."

So, I had to run the files through the f4vpp.exe and extract the audio from the post-processed files. The f4vpp process takes around 45 seconds for a 200 MB file and so on on my machine.

Saturday, December 01, 2012

irctc booking tips invalid

The new rules at the Indian Railways ticket booking site have made most of the old tips invalid. The mobile site used to be more responsive, but now booking is not allowed from the mobile site between 8 am and noon. Tatkal ticket booking is allowed only after 10 am and not at 8 am. "Quick Book" is also not allowed 8 am to noon. Also, the Tatkal ticket is available for booking only from the day before the journey date (and not two days before).

The mobile site uses user agent detection to redirect desktops to the desktop site. This detection is not so great - my HTC Wildfire with Android 2.3 has the default browser as well as Opera mobile being redirected to desktop site despite the mobile version setting being turned on. But User Agent switcher addon for firefox does the job with ease.

Edit: A couple of tips learnt from my experience this morning with Tatkal booking.
  1. Patience is a virtue - try, try, try again. On the third trial, after one hour of timeouts and service unavailable messages, got through.
  2. One timesaver would be to copy the From and To station fields in their entirety logging on to the site a few minutes before the 10 am deadline. Then, you can avoid waiting for the station pop-up, by pasting this info directly into the box. Confirmed working on Firefox.

wifi connection issue with HTC Wildfire

This morning, the HTC Wildfire refused to connect to wifi at work - kept saying "Scanning" after wifi was enabled. Reboots did not solve the issue. After I took it home too, it continued to refuse to connect. Many scary scenarios are described on the web, like having to do a factory reset. Anyway, turned on Airplane mode, turned off Airplane mode, and hey presto, wifi working again. In the evening after going back to work too, it connects without a hitch.

So, the solution was a simple Airplane mode toggle. Probably some hidden bug.