Tried out a Blu-Ray player, Sony BDP S 190 for projection for our mirror-dome. Got more clarity on the dome over our earlier VGA output method. Most probably the improvement is due to the blurring in the earlier VGA signal due to the cable length, while the Blu Ray player uses HDMI, and hence an all-digital signal path.
In case someone is interested in using this technique for "pre-warped" mirrordome projection, it is extremely cost-effective. Create the shows, warp as desired, put them on Blu-Ray or USB mem stick, no computer needed for playout.
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!
Tuesday, August 14, 2012
Sunday, August 05, 2012
removing background from drawing or line art
I was requested to put in some drawings onto a website in such a way that the background image of the website showed through. At first I thought I needed to make jpgs with similar region of background, but this led to seams being visible at the edges of the jpg since the background was complex and not a single colour. Finally settled on png files with transparency.
For getting the line drawings to that state, first I thought about converting to vector format. Explored vectormagic.com but found that the free online version was too low res for my needs. Then came across this post - I needn't go the vector way, since the images I had were higher resolution than what I needed for the website. So, just used Select -> Color Range in Gimp, was able to select the line art alone without the white background, was able to paste it into a new transparent layer in Gimp, and could proceed from there.
For getting the line drawings to that state, first I thought about converting to vector format. Explored vectormagic.com but found that the free online version was too low res for my needs. Then came across this post - I needn't go the vector way, since the images I had were higher resolution than what I needed for the website. So, just used Select -> Color Range in Gimp, was able to select the line art alone without the white background, was able to paste it into a new transparent layer in Gimp, and could proceed from there.
sms spam on Airtel
I've started getting some SMS spam on my Airtel number. As pointed out by Prasanto, I've logged a complaint with Airtel, (or the last link at this page) after getting my DND registration number by smsing MY DND to 1909.
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:
Just a word about this particular MFD - the driver software is quite buggy. Noticed so far:
- 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.
- 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.
- 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.
- 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.
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.
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.
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 annotations
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.
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.
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
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
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.
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
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.
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.ln /full/path/to/sourcefile /full/path/to/destinationfile
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
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.
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
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.
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:
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.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.
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....
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.
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.
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.
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.
- 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. - 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.
- In the Tascam Control Panel, choose the dropdown to change the Digital output channels from line out 1 & 2 to line out 3 & 4.
- Next, fire up the Jack Pilot app.
- 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.
- Next, start the BUTT app.
- And finally start Reaper.
- 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.
- 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. - Start playback of pre-live Announcement in Reaper approximately 3 minutes before desired start of live broadcast.
- Press the 'Play' button in BUTT to start live broadcast on AsiaStream.
-
Double-click the "startlive.command" shortcut on the Desktop to start live broadcast on TeluguStream.
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.- Recording of programs is mapped to Channel 15 which is record enabled. The spacebar is the shortcut key.
- 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. -
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.
- 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.
- 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.
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/
Some of the probable reasons are given in the forum posts below:
http://forum.recordingreview.
- Upgrade to Windows XP SP3
- Make sure you have connected to a USB2 port and not to USB1
- Make sure no other device (like mouse) are connected to the same bus (using device manager, you can check this.)
- 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.
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/
Schedule it to run periodically using Windows task scheduler as given at
http://www.iopus.com/guides/
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/
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/
Can annotate the page, too. Works with IE also.
https://addons.mozilla.org/en-
Saturday, March 03, 2012
Connecting iPhone to ad-hoc network - without access point
Connecting iPhone to ad-hoc network - without access point - as requested by A:
for a Mac,
https://culturedcode.com/ things/wiki/index.php/Setting_ up_an_Ad-hoc_Wi-Fi_network
or
http://geeknizer.com/how-to- connect-iphone-to-mac-adhoc- wireless-without-router- reverse-tether/
for a Mac,
https://culturedcode.com/
or
http://geeknizer.com/how-to-
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.
http://www.fauskes.net/nb/
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.
Tuesday, February 28, 2012
unlimited bandwidth hosting options
Interesting thread on slashdot,
http://ask.slashdot.org/story/ 12/02/28/0029218/suggestions- for-music-hosting
etc
http://ask.slashdot.org/story/
1. http://www.fdcservers.net/ [fdcservers.net]
FDCservers has had great support. They are absolutely the cheapest per-megabit in North America, with rates of <$150 for 100Mbps unlimited bw, which you can easily push with even a mediocre server. Their plans also don't require you to build or buy your own servers, which is great.
2. http://www.leaseweb.com/ [leaseweb.com]
In Europe, you can look into Leaseweb. Based in Amsterdam, they have great rates (<$150 too for 100Mbps unlimited bw) for their dedicated servers, slightly worse support than FDCservers, but still pretty good service. They're based in Amsterdam, and have pretty decent North American data transfer rates despite their location.
etc
Toshiba AC100 trials
Got a Toshiba AC100 for just Rs. 10,000, wanted to try and play the Planetarium shows from it since it had an HDMI out and is supposed to be HD capable. It played the 6 Mbps Xvid videos without hiccups, but the HDMI out was not stable. Pausing the video would cause the HDMI to be interrupted, so that the projector would show a black screen. Also, there seemed to be no way to play a playlist of multiple videos one after the other.
Moboplayer was supposed to be one of the players for Android which supports playlists. Since the Toshiba AC100 does not have the Android Market, downloaded and installed it from apktops.com. But it appears that the playlist support needs the menu, which needs to be accessed by a swipe on the touchscreen, and the AC 100 does not have a touchscreen! Foiled!
Tried installing Linux on the device instead of Android. But the players in Linux were disappointing. The default movie player in Ubuntu and vlc both were quite unable to play the 1080p 6 Mbps movie files - played like a slide show, only updating the frame when seeking etc. mplayer was better, but was still dropping frames. So, restored Android.
Tried an android port of mplayer. Unfortunately it skips frames when playing the 6 Mbps 1080p XVid movie files.
Then tried mvideoplayer, downloading from some download site - I think mediafire. It works reasonably well, playing all the files in one folder sequentially like a playlist. It is supposed to support playlists, but I have not been able to make playlists with it yet, it says "No playlists found" even when m3u pls and asx files are in the usb disk.
Moboplayer was supposed to be one of the players for Android which supports playlists. Since the Toshiba AC100 does not have the Android Market, downloaded and installed it from apktops.com. But it appears that the playlist support needs the menu, which needs to be accessed by a swipe on the touchscreen, and the AC 100 does not have a touchscreen! Foiled!
Tried installing Linux on the device instead of Android. But the players in Linux were disappointing. The default movie player in Ubuntu and vlc both were quite unable to play the 1080p 6 Mbps movie files - played like a slide show, only updating the frame when seeking etc. mplayer was better, but was still dropping frames. So, restored Android.
Tried an android port of mplayer. Unfortunately it skips frames when playing the 6 Mbps 1080p XVid movie files.
Then tried mvideoplayer, downloading from some download site - I think mediafire. It works reasonably well, playing all the files in one folder sequentially like a playlist. It is supposed to support playlists, but I have not been able to make playlists with it yet, it says "No playlists found" even when m3u pls and asx files are in the usb disk.
Monday, February 27, 2012
Saturday, February 25, 2012
Installing and running Linux on the Toshiba AC100
Since my main purpose was to use the Toshiba AC100 for screening 1080p HD movies at 6 Mbps or more, I did not do too many benchmarks or other tests. But the installation procedure was as follows.
This link provided tips on taking a backup of the factory boot-loader. Since I run Kubuntu as a dual boot on my laptop, I could install nvflash as given here, with dpkg.
After installing nvflash,
whereis nvflash gave the location /usr/lib/nvflash for fastboot.bin which was the included bootloader. So, the command I used for backup of the Toshiba's bootloader was
nvflash --bl /usr/lib/nvflash/fastboot.bin --read 6 partition_6_backup.bin --go
When I tried it the first time, I had got the path wrong, a typo. After retyping the correct path, it took a very long time, and didn't seem to be doing anything. Just for testing out, tried putting off the device, and again putting it in recovery mode with Ctrl-Esc pressed down while power on. Then tried
nvflash --bl /usr/lib/nvflash/fastboot.bin --go
nvflash -r --getpartitiontable partitiontable.txt
nvflash -r --read 2 part-2.img
etc
as suggested at http://gitorious.org/ac100/pages/Installation , worked in seconds. So, made a backup of partition 6 as given above.
Then followed the instructions at https://wiki.edubuntu.org/ARM/TEGRA/AC100 for the install.
The system was fairly OK with Ubuntu 11.10, though a bit sluggish with its 512 MB RAM. Firefox opened in 10 seconds. Boot time was around a minute. xubuntu loaded with apt-get, and with an xfce desktop, it felt more responsive.
Anyway, since the video was not playing without frame-drops, went back to Android by restoring the boot loader,
nvflash --wait --bl /usr/lib/nvflash/fastboot.bin --download 6 partition_6_backup.bin --go
This link provided tips on taking a backup of the factory boot-loader. Since I run Kubuntu as a dual boot on my laptop, I could install nvflash as given here, with dpkg.
After installing nvflash,
whereis nvflash gave the location /usr/lib/nvflash for fastboot.bin which was the included bootloader. So, the command I used for backup of the Toshiba's bootloader was
nvflash --bl /usr/lib/nvflash/fastboot.bin --read 6 partition_6_backup.bin --go
When I tried it the first time, I had got the path wrong, a typo. After retyping the correct path, it took a very long time, and didn't seem to be doing anything. Just for testing out, tried putting off the device, and again putting it in recovery mode with Ctrl-Esc pressed down while power on. Then tried
nvflash --bl /usr/lib/nvflash/fastboot.bin --go
nvflash -r --getpartitiontable partitiontable.txt
nvflash -r --read 2 part-2.img
etc
as suggested at http://gitorious.org/ac100/pages/Installation , worked in seconds. So, made a backup of partition 6 as given above.
Then followed the instructions at https://wiki.edubuntu.org/ARM/TEGRA/AC100 for the install.
The system was fairly OK with Ubuntu 11.10, though a bit sluggish with its 512 MB RAM. Firefox opened in 10 seconds. Boot time was around a minute. xubuntu loaded with apt-get, and with an xfce desktop, it felt more responsive.
Anyway, since the video was not playing without frame-drops, went back to Android by restoring the boot loader,
nvflash --wait --bl /usr/lib/nvflash/fastboot.bin --download 6 partition_6_backup.bin --go
Sunday, February 12, 2012
why did the server crash
There was an outage for a few hours yesterday. Reason was that the server had stopped responding. All services seemed to have crashed. Audio streams from around 11 am, Apache from around 3.50 pm. No ssh also. But a remote reboot worked and solved the issue.
Checking out logs, Apache's access log and error log both stop at around 3.50 pm till the restart around 50 minutes later. Not much info except some lines in Apache logs which say possible SYN flooding, which may or may not be a real DoS attack. If there is a tuning issue with SYN flooding, this might be a possible solution,
http://labs.creativecommons. org/2010/12/08/tuning-tcp-on- ccs-servers/
Checking out logs, Apache's access log and error log both stop at around 3.50 pm till the restart around 50 minutes later. Not much info except some lines in Apache logs which say possible SYN flooding, which may or may not be a real DoS attack. If there is a tuning issue with SYN flooding, this might be a possible solution,
http://labs.creativecommons.
ebook readers on iphone redux
In my previous post, I mentioned that Bluefire reader is working fine. But... while using, found that sometimes it becomes very slow. Slow to load, 2-3 minutes to start; slow to change pages, sometimes taking 2-3 seconds or more. Looking around for other options, found this post, and also this comparison wikipedia page.
Tried out BeyondPrint, ShuBook and uBooks.
BeyondPrint - interface looks very similar to BlueFire reader, has similar limitations. But also supports PDF.
ShuBook - is quick and responsive, but can only load books from the online sources built-in with the free version. The paid version has the option for us to load our own books etc.
uBooks - Can upload books with wifi using its own web interface. Web interface doesn't work with Firefox which complains about some incompatibility, but works fine with IE. Has a slightly different interface - not the paginated interface of other ebook readers, but allows continuous scrolling. Also jumps to "next page" with a tap on rhs of screen.
So, as of now, using ShuBook for books from Gutenberg et al, and uBooks for others.
Tried out BeyondPrint, ShuBook and uBooks.
BeyondPrint - interface looks very similar to BlueFire reader, has similar limitations. But also supports PDF.
ShuBook - is quick and responsive, but can only load books from the online sources built-in with the free version. The paid version has the option for us to load our own books etc.
uBooks - Can upload books with wifi using its own web interface. Web interface doesn't work with Firefox which complains about some incompatibility, but works fine with IE. Has a slightly different interface - not the paginated interface of other ebook readers, but allows continuous scrolling. Also jumps to "next page" with a tap on rhs of screen.
So, as of now, using ShuBook for books from Gutenberg et al, and uBooks for others.
Friday, February 10, 2012
PHPlist - issues with spaces in words
PB found a possible solution for the problem where the SI messages when sent by email had spaces inside random words. Basically it seems to be due to the MTA adding carriage returns or line feeds or CRLF in the middle of large lines.
https://mantis.phplist.com/ view.php?id=15603
For the time being, the SI people are using a workaround, of pasting the message into the PHPlist compose box again after copy-pasting the entire html message. Perhaps that adds CRLF and has the same end result.
https://mantis.phplist.com/
For the time being, the SI people are using a workaround, of pasting the message into the PHPlist compose box again after copy-pasting the entire html message. Perhaps that adds CRLF and has the same end result.
Saturday, January 28, 2012
firewall rule to restrict browsing during live times
P wanted some firewall rules on Cyberoam so that the live video broadcasts are not affected by people browsing, downloading, etc.
1. Added a schedule under
Firewall -> Schedule -> Define Schedule
called LiveTimes and added the times 7.50 am to 10 am and 4.25 pm to 6.30 pm.
2. Created a Bandwidth policy under
Policies -> Bandwidth Policy -> Create Policy
called LiveTimesThrottle to throttle bw to 256 kbps up and down.
It says Bandwidth in KB - so we have to enter 256/8 = 32 in the box there.
3. Added the LiveTimes schedule for this policy.
4. Added it to Firewall rule in Firewall -> Manage Firewall -> Rule 1 Any Host to Any Host Accept.
Now I am not sure if the Voxel traffic also will be allowed! So, adding a firewall rule,
5. LAN Any Host -> WAN Any Host, RTMP service, Accept + MASQ, with no time/bandwith limit.
Unfortunately, this had the opposite effect to what was desired - during the live times the bandwidth was unlimited, and at other times the bandwidth policy was enforced! This was because the bandwidth policy page says:
Default Values to be applied all the time....
and the schedule is added under
Add Schedule wise details to override default Bandwidth details
So one way out would have been to reverse the schedule timings. But P wanted an alternate solution, just giving priority to the RTMP streams to and from Voxel instead of throttling all traffic on all days at those times. So, he decided on creating a bandwidth policy, Guaranteed 1 Mbps (128 KB) and Burstable 2 Mbps (256 KB) for RTMP service to voxel, with maximum 0 priority. Now we have to check whether enabling just this bandwidth policy is enough by itself, or we need to explicitly de-prioritize other traffic.
1. Added a schedule under
Firewall -> Schedule -> Define Schedule
called LiveTimes and added the times 7.50 am to 10 am and 4.25 pm to 6.30 pm.
2. Created a Bandwidth policy under
Policies -> Bandwidth Policy -> Create Policy
called LiveTimesThrottle to throttle bw to 256 kbps up and down.
It says Bandwidth in KB - so we have to enter 256/8 = 32 in the box there.
3. Added the LiveTimes schedule for this policy.
4. Added it to Firewall rule in Firewall -> Manage Firewall -> Rule 1 Any Host to Any Host Accept.
Now I am not sure if the Voxel traffic also will be allowed! So, adding a firewall rule,
5. LAN Any Host -> WAN Any Host, RTMP service, Accept + MASQ, with no time/bandwith limit.
Unfortunately, this had the opposite effect to what was desired - during the live times the bandwidth was unlimited, and at other times the bandwidth policy was enforced! This was because the bandwidth policy page says:
Default Values to be applied all the time....
and the schedule is added under
Add Schedule wise details to override default Bandwidth details
So one way out would have been to reverse the schedule timings. But P wanted an alternate solution, just giving priority to the RTMP streams to and from Voxel instead of throttling all traffic on all days at those times. So, he decided on creating a bandwidth policy, Guaranteed 1 Mbps (128 KB) and Burstable 2 Mbps (256 KB) for RTMP service to voxel, with maximum 0 priority. Now we have to check whether enabling just this bandwidth policy is enough by itself, or we need to explicitly de-prioritize other traffic.
Tuesday, January 24, 2012
making pretty pdfs of webpages and reports
In my previous post, I mentioned creating pdfs server-side for awstat. But creating pdfs from any web page or report?
One way - view only main frame by right-clicking on required frame and choosing View only this frame, and use that url in Adobe Acrobat Pro,
File -> Create PDF -> From Web Page
If you don't have Adobe Acrobat Pro, this solution looks good: using www.web2pdfconvert.com
One way - view only main frame by right-clicking on required frame and choosing View only this frame, and use that url in Adobe Acrobat Pro,
File -> Create PDF -> From Web Page
If you don't have Adobe Acrobat Pro, this solution looks good: using www.web2pdfconvert.com
configuring voxel server for sgh and h2h - part 3
Continuing my series of posts on server setup.
Wanted the home page to be not cached, since they update it often. Looking into it, found two interesting articles, at stackoverflow and metaskills. The first article gave a tip on how to control browser cache for specific urls - using the LocationMatch tag. The second one recommended expiring all html pages immediately. I followed the second one, since our server is not facing any resource crunch right now.
ExpiresActive On
Wanted the home page to be not cached, since they update it often. Looking into it, found two interesting articles, at stackoverflow and metaskills. The first article gave a tip on how to control browser cache for specific urls - using the LocationMatch tag. The second one recommended expiring all html pages immediately. I followed the second one, since our server is not facing any resource crunch right now.
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 120 minutes"
ExpiresByType image/jpeg "access plus 120 minutes"
ExpiresByType image/png "access plus 120 minutes"
ExpiresByType text/css "access plus 60 minutes"
ExpiresByType text/javascript "access plus 60 minutes" ExpiresByType application/x-javascript "access plus 60 minutes" ExpiresByType text/xml "access plus 60 minutes"
Initially this block in apache2.conf was inside an if tag, IfModule mod_expires.c - but was not working. Then I commented out the IfModule tags - then it started working, since anyway I had enabled the module using a2enmod expires
Next - wanted to enable some sort of automated log parsing. Among free log analyzers, settled on awstats, since someone had made a mod for wowza too. Followed the ubuntu documentation for awstats installation. There, the recommended cron is
This notation */3 means once every three hours.
For installing GeoIP - tried enabling it directly, since it is supposed to be one of the default included modules, but got this error,
Error: Plugin load for plugin 'geoipfree' failed with return code: Error: Can't locate Geo/IPfree.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /usr/share/awstats/lib /usr/share/awstats/plugins /usr/lib/cgi-bin/plugins) at (eval 9) line 1.
So now I knew where the plugin directory was - so, could follow the method given here for installing maxmind's geolite databases.
wget http://geolite.maxmind.com/ download/geoip/database/ GeoLiteCountry/GeoIP.dat.gz
wget http://geolite.maxmind.com/ download/geoip/database/ GeoLiteCity.dat.gz
wget http://geolite.maxmind.com/ download/geoip/database/asnum/ GeoIPASNum.dat.gz
gunzip GeoIP.dat.gz
gunzip GeoLiteCity.dat.gz
gunzip GeoIPASNum.dat.gz
mkdir /usr/local/share/GeoIP/
mv *.dat /usr/local/share/GeoIP/
Tried installing Geo::IP Perl module with
http://www.cpan.org/modules/ INSTALL.html
So, followed the steps at
http://antezeta.com/awstats/ geoip.html
to install the C module.
wget http://geolite.maxmind.com/ download/geoip/api/c/GeoIP. tar.gz
gunzip GeoIP.tar.gz
tar xvf GeoIP.tar.gz
cd GeoIP-1.4.8
./configure
make
make install
Then,
cpanm Geo::IP worked.
Uncommented
LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"
changed the path to /usr/local/share/GeoIP/GeoIP. dat
Did not add the other two plugins, for city and ISP, since that would slow down AWstats.
Had to flush newer records, by deleting files in
DataDir - /var/lib/awstats
in order to process older log files, as given at
http://awstats.sourceforge. net/docs/awstats_faq.html# OLDLOG
Took around 15 minutes to crunch old logs for 15 days, so probably the log for 3 hours will take only half a minute or less.
Next for Wowza. Did not have to modify the logging parameters as given at
http://www.wmconsulting.info/ awstats-mod-for-process-wowza- stats/
since most of the parameters were already set. But had to change the LogFormat drastically, since my Wowza version is different - 3.03. Also, one point which he makes is to log only the destroy stream event. Not doing that, logging everything as we are doing, was causing over-counting of bytes sent. So, changed the LogFile parameter to read
LogFile=”/usr/local/awstats- wmc/tools/logresolvemerge.pl /usr/local/WowzaMediaServer/ logs/*access* | grep destroy |”
And my LogFormat parameter is
LogFormat="date time %other %other %other %other %code %other %other %other %virtualname %other %other %other %other %url c-ip %method %referer %ua %other %other sc-bytes %other %other %other %other %other %other %other %other %other %other %other %other %other %other %other"
Using this method, bandwidth is slightly under-reported - by some 10%. But cheaper than Sawmill.
To make pdf reports, on the server, the buildstaticpages tool needed htmldoc, which I installed with apt-get install htmldoc
Initially this block in apache2.conf was inside an if tag, IfModule mod_expires.c - but was not working. Then I commented out the IfModule tags - then it started working, since anyway I had enabled the module using a2enmod expires
Next - wanted to enable some sort of automated log parsing. Among free log analyzers, settled on awstats, since someone had made a mod for wowza too. Followed the ubuntu documentation for awstats installation. There, the recommended cron is
0 */3 * * * /usr/lib/cgi-bin/awstats.pl -config=yourdomain.ext -update > /dev/null
This notation */3 means once every three hours.
For installing GeoIP - tried enabling it directly, since it is supposed to be one of the default included modules, but got this error,
Error: Plugin load for plugin 'geoipfree' failed with return code: Error: Can't locate Geo/IPfree.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /usr/share/awstats/lib /usr/share/awstats/plugins /usr/lib/cgi-bin/plugins) at (eval 9) line 1.
So now I knew where the plugin directory was - so, could follow the method given here for installing maxmind's geolite databases.
wget http://geolite.maxmind.com/
wget http://geolite.maxmind.com/
wget http://geolite.maxmind.com/
gunzip GeoIP.dat.gz
gunzip GeoLiteCity.dat.gz
gunzip GeoIPASNum.dat.gz
mkdir /usr/local/share/GeoIP/
mv *.dat /usr/local/share/GeoIP/
Tried installing Geo::IP Perl module with
http://www.cpan.org/modules/
cpan App::cpanminus cpanm Geo::IPFAIL Configure failed for Geo-IP-1.40. See /root/.cpanm/build.log for details
So, followed the steps at
http://antezeta.com/awstats/
to install the C module.
wget http://geolite.maxmind.com/
gunzip GeoIP.tar.gz
tar xvf GeoIP.tar.gz
cd GeoIP-1.4.8
./configure
make
make install
Then,
cpanm Geo::IP worked.
Uncommented
LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"
changed the path to /usr/local/share/GeoIP/GeoIP.
Did not add the other two plugins, for city and ISP, since that would slow down AWstats.
Had to flush newer records, by deleting files in
DataDir - /var/lib/awstats
in order to process older log files, as given at
http://awstats.sourceforge.
Took around 15 minutes to crunch old logs for 15 days, so probably the log for 3 hours will take only half a minute or less.
Next for Wowza. Did not have to modify the logging parameters as given at
http://www.wmconsulting.info/
since most of the parameters were already set. But had to change the LogFormat drastically, since my Wowza version is different - 3.03. Also, one point which he makes is to log only the destroy stream event. Not doing that, logging everything as we are doing, was causing over-counting of bytes sent. So, changed the LogFile parameter to read
LogFile=”/usr/local/awstats-
And my LogFormat parameter is
LogFormat="date time %other %other %other %other %code %other %other %other %virtualname %other %other %other %other %url c-ip %method %referer %ua %other %other sc-bytes %other %other %other %other %other %other %other %other %other %other %other %other %other %other %other"
Using this method, bandwidth is slightly under-reported - by some 10%. But cheaper than Sawmill.
To make pdf reports, on the server, the buildstaticpages tool needed htmldoc, which I installed with apt-get install htmldoc
Subscribe to:
Posts (Atom)



















