Hari's Corner
Humour, comics, tech, law, software, reviews, essays, articles and HOWTOs intermingled with random philosophy now and thenGeeky and Meeky 6 - MCP
Filed under:
Geeky and Meeky comic by
Hari
Posted on Tue, May 29, 2007 at 17:40 IST (last updated: Thu, May 7, 2009 @ 21:24 IST)
Crossword Challenge solution
Filed under:
Bits and Bytes by
Hari
Posted on Tue, May 29, 2007 at 10:27 IST (last updated: Thu, Oct 30, 2008 @ 07:45 IST)
Selected posts from July 2005
Filed under:
Bits and Bytes by
Hari
Posted on Mon, May 28, 2007 at 16:37 IST (last updated: Thu, May 7, 2009 @ 21:35 IST)
Crossword Challenge
Filed under:
Bits and Bytes by
Hari
Posted on Thu, May 24, 2007 at 13:01 IST (last updated: Mon, Dec 6, 2010 @ 11:57 IST)
4 – Not ordinary
7 – First
8 – Go off topic for a while
9 – Quality of compassion
10 – Perfect fit
14 – Undesired message
16 – Smooth speaking
17 – Pleasing quality of perfumes
19 – Liquid burn
20 – Huge task ahead (figuratively.)
21 – Made furious, infuriated
22 – A kind of aurochs
23 – Native inhabitant of the Americas
25 – A stream or water channel
26 – The major aspect of globalization
27 – Traditional source of mineral water
Clues Down 1 – Of immense value
2 – Final demand with threat of force
3 – Taking attendance of a group
4 – Sports arena
5 – Ester of common organic acid found in lemon
6 – Unit or portion of instruction
11 – Elaborate nonsensical procedure
12 – Stunning, stupefying
13 – Give up, leave behind
15 – Unusual, strange
16 – Completely destroyed by fire
17 – Move forward
18 – Root of, first cause
24 – Of the highest quality, first-rate
iPod video encoding guide for Linux users
Filed under:
Tutorials and HOWTOs by
Hari
Posted on Wed, May 23, 2007 at 17:54 IST (last updated: Wed, Oct 1, 2008 @ 22:15 IST)
- Rip the DVD chapter by chapter, using acidrip. It's the most convenient way of doing it. I generally scale the video to the iPod size (320x240) at this stage since ripping becomes less time consuming. Other parameters don't matter much since you won't be using this format anyway. I also set the audio to MP3 using LAME (you need liblame for this) and bit rate to 64. You can set other parameters if you wish.
- Convert the resulting mpeg file(s) one by one to mp4 (with h264 codec) using the script (see below).
- Take a long coffee break
- Use a tool like gtkpod to transfer the mp4 file to your iPod. Hopefully it should play properly now.
ipodenc.sh
) and make it executable using the command chmod +x ipodenc.sh
.
The script's usage is (from the command line):#!/bin/bash #Encode iPod Video input_file=$1 output_file=$2 ffmpeg -i "${input_file}" -vcodec h264 -b 150k -bufsize 244 -maxrate 768k -s 320x240 -bf 0 -level 13 -f mp4 -acodec aac -ar 48000 -ab 64 "${output_file}"
./ipodenc.sh inputfile.mpg outputfile.m4v
You can alter some of those ffmpeg settings if you want to. I deliberately kept the bit rate low because the encoder will always choose higher bit rates. But you need the -bf 0
and the -level 13
parameters if you want the video to play (with the h264 format). I found this obscure bit of information on a mailing list archive. Earlier, when I encoded with h264 without those flags, it refused to play on the iPod.
This is more like a reminder to myself, but I hope you find this useful anyway. On programming
Filed under:
Software and Technology by
Hari
Posted on Mon, May 21, 2007 at 08:35 IST (last updated: Wed, Jul 16, 2008 @ 20:40 IST)
- Solving a particular problem using a specific method. This is the most basic level of software development that I can think of. This can probably be thought of as algorithmic programming in its purest form. Both the problem and the solution are well defined and the challenge is to translate the solution in a computer-readable form.
- Solving a particular problem by choosing from different methods. This is the next level of programming where you have a well-defined problem and different methods of solving them. Your main worry here is to choose the best method under a variety of constraints.
- Devising new methods to solve a well-defined problem. This could be thought of as creative programming - where a problem is well-defined, but the solution may not be as straightforward.
- Using an existing paradigm to generate methods of solving undefined problems. This is meta-programming at one level. Where problems are not yet well-defined, but you devise solutions based on an existing concept (like Object-Oriented Programming) which would cover expansion of scope. This could probably be best thought of as "anticipatory programming" - where you attempt to make code re-usable and extendable. This is the stage of advanced programming which requires more planning than coding.
- Creating a new paradigm which will generate methods of solving undefined problems. Now this is what we're talking about in the book I mentioned. It creates new paradigms of programming which will generate ways of solving future problems without writing new code. In short, it is generic programming at its height. Even grasping the basic idea is hard enough. I call it "meta meta-programming" because both the problem and the solution are undefined and requires the highest degree of skill and imagination to visualize.
- Theoritical complexity - as illustrated above, you can see how a theoritical complexity increases when you start thinking about concepts and programming paradigms. Theoritical complexity is the difficulty you encounter when you think about the software design and how best to match a design with a particular problem.
- Practical complexity - this is when the actual problem to be solved is inherently difficult. It can be anything from writing a full-fledged 3d game requiring intricate knowledge of vector physics and 3d geometry to writing an entire Operating System. Practical complexity often forces programmers to avoid theoritical complexity and choose solutions which are not necessarily suitable.