Wednesday, January 31, 2007

downloading windows media stream

I'd done this a long time back, just verified that it worked with the "latest" site too - using Ethereal, got the rtsp url, fed it to Net Transport.

Monday, January 29, 2007

update on X forwarding with Putty

Update to my previous post. Now the X forwarding jumping over two hosts is working, when I changed the "Remote X auth protocol" in Putty from XDM to MIT Magic Cookie.

miscellaneous

Various miscellaneous jobs.

1. Processing Moments of Oneness - 8 episodes in one hour.

2. Installed Skype, Xming (X server) and Yahoo messenger on Windows because now onwards most of my time I'll be doing audio work. Installing Skype with the default options in the installer works ok, but changing the install folder to a different drive, for example, was causing skype to crash. Another problem is that saiwaves X apps don't work on Windows. Incorrect X authentication, it seems.
X11 connection rejected because of wrong authentication.
annlink: Fatal IO error: client killed


3. Writing backup CDs of various stuff and removing from HDD - wmv, SW, audio, etc.

4. AfriStar had some playout skipping at 0515 GMT - wonder why. BOC operators report some restarts over the last 2-3 days, too. 0530 changeover seemed to have solved the problem. Later, didn't connect - as suspected, the DHCP had changed the IP, waited for the next dns update at changeip.com, and two minutes later, connected as usual.

5. Strange problem with Cool Edit Pro on saispace2 similar to earlier problem on dharma - saving wav files with some sort of header info so that the file appears to be a RIFF file to SF. Saving as au files as a workaround. Solution was to toggle on and off the setting Options -> Settings -> Data -> Auto-convert all data to 32-bit on opening restarting Cool Edit Pro after the change. Also changed Multitrack premixes at Options -> Settings -> Multitrack to 16-bit Premixes

Sunday, January 28, 2007

ssh problem resolved

I'd been unable to log into another account with ssh on krishna, using the method I'd mentioned before, RSA Auth. The problem was with directory permissions on the .ssh directory in that user's home directory - needs to be 700 - 600 is not enough. Changed, now it works.

Huawei SmartAX MT882 ADSL Router

Configuring the Huawei SmartAX MT882 ADSL Router is very similar to the earlier configuration steps I'd written for the MT 841 earlier. Until PPP is clicked in the WAN settings, the username/password boxes don't appear.

Flying Air Deccan

I've got some more posts backlogged. Will catch up in due course. Meanwhile, here's a howto on flying sans frills.

Check on their website and/or call-centre to verify that flight is on time, just before going to the airport. Go to the airport to arrive an hour before the flight. Check-in begins upto 2 hours before the flight, but since we're talking of a 70 seater ATR 72, the crowd is not much, and one can afford to be casual.

Walk into the departures lounge. The security guard may want to see your ticket since visitors are not allowed inside. Then he'll wave you through. If the check-in time has begun - can be seen from the flight status notice boards too - you can go to the Air Deccan counter and show your ticket to be issued the boarding pass. You'll need to check in extra luggage for baggage handling now. "Photo identification" is required now, but just a formality - xerox of PAN card etc should be fine. Probably won't even ask you. Even the CISF people for the security check were quite relaxed and smiling. Due to the small number of passengers, maybe.

Air Deccan ground staff seemed to take being on time seriously - they probably want to retain their statistics lead or whatever - so they were in quite a hurry to make up for the ten minutes delayed arrival of the flight. Walk out to the aircraft waiting just outside the terminus... or take a bus there if your airport is bigger.

Free seating - I've heard of people "rushing for seats" and so on, but none of that on this flight, since it was only half full. Leg room is of city bus variety, just like on Indian Airlines A320 last year, but the seats here recline only 2 inches. Anyway, it's only an hour in the plane, so it's all right. After all, can't expect to recline in a no-frills airline. No free food either, of course - not even toffees. The noise level inside was lower than the Airbus - the turbo-props are quieter. And the ride was quite smooth - no different from a large jet - may be different in bad weather, I suppose. But overall, the experience is OK for an hour's commute.

The air-hostesses came up with coffee for Rs. 20 and sandwiches for Rs. 40 and so on. Cookies for Rs. 10 were the hot items which "ran out" by the time they were half-way up the aisle. And the comments about air hostesses on Indian Airlines being more human than the rest are probably right - these ones, maybe because they were young and nervous, were finding it difficult to smile. And totally stumped by my question, "Is this a Dornier or an Avro?" (It was an ATR, of course). The Indian Airlines lady was quite confident of her reply, "26,000 feet" or something like that, for my question last year on how high we were flying.

Touchdown, walk out if you have no baggage to claim. At Bangalore airport, penny-pinching travellers like me can just walk out of the Airport, 10 minutes of brisk walking gets you to the bus stop where there are buses to the city centre ("Majestic") every 10 minutes or so.

An interesting footnote. In the plane, the airhostesses were hawking some wares, passing on some coupons which the passengers tick for buying some items. In the APSTRC bus, later, an enterprising pair of guys were carrying out an auction of various cloth material, shawls and so on, with free gifts of combs and so on to anyone who participates in the auction. I suspect the latter had more sales volumes.

Wednesday, January 17, 2007

war stories of migration

1. PB added a module to SGH.mdb named "ImportCSV"... it had a line "Am*.csv" - unfortunately this was somehow matching with not only AmerStream.csv, but also AsiaStream.csv and AfriStream.csv! This was causing AmeriStream schedule to have 114 items instead of 38, for example. Changing it to Amer*.csv solved the issue!

2. maillist and shoutstats have issues with PHP5. shoutstats updated to new version 0.8.4, solved issue of not displaying multiple servers. automailer.php is currently not taking the args supplied as a GET request. Current workaround is to supply the date by hard-coding in the php file by find-replace!

3. afristream dies when ameristream or asiastream changes playlist. Don't know why, current workaround is to run auto_africa.sh just after the changeover.

4. saiwaves audio directory has only 2 GB left. So, currently krishna's audio directory (which has 24 kbps files) is mounted with smbmount on saiwaves

5. radiosai.asp has some code-changes to reflect the three change-over times instead of a hard-coded single change-over time. The date calculation for the page displayed when visited for the first time has to be fine-tuned - if cookie exists, must take appropriate changeover time instead of the hard-coded one to calculate date.

6. running main_ftp.sh etc on saiwaves - not working initially, since SEQUENCES were not existing. PB manually created them with psql:
CREATE SEQUENCE file_id_fileid_seq  START 16279;
and so on.

Monday, January 15, 2007

certificate renewal

Got an email The certificate for localhost.oT5171 will expire in 27 days

Ran the latter prg as per email's recommendation
The certificate needs to be renewed; this can be done using the '/usr/bin/openssl' or the '/usr/lib/ssl/apache-mod_ssl/gentestcrt.sh' programs supplied with Mandrakelinux.
Hope it worked, tho probably something more than just running that script is required.... like maybe copying and pasting the generated cert and so on.

Edit: Probably the last few lines of the tutorial here: http://www.unix-tutorials.com/go.php?id=472

Edit:
Was quite simple - the mail said that the file /etc/ssl/apache/server.crt was causing the error.

Ran '/usr/lib/ssl/apache-mod_ssl/gentestcrt.sh'

This generated server.crt and server.key in pwd

mv server.crt /etc/ssl/apache/server.crt
mv server.key /etc/ssl/apache/server.key

service httpd restart

Sunday, January 14, 2007

Adding a new broadcast centre

1. Added code to scripts/playlist_import.sh copy-pasting from orig code for other centres.

2. Created sub-folder in playlist folder, like
/home/sgh/playlist/ASIASTREAM


3. Created entry in broadcast_centers tables in sgh pgsql database.

That's it!

Then, of course, other things have to be updated - like the schedule page and playlist email subscription page on the website.

And then the php scripts for generating the csv files and automatically emailing the schedules. Ah! That's where the sphagetti code resides!

Mandir microphones

There are the products I believe are currently used in Mandir:

Swami's mic - ATM Gooseneck Model 857 - AT857QMLa

And most important, the Wind Shield (pop filter) for Swami's mic is the High Performance one from Shure - A99WS Microphone Windscreen.

The mic used at the Indoor Stadium was tied to the edge of the glass teapoy like structure used as Swami's podium - the Shure EasyFlex mics 18 inches.

Wednesday, January 10, 2007

Shoutcast server quirks

One of the methods suggested for starting Shoutcast server(s) automatically on Windows is to create a "Scheduled Task". But as far as my experiments go, this works only if
1. you have auto-login enabled
2. you are starting only one instance of shoutcast.

If not, then srvany is the way to go.

And another thing is the way Shoutcast handles "Backup file". It will play a looped file for currently connected listeners if the source drops connection. But:
1. the path to the file should not have spaces, you can't put quotes in the ini file either
2. a source must connect and then disconnect for this functionality to work.
3. the source cannot be a relay - it has to be a conventional source, and this shoutcast server must not be configured as a relay. the server can be a relay also - but....
4. new listeners will only get "Service Unavailable" - only those who connected before the source disconnected will get the loop.
5. enabling intro files does not modify this behaviour - new listeners will still get "Service Unavailable" if the source disconnects.

creating our own services in Windows

The method of using srvany to create our own services: with download link from here. But Microsoft site says this doesn't work for batch files. But the included srvany.wri file says
OPTIONAL: under the above key, create an 'AppParameters' value of type REG_SZ and specify the parameters for your app.
So that should solve our problem. It says on installing a service,
Make sure that you go into the Control Panel and use the Services applet to change the Account Name and Password that this newly installed service will use for its Security Context.
Default being Local System account. The default seems to be OK for us. But in the procedure given, one inconsistency found by trial and error: It does not matter if the filename given in 'Application' value has spaces in the path, no quotes are required. But if the 'AppParameters' has a path with spaces, it needs to be enclosed in quotes. AppDirectory behaves similarly, and also requires that it should NOT end with a \ - so, our value in AppDirectory should be "C:\Program Files\Shoutcast" - not "C:\Program Files\Shoutcast\".

Monday, January 08, 2007

pdfs on the Sony Reader

Some user-generated pdfs work fine on the Reader. No resizing, of course, but the page-turns are quick enough and links work fine. Example book Oliver Twist from beta.feedbooks.com. Also another "Survey - The Brain from the Economist" which has some illustrations too. Transferred using PRSUtil (works fine after .NET framework was installed) and Connect reader SW - in both cases, the results were the same.

using the Reader without Connect software

I'm trying to add files (PDF and RTF) to the Sony Reader PRS500 without going through the Connect SW from Sony. User developed utils from mobileread forums.

PRSUtil - tried, but it says
The system cannot execute the specified program.
- Is it because .NET framework needs to be installed? Let me check.

libprs500 - Involved process:

Following the wiki, I've downloaded and installed the other items. Running
L:\Python25\scripts\easy_install libprs500 ran for a while, then stopped with

error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.


So I tried downloading the PyXML-0.8.4 tar.gz manually, went into the directory, ran setup.py install -c

mingw32

No, that's not right, it error: option -c not recognized

Then tried setup.py build -c mingw32

This time it said error: command 'gcc' failed: No such file or directory

So I checked in the mingw32 bin directory (which was installed with QT).

Added L:\MinGW\bin to the PATH by going to Control Panel -> System -> Advanced -> Environment Variables

RESTARTED the system (or else path is not updated) and then tried

setup.py build -c mingw32

OK, worked.

Then setup.py install - still gave the same error of VS2003 not found. Oh, it's trying to build it again. So,

checked

setup.py --help - install has options --skip-build as well as --no-compile. Aha! Did

setup.py install --skip-build

Worked!

Ran L:\Python25\scripts\easy_install libprs500

This time it gave

error: Couldn't find a setup script in c:\docume~1\sgh\locals~1\temp\easy_install-vvkkzb\pyusb-0.3.5.win32.zip

This is in spite of having already copied the contents of this zip file to the site-packages directory before the install. Probably because this compiled version is for Python2.4.

So,

running prs500 info gave

Traceback (most recent call last):
File "L:\Python25\Scripts\prs500-script.py", line 5, in
from pkg_resources import load_entry_point
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 2479, in
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 585, in require
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 483, in resolve
pkg_resources.DistributionNotFound: pyusb>=0.3.5

OK, now try to compile pyusb from source. Downloaded from sourceforge pyusb-0.3.5-py25.zip - but this just had the same 80 kB usb.pyd which I already have in site-packages! So, checked the pkg_resources.py mentioned above, the path itself doesn't exist, because the setuptools-0.6c3-py2.5.egg is a binary file, so no wordpad editing possible. So I'm stuck.

Friday, January 05, 2007

update on BookCreator

Got BookCreator running inside VMWare player by deleting the disk images and all files and starting from scratch. But it's not very impressive - useful for layout junkies, but not for bulk conversions, I think.

Trying to get Wikipedia CD into Sony Reader

Tried out various options to get links to work so that I can get the Wikipedia CD onto the Reader with complete hyper-linked goodness. Links to the SW below are on the Mobileread forums.

1. flatLRF - was creating only LRF of first file to which it was pointed, no recursion, no links.

2. HTML2LRF from MobileRead forums - no links work except those within the same html file - and that too if referenced only with label.

3. Librie Toolbar from the Librie Yahoo group. Results same as above - only to be expected since HTML2LRF was made with the toolbar's dll. But it makes a Table of Contents and keeps images... very useful tutorial at http://www.xtmotion.com/librie/ - the wayback machine has a working link.

4. Installing BookCreator in a Virtual Machine as detailed in http://silicondependency.googlepages.com/bookcreator%40librie - details below.

5. BookDesigner on XP - needed Word installed (which I didn't have) for best results. But with the "reformat completely" option it was able to open html files - but no links. "Failed" when trying to export as Sony Librie (lrf). Later succeeded in exporting lrf by changing output option to not use "advanced Word doc and rtf export"! But still no links...

6. BookDesigner on Win98, which had Word2000. Yes, the links are seen as underlined text at least! But very very slow. More than 10 minutes for a single page! On a PII 400 MHz. And seeing the posts about BookDesigner problems, not encouraged to try more http://www.mobileread.com/forums/showthread.php?t=7897

BookCreator in VMWare was, of course the most time-consuming, especially since I had to do it twice over an hour each time since the first time I "forgot" the installing Japanese part, and landed in the soup. Without Japanese, BookCreator gives error "Standard fonts not installed". And I can attest that without the "mysterious TTEdit" which also installs along with BookCreator, BookCreator refuses to start. Installing the fonts by adding support for East-Asian languages as given in the readme of the "English" BookCreator, the BookCreator crashed every time and refused to uninstall - path not found. And somehow the clock reset and Windows wanted Activation! The Windows install takes around 45 minutes. The Ethernet refused to work at first - not pinging. A series of checking and unchecking the connected checkbox on the VMWare Player Ethernet menu and changing from Bridged to Host-Only seemed to do the trick. Somewhere along the line, the BookCreator has realised that the trial period has expired, tho' the VMWare player shows Jan 2 2005!

Finally, the result is: no working links as of now, since I can't try BookCreator. Best bet seems to be HTML2LRF, with the Table of Contents it makes, make a separate book for each alphabet. Doing
dir /B
redirecting to a file, formatting it with Find/Replace so that all the filenames come on a single line with full path and separated by spaces....

Edit: March 15 2011 - changed the Librie Toolbar link to a wayback machine link.

Wednesday, January 03, 2007

Tuesday, January 02, 2007

CD writing SW

Last month, GSS told me that GS had a problem with his CD writer, SAMSUNG RW-52-24-52, not being recognized by his CD-writing SW - some version of Nero or something. Downloaded and sent him Deepburner Free since it was smaller than (and probably also more polished than) CDBurnerXP Pro. Actually, searching on Sourceforge gives many more results for free cd burning SW based on .NET.

vnstat

Installed by PB - gives useful info by running as a daemon. On my machine there is knetload, of course, but it runs only when I'm logged on....

mount iso file

This is something we sometimes need to do....

mount -o loop -t iso9660 filename.iso /mnt/mountpoint/

Jo'berg connect problem on Fri-Sat

The Joburg link was down. So I got on yahoo messenger, requested the
operator wsjhbboc to please restart the router. He did it, and after an
hour when the hourly dns update was sent, I am able to logon.