Tuesday, May 29, 2012

extracting audio from DVD

The older post on this topic mentioned DVD Decrypter and others. This time, for some reason, that method did not work. Perhaps because of some mistake in the sequence of steps, I suppose, the resulting file was a VOB file and not an mp2 file. Anyway, the file was not being opened by any of the AC3 decoding methods like WinAmp plugin etc.

So, this time, I tried just copied the VOB files to the hard disk and opening them with VirtualDubMod, extracting the audio stream using Streams -> Stream List -> Save wav. That wav was opened using Soundforge, using AC3 codec. Slightly buggy, since each VOB file's wav data had the duration info of the entire program chain, and so had some sort of repeating audio after the first 25 minutes or so which had to be cut out. But otherwise OK.

Sunday, May 20, 2012

installing Perl module on dreamhost

K wanted me to include mp3 tags on the downloads at dl.radiosai.org. Googled installing Perl Module without root access, and found lots of people doing it, so went on to install MP3::Tag module without root access.

First I tried the procedure at
http://perl.jonallen.info/writing/articles/install-perl-modules-without-root
but the perl process kept getting killed as given at
http://wiki.dreamhost.com/Killed

Dreamhost recommends installing via the CPAN command, as given at
http://wiki.dreamhost.com/CPAN
and then the process doesn't get killed.

But the wiki had some bugs. Got errors like

Cannot gzopen $ENV{HOME}/.cpan/sources/authors etc. Googled it and found
http://discussion.dreamhost.com/thread-87436.html
where the user k2S explains that he did two things differently from the wiki page
http://wiki.dreamhost.com/CPAN
that is

**don't forget to add the suggested lines into your '~/.bash_profile' - that is, not ~/.profile
 ** test command 'echo $PERL5LIB', it should return the correct path

* *I had to edit also ~/.cpan/CPAN/MyConfig.pm and replace all '$ENV{HOME}' with the correct path

Once I did this, the install worked fine, with perl -MMP3::Tag -e 1 not returning any errors.
 (I had actually done the manual config of the MyConfig.pm  as given in the wiki, too.)

After the module installation, some trial scripts still gave errors. Trying out a basic script from

http://search.cpan.org/~ilyaz/MP3-Tag-0.9709/Tag.pm
got errors like
Can't call method "get_tags" on an undefined value

Found this explanation, that it is because the file has no tag to begin with:
http://www.linuxquestions.org/questions/programming-9/cant-call-method-title-on-undefined-title-in-perl-script-396858/

Then tried tagging the file with no tag to start with, and got errors like:
Can't call method "new_tag" on unblessed reference at ./mp3tagger.pl line 6.

Problem was - the filename has to have the full path, and not start with ~/
Once that was done, the script worked. Now to work out some sort of tagging scheme, after which the tagging can be done.

Friday, May 18, 2012

Cyberoam and ftps

The guys at the studio had some trouble connecting to secure ftp. Their newly commissioned server would accept connections only over secure FTP on port 21, as below,
I was able to connect from BSNL network as well as from the Planetarium. But when they tried from the studio, they were getting timed out at "Initializing TLS". I replied with the following:
When the connection is initialized, a dialog box pops up, talking about the certificate, and whether we want to accept the certificate - attached. Only after you say yes does it connect. So, there are several possibilities - either your machine is not getting the certificate due to cyberoam, or somewhere in settings you have set it to not ask, or deny the certificate.

My guess is cyberoam. Cyberoam is set to proxy ftp connections. So, ftps may need some settings. You may want to ask the cyberoam support about this.
http://kb.cyberoam.com/print.asp?id=36&Lang=1&SID=

"Cyberoam parses SSL handshake (SSLv2, SSLv3, and TLS) and extracts “Common Name” (CN) from the certificate. It applies control filters on common name. Based on the outcome of filters, user is either served the page or the connection is terminated."

So probably somewhere in cyberoam you will need to add the certificate of this server, saying accept this certificate. Only then, I am guessing, will cyberoam connect to the server....
They contacted cyberoam support, and as per their recommendation added a MASQ rule so that this connection goes directly instead of through cyberoam's transparent proxy. Then it worked fine.
 

Wednesday, May 16, 2012

Prayaya

A sent me this link,
http://en.prayaya.com/index.html
for software which can create a portable subset of your desktop with the software you need, which you can then run from USB key or other portable storage on any Windows computer. Basically making any app portable. Interesting concept.

Wednesday, May 09, 2012

Google Sky Map

I remember seeing a device on Amazon.com which you could point to the sky, and it would label the objects seen. Now, an app - free to boot - does the same job. Google Sky Map.

Sunday, April 29, 2012

finally disabled old server

When the SaiUniti FS3 was restarted, our old Colinux service as well as the ShoutCast servers started running on it again, as I found with the Colinux auto email on reboot, since they were set to automatic startup. So, logged in to the server, disabled the automatic startup of all the shoutcast services + colinux on that server.

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.

Monday, April 16, 2012

preventing saiwaves disk from filling up

PB reports:

automysqlbackup script runs on Krishna and takes a backup into ~/dbBackups on krishna
The cron on saiwaves takes a copy of the backup into saiwaves through dbdumpsftp.sh

Changed the scp to copy only the daily folder instead of the entire backups folder. Also, changed destination to /local instead of ~

/local has about 200+ GB free

Hope this resolves the issue.

Saturday, April 07, 2012

error running our import script

While running our file import script, got an error,
error while loading shared libraries: libgnomeui.so.32: cannot open shared object file: No such file or directory
Sorry response not recoginsed...
 
Turned out it was because there was a wav file in the import folder. Removed the wav file, the import script ran fine.

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.



Edit: If you want youtube to show subtitles or captions ON by default, you must add the following tag to the video - yt:cc=on


Wednesday, March 28, 2012

Yamaha audiogram and "noise in recording"

I got a call from SK saying they are trying to start work at the newly inaugurated Studio, with a Yamaha Audiogram 6, but the recordings turn out to have some noise. My reply:

Some of the probable reasons are given in the forum posts below:
http://forum.recordingreview.com/f23/yamaha-audiogram-6-cubase-ai4-18362/
  1. Upgrade to Windows XP SP3
  2. Make sure you have connected to a USB2 port and not to USB1
  3. Make sure no other device (like mouse) are connected to the same bus (using device manager, you can check this.)
  4. Increase the buffer as given in the forum posts above

Tuesday, March 27, 2012

save a particular web page at predefined intervals in a specific folder

NA had this query - how to automate saving  a particular  web page ( Specified  url in the settings )  at  predefined intervals  in a specific folder.

My reply:

I assume you want to do this on a Windows machine. On a Linux machine this is quite easy.

For Windows:

write a vscript file to save the webpage as given in
http://www.computerhope.com/forum/index.php?topic=110781.0

Schedule it to run periodically using Windows task scheduler as given at
http://www.iopus.com/guides/winscheduler.htm

Follow-up about making the filename unique for each grab:
filename changing can be managed by massaging the vbs file, appending the date-time to the filename or something like that. Since I'm not a vbs guru, I'm not spending time on it to modify the file for you. :)

Also, making Windows Scheduled tasks repeat tasks every few minutes:
http://support.microsoft.com/kb/226795

NA reported that he has successfully implemented this.

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/

Wednesday, February 29, 2012

picture in picture with avisynth

Here is a nice recipe for doing p-in-p using avisynth:
http://www.fauskes.net/nb/avisynth/#picinpic
Basically using the Overlay function.

Using this for creating intro video, a white background with a picture frame of 1080p resolution around a 320x240 video.