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.

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

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

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 23977radiosai.org 32886 0 0 0 0 0 0 0 4 9645 23237sssbpt.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 deferredT 5 10 20 40 80 160 320 640 1280 1280+TOTAL 33623 0 0 0 0 0 0 0 4 9645 23974yahoo.com 24602 0 0 0 0 0 0 0 3 6365 18234yahoo.co.in 7809 0 0 0 0 0 0 0 1 2903 4905airtelbroadband.in 154 0 0 0 0 0 0 0 0 30 124yahoo.in 127 0 0 0 0 0 0 0 0 72 55spml.co.in 82 0 0 0 0 0 0 0 0 20 62lycos.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.

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
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

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.

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.

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

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

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

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....

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.

Wednesday, April 28, 2010

making conference calls

Found that my Tata Indicom Haier C2030 can't not make conference calls tho' the manual says press Send button after dialling the second number. Probably blocked by Tata. With the Airtel connection on the QTEK 9100, the procedure is
1. Make 1st call
2. Hold
3. Make second call
4. Menu -> Conference.

Thursday, April 22, 2010

google maps for mobile

GMaps crashed on the mobile with error message Internal Error: c:\workspaces\gmm-4-0-branch\googlemobile\src\cpp\googlenav\common\resource_loader.cpp:13

This was probably due to me deleting some of the google maps stuff in application data, in order to free up space. There are quite a few people with this problem - ...resource_loader.cpp:13 internal error

Reinstalling gave the same error. Then tried removing old install, then manually deleting files in Program Files and Application Data, then reinstalling. This time it worked. And the new version has voice search enabled!

yet another twist in the tale

The possible solution noted before seemed to work with no problems over the last two weeks. But P noted that earlier, the downloads had the path to D: hard-coded into the asp, so the files in D: were being accessed though IIS pointed to E:. This might have led to the earlier problems, he said. To test this out, we put back the 4 GB of stuff to the playout folder in E: - and the streams continued to work fine. Now we have deleted the stuff in D:, and that drive is pending a Scandisk. But that needs a reboot, so probably we'll keep it pending. Or maybe we can move all the data to E: and do it without a reboot - will think about it.

Friday, April 16, 2010

possible solution to streaming problems

Remembered A telling me that there could be performance issues if too many files are in the same folder. Moved out 600+ files, 4 GB+, to another folder. After that, the streams seem to have stabilized, playing out from E drive. Now I have enabled the Radiosai downloads also, all seems fine. We'll work out some mechanism to avoid this from happening again as we add files. Some sort of directory hierarchy.

Tuesday, April 13, 2010

ngpay and Java midlets on my phone

My previous post was "under controlled conditions. Finally in a crunch situation, ngpay let me down. Not really ngpay's fault, I should add. This is what happened: At 8 o'clock, had to book a tatkal ticket. The irctc.co.in website was crawling, since thousands of people all over the country would be trying the same thing. Hopped on to ngpay over wifi on my phone. Connected very nicely, got through to the payment page. But.... The HDFC bank password kept getting rejected. Known issue with midlets on this phone, at least I have seen it often with Opera Mini - the shift key or function key appear to get activated on their own. On a normal text field, this can be corrected. But on a password field, can't do much, since only **** is seen. Now I've added my credit card to the ngpay wallet. Maybe with that, I can avoid this issue. Another way out would be to use MyMobiler, like I did last time. MyMobiler can connect over wifi too, so I should test it out.

Edit: April 22 - Did try MyMobiler, did connect over wifi fine. Another solution when without a PC - using the Phone Pad input method.

Then, the passwords etc are visible in clear text before you enter them.

Tuesday, April 06, 2010

problems with streaming - hard disk usage

Our streams had problems, as noted before. IIS was a possible culprit, with our own download service being the prime suspect. Limiting number of connections per IP address seemed a possible way out. But IIS does not have a mechanism to do that - only global total number of connections can be limited. The disk from which the audio files were being taken seemed highly fragmented - maybe because of all these small files? Anyway, wanted to try defragmenting it. So, copied all to another volume on another drive. Copied using RichCopy to minimize disruptions during the process, with

1. trickle

2. serialize disk access

3. single thread only

4. system buffer disable
turned on so that impact on system performance was minimized. Screenshot:

No problem with the streams while the copy went on. A minor issue when the playout was restarted, the temp audio files could not be overwritten by colinux. Had to manually delete them from Windows.

But after shifting playout to the new volume, again the skipping re-occured in a couple of hours! So, there is some system-wide hard disk usage? The first reaction was to shut down IIS by stopping the websites one by one. That did not solve the problem - at least, it did not reflect in any reduction in the hard disk usage with Performance Monitor as given in my previous post.

Investigating with the tips given on these pages, to identify the process which uses large amount of disk usage by checking out Task Manager, Start -> Run -> taskmgr, looking for processes with rapidly changing values for I/O Read Bytes and I/O Write Bytes and later using Process Monitor to view files accessed by that process. csrss.exe seems to be the process using the filesystem to some extent - Client Server Runtime Subsystem. But it does not display excess CPU utilization as noted here. This forum post notes a similar hard disk issue with csrss. Or maybe there is some process which we did not catch in time. Will keep investigating.

revisiting internet banking from mobile

In my earlier post, I'd described failure of IE mobile and Opera Mini. This time, Skyfire worked with HDFC bank. It still doesn't work with Canara bank and SBI. Of course, it goes through Skyfire's servers, but so does Opera Mini, so hopefully it is as safe as it's privacy policy states. Skyfire drinks bandwidth, so feasible only on an unlimited plan or for emergencies.

Monday, April 05, 2010

ngpay and mchek

Tried out these mobile payment solutions first with the new credit card. mchek has the disadvantage of having only Airtel recharge as the USP. Can't recharge other operators' mobiles if your operator is Airtel! ngpay's USP for me is KSRTC booking. Even when KSRTC's AWATAR system is down, which is often, ngpay works. But ngpay does not have Airtel recharge for AP circle or All India, though the menu item exists. Navigating ngpay is a pain because of the QTEK 9100 mobile's terrible touch screen. Much easier to do it by tethering it to a PC and using MyMobiler.

mchek registration had some hiccups, since the registration is followed by a card number verification which requires a popup. The first time I enabled the popup, had to retry. And on retrying so quickly, I think the card processing back end would have refused the connection, and hence returned "Invalid card". I thought this was because the card was earlier registered with my Tata number. Customer care assured me that the earlier unsubscribe was effected. Anyway, waiting for some time - 15 minutes - and retrying - solved the issue.

Wednesday, March 31, 2010

free space on colinux and hard disk performance

Over the last two days, there were several interruptions on our streams. Problem seems to be excessive Hard Disk usage, since copying files was taking a very long time. But at a time when the system was behaving normally, trying out the counters
1. PhysicalDisk: Avg. Read Queue Length Should be less than 2
2. PhysicalDisk: Avg. Write Queue Length Should be less than 2
3. PhysicalDisk: % Disk Time more than 50% indicates a bottleneck
as given here indicates that the disk is fine. That page says
to ensure that it was not a processor or memory bottleneck, I also recorded % processor time and available bytes. As you can see from Diagram 1, the processor's average was below 30%. If the processor were the bottleneck the trace would be over 80%. On the other hand, if there was a memory shortage, available bytes should drop below 10MB.

And our processor usage was < 20%, with > 200 MB of memory also available.

Maybe I should try the same checks when the system is crawling. If there is some indication of what application is causing the hard disk usage in some log somewhere, it would have been useful. I suspect IIS, since SSSBPT and the audio downloads are also on this machine.

Checking the colinux virtual machine, found only 100 MB free, 10%. Cleaned up to make it around 40%, 400 MB or so, by the following.

apt-get clean cleaning out /var/cache/apt

As given here,  postsuper -d ALL
for /var/spool/postfix

from /home/sgh/playlist,
ls ????09* to find the 2009 playlists, removed them and older ones...

Some interesting info:
2007 Feb asia/africa/america started
2004 Oct started web stream

for /home/sgh/log

mv 0*.check ../audio/log_backup 2> /dev/nullmv 1*.check ../audio/log_backup 2> /dev/nullmv 2*.check ../audio/log_backup 2> /dev/null
etc - the errors to dev null, because mv complains that it cannot keep the same user ownership and permissions.

tail -5 logfile > logfile did not work, so had to do
tail ices.log > icesnew.logmv icesnew.log ices.log
after taking backup.

But tho playout continues, log file is not appended :(
only after playout restarts next day? Anyway, had to restart all playouts by restarting colinux service since the streams started skipping, so the logs have restarted now.

Sunday, March 28, 2010

midi works tho' audio is dead

The Yamaha AW4416 came back some weeks back after a stint at Chennai, with no improvement. Apparently it can't be fixed without a high cost. The audio output is dead, and I believe the inputs are dead too. Some of the switches are also not working. Tested the midi connections today by connecting to laptop like in my previous post through a Tascam US-144. The Midi section seems to be fine. They seem to be getting a firewire mixer at the Studio. Then maybe I will get the Tascam US-1641 once again.

Tuesday, March 09, 2010

hardware debugging - cordless door-bell

A cordless door-bell which K got for me had a funny problem. When I affix the remote switch on our door, it would not work. Remove the switch from the door, and it works, though it is at the same distance from the bell. When KR fixed it to the wall instead, it worked. So, in retrospect, it was probably some sort of capacitive effect from the aluminium door frame acting through the plastic case which was changing the transmission frequency or something.

asp error '8004020f'

BT subscription feedback form returned this error. The many-headed say this means that the e-mail was rejected by the server for some reason. Checked the asp code, it had
Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
which listed the wrong smtp server. Corrected it and it worked fine. A wrong email address, as mentioned here, leads to asp error '8004020e'.

Friday, March 05, 2010

A google ad on this very blog pointed to www.fatfreecart.com which looks pretty useful. Free shopping cart code for google checkout and paypal. Of course, many hosting companies offer free shopping cart code with their hosting too... And DigiVendor seems to be a useful MySql-Php secure downloads payment option. The Google Checkout API docs detail the process, and provides sample code, too. Similar stuff exists for paypal.

Thursday, March 04, 2010

ebook reader for Nokia 6303

Struggled quite a bit for helping V find an ebook reader for his Nokia 6303 classic. C mentioned that it was an S40 phone and not an S60 phone. That helped the google searches. Mobipocket's java version had some signing bug which was not allowing it to work properly. I sent him this list,

Libris is not free, \$10

free, but supposed to read books from their website, I don't know if you can read your own files.

Wikitome reader seems to be for Series 40, so may work on 6303

Again, getting books in that format?

And he replied with his solution, MTextReader, which seems much better, and free too.

Monday, March 01, 2010

disabling google buzz in a corporate or academic network

R wanted some way to block google buzz at work. According to him, too many people were spending too much time on Buzz, with a spike in network bandwidth. And following friends of friends and other such undesirable activities. This was my reply.

This question has been asked in gmail support forums also, but since
buzz is integrated into gmail, it seems difficult to block it using
traditional methods. Here is one way I can think of:

Make the user log in to gmail using an older browser, or a browser not
supported in the latest gmail version. For example, I am typing this
in Opera 8.53 - available from oldversion.com - then, buzz is not even
seen. It is not using html view, either - it is using the older
version of gmail, which you can see from the url
This version has most of the useful things like address completion and so on.

(If you can redirect users to this url when they go to gmail also, it
might do the trick.)

One way of forcing users to use an old browser would be to allow gmail
only on terminal sessions running on a terminal server or remote X
sessions running on a linux server or remote desktop sessions. Since
the user is just logging on to the server, permissions can be set so
that the user cannot install any sw. Possibly such permissions can be
set on the desktops also.

Edit: R says it's not practical for him to change user settings. He will explore a url rewrite using squid's php rewrite or something like that, to redirect any requests to mail.google.com/mail to mail.google.com/mail/?ui=1

Saturday, February 27, 2010

malware and more

Once again, malware hit some of our websites. Had to do stuff from this earlier post. These were coming in via ftp from remote hosts. So, ftp logs showing logins from Poland, Bulgaria, etc were red flags. All sorts of stuff, like iframes and links to various sites which were themselves hacked, and so on. Some examples of malicious links, do not visit these!!!videointerviewtips.com/pdf/free-resources-old.php 

and in iframes

 jL.chura.pl/rc/
Luckily Google and stopbadware.org have filters in place, warning us. But some sort of pro-active thing should be done, instead of reactive, like this time.

pdf to text

Foxit reader has "Save as text", but only for the pro version. Doubtless there are easier ways to do this, but for the quick and dirty fix without having to install any software, pdftextonline.com does the job. Of course, only those pdfs which have text in them (and not just images) will be useful with this text extraction.

Wednesday, February 24, 2010

testing Tata Indicom photon plus usb wireless connection

First I tried the McAfee speed test like in my previous Airtel test and it showed 200 kbps.

But then I tried connecting to our studio ftp server, and it started serving at 1500 kbps! This sustained for quite some time, not some caching effect. So, their international ports are probably slow. Again, their speeds seem to fluctuate. Tata Indicom's own test showed Your current download speed is: 695.50kbps

It was able to connect to our colinux machine, so no problems with ssh or rdp being blocked or anything like that. Latency-wise, it seemed even better than our leased line Tata internet port! 186 ms on pinging google.com, versus 256 ms with the leased line. Similar results to tracert as given here.

My tests were on Windows XP, so the built-in drivers could be used. The USB device has the drivers on in-built memory which is recognised as a CD drive. Autorun.exe and all that. For Linux, these people seem to have it worked out. Basically using wvdial, copy into /etc/wvdial.conf
[Dialer Defaults]Modem = /dev/ttyUSB0Init1 = ATZPhone = #777Username = internetPassword = internetNew PPPD = yesStupid Mode = 1
then sudo wvdial

Edit: Some more info. The device gets a bit hot like a mobile phone during talk-time! Bittorrent speed tested with an Ubuntu CD download, was around 1.5 Mbps again. So, that seems to be the fastest it can deliver. Upload speeds were slightly slower - 800 kbps for the local ftp server. This product is a USB-based one, Tata also has a router configuration. Tariff is somewhat higher than BSNL's wireline ones.

Friday, February 19, 2010

mixer glitches

The Tascam TM-D4000 I'm currently using after the Yamaha 4416 went back to Chennai for repairs, showed its temperamental nature a couple of days back on Tuesday, when it "hung" with blank display and saturated output - all inputs set to +10 dB or something like that. This happened 10 minutes after switching it on around 4 pm. So, the reason S used to report this in the Studio is probably not water condensation. Turning it off and on does not work, have to wait an hour or so. After an hour, turning it on - worked, again hanging after 7 minutes. Turned it off till Wednesday, then it worked fine. No problems yesterday and this morning, either. But must be ready with a backup plan, since this sort of failure is a possibility.

Tuesday, February 16, 2010

trying out Java streaming radio apps

Tried out various Java apps listed on the radiosai website on my Windows Mobile 5 phone which has a Java environment also, but all of them failed to play. At least VirtualRadio gave an error message:
creating player: javax.microedition.media.MediaException NULL 
I suppose that is because the Java environment does not have access to an mp3 decoder.

Thursday, February 11, 2010

gprs counter for mobile - WM5

Tried out the built-in gprs data counter in HomeScreen PlusPlus, the settings for which which can be accessed via Start -> Settings -> Personal -> Today -> Items -> HomeScreen PlusPlus and clicking the Options button. Or by pressing and holding near the cpu icon.

But for some reason it did not work on my phone. Maybe I should have tried rebooting the phone after setting it or something. But anyway, it showed 0 incoming 0 outgoing even after using nearly an MB - Rs 5.40 worth - by just seeing half a page of slashdot in skyfire!

Monday, February 08, 2010

some fixes for windows media encoding

Some of the VOB files to be encoded showed some audio delay when processed through VirtualdubMod even though they played perfectly well with KMPlayer. Then found this page which explains how to do it with Virtualdub, and this one for VirtualdubMod. Basically,
Streams -> Stream List -> Right-click the audio -> Interleaving -> Delay audio track by xxx ms.
500 ms worked well for me. Virtualdub has the same thing under
Audio -> Interleaving

Then trying to do WME batch encoding as given in this post, finally ended up making a batch file with
cscript.exe wmcmd.vbs -wme "E:\wmv\2.wme"cscript.exe wmcmd.vbs -wme "E:\wmv\3.wme"cscript.exe wmcmd.vbs -wme "E:\wmv\4.wme"cscript.exe wmcmd.vbs -wme "E:\wmv\5.wme"
and so on, with each wme file having a separate input and output file specified. The input file is in two places in the wme file, for audio and video. The wme files are xml files, so a text editor can be used to generate them by modifying older wme files.

But in typical Microsoft fashion, the resultant output files are not exactly the same as the files generated using the WME gui. Because, WMVAppendGui cannot join these files with files produced earlier with the WME gui! Have to re-create those files also with the wmcmd.vbs commandline technique.

Tuesday, February 02, 2010

BleachBit

From this slashdot story about tracking, went on to EFF's Panopticlick and bleachbit. Bleachbit - removes cache/temp/cookies etc from a variety of programs and plugins including Flash cookies and Java cache - seems quite impressive, a portable version too, along with Windows and Linux versions. Saves space on C drive for the space-constrained, too.

delay in streams and jitter

Today, I sat down to quantify the amount of delay in our stream which is being aired now on AsiaStar also. I noticed that most programs on AsiaStar were starting a few minutes after the hour - like 1.05 instead of 1.00 etc. Checked if the time on the server was correct, yes, it is set to automatically keep the correct time using updates from time.windows.com

Then checked the log to see when files are being played:
tail /home/sgh/ices/asiastream/ices.log
This does not have any timestamps. But
ls -l /home/sgh/ices/asiastream/ices.log
gives last write timestamp, saw this was 13:04

Checked the playlist on xmms, according to the xmms duration listing, it should have been 13:03. So, this adds some jitter.

Next, there is the buffering time in the ShoutCast server, and also buffering in the client. This probably adds a few more seconds. Checked the time gap from the time on the log and the time I heard it on AsiaStar - 13:20 on log for next file, I heard it at 13:23. This is probably the buffering on the server + client.

Client buffering probably changes with time. For example: I played AsiaStream on my machine, it was approx 10 seconds later than AsiaStar which is AsiaStream coming after going up and down from the satellite. The satellite round-trip takes approx 2 seconds, so my machine was 12 sec behind the Melbourne machine.

permission error

My colleague got this error from the webserver:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Excel Driver] Operation must use an updateable query.

Googling found these possible causes, and changing permissions for the folder seems to have solved the issue. Allowed the user called IUSR_WEB_SERVER_NAME (the web server) to write in that folder.

Sunday, January 31, 2010

Windows media encoding and virtualdubmod batch jobs

Investigating batch converstion with Windows media encoder, found this resource which includes info on the command-line encoder. This page has the info in a more readable form - just
cscript.exe c:\path\to\wmcmd.vbs -loadprofile encoding-profile.prx -input "F:\input-folder" -output "F:\output-folder" 
This page explains how to get the prx files from the WMEncoder, Properties -> Compression -> Edit -> Export button. But of course, it did not work for me,
.Error occurred in transcoding: Error Code = 0xC00D002F
since my WME does not work with Xvid encoded files, needs a nominal crop of a couple of pixels before it works. Probably then it uses a different input codec or whatever.

But checking out cscript.exe wmcmd.vbs /? `found that it supports WMEncode wme session files too! So next time I can try that.

Virtualdubmod also has a batch encoding option with input and output folders, as given at this page and I used it this time: File -> Job Control, and Edit -> Process Directory from the Job control window.

machine translation of Indian languages

This IIT-built automatic translation engine is interesting, pointed out to me by BK. If you don't prefer the Hindi keyboard, you can use other tools like gmail's or google's or others like writeka, then copy-paste into the duur sampark page. The attached sentence took nearly a minute to translate, and it seems to be highly Hyderabadi Telugu! (Click on the picture below for larger image).