Tuesday, July 31, 2012

long filename problems

One of our filenames was too long, and probably because of that, had multiple entries in the website database. Renamed it on the servers, changed database entries to reflect the shorter name.

one more bug

I'd listed some bugs in the MFD in my last post, and had posted about Mac OS X Lion's flawed SMB implementation. P contributes one more:
Yesterday we were trying to take a print in Landscape from a Mac computer through Libre office app to the new HP printer. There was no option to change the orientation from Portrait to Landscape. Did a bit of google and found this workaround.


The solution is to use TextEdit to change the orientation, save it (like A4 Landscape) an then use it with other apps. While using the TextEdit to change the orientation, keep all other apps closed to enable it later to pick the new printer settings.

labour-saving with ADF

The Studio recently got a multi-function device (MFD) - the scanner - copier - network printer HP MFP 400 series M425 and I had the pleasure of using the automatic document feeder (ADF) for scanning a book. The job which would have taken me around 20 minutes per page of typing - 50 hours - or at least 10 hours of scanning and OCR using my old flatbed scanner, was over in just 1 hour. Proof-reading for corrections took another 5 hours or so for the 150 page Octavo sized book.

Just a word about this particular MFD - the driver software is quite buggy. Noticed so far:
  1. Printing from Windows, there seems to be no way to over-ride the printing on both sides of the paper. Even though the single-side printing is chosen in the print dialog box, printer prints on both sides. While printing from Mac, this issue is not seen.
  2. Scanning with OCR - when done with 'Greyscale' mode and scanning of both sides of the paper is chosen, scanning fails after the first side with an error. Probably the scanning of both sides of the paper with ADF is supported only in 'Black and White' mode.
  3. Device doesn't respond when it is in power-saving mode. Have to remove paper or do something to make the printer "wake up" after which it responds to print (or scan) commands from the network.
  4. Printer is very sensitive to paper jams. The earlier MFD in the Studio was able to print on a wide variety of paper, even thin paper. This one is finicky, jams with paper thinner than "copier paper".

Wednesday, July 25, 2012

manual changes to schedule page

P contributed this nugget - he manually edited the csv file to create an entry into Thursday's schedule, with the description having a link to the live schedule page. The filename could be fictitious, since the downloadable and streamable flags were set to zero.

Friday, July 20, 2012

procedure for UPS turn on and off

The  APC SmartUPS RT 5000 which was lent to Planetarium by P has some slightly unintuitive on-off procedure.

When there is mains power:
Switch on - First switch on input power, if not already on. Wait for 10 seconds or so for various relays to click, with the fan spinning up immediately. Only then press the ON button, for output to appear.

When there is no mains power:

Switch on - If the inverter and fans are off, first press (and release) ON button to start the fans spinning. After 5 seconds, keep ON button pressed till it emits a long beep after 4 seconds or so. Release the ON button during the long beep in order to cold start UPS output.

Switch off - Pressing the OFF button just stops the output - doesn't stop charging or the fans. There doesn't seem to be any way of turning off the fans when the UPS is connected to power - probably the charging circuits need the fans. So, if you want the UPS to be quiet and the fans switched off, you need to switch off inputs mains AC power, then long press the OFF button for completely switching off.

Tuesday, July 17, 2012

smb issues on Mac OS X Lion

P reported that on the machines which he upgraded to Mac OS X Lion, password-less access to guest SMB shares was no longer happening.

According to this page,
http://donmorris.com/on/smb-and-mac-os-x-lion
Lion dropped support for SMB1 and supports only SMB2. Maybe this is the reason?

This thread describes the same problem - guest user not working.

More discussions on this topic....

Finally, P got it working with SMBup. A much more elegant solution than installing Xcode and installing samba via macports etc etc.

Saturday, July 14, 2012

projector upgrade

A conversation with AB led to some research on possible projector upgrades for the Planetarium. Our current projector has around 2 megapixel count. For doubling the resolution, currently the only projector seen is this Sony 4k projector which costs 20 times as much as our projector. Even if we get our hands on that projector, it does not have the ability to focus at the distances we want.


And then there are the dedicated planetarium projectors, which give really good displays, but which cost in crores, like this one at page 11/13.
 
Some more projector info came from the E&S page - which gave info about this JVC model and searching for that one led to this one for "just" $8K. And a review too.

Friday, July 13, 2012

screen capture with video annotation​s

There was a conversation by email regarding this. S asked the question, K replied.

The question:
Have you used any screen capture s/w other than camstudio.. camstudio is great but its video annotation feature doesnt work..so while creating a video tutorial, if i want the webcam to also show my face in a small window in a corner of the screen, the video annotations under tools menu is supposed to work..but for some reason doesn't...

The answer:
I am assuming you are using the free version from techsmith called Camstudio. There is a commercial version called Camtasia Studio. I am currently using version 3.0 in my office.


Camtasia (the commercial version) is by far one of the best tools for screen recording. Is there a specific reason you want full motion video captured via your webcam? The reason I am asking is this:

Screen recording is done at a much lower frame rate than full motion video. A typical camtasia recording will be at 5 frames per second while full motion video is 25 frames per second. Even the 5 frames per second is further reduced when the recording tool detects that there has been no change to the screen for more than 5 seconds. I would suggest not using a built in webcam recording unless absolutely essential.

These are some good alternatives I have tried:

ViewletCam (http://www.qarbon.co.in/presentation-software/viewletcam/) - Affordable and excellent after sales service.

Adobe Presenter (Powerpoint specific). 
Adobe Captivate - Generic elearning authoring tool from Adobe. This not as good as Camtasia Studio or Viewletcam. It is known to be buggy and I have had issues with rendering after a successful recording. It fails to detect changes in the screen and hence misses out some important activity on the screen.

Wednesday, June 27, 2012

fades to trims

After watching a fulldome show of Space Opera where the sequences were cropped using Trim in avisynth, found the abrupt cut transitions were too jarring in most cases. So, added 5 frame fades, like below:

FadeIO0(Trim(mix,73200,73220),5) ++ \
FadeIO0(Trim(mix,73457,73477),5) ++ \
FadeIO0(Trim(mix,4621,57424),5) ++ \
FadeIO0(Trim(mix,58301,59714),5) ++ \
FadeIO0(Trim(mix,60757,68115) ,5)
# FadeIO0 does the fade without adding any black frame at the begin or end.

While doing the export from avs to avi in Virtualdub, a virtualdub audio filter is required for this show, to reduce gain by 50%, as below.

Monday, June 18, 2012

filing income tax return online

Filing the income tax return is seen with trepidation by many (most?) people. Some of the pain associated with it can be reduced by knowing more about the process. Encouraged by this post by a colleague, I decided to try and file my own return this year. Keeping at hand income statement, investment and other transaction history, LIC and other receipts, PAN numbers of all entities, etc. is of course necessary, so I invested in a (physical) folder to keep all the papers in one place. Even after doing so, I was initially stumped while entering the numbers - the deductions need to be grouped according to section! (Section of the IT Act).

Some googling + a couple of phone calls solved the questions in my mind.

If I have to mention losses like short term capital loss - investing in a fund and then redeeming it at a loss during the financial year - then I have to use not the ITR1 form, but the ITR2 form.
https://incometaxindiaefiling.gov.in/portal/individual_huf.do

LIC premia for simple life insurance come under 80C, Health Insurance premia under 80D, Infrastructure bonds under 80CCF
http://www.licindia.in/tax_benefit.htm

Specific LIC schemes come under 80CCC - specifically mentioned in the premia receipts.

Tax saving mutual funds come under 80C, as mentioned in the mutual fund transaction statement.

SSSIHL donations come under "100% deduction without qualifying limit" in the 80G section since universities come under this ambit,
http://yourownadviser.com/articles/article_65_27-nov-2011

Now there may be misconceptions or errors in this post - in case you notice any, please let me know in the comments or by email to hn_88 at rediffmail dot com

Saturday, June 16, 2012

back to Linux on the Toshiba AC100

Have gone back to Linux on the Toshiba AC100 since it is probably of more use that way as a general purpose machine. After installing the proprietary NVidia driver, which is supposed to be required for HDMI out, found that suspend / hibernate don't work any more. The system does not come out of suspend - no display. Battery life seems to be only 4 hours now. Not sure if this is due to Linux or due to lessening of life over the last few months.

Thursday, June 14, 2012

escaping quotes in php

The TFD folks had trouble entering the TFD - they had copy-pasted the TFD into the data entry form which uses php, and on submitting it, got errors like
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''In spiritual matters // snip

Guessed that this was due to unescaped quotes. Asked him to manually remove the quotes before submitting. It worked. But he was again stumped by an apostrophe which again caused hiccups. Checked with P and he changed the code from

//$singlequote= "\'";

//$replace_singlequote= "''";
//$messageposted = str_replace($singlequote,$replace_singlequote,$messageposted);

and so on to

messageposted = htmlspecialchars($messageposted);

Tuesday, June 12, 2012

connection issues and workaround

At times when starting the live audio broadcast with BUTT, it is unable to connect to the streaming server immediately, and shows "Connecting..." for even as long as 2-3 minutes. Found a workaround - Restart management services on Cyberoam just before starting the stream. Why does this happen, and only in the evenings and not in the mornings? My feeling is, looking at the usage graphs on Cyberoam, that Cyberoam has too much traffic in the evenings, and doing the restart bounces off some of the excess traffic like streaming video and the like.


Monday, June 11, 2012

MNP - Mobile Number Porting experiences

Starting last year, Indians could change their mobile service providers without changing their mobile numbers. I had been a happy Airtel customer for around nine years, so I thought I need not port my number. But then a series of events made me change my mind. Airtel started asking me for ID proof documents repeatedly over a period of months, even after the ID proof documents were submitted. Tata Docomo had some nice plans and some of my colleagues shifted to Docomo. So, I ported my number from Airtel to Docomo.

That first port went off without a hitch. The only issue was, Tata Docomo had poor connectivity near the Planetarium, and no signal inside the building. This was clearly not acceptable, so I had to port again.  I thought I would give Vodafone a try, since Airtel was so ornery about my ID proof. For the mandatory 3 month waiting period between ports, I had to set up call forwarding so that calls to my number would be forwarded to my secondary mobile whenever the first one was out of range, ie. I was inside the building. Thus, I came to port my number for the second time, Tata Docomo to Vodafone.

Vodafone had coverage at the places I wanted, but.... no conference calling for pre-paid customers in AP! Also, the network quality was not as good, with voice drops etc, and the need to go to the lobby to answer calls to get a better signal. So I had to port again, especially since call conferencing is so much a requirement for me. Running out of options, I was going back to Airtel.

But now the porting process did not go smoothly. Each time a port request is made, the incumbent service provider calls up the customer to try to persuade him not to leave. The Vodafone rep gave me false information, that conference calling has been enabled "just last week". Still, I said I wish to port. But the porting did not happen. My local dealer, who was doing all the SIM card work for me, told me that this had happened to two other customers of his also, when they ported away from Vodafone - the Vodafone rep denies the porting request saying, "Customer cancelled port request"!

On the dealer's advice, tried another port request, with the same SIM, without submitting fresh documents. That did not go through. Calls to Airtel customer care indicated that the port was "in process", meaning that documents were awaited. Each of these port requests took two weeks, with a wait time of 7 days for the port to work under normal conditions, and a two week wait for a fresh porting code.

So, tried a port once again, with the same SIM, but with one more copy of ID proof documents. This time, the port went through. The Voda SIM stopped connecting to the Voda network, inserting the Airtel SIM connected to Airtel network. But.... no outgoing calls, and incoming calls were getting the message, "This number is blocked."

The dealer said that it would be resolved in one day. But since this is not normal behaviour, I called up Airtel customer care. The first level support agent said, "Everything is fine at our end". But I was not able to recharge, not able to get or make calls! So, I asked the call to be escalated. Second level support said, "Please call 123 (customer service IVR) and set your language preference there, that should solve the issue". And it did! So, finally, I am back with Airtel, which has a superior network in this part of the world.

Monday, June 04, 2012

more on overlay

After my earlier post on using AviSynth and virtualdub to create an overlaid video, found that the framerate of the clips had been wrong. The first version of the script had
bg=Imagesource("bk3.jpg", end = 16200, fps=30, use_DevIL=true)
top = BicubicResize(Crop(DirectShowSource("1.mp4"),40,6,-36,-4),320,240,0,0.75)

audio=DirectShowSource("1.mp4")
video1=Audiodub(Overlay(bg, top, 834, 771), audio)

Overlay uses the background clip's length to create the framerate. In this case, the clip used for "top" became speeded up.
So, modified the script, and also took into account that some of the clips were PAL and some NTSC - converted the PAL to NTSC using Bob and Weave using the recipe given here.

bg1=Imagesource("bk3.jpg", end = 15732, fps=30)

# changed the number of frames here
top = BicubicResize(Crop(DirectShowSource("1.mp4"),40,6,-36,-4),320,240,0,0.75)
audio=DirectShowSource("1.mp4")
video1=Audiodub(Overlay(bg1, top, 834, 771), audio)
# this was NTSC video, did not have to change framerate

 
bg2=Imagesource("bk3.jpg", end = 17264, fps=30)
# changed the number of frames here to match number of frames
#  in 30 fps version of ntscvid2 below

palvid2=DirectShowSource("2.mp4")
palvid2=Bob(palvid2) # Separate fields and interpolate them to full height.
palvid2 = ChangeFPS(palvid2, 60000, 1001)
# Convert field rate to NTSC, by duplicating fields.


palvid2 = SeparateFields(palvid2)
palvid2 = SelectEvery(palvid2,4,0,3)
# Undo Bob, even field first. Use SelectEvery(4,1,2) for odd field first.
ntscvid2= Weave(palvid2)
top2 = BicubicResize(ntscvid2,320,240,0,0.75)
audio2=DirectShowSource("2.mp4")
video2=Audiodub(Overlay(bg2, top2, 834, 771), audio2)

# and so on

Sunday, June 03, 2012

recovering a Windows XP laptop

V's Windows XP laptop - this old Acer machine, repurposed as an internet radio player - was not booting. Not even in safe mode command prompt only. As recommended by PB, tried booting from Windows XP boot disk, recovery console. That worked. Then tried chkdsk in recovery console, rebooted, chose "Last known good configuration", worked fine.

Did a Scandisk thorough after that also, just to be safe. Seems to work fine now.

abandoned attempts to play shows on Toshiba AC100

With mvideoplayer app on the Toshiba AC100, was able to play files sequentially from a folder - that seemed to be its playlist functionality as mentioned briefly earlier. With that, tried to play today's Planetarium show using the Toshiba AC100. Made multiple copies of the intro avi files in each relevant folder using hard links, with the SD card formatted as ext3 on Linux to save space on the SD card.
ln /full/path/to/sourcefile /full/path/to/destinationfile
And so on.

Unfortunately, when the video stutters a bit - and the Toshiba has that problem, with a few frame drops here and there - the HDMI input on the projector blacks out for 5 seconds or so. This happened 2-3 times during the show. Clearly this is unacceptable, so gave up playing Planetarium shows on the Toshiba AC100 for now.

The HDMI input does make a difference, with the video being much crisper than with the VGA output from the laptop. Maybe a standalone HD player might work out.

Saturday, June 02, 2012

importing files without playing them - revisited

After I had used this technique, we have made some changes, ie. adding DiscourseStream to the mkcsv scripts, with AsiaStar being dropped. So, had to do an additional step of creating some dummy records for DiscourseStream - finding the fileid 695 for bcid 1314 (Signature tune for AsiaStar), changing it to bcid 9 (DiscourseStream) and changing the time from 6.30 am IST to 7.00 am IST (changeover time for DiscourseStream). Then changing bcid for a couple more dummy records which have timestamp after 7 am. This way, imported a lot of files like Polish Veda Pushpanjali, Satyopanishad in Mandarin, etc to our audio archive / audio search.

avisynth and virtualdub redux

Last time I had used a transform in virtualdub in order to create a video with predominantly white background and a window with a slideshow. This time, did all the processing in avisynth and used virtualdub only to save as avi. Used virtualdub's audio filters for the first time, and had to see this article in order to make them work - we need to add the input and output filters in addition to any other filter we add, and then link them together in a meaningful way.

The main avisynth filter I used was Overlay. Also, Crop to remove unnecessary black bars from one of the videos. The script is as follows, concatenating together three videos with a background pic which has a nice frame on a predominantly white background, as below.

top = BicubicResize(Crop(DirectShowSource("1.mp4"),40,6,-36,-4),320,240,0,0.75)
audio=DirectShowSource("1.mp4")
video1=Audiodub(Overlay(bg, top, 834, 771), audio)

top2 = BicubicResize(DirectShowSource("2.mp4"),320,240,0,0.75)
audio2=DirectShowSource("2.mp4")
video2=Audiodub(Overlay(bg, top2, 834, 771), audio2)

top3 = BicubicResize(DirectShowSource("3.mp4"),320,240,0,0.75)
audio3=DirectShowSource("3.mp4")
video3=Audiodub(Overlay(bg, top3, 834, 771), audio3)

video1 ++ video2 ++ video3

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.