This causes some files not to be entered into database, so when importing playlist, it complains that some fids are NULL
Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Thursday, August 18, 2011
ERROR: duplicate key value
This causes some files not to be entered into database, so when importing playlist, it complains that some fids are NULL
Wednesday, August 17, 2011
setting up vnc
Tuesday, August 16, 2011
procedure for telugu broadcasts
2. Copy relevant m3u file to ~/playlist directory.
3. cd to playlist directory and run the sed script modifying the commmandline to relevant date, which converts the extended m3u to simple m3u and appends the audio directory path.
4. run ~/scr*/lame_encoder2422.sh
5. Open playlist from step 2 in kwrite and change / to \, save as m3u
6. Open the m3u playlist in Winamp after lame finishes, to check that all files are present - total duration should be 24 hours and a bit, and it should not show a + symbol after the total duration.
If playlist generation is desired, additional steps:
7. Run scr*/main_ftp.sh which takes files from ~/ftp folder
8. upload files from ~/ftp folder to dl.radiosai.org
9. Run scr*/playlist_import.sh
10. Update missing descriptions from localhost/SGHDescription as with sgh database, if necessary copy-pasting from sgh database
11. Make csv and upload from localhost/mkcsv
bug in our playlist import script
to 2011-08-16 06:30:00+05:30 during the import process. So, verify if the correct timestamp should be 00:00:00+05:30 and then edit the entry manually from 06:30:00+05:30 to 00:00:00+05:30 .
The point to be noted is that the problematic entry may not be adjacent to the actual 06:30 signature tune file, it could be at midnight also.
Saturday, August 06, 2011
updating MBV download filenames
1. In sgh database on saiwaves run the following query:
select 'UPDATE file_id SET download_filename=' || '"' ||download_filename|| '"' || ' WHERE filename="' || filename || '"' from file_id where filename ilike 'MBV%' \t \o update_mandirbhajans.sql ;
First row of the result set looks like:
UPDATE file_id SET download_filename="MBV_04_
2. Save the result set to a file update_mandirbhajans.sql
3. Replace double quotes with single quotes in update_mandirbhajans.sql
4. In sghtelugu database on saiwaves execute the saved update_mandirbhajans.sql (through phpPgAdmin interface)
5. upload the updated csv files / run the update sql statements on the schedule database through the cpanel
Friday, August 05, 2011
stellarium night sky on our mirrordome
View Settings Window -> Sky tab -> Absolute scale = 2 makes everything bigger and hence brighter, and Relative scale = 0.2 or so makes the stars uniform in size instead of brighter stars being as big as oranges! This makes the night sky much better to look at, more like a "starball" effect.
viewing panoramas on fulldome - simple technique
When I tried it with a pan of the SSSIHMS, a hi-res version of this picture, found that it looks squished on the dome - need original to be more squarish? Also, building is too far above the horizon. Need more sky and less ground. So, probably the solution would be to take a pan with the interesting parts near the bottom edge of the pic, and clone the sky to make it square instead of distorting it by simply resizing.
Friday, July 29, 2011
download users as csv in Google Apps
This post seemed to have the solution:
http://www.google.com/support/
So, sign in, and then use the following url for the csv file:
https://www.google.com/a/
where you must change the date 20110727 for the relevant date. We also have to remember that google servers use US time, so today is still 28 July for them and not 29 July.
Wednesday, July 27, 2011
Telugu stream playlist - Extended m3u to simple m3u
cat 26th_JULY.m3u | sed /^#/d | tr '\\' '\n' | tr '\r' '\n' | sed '/\(.mp3\)\|\(.MP3\)\|\(.Mp3\)
sed /^#/d Remove the lines starting with #
tr '\\' '\n' The windows path backslash (\) is changed to line feed
tr '\r' '\n' The Carriage return is changed to line feed
sed '/\(.mp3\)\|\(.MP3\)\|\(.Mp3\)
Added tr '\r' '\n' on 26th July 2011.
The line used to end with both \r\n which made ices fail to start the playlist.
\r - Carriage Return - 0D in Hex
\n - Line feed - 0A in Hex
Saturday, July 16, 2011
problem playing file from finder for live broadcast
But in general, this is a bit risky - a better way to do announcement insertion would be to drag and drop the relevant files into the timeline on Reaper. This can be done even when Reaper is recording. The track into which the file is dropped should not be armed for recording - only then will the file play back if Reaper is recording on another track.
Friday, July 15, 2011
more ports on server
Did some troubleshooting by starting the server from the command line.
Found that the reason it gives for the other ports not to work is:
error opening client socket! FATAL ERROR! Some other process is using this port!
So it is not the service provider's fault.
When I test with telnet, I find (after stopping shoutcast)
telnet stream.radiosai.org 8021
Trying 66.249.27.181...
Connected to stream.radiosai.org.
Escape character is '^]'.
200 1500
GET / HTTP/1.1
fxÚ
ÍËÎË/ÏSHÎÏÍMÌKÑ5
Yesterday when I tested, ports 8023, 24 and 25 were also probably occupied by the other process. Today, those ports were open, and shoutcast could use those ports.
Using
Netstat -a -b -n -o > c:\netstatnames.txt
and searching for 8021 in that file,
found that the process is
G6FTPSERVER.EXE
So, requested that the Gene ftp be tweaked so that it uses only ports above 8100 for listening, like 8121 etc. That solved the issue.
Wednesday, July 13, 2011
procedure to change over to live broadcast
Shortcuts on desktop for these bat files have been created. So, one minute before the live broadcast is to start, like 4.29 pm for the evening programme, just login with Remote Desktop and double-click on the respective icon.
To stop live, wait 70 seconds after the ending point - usually the Jaikar after Arati - and double-click the stoplive bat file. The BUTT has to be running during these 70 seconds too. This is because of buffering of the stream by the Shoutcast servers.
Edit: Initially we experimented with using Scheduled Tasks to automate the changeover, at least for the startlive which was a fixed time. But Scheduled Tasks don't run if the password is changed, and then we would also have issues when DST kicked in. So, decided manual change-over was better. And the next day the manual change-over came in useful when we had a long power outage at the Studio and could not change to live till 50 minutes into the morning session - recorded filler was played on air at that time.
Thursday, June 16, 2011
importing SGH M CDs into local database
1. The script mount_cd.sh had a call to the binary message
Tuesday, June 14, 2011
colinux instabilities and D drive
Yes, the issue could be the windows file system size or its way of dealing with long file names. But the failure in reading might even be due to Colinux. Windows has never complained in sending the data to Colinux but CoLinux always complains in not able to read the data. The Colinux change log does mention about I/O errors.
Was going through this link on Working with File Systems which says:
If you use a large number of files in an NTFS folder (300,000 or more), disable short-file name generation, especially if the first six characters of the long file names are similar.Every time you create a file with a long file name, NTFS creates a second file entry that has a similar 8.3 short file name. A file with an 8.3 short file name has a file name containing 1 to 8 characters and a file name extension containing 1 to 3 characters. The file name and file name extension are separated by a period.
If you have a large number of files (300,000 or more) in a folder, and the files have long file names with the same initial characters, the time required to create the files increases. The increase occurs because NTFS bases the short file name on the first six characters of the long file name. In folders with more than 300,000 files, the short file names start to conflict after NTFS uses all the 8.3 names that are similar to the long file names. Repeated conflicts between a generated short file name and existing short file names cause NTFS to regenerate the short file name from 6 to 8 times.
To reduce the time required to create files, use the fsutil behavior set disable8dot3 command to disable the creation of 8.3 short file names. (You must restart your computer for this setting to take effect.) For more information about disabling 8.3 short file names, see “MS-DOS-Readable File Names on NTFS Volumes” later in this chapter.
If you want NTFS to generate 8.3 names, improve performance by using a naming scheme in which long file names differ at the beginning of the name instead of at the end.
But again, disabling 8.3 filenames systemwide seemed a bit drastic, and could lead to other unexpected problems elsewhere. So, for now we have not done the disabling.
wifi radios for radiosai
This one, for eg. is around Rs. 4.5k in the UK while in India, the listings start from 10k. Other cheaper options in India other than mobile phones are products like this Asus box for around 6k. What you have to look for in products which allow you to listen to Internet radio stations is: do they allow you to enter custom stations - if yes, then you are safe. Otherwise, do they use the Reciva online database - if yes, then also it is safe, since Sai Global Harmony all streams are listed in Reciva. If the player uses a custom database and does not allow you to enter your own stations, then you may not be able to listen to SGH with such a player.
Monday, June 13, 2011
buffering on server
1. The changeover actually happened at around 6.32 as heard on the stream, but the shoutcast server went into the interruption music for more than ten minutes more, till the signature tune finally came, around 6.44. Meaning the stream is buffered by 14 minutes due to the two servers?
2. By afternoon, the delay was around 7 minutes - The dd which was supposed to get over at 2.41 was heard to end at 2.48. So somehow the buffering delay was reduced ?!
Friday, June 10, 2011
BSNL online directory enquiry
Wednesday, June 08, 2011
adjustments for mirrordome
- Moving the mirror up by a few inches more now allows us to bring the horizon a bit lower in the front area of the tilted dome of the theatre.
- Moving the projector laterally left-right corrected the tilt in the reflected image, where earlier the left side of the reflected image was around a foot higher than the right side - for this, we moved the projector physically to the right.
- Moving the projector towards and away from the mirror, and adjusting the zoom setting allowed us to reduce the shadow area right above the mirror. Covering a larger area on the mirror makes the shadow smaller and vice-versa.
- Using the Bright mode instead of Custom mode in the projector, the colours are a bit better though the brightness levels are quite lower. This has to be further tuned.
Wednesday, June 01, 2011
couple of queries of email migration
http://www.google.com/support/
When you delete the group, you should be able to recreate a user of the same name immediately. The 5 day wait period only occurs when you delete a user and try to recreate a user of the same name. Deleting a group or email alias does not lock out that address for 5 days like it does when deleting a user.Also, Google Apps seemed to have removed the online IMAP migration tool from within the Domain control panel. So the email migration has to be done using the Google Apps Migration for Microsoft Exchange utility .
Once you install it, the setup is like the screenshot for migration from gmail:

In case it asks you for changing the consumer key, you have to log in to google apps as webmaster and copy-paste the new key.
The users csv file should be of the form
user1@domain.in#user1password_of_domain.in, google_apps_user1
(Please note that the @google.apps.domain is not required for the second field.)
Unfortunately, this tool takes a lot of bandwidth, needs the computer to be on all the time it runs, and is much slower for gmail to gapps migrations than the online IMAP migration tool. A sample run is:
Info:Start local time is: 2011:06:01 13:56:12
Info:Migration start local time is: 2011:06:01 13:56:12
Start: Now migrating user=**********
Start: Migrating Email for store=**********
Start: Migrating 105 messages from Folder [Gmail]/All Mail for store=**********
In progress: Migrated 100 out of 105 messages from folder [Gmail]/All Mail for user.
Success: Migrated 105 messages from folder [Gmail]/All Mail for store=
snip....
Info:Migration end local time is: 2011:06:01 14:25:19
Info:End local time is: 2011:06:01 14:25:19
So it took half an hour for 100 mails.
upload problems persist
Sometimes, when using sftp and it stalls, if we kill the process, then the file at stream.radiosai.org becomes orphaned or something like that. If we delete the file, then also the file appears in ls. After a day or two it disappears on its own - probably when the process times out or something like that.