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