Sunday, December 27, 2009

How to memorize difference between little vs. big endian?

Finally i discovered how to memorize distinguishing between little/big endian notation!
Guess how? Just understand the terminology and interpretation comes automatically.

endian stands for "end" or start (beginning)

little endian -> "start/beginning is small", hence memory starts with little number (lsb)

big endian -> "start/beginning is big", hence memory starts with big number (msb)

Sunday, October 25, 2009

HowTo: Embedding Non-english subtitle into iphone videos



After more than 4 hours, finally I can successfully embed hebrew/arabic subtitles into my iphone videos. For a matter of fact, googling this has took me to many various areas of iphone / video encoding which is not really what i am looking for.

So here is a short brief for what you need to do in order to add subtitles for iphone videos:
The process works in two phases:
  • VirtualHub
    Adding subtitle to your video
  • MediaCoder
    Converting your avi file to mp4; playable by your iphone.
Full procedure:
  • Install required software:
    - VirtualDub
    - Vobsub plugin for virtualdub. (choose TextSub plugin during installation)
    - 'MediaCode ipod edition'
  • Run virtualDub and load u'r video file
  • Add "TestSub" filter to u'r session (Menu: Video->filters->Add)
  • Navigate to u'r subtitle in TextSub configuration menu and choose the required font under "styles"
  • Choose compression mode to be Mpeg4-Xvid.
  • Save file
  • Open MediaCoder and load the file u just saved
  • Choose iphone as target resolution
  • hit 'Start'
  • Done. :)
I decided not to post links to installation software since links might be broken with the time, and googling them is quite simple operation.


Goodluck :)

Monday, March 9, 2009

Mastering Linux shell

I've been looking around about how can i extract the size of each subfolder in the current directory.  The issue is that find works recursively by default, and this will cause calculating the size of each subdirectory recursively.

The solution is to limit find depth by the parameter "maxdepth":
> find . -type d -maxdepth 1 -exec du -sh '{}' \;