Thursday, April 26, 2012

regressive feature on Mac OS X Lion

Yesterday DSP came with his MacBook to reinstall Microsoft Office to solve a bug as instructed by "experts" at Applecare Australia. Long procedure to uninstall, and after reinstalling, a longer time to download and install all updates. And finally, at the end, his problem remained. His issue was that even after he releases the SHIFT key, the next letter would be capitalized. Now, this is actually a "feature" of Mac OS X Lion, carried over from iOS - demonstrated by typing something in TextEdit. But it does create problems for those who type moderately fast.

monitoring apache server

A couple of days back, we were caught left-footed when our website slowed down to a crawl. The "standard practice" of restarting the process, restarting networking, even rebooting the server, did not help. Later, found that the problems were due to a 500 MB + flipbook uploaded the previous night, with a link on the home page.

Voxel support had pointed to
apache2ctl -t
as a possible first test, to see if apache was able to start with the config given. Did some googling and found this optimization and tuning page, which has some sections relevant for our static website also. In particular, the part where he says use
apache2ctl status
and
top d 1
to monitor apache's health.

These discussions also provide some tips on monitoring swapping, disk thrashing, io bottlenecks etc using vmstat, top, iotop and so on. This page has a good description of vmstat and free, what the displays mean etc.

Saturday, March 31, 2012

procedure for Mandir live broadcast

Documenting the Mandir live broadcast procedure.
  1. Power on procedure is:
    (a) UPS input on
    (b) UPS on
    (c) Extension box power on (right-hand side of equipment box)
    (d) Tascam US-1641 power on
    (e) MacBook power on
    Power down procedure follows in the reverse order.
  2. In the MacBook, the programs to be run are in right-to-left order in the Dock. We start by powering up the Tascam Control Panel app.
  3. In the Tascam Control Panel, choose the dropdown to change the Digital output channels from line out 1 & 2 to line out 3 & 4.
  4. Next, fire up the Jack Pilot app.
  5. Press the start button in Jack Pilot to start Jack. Wait till Jack starts up, with a wait dialog box indicating the starting of Jack.
  6. Next, start the BUTT app.
  7. And finally start Reaper.
  8. Now set up routing in Jack for broadcast. For this, click on the Routing button in Jack Pilot, and choose File -> Load Studio Setup, choosing the broadcast_setup.jks file.
  9. The setup can be tested by playing the output of reaper. Reaper channels 1-8 are mapped to sliders 1-8 on the Korg NanoKontrol. Channels 9-14 are mapped to knobs 1-6.
    Channel 12 (knob 4) has instrumental music and
    Channel 13 (knob 5) has the pre-live announcement pre-loaded.
    Channel 14 (knob 6) has the full mix output of PA mixer coming in.
    Pressing play on the Korg NanoKontrol allows you to test whether the BUTT gets signal when knob 5 is opened, as seen by the lit up LED-style indicators on BUTT.
  10. Start playback of pre-live Announcement in Reaper approximately 3 minutes before desired start of live broadcast.
  11. Press the 'Play' button in BUTT to start live broadcast on AsiaStream.
  12. Double-click the "startlive.command" shortcut on the Desktop to start live broadcast on TeluguStream.

  13. Fade out knob 5 and allow knob 6 to maintain around -12 dB at the output when the program starts. Playback can be stopped with the stop button on the NanoKontrol.
  14. Recording of programs is mapped to Channel 15 which is record enabled. The spacebar is the shortcut key.
  15. If recording is in progress, if a filler instrumental is to be added, BI.mp3 can be dragged from desktop to Channel 12 (knob 4) which has record enable DISABLED - the dull red ar button.
    Unless the track has record enable Disabled, playback will not occur from the track.
  16. The same procedure as above can be used to drag and drop the ANN_END_LIVE end announcement file for playout at the end if no one is available for live announcement.
  17. The microphone with stand available can be connected to the XLR input Channel 8 on the Tascam, and this can be used for Live announcements.
  18. In case there is live video streaming, the network cable tagged "Studio" has to be disconnected from the Macbook and connected to one of the BLUE coloured LAN ports of the router. The router has to be plugged into the UPS. The lan cable from the router has to be plugged into the MacBook. This setup has to be restored at the end of the live broadcast by unplugging the router and restoring the "Studio" tagged network cable, connecting it back to the Macbook.


creating closed caption subtitles for youtube videos

Youtube gives the option for closed captioning, which can be used to provide subtitles for videos. The part 1 of this post details the creation of the subtitle .srt file, which can be used for viewing subtitles on desktop players also. Part 2 walks through the process of adding the .srt file to youtube. The workflow follows this youtube tutorial, http://www.youtube.com/watch?v=e9t6cvEm600

Part 1 - creating the SRT file.

1. Download and install DivXLand Media Subtitler from http://www.divxland.org/subtitler.php
2. Create subtitles in notepad, use | to delineate multiline titles, else one line per subtitle.
3. File -> Open Text or Subtitle to open the text file create above,
    File -> Open video - rename flv video to mp4, if not recognized by the player.
4. Click apply and hold for as long as you want the title to appear.
5. Repeat till end of video, deleting duplicate last title if any.
    File -> Save As SRT

Part 2 - applying to youtube video
1. Upload video to youtube.
2. Choose Video Manager in your youtube account dropdown,

3. In the Edit dropdown, choose Captions,
4. Select Add New Caption 



 5. Choose this SRT file you have created using the browse button, and click the upload file button.


Thursday, March 22, 2012

Laptop DVD drive troubleshooting

Guest post from DJ:

Platform: 
Dell Vostro 1400
Windows XP SP3


Problem: For over a year the CD/DVD RW player did not perform properly. Jittery playback of Audio CD and most commercial DVD discs were not read. Writing was producing errors and most DVD R blanks were not recognized. 

Analysis 1: Drive lens problem. Cleaned it a couple of times - No positive impact

Analysis 2: Drive hardware problem. - Result out of laziness did not bother to fix and planned to buy external USB drive.

Analysis 3: (After over an year of sadness and lack of enthusiasm). Lens and hardware at fault. 
Took out my camera lens cleaner kit and carefully cleaned the lens. Still there was jitter. But all discs and DVD's were recognized. This gave me hope. Also I noticed that during DVD playback the computer response was sluggish. This prompted to think of DMA. In Device manager I found that the mode was sett to PIO and DMA was not an option. This was quite strange. Out of curiosity I checked the Dell website for any available updates. 

There was a firmware update available for the DVD drive. Carried out firmware upgrade for the DVD drive. Voila - Now it works like a charm. All DVD's are playing smoothly. Have not yet tried burning any discs yet.

I still cannot figure out how the firmware got corrupted - the DVD drive used to work fine earlier!

Tuesday, March 13, 2012

order mixup on schedule page

Our schedule page appeared to have some sort of bug where the order of some files would get mixed up in the "Listen Now" or downloads listings. The reason seemed to be that the files were being shown in the order of the playlist based on timestamp, but the timestamp only had hours and minutes, and not seconds, in the csv file generated from our local database and uploaded to the server. So, those files which had durations of less than a minute would have the same timestamp as the next file, and these two files would be interchanged during the display. So, today, added seconds to the csv, and the bug seems to have gone away. B tested the import before and after, etc.

Monday, March 05, 2012

bug-fixing the downloads links in search results

After the javascript for sorting the table was added to the audio search results page, there was a bug introduced, brought to our notice by a listener. Due to the way in which the javascript call was written, sorting the table caused the wrong links to appear. B, who had written the original code, fixed it by changing the javascript calls to explicitly reference the fids.

Sunday, March 04, 2012

screenshots of entire webpages

Useful tool - Fireshot - to create snapshots of entire (multipage) web-pages.
Can annotate the page, too. Works with IE also.

https://addons.mozilla.org/en-US/firefox/addon/fireshot/