Thursday, March 24, 2011

problems during first fulldome show

So we had our first fulldome show - two shows actually. The problems we faced were:

  1. projector doesn't switch off with remote - have to lean around to switch off using the button on the unit. Another workaround is to change the input to another non-active input and then power off.

  2. avs files give error on first try, intermittently - this seems to be because the machine and or hard disk cannot keep up. Solution is probably to render the AVISynth files as avi files.

  3. alignment may be improved - probably increasing the height of the mirror might help to reduce the height of the horizon at the front of the dome, by increasing the angle of tilt of projection.

Another innovation would be to remove the need for the 110V system altogether - currently used only for lighting - by using the video projector itself for lighting. Still frames like the one below, made into movies with AVISynth.



Tuesday, March 22, 2011

avisynth and virtualdub for fulldome show

After warping with tgawarper, and rendering with virtualdub to make a movie, decided to do non-destructive edits with avisynth for making the credit appear at the beginning (so that the audience wouldn't walk out during the end credits!) and for the intro and outro videos. For the intro and outro videos, it turned out that taking 4:3 video as the source, I could just make the video occupy a 640x480 rectangle near the bottom of the 1920x1080 screen, and it would come out reasonably well though much enlarged when reflected with the mirrordome. This conclusion was reached after much trial and error using the General Quadrilateral Transform filter from here. The settings were as follows:



1000 - 520 = 480 and so on.

Except for simple FadeOut and Trim commands, the intro video was relatively straightforward. The show video itself had some extras, including a subtitle call for adding the Indian voices to the credits. The file was as below:

video=DirectShowSource("TSPOG_2k_w.avi")
audio=WavSource("TSPOG_IN_stereo.wav")
mix=AudioDub(video,audio)

Trim(mix,0, 3085)
++ subtitle(Trim(mix,39024,40504), "Indian voices: K, A, V", -1, 1000, align=2, 651, 699)
++ FadeOut(Trim(mix,3116, 37816),60)


The last line being actually on a single line with all the ++ etc. The outro also had some gymnastics because of an extra line of audio I wanted added. This was before the Virtualdub quadrilateral transformation:
video=Trim(DirectShowSource("VTS_01_2.VOB"),750,4690)
blank=BlankClip(video,length=750, color=$000000)
blankaudio=DirectShowSource("30sec_48k.wav")
video_pre=AudioDub(blank, blankaudio)
video_pre ++ video


Finally, all the three - intro, outro and the show itself - were put in a KMPlayer playlist, a .KPL file.

Friday, March 18, 2011

MediaWarp3​D evaluation

Tried out MediaWarp3D - had been in touch with one of the guys involved in developing it. Priced at $995. On my machine - Athlon X2 Dual core at 1.9 GHz, 2.75 GB RAM, nVidia GeForce 9100 M G - only one of the two windows could be running for a full fps Real-Time Warping. If both windows were open, drops to 15 fps or so. Has options for 3D, but since I neither have the hardware nor the content, couldn't test the 3D part. A screenshot is here.

rate of sending emails

This morning, there was a gateway mixup - the SMTP firewall rule was pointing to a disabled gateway, so the emails did not go through. After I changed it, checking the number of mails pending with sudo qshape incoming active deferred found that the mails were going at the rate of approximately 20,000 per hour. Of course, services like yahoo which had rate limiting would queer the pitch, but otherwise this was the rate for a 1 Mbps line, I believe.

Wednesday, March 16, 2011

bat file to start IMs

Going offline in three chat apps and coming back online later was a bit of a pain. So, exiting them instead, and made a bat file to start all three of them at once. But for running Windows apps in a BAT file, and to continue execution (similar to putting a task in the background on *nix) the syntax is:
START C:\Progra~1\PATH\TO\FILE\IN\DOS\STYLE\file.exe

migrating mail from GMail to Google Apps and so on

While discussing the sssihl migration, where they have an edu GApps account and hence can use GApps IMAP migration tool, S mentioned that some other institutions like MedTrust had similar requirements. But they're using the Standard (Free) Edition.

For just a single account to another account, the migration would be possible, though slow, by just adding both accounts as IMAP accounts on a desktop client like thunderbird, making sure that emails are retrieved completely and not only headers, and dragging and dropping from one account to the other, as given in this discussion.

In the link above, the popular answer is the way it's being done with the IMAP migration tool on the Edu version. But the lifehacker link just below that gives this other method.

Tuesday, March 15, 2011

transferring files to a Nokia phone

N wanted me to transfer some mp3s to a Nokia music phone. First try with the data card directly inserted into the card reader did not work - probably because the card reader can't read high density SD cards or something like that. Then tried by connecting the phone via usb and using Nokia Phone browser. That opened up Windows Media Player, and asked it to transfer files. But when we attempted to transfer, it would say "An error occurred". Finally got the job done by transferring to my SD card, then transferring from my phone to the Nokia via bluetooth. One future possibility is attempting through Nokia PC suite.

Thursday, March 10, 2011

phplist attachment size limit

There were issues with the shared internet connection being swamped by the Sai Inspires emails, especially when they were sent late. P wanted me to set an attachment size limit in phplist, so that the email attachment would be 20 kB instead of 100 kB as was done recently. Went through the docs, did not find any such parameter in phplist except setting file upload limit for php itself, as given at this post.

Since the upload_max_filesize attribute is of php itself, not of phplist, I was afraid of breaking things if I set it in php.ini, so did not do so. Instead, the current solution is to not embed images at all inline, and to just link them instead as in Sai Spiritual Showers. A link to the online version makes it easier for the 'linked image challenged' email clients.

changing virtual postfix hosts and testing SMTP with telnet

As given in my earlier post, the only change required was to change the line
virtual_alias_domains = whateverdomain.com
in /etc/postfix/main.cf and accordingly make changes in /etc/postfix/virtual running
sudo postfix reload
sudo postmap virtual
afterwards. Actually I ran the postfix reload after the postmap also, just to be sure. For testing, using telnet as given in this technet article, telnet on port 25 to our machine failed from dreamhost. Tried restarting the network, firewall box, etc, but probably dreamhost has blocked port 25 for spam-blocking. Restarting network was
sudo /etc/init.d/networking restart
by the way. Finally tried it from our colinux machine, there it was working fine.

telnet our.mail.server.radiosai.org 25
Trying 111.111.111.111...
Connected to our.mail.server.radiosai.org.
Escape character is '^]'.
220 our.mail.server.radiosai.org ESMTP Postfix
MAIL FROM:whatever@yahoo.co.in
250 2.1.0 Ok
RCPT TO:whoever@whatever.in
250 2.1.5 Ok
DATA
354 End data with .
Subject:2nd test
One more test email.
.
250 2.0.0 Ok: queued as 491ID14E8EC
^]
telnet> quit

Wednesday, March 09, 2011

backing up phone contacts

I've not tried them myself, but A at the Studio said these were good:

1. Google Sync for your phone
2. www.mobical.net
(this one seems to have moved to
https://www.everdroid.com/
)

deleting a gateway in Cyberoam

Our ISP changed, and suddenly I had to delete a gateway on the Cyberoam which was no longer active. With the gateway still existing, the device was unstable and not allowing incoming connections. First took a backup as P advised, System -> Manage Data -> Backup Data. Then, going directly to System -> Gateway -> Manage Gateways and trying to delete it gave the error message
Gateway used for pool(s) or Acting as Effective Gatway or assigned to firewall
rule cannot be deleted
(sic)
So I went to Firewall -> Manage Firewall and removed all the firewall rules relating to virtual hosts which mentioned that gateway. Still no dice. Then removed those virtual hosts too. Still no. Then removed the relevant host names from Firewall -> Host -> Manage. Still no. Then, during a support chat with Tech support, thought about other firewall rules, outgoing rules for eg. Lan to Wan and so on. Went through those, in a couple of them the old gateway was the Primary. Modified the rules suitably, then the gateway could be deleted.

Friday, March 04, 2011

ip address change and cyberoam changes needed

After getting a new IP address and a new ISP, did the following changes to cyberoam.

1. Delete firewall rules using the relevant virtual host(s) which reference the old ISP ip addresses etc. For this, you have to go through all the firewall rules - even things like DMZ-DMZ etc.
2. Delete the relevant virtual host.
3. Create the corrected virtual host - basically only the External ip address changes.
4. Make the firewall rules again! Here, things like DMZ-DMZ rules are made automatically, when the WAN-DMZ rules are made.
5. Modify host group (if any) to add the new ips. We had the group of machines which were allowed to ssh. For this, first create a relevant host name, and add it to the group while creating it.

All these changes took around half an hour.

Later I had to change the ip addresses pointing to the web server and so on.

Edit: After 24 hours, learnt from experience :( that I should have updated the spf txt dns records before-hand! All gmail emails went to spam. Anyway, I have done so now...

Tuesday, February 22, 2011

sql injection

Tried out HackBar for firefox to check for SQL injection on our sites. Basically followed this article's walkthrough. Lots of useful links at this stackoverflow post, in the comments. Especially the Oracle tutorial.

Sunday, February 20, 2011

Reviving a Transcend 256 MB pen drive

S wanted me to try and revive a 256 MB Transcend USB flash memory pen-drive. Plugging into an Ubuntu machine and checking fdisk -l showed it was formatted as FAT16. Probably there was also some corruption since he reported pulling it out while Puppy was formatting and/or partitioning it! Anyway, a quick mkfs -t vfat /dev/sdc1 did the trick, working fine now.

Friday, February 11, 2011

new A record

Added a new A record for our alternate ip address, krishna.sssmf.org

adding a mail relay

Re-created a virtual mail server relaying mail to alias addresses on our current server just like in my previous posts

http://hnsws.blogspot.com/2006/03/finishing-postfix-configuration.html
http://hnsws.blogspot.com/2006/03/using-krishna-to-forward-mails-to.html

Just had to do postmap /etc/postfix/virtual after the cf file etc update. This new machine did not start refusing emails for krishna.radiosai.org after adding the virtual domain. Added appropriate firewall rules to the gateway, of course. Just a note: in /etc/postfix/main.cf,
mynetworks = 127.0.0.0/8
does not need to be changed. Changing this is only required if you want the postfix to relay mail (without auth, for third-party domains - an open relay!) from some other ip address also.

Saturday, February 05, 2011

winamp not playing wav files - resolved

For many months, my WinAmp installation was not playing wav files, but was playing mp3 files. Today I finally worked out that the in_wave.dll was missing. And the reason was given in this post - I had installed Winamp Lite at one point of time, and that does not have wav support. Installed WinAmp full now - Lite is no longer available - and now it plays wav files without problems.

Friday, February 04, 2011

problems with Nokia Internet Radio on E63

B had a problem with his Nokia E63 phone not allowing him to open the Internet radio app, and giving
playinit error =-5
on trying to play with s60 internet radio app which was installed later. Googling found that this was most probably due to a failed update. Suggested solution seems to be to hard-reset the phone.

Thursday, February 03, 2011

playlist in The KMplayer

Making a playlist in The KMplayer might be the solution to my issue of playing PAL clip followed by NTSC (or 30 fps HD) clip. To make KMplayer play the next file in the playlist automatically, I had to go into

Options -> Preferences -> General -> Repeat / Playlist -> Choose Play Next Album

under "When Finished (Album has been fully played)..."

Wednesday, February 02, 2011

niggling bugs with Kubuntu

Had installed Kubuntu Ubuntu 10.04.2 LTS as the dual boot on my work machine after the earlier install stopped booting. (Most probably that was due to the mbr file being deleted from c:, or becoming corrupted.) This installation also runs from a loopback device, a file on the Windows filesystem, like my earlier install.

Anyway, came across some niggling bugs. One persistent one was the error message E:Unable to correct problems, you have held broken packages.

This would pop up every time I clicked OK for Amarok to install "extra multimedia functionality" as this dialog box says.

Doing a mouse-over reveals the correct package name. Installing everything else worked fine except for Flash. The package was flashplugin-installer
Googling found this thread, and as suggested, doing
sudo apt-get update
sudo apt-get install flashplugin-installer
seems to have done the trick.

Monday, January 31, 2011

Testing our page loads and optimizing

K pointed out some excellent page-load speed resources for testing and optimizing:
http://googlepagespeed.com/
http://code.google.com/speed/page-speed/
http://modpagespeed.com/
And for testing, http://www.webpagetest.org/

As suggested by webpagetest.org , I have enabled compression on media.radiosai.org as given in this article: basically
cd c:\InetPub\AdminScripts
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true

cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcFileExtensions "txt" "htm" "html" "js"

cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcFileExtensions "txt" "htm" "html" "js"

cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcDynamicCompressionLevel 7

cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcDynamicCompressionLevel 7

cscript adsutil.vbs set W3Svc/Filters/Compression/GZip/HcOnDemandCompLevel 7

cscript adsutil.vbs set W3Svc/Filters/Compression/Deflate/HcOnDemandCompLevel 7

I have not enabled the compression for aspx and other dynamic files, I have not disabled for HTTP 1.0 or proxies as given in the last two lines: will do that if problems arise.

Also set in content expiration as 1 day from the IIS Manager. http://www.radiosai.org/ had some difficulty in setting compression, since it is a shared environment under Plesk. Did contact nettigritty team about it anyway.

Thursday, January 27, 2011

ssh-add required for Ubuntu 8.04 after ssh-keygen

On the Macbuntu running Ubuntu 8.04, when I attempted to use ssh with RSA key-based authentication like in my old post, ssh returned an error
Agent admitted failure to sign using the key.
Permission denied (publickey).


Googling found this as the first match.
Verified that running
SSH_AUTH_SOCK=0 ssh myuser@myhost
works fine with key-based auth.

Then ran ssh-add as suggested in that thread. From then on, ssh works fine.

Wednesday, January 26, 2011

keeping Windows and Linux dual-boot times correct

In this old post I had mentioned how to do it with Mandrake 10. In Kubuntu 10, the file to be edited, as per this forum post, is /etc/default/rcS
and by default it is already set to UTC=no

Saturday, January 15, 2011

downmixing to stereo

According to these posts on Hydrogenaudio forums, for downmixing 5.1 to stereo I should go with either
Lo = 1.0 * L + 0.7071 * C + 1.0 * Ls;
Ro = 1.0 * R + 0.7071 * C + 1.0 * Rs;
or
Lo = 1.0 * L + 0.5 * C + 1.0 * Ls;
Ro = 1.0 * R + 0.5 * C + 1.0 * Rs;

But I suppose in my case the C will have to be more since I want the commentary to be a bit louder.

Tuesday, January 11, 2011

direct links to listen to specific radio programs

Explored ways to give direct links to radio programs like the hidden form + javascript like the technique mentioned at this stackoverflow form post. Basically of the type

javascript code for hidden form
but all in one line. Tried making a tinyurl link out of the javascript. It works with preview.tinyurl.com, but not with the direct tinyurl link. Other url shorteners like bit.ly did not work with javascript at all. So finally decided on html forms with javascript to auto-submit.

Tuesday, January 04, 2011

updates on twitter

Started populating the twitter feed by 31 Dec using FutureTweets.com so that a twitter update box could be added to the schedule page by 2 Jan. Maybe it will be added to the home page later. Takes around 10 minutes a day or less to update. The thing to get the hang of is: which timezone to report in the tweet. For AsiaStream programs, IST is the easy choice. Other programs need some thinking.

Earlier, I'd envisaged making some sort of automated twitter posting with code similar to this blog post using php - but the coding is pending with P, and for me spending 5 minutes daily tweeting is easier.

Wednesday, December 29, 2010

printing to a receipt printer from OpenBravo POS

P had installed a new POS system on a Win7 Lenovo netbook and was having trouble printing to the USB receipt printer. It was printing, but leaving a lot of blank space at the top before printing and cutting the receipt. Finally fixed it by going to the printer properties, and in the paper settings, choosing 'Conserve paper' 'Top and Bottom'. The font is also different from the one seen in his other POS, which runs Linux. Probably because the Linux machine is printing to a driver similar to Generic Text. Trying Generic Text driver on the Win7 box gave the "correct" font, but the layout was awry. Probably an issue with paper settings for that driver, too. Anyway, since the smaller font is OK, he'll probably go with the Epson driver.

Edit: P adds:
Finally was able to get this work with correct font size.

Suggestion from this forum post.

Solution:
Epsons POS website had the latest virtual COM port software which works for Windows 7: TM Virtual Port Driver Ver.5.00aE . Assigned the printer to COM1 through the software and changed the openbravo pos settings to Printer: epson -> Serial -> COM1

Tuesday, December 28, 2010

set mime types in Plesk

Noticed that after the server migration, the pls and asx files were no longer being served from www.radiosai.org - so went into the Plesk control panel,
radiosai.org -> Virtual Directories -> Mime types tab and added
asx - video/x-ms-asf
pls - audio/x-scpls

upgrading ActiveSync and more

A brought a Toshiba Portege for me/A. When I attempted to sync it, it wanted me to upgrade to ActiveSync 4.5 from 4.2. After doing that, syncing from the old phone no longer does Contacts Sync - it says install Outlook for that functionality. So, for now, using ActiveSync merely as a connection mechanism to manually transfer files. Initially internet connectivity using ActiveSync did not work. Then changed the Connection settings on the desktop, "This computer is connected to:", changing the dropdown to The Internet



Also, as this post points out, changed the Remote NDIS host setting on the mobile so that the "Unable to obtain IP address" error stops popping up.

Wednesday, December 08, 2010

gmail pop3 captcha

Found an issue with pop3 not working on our automated bounce processing - fetchmail could not fetch mail from gmail and gapps accounts. At first I thought it was the problem with the issue reported here, and that I had to go to http://www.google.com/accounts/DisplayUnlockCaptcha

Did all that, but actual problem was a change in password from sssbpt.org. Fixed that, and everything started working again.

Tuesday, December 07, 2010

cyberoam failover tweak

By default, cyberoam failover rules checks pings to the default gateway and fails-over if the pings fail. But in our case, the default gateway itself is ususally fine, it is the link to Bangalore which fails. So, it needs to ping the Bangalore end of the link and if that fails, failover. Changed the rule accordingly in cyberoam, works well now.

Monday, December 06, 2010

upload through cyberoam - problem solved

In a previous post, I'd mentioned that the Studio people have problems uploading stuff - ftp / yousendit / vimeo et al. Found a workaround - disable virus / spam scanning in the firewall rules. You can, of course, do this for only the particular host you are uploading from.


That is, clear all the check-boxes in the last line in the image above.

Sunday, December 05, 2010

problems with kindle not connecting to wifi - solved with static ip address

K had some issues with his Kindle not connecting to his wireless router at home. He tried many things including changing the security settings to WPA and even to unencrypted. Still did not connect. Finally he put in a static ip address instead of getting the ip address from the router, and this worked like a charm. So, don't rely on the DHCP server running on routers for connecting mobile devices. I did not even try to connect my Windows mobile to Airport at home with DHCP, since even my Windows laptop had problems with the Airport's DHCP. Static IPs work with no problems.

K was initially turned off since a DNS server IP address is required. You can always give the google public dns ip address of 8.8.4.4 or 8.8.8.8 if your router itself does not do a good job of providing a stable dns server. OpenDNS is also available, 208.67.222.222 and 208.67.220.220

Thursday, December 02, 2010

uploads problems with Cyberoam

The Studio people have problems uploading stuff - ftp / yousendit / vimeo - using the Cyberoam 50ia as the gateway. For all of last month, P was directly connecting a laptop to the gateway directly for uploads. So is there a solution with Cyberoam support, or do we have to make a workaround with another router etc?

Wednesday, December 01, 2010

thumbnail images for saicast

Ran a thumbnail factory this morning for saicast, generating 15 thumbnail images. On DG's guidance, this was my procedure.

Saved http://saicast.org/images/gangacanal.jpg on my system as saicast4x3.jpg

Opened it in Gimp and found the dimensions of the image alone excluding the frame to be 171 x 127

Then, opened the vimeo videos one by one, played them till a suitable frame, paused and hit printscreen, pasted into Gimp, cropped to a suitable 4x3 frame, resized to 171x127, pasted into the selection on saicast4x3.jpg and then exported as whatever.jpg.

Wednesday, November 24, 2010

live streaming with stock laptop

Used the daily-use machine for live streaming on 23 November, with just its built-in soundcard. Reaper was running as something for me to monitor the waveform and also as an archive copy of the stream. Srv ran the mix through his Yamaha mixer from Chennai and used the Alesis compressor from the Studio to give me a compressed mix. My nominal input level for 0 dB for -10 dBV signal was as shown.

I rode the rec-level fader since Srv was monitoring before the compressor. Maybe next time a better choice of compressor settings can avoid my having to ride the faders. Anyway, output level was respectable, near -12 dB RMS, after the first few minutes when I was not riding the faders close enough and the compressor was not set on the output.

Saturday, November 20, 2010

direct download to kindle

Playing around with the Kindle got for A - Latest Generation Wifi. Can download directly to the kindle by browsing gutenberg.org. But can't load to the kindle from email attachments. I think it's because the kindle's experimental browser does not support redirects and most webmail services have a redirect for attachments. Pointing the kindle to the direct link after deciphering the redirect's URL encoding, it loads the content with no issues. This works with the content emailed by yourkindlename@free.kindle.com too.

Sunday, November 14, 2010

smtp timeout errors

After introducing the Cyberoam 50ia as the gateway at the studio, there were some teething troubles. When one of the two redundant links went down, the device would refuse incoming connections on the other link also. The management services would then have to be restarted from the console. Also, occasionally krishna had some smtp timeout issues even after the links were up. These were solved by restarting krishna.

Friday, November 12, 2010

qshape for checking postfix queue

One of the tools for checking the sending of our emails - qshape.
Some results from 5 days back when the problem was first detected:

sudo qshape -s incoming active deferred
shows
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 33626 0 0 0 0 0 0 0 4 9645 23977
radiosai.org 32886 0 0 0 0 0 0 0 4 9645 23237
sssbpt.org 740 0 0 0 0 0 0 0 0 0 740
Out of these mails, most of them were yahoo.

sudo qshape incoming active deferred
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 33623 0 0 0 0 0 0 0 4 9645 23974
yahoo.com 24602 0 0 0 0 0 0 0 3 6365 18234
yahoo.co.in 7809 0 0 0 0 0 0 0 1 2903 4905
airtelbroadband.in 154 0 0 0 0 0 0 0 0 30 124
yahoo.in 127 0 0 0 0 0 0 0 0 72 55
spml.co.in 82 0 0 0 0 0 0 0 0 20 62
lycos.com 67 0 0 0 0 0 0 0 0 13 54
.... snip .....

Wednesday, November 10, 2010

bug - some files not imported into database

When there is a file with the same download file name (spaces replaced by underscores) being imported, the import script silently fails. The workaround would be to change the download filename of the old file in the database and then do the import.

importing files to downloads without playing them

1. Create playlists for the required files. Don't forget Signature tune. Choose a date in 1985 or something like that.
2. Enter suitable date in /home/sgh/scripts/playlist_import_hardcoded_date.sh
3. Then we can run playlist_import_hardcoded_date.sh to get the csv to the radiosai.org database
4. Then go to http://localhost/mkcsv/csv.php?date=01&month=01&year=1985 (or whatever date) to upload csv
6. Then go to radiosai.org and import the csv of the correct date.

bounce processing for yahoo and new ip address

Found a lot of delays from yahoo mail servers, deferred connections and so on. At first I thought it was just due to the new ip address - found that it was listed in Spamhaus, and sent in a request for removal from Spamhaus.
Contacted yahoo using their bulk mail contact form. Their reply said
After looking into the issue, it appears that your emails may have become de-prioritized due to a number of potential issues with your mailings. Please visit the following URL for information on improving list maintenance:
http://help.yahoo.com/l/us/yahoo/mail/postmaster/errors/postmaster-23.html
http://help.yahoo.com/l/us/yahoo/mail/postmaster/basics/basics-55.html
http://help.yahoo.com/l/us/yahoo/mail/postmaster/errors/421-ts03.html
The last point was about too many non-existent email addresses - and found lots of such errors in mail.log

Digging deeper, this is what I replied to yahoo:
Going through your checklist, and checking out our bounce processing, found that the bounces from yahoo were not being processed! The reason being that yahoo mail servers don't send the bounce messages, our mailer daemon has to send the bounce message, and this was not being sent to user noreply - user did not exist! This meant that more than 100 - 200 bad yahoo accounts have been sent mail from our server for the past several months! We're weeding out the bad ids - done some manually, rest will be processed by the bounce processing mechanism of phplist over the next week.
Actually there were around 400 bad mails of yahoo domains and a few from other domains. Unsubscribed the yahoo ones manually by digging through the bounces one by one using the gmail interface. The others will be caught by the bounce processing in due course.

For getting the bounces to the right place, I just had to create a noreply user, and put the following lines in a file /home/noreply/.procmailrc
MAILDIR=/var/spool/mail/noreply #The location of mail directory
:0
! our.bounces.email.id@gmail.com


After I sent the email to yahoo, they replied, saying in part,
Yahoo! Mail accepts a maximum of 20 messages per SMTP connection. We encourage you to cap the number of messages you send to Yahoo! Mail to fall within this per-connection limit.

My reply to that was:
We're running postfix > 2.3 which does not have a direct way to limit number of mails sent per connection.
http://www.postfix.org/CONNECTION_CACHE_README.html#limitations

Hopefully our server will reconnect OK with yahoo servers on dropping connections - our logs don't show any problems with that. We're still in the process of weeding out bad addresses. Once we finish that, hopefully, we won't irritate the yahoo MX servers as much!


In addition, I have now put
smtp_defer_if_no_mx_address_found = yes
in the /etc/postfix/main.cf - Default was to bounce mail if MX record not found, i.e. if DNS fails. Now changed to wait and retry for upto 5 days or whatever message age time is set.

Friday, November 05, 2010

download link from vimeo

Initially there was a requirement that we make the videos of MoL downloadable. P and I checked out various ways to do it from vimeo itself, since uploading duplicate copies to dl.radiosai.org would be not only tedious, but also tough on the server! Guided by this shell script, where he uses curl or wget to retrieve
http://www.vimeo.com/moogaloop/play/clip:${VIMEO_ID}/${REQUEST_SIGNATURE}/${REQUEST_SIGNATURE_EXPIRES}/?q=sd" > ${VIMEO_ID}.flv
where he gets REQUEST_SIGNATURE and REQUEST_SIGNATURE_EXPIRES from

VIDEO_XML=`${GET_CMD} http://www.vimeo.com/moogaloop/load/clip:${VIMEO_ID}`
REQUEST_SIGNATURE=`echo $VIDEO_XML sed -e 's/^.*\([^<]*\)<.*$/\1/g'`
REQUEST_SIGNATURE_EXPIRES=`echo $VIDEO_XML sed -e 's/^.*\([^<]*\)<.*$/\1/g'`
P made a very elegant PHP5 script based on
$xml = simplexml_load_file("http://www.vimeo.com/moogaloop/load/clip:$id");
$request_signature = $xml->request_signature;
$request_signature_expires = $xml->request_signature_expires;
$downloadurl = "http://www.vimeo.com/moogaloop/play/clip:$id/$request_signature/$request_signature_expires/?q=sd";
Unfortunately our server did not have PHP5, and PHP4.x did not have the simplexml functions. So I modified it to use curl using the code example from this page and using the value_in() example from this page.
$xml = get_html("http://www.vimeo.com/moogaloop/load/clip:$id");
$request_signature = value_in("request_signature", $xml) ;
$request_signature_expires = value_in("request_signature_expires", $xml) ;
$downloadurl = "http://www.vimeo.com/moogaloop/play/clip:$id/$request_signature/$request_signature_expires/?q=sd";
echo "<p align = \"center\">";
echo "<a href=\"";
echo $downloadurl;
echo "\">Right-click here and choose 'Save Link As...' or 'Save Target As...'</a>";
Attempls to avoid the 'right-click instruction' did not work, since the vimeo server sends the video as mp4 without a Content-Disposition attachment header, and redirects don't conserve headers. Finally, of course, the script was not used due to non-technical reasons....

Saturday, October 30, 2010

setting a web page to expire on IIS

This is useful for pages which are frequently updated. If this is not done, visitors complain that old content is seen on the page; we need to keep telling them to refresh the page.
Instead, do as shown in the screenshot below.

Thursday, October 28, 2010

cyberoam configuration

Sat with P configuring the Cyberoam CR50i for quite a few hours - 1-4 on two afternoons and 8-11 last night.

Actually info on what we needed to do was there in the knowledge base, what we were doing wrong was
(a) using the hardware ports to create sources for port forwarding while creating virtual hosts, and
(b) not creating simple Accept firewall rules with the virtual hosts as the destination.

So, first go to Firewall -> Virtual Hosts and create as required:


Then the firewall rules to allow connections.


We had to make a similar rule for Wan also, of course.


One more thing which we needed to do was to disable the Web console of cyberoam from WAN. This was found in the User Manual, blandly located in Firewall -> Local ACL

Wednesday, October 27, 2010

the fickleness of printers

While printing to the USB attached printer, I plugged in an external hard disk to another USB port. And the printer stopped mid-job! And wouldn't resume! Had to restart the computer and the printer to continue printing. So, moral of the story - don't do anything to tick off printers!

Friday, October 15, 2010

8 hours recording time with the Transcend MP330

More on recording with the Transcend MP330 - I didn't charge it yesterday, so that I could check out the recording time on one charge. From 13th evening, more than 8 hours recording time over 40 hours. That's good going.

Recording with the built-in mic is almost useless, though. Even the priests chanting more than 5 metres away makes it saturated.

making chages to Daylight Saving Time dates

The dates when Daylight Saving Time starts or ends for various countries varies from year to year, and periodically we have to update our schedule page's database. Earlier, I was doing it manually one by one, changing something like 30+ records. This was both painful and error-prone. This time, I made some SQL queries to make it relatively painless. I've saved them locally as zonestoupdate.txt - queries along the lines of
UPDATE `radiosai_zone_master` SET `dstEndDay` = '31' WHERE `dstEndDay` =25 AND `dstEndMonth` =10
for countries in Europe etc.

Tuesday, October 12, 2010

recording with the Transcend MP330

I'm using the Transcend MP 330 for recordings in PC, using it's line-in with a Tascam US-144 as a pre-amp. For powering the US-144 - it needs 500 mA through USB cable - I used the old Tangerine iBook.

The first session had the level set too high - all the way up on the US-144's line-out control. For the second session onwards, set the line-out to 50% - that seems to be the sweet spot. This particular US-144 seems to have something wrong with the right line-out (or maybe the right input) with a continuous hum/hiss. But not too bad - when the input is turned down to 50%, the S/N is good enough so that the hum/hiss is drowned in ambient noise.

Monday, October 04, 2010

running 1920x1080 on saispace2

As noted in my last post, I tried out a GeForce 6200 card borrowed from P. It had a DVI out, so I tried connecting it to the monitor with a DVI to VGA adapter. Maybe because the output was DVI-D and not DVI-A the monitor did not show any display. No DVI cable to test direct DVI connection, either. And no display from the integrated AGP, since the AGP card in the slot probably overrides the integrated graphics.

Then, tried seeing the tech specs of the integrated Intel 865 graphics. Apparently it supports upto 2048x1536. Various forum posts say that with Linux drivers, people have used 1920x0180, and recommend Windows users to update the driver. Accordingly updated the driver to version 14.17, released in 2007. Now when I disabled "Hide modes that this monitor cannot display" and chose to list all modes, 1920x1080 was listed! Directly viewing it on the LG Studioworks 221U 21 inch monitor showed the desktop as spanning more than the viewable area, with the mouse making the screen pan when taken out of left or right end of the screen. The 1080p video played without any stuttering, and the Optoma EP 1080 projector displays it just fine. And when the VGA out of the Optoma is connected to the LG monitor, it displays the whole screen, with a mode of 67.5 kHz vert. 60 Hz horiz. Since the Samsung Syncmaster 753 Dfx with the touchscreen upstairs is supposed to support 30-70 kHz, maybe it will even work with the touchscreen.

Sunday, October 03, 2010

trying to run 1920x1080 with the Matrox card

In order to play the MirrorDome videos, I need a computer. The tests were done with my laptop, which could comfortably play 1920x1080 at native resolution, since it has nVidia graphics - GeForce 9100M G. Trying to run on saispace2 was altogether different. It has a 2.7 GHz P4 processor, so it should be capable of playing 1080p. But the integrated Intel graphics can only go up to 1600x1200, though it plays the video fine. With the Matrox G400, the driver in WinXP doesn't seem to be accelerated. (Also, 1920x1440 is available, but not 1920x1080, even when "List all modes" is enabled.) So, the video plays at something like 1 fps! Tested the mga driver using puppy linux 5.11 - that too doesn't play the video. Now probably I will test with a graphics card "borrowed" from P.

Meanwhile, the network card stopped working on saispace2 - the device was just not seen on device manager, and was not seen in Linux either. Maybe due to inserting it without unplugging the power from the cabinet. Swapped it out for another DLink DFE 538 TX card, same problem. Then tried an old 10 Mbps card, NEC compatible - that one is working.

Tuesday, September 28, 2010

printing to USB printer using Command prompt

Found that the way to use the command prompt to print to a USB printer is by sharing it and using the net use command to map it to a printer port. But then, when I did
net use lpt3: \\mymachine\shared_name /persistent:yes
it gave me the error message
The local device name has a remembered connection to another network resource.
I tried restarting the machine, but the error still remained. So I just mapped my USB printer to lpt3 instead of trying to fight with Windows.

Sunday, September 26, 2010

printing to centronics printer from USB

All these days, I was printing to the MSP 345 24-pin Epson compatible printer from my laptop over the network, since the laptop did not have a parallel port. Today I tried out a USB-36-pin Centronics cable, so that I can directly print from the laptop which has only USB ports to the parallel port only printer without having to switch on another machine. Installing drivers had to be done manually, and at the point in the Wizard where Windows asks you for the port, you have to choose USB001 (Virtual Printer Port for USB) as given at this page. Then everything works fine.

Tuesday, September 21, 2010

video encoding for viewing on mobile

With the 1 GB storage card, viewing long videos on the Qtek 9100 is now a possibility. It plays low bitrate files just fine, but hiccups for higher res. files since the processor is not powerful. Resizing to 320 x 240, XviD codec at 100 kbps video and mp3 codec at 24 kbps mono for audio looks quite OK. File size at this bitrate is around 1 MB per minute. Can use virtualdubmod with avisynth for video conversion, for example.

Saturday, September 18, 2010

more apps on the Qtek 9100

With the 1 GB memory card in the Qtek 9100 mobile, I can install more and larger apps. Opera Mobile 10 was a success, but it uses a lot of memory and seems to use more network also than the previous version. Nice interface, though, and has tabbed browsing. Had to reset IE as the default browser, since Opera was drinking so much RAM it has to run standalone and takes a long time to open. For that, followed this article to download FixIE.cab (requires registration) from the xda developers forum and run it. Have not tested it yet, hope it works. Google maps was not available from the publicized link at m.google.com/maps - manually downloaded it from www.google.com/mobile/maps/ which had a link to download binary. Skype for Windows Mobile has been discontinued, but I downloaded from CNET. Flopped. Voice quality is as bad as before. Tried iSkoot for Skype. At first it said password is wrong. Some forum pointed out that iSkoot requires only alphanumeric password! Tried that, now the error message changes to "Currently unable to connect." Maybe this is because I'm in India? So, back to Fring. But some problem with installing it, "error opening the shortcut or locating the target filename" - have contacted fring support.

problems with Seagate portable external drive

The Seagate portable 2.5 inch 500 GB external USB drive started having problems with reading. Would read 1 GB or so, and then stop. On Windows, it would give "unable to read" error, while on Linux the reading speed would slow down to a trickle before starting up again after a minute. Opened it up using tips for similar drives from instructables and ifixit breaking the plastic tabs on the enclosure in the process :(
Opening the screws on the sides of the metal frame took two of us - one to push down the star screwdriver, and the other to rotate it with the help of pliers - it was so tight. Once the drive came out, connected it to a USB-Sata-Pata adapter by borrowing Sata cable from saispace2. Now the drive reads fine.

Friday, September 10, 2010

FX with Reaper

Explored some of the audio effects bundled with Reaper. Very nice. For example, ReaFir in subtract mode, does noise reduction on the fly! So, I could remove noise and record a clean signal for the keyboard even though the signal going to the PA system had lots of hum! ReaVerberate is the FX to use for a reverb-like effect for live mixes - I reduced the Wet signal to -10dB in the Live Vocal preset and used that. ReaVerb introduces a lot of delay - probably that is useful only for offline work. The JS: LOSER/masterLimiter appears to do a good job in making the output LOUD without distorting - useful for broadcast if not using external compressor hardware.

a caveat for audio routing with the Tascam US-1641

While setting up for recording with Reaper, I'd set up outputs 3&4 on the Tascam US-1641 as the channels to send to digital out, which is what I record. 1&2 are being used as headphone monitors, on which I can do Solo etc. Found that on restarting the machine, the digital outputs again go back to 1&2 by default. If the machine is put in hibernation, this does not happen. So, only if the machine is restarted, I have to go to the Tascam control panel and change the digital outs to 3&4.

Thursday, September 09, 2010

Image albums on portable devices - ebooks

To show some pictures from facebook and picasa to A, tried different techniques. One way was to just save jpgs on the phone and show it using the phone's image viewer. This is slow for many pictures and doesn't include captions. Exporting pdf from Picasa was neat, included captions also (configurable). This was using Picasa3
File -> Print after selecting the required photos. I chose paper size as 'screen' and it was quite good for viewing on phone. In the print dialog, there are options for including captions etc.

For Facebook pix, I tried the Librie toolbar which saves an LRF file. Reasonably OK, except that there will be 5-6 pages of cruft between images while viewing on the Sony ebook reader.

Copy-pasting images into google docs and exporting as pdf did not work for some reason - the images were not being seen on the mobile's Clearvue pdf reader, though the desktop pdf software shows the images. Another failed experiment was exporting to epub from RTF file etc using calibre. The epub file had all the images in one page, squashed together in thumbnail size.

Copy-pasting into Microsoft Word and printing as pdf did work, though the output was not as clean as with Picasa - the page size setting was not perfect, and resizing of images to fit the page size is not automatic.

So, maybe the best option is to save images to a folder and export them from Picasa as PDF.

Radiosai listener stats

B wanted listenership statistics for the Radio Sai Global Harmony streams. We have stats on total number of visitors served and total number of GB served. Dividing GB by no. of visitors, we arrive at GB/visitor which can be translated into no. of hours per visitor since our streams are approx 10 MB per hour. Eg. July to Dec 2009,
Data transferred - 5.63 terabytes.
Distinct hosts served - 157,032.
Average - 5.63 x 1024 x 1024 / 157032 = 37.6 MB per host,
around 3.7 hours per visitor.

Another derived metric - Total data served divided by the time period of the stats gives us average number of simultaneous listeners. We can take 250 MB as data transferred for one listener per day. Once again, in July to Dec 2009,
Data transferred - 5.63 terabytes.
Data is for - 185 days.
Average - 5.63 x 1024 x 1024 / (185 x 250 ) = 128,
around 128 simultaneous listeners on an average.

This figure has been going up steadily over the years:

adventures with tgawarper

To go forward with the mirrordome project, purchased the tgawarper software for windows from LochNess. It appears to have some bugs, as the product page itself notes -
When using the "-o output filemask" option and the filemask contains a folder
structure or drive letter, the program will prepend its "w_" onto the filemask
instead of the actual filename — instead of creating "d:/output/w_filename.tga",
it will create "w_d:/output/filename.tga" (which will likely fail). So you may
have to be creative in order to use this feature in its current implementation.

My workaround was to copy the exe to the folder which had the input images, and run it from there without the -o option, so that output also goes to the same folder.

Time taken: for
tgawarper -w 1920 -a 5 s3_%04d.tga EP_xyuv_1920.map
it took approx 2.9 seconds per frame on my Athlon X2 Dual Core @ 1.9 GHz. 36 seconds of 30 fps video, 1100 frames in an hour. Later, using Virtualdub and AVISynth to make a 6 Mbps HD movie using XVid codec, approx 2.5 fps rendering speed. The AVISynth input avs file was using ImageSource, an avs file with the following lines:
video = ImageSource("w_s3_%04d.tga", 0000, 1110, 29.97)
audio = DirectShowSource("C:\My Path\myfilename.mov")
return AudioDub(video, audio)

phone recording - good only for voice memos

Tried recording on the QTEK 9100 at 44.1 kHz 16 bit mono using the built-in mic. Saturates pretty badly for the volume levels inside bhajan hall during bhajans. Also has a rolloff at 8 khz. 30 ms lag in 30 minutes compared to the Tascam recording.

extracting video recorded on DVD - isobuster

DS had some DVDs with video which were not readable. Apparently they had been recorded with a Toshiba DVD Video recorder DVR17. The DVDs were written, but not finalized, and the session was left open according to Nero. Nero was unable to finalize it because the format is slightly different, since it was written by a hardware DVD player. I tried to get a raw dump of the data using dvdisaster, did not work - dvdisaster needs ECC data from a 'good version' of the disk to start with, I suppose. Then tried the free version of isobuster. It showed the VOB files, but required us to buy the software to extract them. DS ponied up the $30 and we got the files out.

Friday, August 20, 2010

Korg NanoKontrol and Reaper

Got a Korg NanoKontrol courtesy A2, and using it with Reaper was a breeze. Connected it to USB, XP recognized it. Started Reaper, went to Options -> Preferences -> Audio -> Midi Devices and chose the "USB Audio Device" giving it an alias and making it control only. Then, in Actions -> Show Action list choosing actions like Set volume for track 28 etc and choosing the Add button, the appropriate MIDI channel etc automatically filled in if the fader is moved. Since the NanoKontrol has 9 faders, 9 knobs and 18 buttons, it can control volume and PFL for 18 tracks from the same "scene". Since it does not have motorized faders, changing scenes is not such a good idea. I had only 14 tracks to control, the US-1641's 14 analog inputs, so this was more than enough. The earphones are Ultimate Ears Metrofi 220.





Sunday, August 15, 2010

ftp users who cannot delete files

S asked for an ftp account where users cannot delete files once they upload, with only a super-ftp user being able to delete. This was something like our old chrooted ftp, I think. Anyway, with dreamhost, this forum post suggested one way, while the Dreamhost wiki showed all the pitfalls. So, decided against it.

download filenames with spaces

Based on a visitor email to webmaster, checked out a download problem. Found that there are many Radio Sai Bhajan Classrooms which have download-file-name with spaces on the database.

Did an update to the database. Basically just
Update `files_table` SET `downloadfileName` = REPLACE(downloadfilename, ' ' , '_' ) where `downloadfilename` like '%Clasr%'

But because our database has some strange requirements on the server, it actually had to be written as

Update `files_table` SET `downloadfileName` = REPLACE(downloadfilename, CONVERT(_utf8 ' ' USING latin1) , CONVERT(_utf8 '_' USING latin1) ) where `downloadfilename` like CONVERT(_utf8 '%Clasr%' USING latin1) COLLATE latin1_swedish_ci

It updated 40 odd entries. I also then replaced Clasroom with Classroom in download file names, and later renamed in these dl.radiosai.org using lots of
mv Source.mp3 Destination.mp3
statements in a text file.

Doing this for all entries, using
where `downloadfilename` like CONVERT(_utf8 '%' USING latin1) COLLATE latin1_swedish_ci
it said updated 4 more entries.

Then updated our local database also, and again replaced all download_File_names with spaces with underscores for all entries, and Clasroom with Classroom.

firewall configuration at studio

Setting up a backup stream for AsiaStar at the Studio, implemented by PB using ices and icecast. Configuring the firewall to point to the right server at the right port took a while, because we did not remember that two rules are required - one for "allow" to the port, and one to SAT to the appropriate server. Not only are two rules required, the order is also important. The Allow has to come below the SAT rule.

"Right-click for more options" is shown in the firewall's web control panel. This works with IE when the site is added to Trusted Sites. Doesn't seem to work with firefox on linux. One of the "more options" is 'move up' for moving the rule up in the list.

Indic on the Sony Reader

Quick update on the Sony Reader PRS-300. Tried out Sanskrit pdfs. Some of them have the verses as embedded images, which are displayed, of course. Even PDFs with embedded fonts, like this one or this one are rendering quite well on the reader if not reflowed. If reflow is attempted, the font becomes completely messed up.

Wednesday, August 04, 2010

update on file deleting and newer versions of files

Uploading newer versions of files causes problems, with the older version refusing to be over-written on colinux. This happens probably due to some ownership issues, with files being copied in multiple ways using colinux / Windows / cygwin. Maybe the IIS website running with that folder as web-root is also an issue. Anyway, this time, P first tried uploading directly - sftp complained
cannot write to filename.mp3.
Then he tried deleting the files using Windows Explorer. Worked in D:, not in E:. E: complained that the file is in use by some other program or user. Tried stopping IIS and deleting, did not work. Tried deleting in colinux as root, it complained
rm: cannot unlink `filename.mp3': Permission denied
Then he tried again from Windows Explorer, and this time it worked. Two possible reasons:
(a) Colinux might have relinquished hold on the file so that Windows could delete it
(b) stopping IIS needed some time and or a window refresh before the file could be deleted.

Update: Apparently, deleting in Linux and then (after it says permission denied) deleting on Windows seems to be a working option. IIS seems to be "not guilty".

change formatting to print to a smaller paper size

A follow-up to my earlier post about printing with dot-matrix printers. I needed to print multiple pages to a different paper size. On Windows,
type filename.bin > lpt1
works best, since it can be added to batch jobs.
copy filename.bin > lpt1
works only for a single invocation at a time. Adding it multiple times to a batch job does the "copy" only once, so only one page is printed.

Till now we used condensed mode extensively. Now, found 15 cpi mode is almost as dense, but much prettier. For setting the paper size, the commands I used were, in Hex,
1B32 - sets 1/6 inch line spacing
1B43420D0D - sets the page length to 66 lines. Since it is 1/6 inch line spacing, that makes it 11 inches. The 0Ds are just padding, I think, but I added them just to be safe. Viewed a page printed to file using the printer driver in a hex editor to be sure of the way to add the 66 lines part. The command for font cpi comes last
1B67 - sets 15 cpi

Monday, July 19, 2010

extracting text from pdf

A good way to extract text from pdfs which are predominantly text, is in my case using the free Mobipocket Creator, since I have it installed anyway. It creates an intermediate html file and images extracted into a folder, useful for converting to other formats etc.

Thursday, July 15, 2010

using the Optoma EP1080 for mirrordome

Trying out the Optoma projector with the mirror sourced from Bangalore, had some issues with colour calibration. The NVidia control panel on the Acer laptop as well as the OS X display control panel on JG's Macbook both mention turning the brightness and contrast all the way up - and they are meant for flat panels and CRTs, not projectors. Mentioning sites like this for calibration to Paul Bourke, he said just leaving everything at the defaults except the gamma setting can get 90% good results.

Windows Media Encoder batch jobs

As noted in a previous post, Windows Media Encoder batch jobs can be made to work by making batch files with lines like
cscript.exe wmcmd.vbs -wme 11_1.wme
cscript.exe wmcmd.vbs -wme 11_2.wme
cscript.exe wmcmd.vbs -wme 11_3.wme

But WMVAppend needs all the files to be encoded this way, otherwise it cannot append files, even if they were created with the same wme file, using the GUI!

Friday, July 09, 2010

more updates on the Transcend MP 330

After my last post on the Transcend MP 330, some more info. The 60 ms lead was probably due to the Darla card. Recording live using the Tascam US-1641 and the MP 330, found the MP 330 to have a lag of 10 ms in 30 minutes. Which is very good.



Using the built-in mic, excessive sensitivity is a problem. Keeping it at a distance of 2 feet and talking in a normal conversational tone keeps it from saturating, but anything louder than that makes it clip. A bit of hum at 5.5kHz and 11 kHz or so. Noise-reduction removes that, of course.

using the Optoma EP1080

Finally got my hands on the Optoma TX 1080 aka EP 1080 projector which Paul Bourke recommends. It had some issues which had to be sorted out before use in the Planetarium.

The Optoma logo - Startup logo had to be made a black screen. Logo capture needed VGA input - it did not capture from S-Video. Supplying a 1920 x 1080 signal, it captured with no issues. Takes a minute or so to capture.

Turn off confirmation - When turning off the projector with the remote, it displays "To turn off, press Power button". Since this should not be displayed during the show, had to work out the turn off using RS232 or network option.

Network control - An RJ45 jack allows the projector to be controlled via an ethernet network. It has a built-in web server, and ip address can be set from the menu. Unfortunately, the manual did not mention that the web server is password protected. Found the password by trial and error, admin for the Administrator login. Once logged in, password can be disabled, so that just pressing login leaving the password field blank logs you in. The interface is not fully compatible with firefox, IE gives best results. Unfortunately, our control machine upstairs does not have a network card, so RS-232 seemed to be the way to go.

RS-232 - Tried many times with Hyperterminal, but did not succeed till, by trial and error, found the following:
(a) The projector needs to be turned on after the computer connects to the RS-232 port via hyperterminal or whatever.
(b) The string to be sent to the projector has a space in it. It should be ~0000 1 and not ~00001
(c) Autoit version 3.3.0 onwards are not compatible with Win98 etc.
(d) The control machine upstairs had no CD-drive, and since it runs Win98FE, needed this driver to recognize the 1 GB Sandisk flash drive.

Once I worked out all these, could get an autoit script to send the On and Off commands using a hyperterminal window which was opened at startup.

Time taken to autodetect - Autodetecting the S-video signal was taking more than a minute. Sending the S-video signal using RS-232 ~0012 9 after 30 seconds does the job - brings up the video in 34 seconds.

Mirror deformation - For using the projector in the mirrordome configuration, the mirror needs some support, without which it deforms under its own weight. Jury-rigged with thermocol, will try again using reduced mirror area.

Tuesday, July 06, 2010

notifications on radio silence

Following a conversation with B, I thought about ways to detect silence when SGH goes off the air on AsiaStar, and using the parallel port for detecting silence and so on. P came up with the Restless Winamp plugin to be installed at the playout server. We did that, and modified the C:\Documents and Settings\User\Application Data\Winamp\winamp.ini file by adding
[Restless Winamp Plugin]
Hit_Start_After_Millis=30000
Hit_Start_After_Minutes_Seconds=00:30

P then suggested using the sound card instead for silence detection, and immediately found the Piraside Silence Detector - software which does this very job! Hooking up a modem to the machine can then make it dial P or me when the silence is detected. But it does not work as easily as given on it's home page - a bat file with commands sent to COM1 etc don't work under WinNT or above. XP etc do not allow direct access to hardware from the Command Prompt, unlike DOS. After tests with hyperterminal etc, the solution of choice is currently autoit - using a user dll and control script to send AT commands to the modem. Just simple ATDT to dial the number, using a ProcessWait to wait for a while, ATH to hang up and so on.

Monday, July 05, 2010

adventures with Sony Readers

The Sony Reader PRS-500 had come back to me from A in December 2009, "not working". The screen was showing ghosting, taking a long time to change pages and so on. Sent it to the US for repair and or firmware upgrade. There, nothing was done since the Sony store guys just sent N to the website. Finally it came back, and found it working reasonably well. Probably the battery had some issues due to being left idle for many months, and a few charge / discharge cycles brought it back in the pink.

Because of the delays, purchased a Sony PRS-300 because R was also interested. Tried out the Calibre software, which has matured a lot since its inception in 2006-2007. Found that only the 0.6 versions and earlier support the PRS-500 with old firmware. Conversions to LRF or EPUB take 20-30 seconds per book, and there is a nice bulk conversion system.

Found a small glitch - when "merging" different versions, it is supposed to change all meta data to match the destination version. But the metadata for author in the EPUB files were not being changed. The calibre window shows the correct author name, but on uploading to the device, the device shows the original un-corrected Author name.

Transcend MP 330

Trying out the Transcend MP330. Surprisingly good recording options. 32 kHz ADPCM wav files in Best mode. 128 kbps stereo. With the built-in mic, saturates at two feet with my singing - it is a bit too sensitive. But quality is good. With line-in, AGC - automatic gain control, I think. Only 0.05 second - 50 milliseconds - lag after 45 minutes of recording. I tested it by playing back a wav file from Sathya using the Darla card, assuming that the Darla itself is close to frame-accurate. In terms of frames, for 25 fps, that would be just over one frame. Far better than the M-Audio Mobile Pre!

Tuesday, June 29, 2010

bash string processing and file renaming

For some reason, some 200 files had not been renamed on the dreamhost download server. Occasional reader emails of files not found alerted me to this.

When I checked the rename shell script, these files were not listed in it. They did have download filenames in our local database, but were not listed in the rename shell script for some reason. Manually renamed them by doing some string manipulation:
find ~ -name '* *' sort > toberenamed.txt
cat toberenamed.txt while read FILE ;

do echo mv \"$FILE\" $(echo $FILEsed 's/ /_/g') ;
done > toberenamed.sh
vim toberenamed.sh

#(to check manually and remove non-essentials)
chmod +x toberenamed.sh
./toberenamed.sh

sample searches and auto suggest

Added sample searches and auto suggest to the search wizard. That seems to make it ready for prime time, so a link also added to the Radiosai home page. Sample searches are javascript calls onclick, with the variables being initialized and the submit javascript being called. Auto suggest is simple-minded in the sense it cannot suggest after one word is typed in. For example, if Concert H is typed, it will not suggest Hariharan, but if H is typed, Hariharan is suggested. Something is better than nothing, of course. This implementation entirely in javascript is from here. The keywords were from descriptions, filenames, festival names etc. in a sort of free association. Later, sorted the auto suggest keywords with alphabetizer.

Then implemented a sort of "hit enter to submit" for the first and last pages of the Wizard. Though it follows the general idea given here, it does not seem to work with IE8. IE8 seems to ignore the Enter key entirely, and does not seem to send any window.event at all when I tested with some code which was to just give a javascript alert.

list all files which have space in them in bash and sort

The most simple-minded way of doing this would be
ls "* *"
but this would not work. This site notes the way to do it - with find:
find ~ -name '* *'
And also lists a neat way of looping through,
find ~ -name '* *' while read FILE;
do
echo $FILE ;
done

The problem is that this lists files in non-alphabetical order. To get it in alphabetical order, The Alphabetizer is available for one-time jobs like my php suggest list. For piping in bash, of course, we can use sort:
find ~ -name '* *' | sort

Friday, June 18, 2010

uploading files to web hosting

Got a DreamHost account, evaluating a move there. Preliminary tests with downloads alone. Initially copied files using ftp from our local machine. Then tried sftp from local machine. Finally the fastest way, sftp from our dedicated server - more than 10 Mbps. Some files which were not present on our local machine had to be selectively uploaded. For that, did the following.
ls /local/audio24 > 24.txt
ls /local/audio96 > 96.txt
diff -Bc 24.txt 96.txt > difference.txt
cat difference.txt grep + > onlynot.txt
onlynot.txt thus has only the files in audio96 which are not in audio24

Used this list to make a sftp batch file - find replace + with put, and put the filenames in quotes.
Had to modify it to
-put "filename.mp3"
because without the hyphen in the front, sftp would stop if any of the files were not found.

CDN roundup

Did a review of hosting solutions for upcoming events. Birthday videos etc would need CDNs. Here is an abbreviated review, with cost being the major criterion, good support also being required.
SimpleCDN - $0.02 per GB - but no response to Moderate ticket in 3 days, hence can't risk it.
CloudFront - $0.15 per GB
Velocix - did not even send a quote in three days.
Voxel - $0.10 per GB, quick and responsive support, free trial.
EdgeCast - sent a quote for $0.30 per GB at 2000 GB per month
Internap - sent a quote for Los Angeles POP alone for $0.25 per GB, else $1.32 per GB...
SoftLayer - $0.18 to $0.12 per GB (minimum $45)
CDNetworks - sent a quote for $1.00 per GB.
You can guess who we picked.

Edit: An update to this post is at http://hnsws.blogspot.com/2011/12/more-cdns.html

Thursday, June 17, 2010

first show with new compressors

As mentioned in my previous post, the new air-cooled compressors had some issues, but after changing their location, seem to be OK. But they do take more power. From an old log reading in 1998 log book of a 2009 reading (yes - 1998 book, 2009 reading) the old system had taken 75 kWhr for 9.45 am to 12.15 pm. Today's consumption was 90 kWhr for 9.55 am to 12 noon. And that too with two of the compressors going off briefly when their thermostats reached the set temperatures. Thermostats were set to 22.5-25-27.5 deg C. The theatre was less frigid than before. Hopefully when the outside temp is higher also we will have similar results. Today outside was just 30 deg C.

Wednesday, June 16, 2010

method to link directly to "listen now'

Following the method given at JGuru and other places, here is something I passed on to my colleagues:
<form method="post" name="submitForm" action="http://www.radiosai.org/program/PlayNow.php">
<input value="on" type="hidden" name="checkallcb">
<input value="on" type="hidden" name="chosencb">
<input value="22346" type="hidden" name="fids">
<input value="22346" type="hidden" name="allfids">
<input value="1" type="hidden" name="play">
<input value="0" type="hidden" name="paHours">
<input value="0" type="hidden" name="paMinutes">
<a href="javascript:document.submitForm.submit()">Click Here to Play Now</a>
</form>
The fids and allfids values will change for different programs. This 22346 value is meant for this link, ie Judy/Sharon Sandweiss interview. For other programs, you can find the fid by searching for the program in our search page, choosing the Listen link after choosing the program of interest, and seeing the code in the PlayNow.php page. For example, for this item, it has the line

s1.addVariable("file","http%3A%2F%2Fwww.radiosai.org%2Fprogram%2FPlayList.php%3Fallfids%3D22346");

Wednesday, June 09, 2010

fixing the compressors

The AC guys are here to fix the compressor trouble. Now planning to keep two of them on the first-floor parapet and only one downstairs. Temperature readings with a room thermometer kept horizontally: before we started the test, room temperature indoors was 32 deg C. After putting on one of the compressors (and the blowers) the temp near the window was 41 deg C. The theatre was being barely cooled down to 30 deg C. But at least the compressor did not trip. When we opened the windows, the temp near the window quickly dropped to 33 deg C, indicating that indeed there is an air circulation problem. Hope the two feet clearance between units upstairs will be enough! PR has some ideas of baffle walls to prevent hot air being sucked into the rear inlets, too. Hopefully with all that and all three compressors running, we can get the theatre cooled.

One more issue is with the electrical connections. The starters used and the cables used are all getting heated up with the 22 amps per phase being drawn. And that's just for one compressor! If this is normal, then these compressors are less efficient than our old ones, which used to take around 35 amps each - and we used to run only one of them at a time.

Wednesday, June 02, 2010

Attenuation required

Taking the direct outs from the PA system mixer Mackie Onyx 32.4, found that they are too hot for the XLR inputs of the Tascam US-1641. D made attenuators for me like below:

Only it was not to ground, but to signal return. Checking out the specs in the manual, found that input impedance for the XLR input is 2.2k ohm and for the jack is 10k ohm. So, made the voltage divider circuit above, with a 10k resistor on top, and a 2k below. For the XLR connector, the connection was like
red wire --- 10k resistor --- pin 2 ---- 2k resistor ---- pin 3.
Later, found similar pad circuits with pix of XLR connectors with resistors soldered in. With the attenuation, which turned out to be around 20 dB, the direct outs are fine for the Tascam US-1641, with around 6-10 dB of headroom. Here, what I mean by headroom is that the peak level reaches -10 dB or so when the Mackie direct-out is at its highest level, when the input gain control at the Tascam is turned all the way down.

compressor problems

The new compressors were installed in the second week of May, but apparently they trip within ten minutes due to overheating. 3x 11 ton units from Voltas. The AC guys are supposed to come and do something about it this month. According to a random google search, 8 feet clearance between units seems to be required. But that is for a completely unrelated product....

google spreadsheets and UI design

Multiple ways of accomplishing the same thing is GOOD. Example of a place where this is done - Reaper. Example of where this is not done - Google Spreadsheets. I wanted to "Merge cells" - had to google search for it to find it is done with a toolbar button. The Merge Cells idea came in the first place from K, who is more familiar with Excel...

Monday, May 31, 2010

the sad story of Mandir mixers

After the Yamaha AW4416 went for repairs and came back in the same state, it was the turn of the Tascam TM-D4000 to give problems. Then I shifted to lower-tech - an old Studiomaster Diamond Pro. The Yamaha had Midi working, so I tried to use it in Mandir. Reaper had a good solution for the "PFL" problem with soft-mixers - Cubase 4 LE only had solo, which was going into the main mix also, and Nuendo 3.0.2 did not have the "Listen" button assignable to a MIDI controller. With Reaper, I could make a custom action to mute the monitor tracks, and the monitor tracks were being sent feeds from the main mix tracks. The main mix goes to main out, monitor mix goes to monitor out as a folder. So far so good. But then, once everything was set up, the Yamaha just died. Not powering up at all. Researched and found the Tascam TM-D4000 is capable of acting as a midi controller for faders alone. But it would not physically fit into the current rack! So now I'm looking for a low cost (used?) midi controller, preferably with 16 faders and buttons like the Peavey 1600x or the Korg Nanokontrol. And of course, my flash drive also failed...

Sunday, May 23, 2010

death of a USB flash drive

The Transcend JF220 finally gave up the ghost. After all, it was being used every day. Putting it in Linux or Windows showed an unpartitioned free space. I suppose the partition table got wiped. Tried Recuva as the first step. It could not read. Then tried formatting. Windows complained that it was write-protected - 'Windows was unable to complete the format' and 'The drive cannot be formatted'. Tried various tips for getting over that by registry edits. Did not work. Tried formatting in Linux, gparted complained that it could not write the disk label. Tried wiping the first and last bytes as in the script at itrc.hp.com by doing
sfdisk -s
manually and then using that number in
off_t=`sfdisk -s $1`
(( off_t = off_t - 1024 ))

echo "Zap the first megabyte of the device."
echoeval "dd if=/dev/zero of=$1 bs=1k count=1024"
echo "Zap the last megabyte of the device."
echoeval "dd if=/dev/zero of=$1 bs=1k count=1024 seek=$off_t"
Still no go - the dd took a long time and then said completed, but apparently it was failing. Tried Transcend's own repartition tool from transcendusa.com, that also failed. Concluding that it was a hardware failure.

Friday, May 07, 2010

streaming over GPRS

RK had complained about buffering in the stream while listening with GPRS. He was using Virtual Radio on an LG Viewty. Tried with TCPMP on my phone with buffer settings as shown.




It played for 5 minutes or so after buffering for half a minute. Then buffered for 3 minutes and played for 7 minutes. So, clearly, network is not fast enough. Downloaded a file from stream.radiosai.org - 5.5 minute file, 976 kB, came through in six minutes. So, I'm getting a throughput of slightly under 24 kbps.... If I remember correctly, I got double that at Bangalore, downloading google maps on the mobile, 1.28 MB, in 3 minutes. Both RK and I are using Airtel, by the way. Airtel customer care tells me that they do not have EDGE anywhere in AP. Bangalore is clearly on EDGE.