Avi Alkalay Digital Awareness and Flying Spirit

Recently at the Blog

Better sleep leads to a better You 2 comments By AviPublished: Thu, 20 Mar 2008 06:02:40 -0300 Updated: Thu, 20 Mar 2008 06:06:21 -0300 Published: 20 Mar 2008 Published: 6:02 am Updated: 6:06 am Categories: ChroniclesMetaphysicsMusic & Podcasts Tags:

The title was the phrase written in a CD left in a Crown Plaza Hotel room I stood this days.

Its excellent content is a relaxation program with very soft music to listen and do after you go to bed and before you fall asleep, with the aim to make you sleep better.

I found it so effective that I read more through the CD cover. It is produced by a company called SoundSleep with the help of a certain Dr. Michael Breus.

The cover also contained some other “holistic approach to sleep principles” which I also find useful and would like to share:

  • Relax before bedtime. Stress can make you miserable and restless. Take some time for a pre-sleep ritual to break the connection between stress and bedtime. Try listening to the enclosed Sleep CD, reading, meditating, light stretching, lavender aromatherapy or a hot shower.
  • Watch the caffeine. Coffee and many teas and sodas contain caffeine and may keep you up. If you’ve already had too much, consider eating some carbohydrates like bread or crackers to help reduce the effects.
  • Watch the alcohol. Alcohol may initially help you fall asleep, but as your body clears it from your system, it can also cause nightmares, sweats and headache. Drink one glass of water for every alcoholic beverage consumed to try to reduce these symptoms.
  • Exercise at the right time. Regular exercise relieves stress and encourages good sleep. However, if a little exercise really gets your blood pumping, you’d be wise to not work out in the evening or just before bedtime.
  • Cut down on noise, light and extreme temperatures. Try earplugs, a night light, an eye mask or drape clip. The best temperature for sleep is 20 to 22°C (68 to 72°F).
  • East right, and sleep tight. Avoid eating a large meal just before bedtime or going to bed hungry. It’s about balance. Some foods that promote sleep include: milk, pumpkin, artichokes, avocados, almonds, eggs, peaches, walnuts, apricots, oats, aspargus, potatoes and bananas.
  • Understand jet lag. Before you cross time zones, try waking up later or earlier to help the body adjust to time difference. And remember, it takes a few days for the body to catch up.
  • Remember the purpose of the bed. Avoid TV, eating, and emotional discussions in bed. The mind and body associate bedtime activities with being in bed. So don’t let a bad habit keep you awake.
  • No drinks after 8 p.m. It’s a fact; most of us cannot simultaneously go to the bath room and sleep. So shut down your fluid intake before 8 p.m. so you can get your rest.
  • Nap smart. A little 20-minute power nap during the early part of the day can really be refreshing. But sleep too much, and you may spend the night staring at the ceiling.
The OOXML Date Bug 5 comments By AviPublished: Sun, 16 Mar 2008 10:16:43 -0300 Published: 16 Mar 2008 Published: 10:16 am Categories: OpenDocument Format Tags:

OOXML Date Bug

This is an example of an old Excel bug that was transported to OOXML for “compatibility” reasons.

In new OOXML, there are several non-standard ways to represent dates. The main one is this, that requires that 1900 is a leap year contradicting the Gregorian calendar, used for centuries now.

More info on this in a post by Rob Weir.

How I Became Vegetarian 1 comment By AviPublished: Sun, 16 Mar 2008 02:09:42 -0300 Published: 16 Mar 2008 Published: 2:09 am Categories: MetaphysicsVegetarianism Tags:

Around early 1995 I was thinking about to stop eating meat. I thought that would do good for my body and my mind.

Then I was waiting in a room, randomly took a book and randomly open it in the part that finally defined my decision. Later a saw many people becoming vegetarian because of the same part from the same book, so I found it important to share. The author was Sri Yukteswar and the book name is The Holy Science, from 1894.

This is the part of the book that influenced my decision that time (copy and pasted from Sain Louis’ Guide to Vegetarian Life):

What is natural food for man?

First, to select our natural food, our observation should be directed to the formation of the organs that aid in digestion and nutrition, the teeth and digestive canal; to the natural tendency of the organs of sense which guide animals to their food; and to the nourishment of the young.

Observation of teeth

By observation of the teeth we find that in carnivourous animals the incisors are little developed, but the canines are of striking length, smooth and pointed, to seize the prey. The molars also are pointed; these points, however, do not meet, but fit closely side by side to separate the muscular fibers.

In the herbivorous animals the incisors are strikingly developed, the canines are stunted (though occasionally developed into weapons, as in elephants), the molars are broad-topped and furnished with enamel on the sides only.

In the frugivorous all the teeth are of nearly the same height; the canines are little projected, conical, and blunt (obviously not inteded for seizing prey but for exertion of strenth), The molars are broad-topped and furnished at the top with enamel folds to prevent waste caused by their side motion, but not pointed for chewing flesh.

In Omnivorous animals such as bears, on the other hand, the incisors resemble those of the herbivorous, the canines are like those of the carnivorous, and the molars are both pointed and broad-topped to serve a twofold purpose.

Now if we observe the formation of the teeth in man we find that they do not resemble those of the carnivores, neither do they resemble the teeth of the herbivorous or th eomnivorous. They do resemble, eactly, those of the frugivorous animals. The reasonable inference, therefore, is that man is a frugivorous or fruit-eating animal.

Observation of the digestive canal

By observation of the digestive canal we find that the bowels of carnivorous animals are 3 to 5 times the length of their body, measuring from the mouth to the anus; and their stomach is almost spherical. The bowels of the herbivores are 20 to 28 times the length of their body and their stomach is more extended and of compound build. But the bowels of the frugivorous animals are 10 to 12 times the length of their body; their stomach is somewhat broader than that of the carnivorous and has a continuation in the duodenum serving the purpose of a second stomach.

This is exactly the formation we find in human beings, though anatomy says that the human bowels are 3 to 5 times the length of man’s body - making a mistake by measuring the body from the crown to the soles, instead of from mouth to anus. Thus we can again draw the inference that man is, in all probability, a frugivorous animal.

Observation of organs of sense

By observation of the natural tendency of the organs of sense - the guideposts for determining what is nutritious - by which all animals are directed to their food, we find that when the carnivorous animal finds prey, he becomes so much delighted that his eyes begin to sparkle; he boldly seizes the prey and greedily laps the jetting blood. On the contrary, the herbivorous animal refuses even his natural food, leaving it untouched, if it is sprinkled with a little blood. His senses of smell and sight lead him to select grasses and other herbs for his food, which he tastes with delight. Similarly with the frugivorous animals, we find that their senses always direct them to fruits of the trees and field.

In men of all races we find that their senses of smell, sound, and sight never lead them to slaughter animals; on the contrary they cannot bear even the sight of such killings. Slaughterhouses are always recommended to be removed far from the towns; men often pass strict ordinances forbidding the uncovered transportation of flesh meats. Can flesh then be considered the natural food of man, when both his eyes and his nose are so much against it, unless deceived by flavors of spices, salt, and sugar? On the other hand, how delightful do we find the fragrance of fruits, the very sight of which often makes the mouth water! It may also be noticed that various grains and roots possess an agreeable odor and taste, though faint, even when unprepared. Thus again, we are led to infer from these observations that man was intended to be a frugivorous animal.

Observation of the nourishment of the young

By observation of the nourishment of the young we find that milk is undoubtedly the food of the newborn babe. Abundant milk is not supplied in the breasts of the mother if she does not take fruits, grains, and vegetables as her natural food.

Cause of disease. Hence from these observations the only conclusion that can reasonably be drawn is that various grains, fruits, roots, and - for beverage - milk, and pure water openly exposed to air and sun are decidedly the best natural food for man. These, being congenial to the system when taken according to the power of the digestive organs, well chewed and mixed with saliva, are always easily assimilated.

Other foods are unnatural to man and being uncongenial to the system are necessarily foreign to it; when they enter the stomach, they are not properly assimilated. Mixed with the blood, they accumulate in the excretory and other organs not properly adapted to them. When they cannot find their way out, they subside in tissue crevices by the law of gravitation; and being fermented, produce diseases, mental and physical, and ultimately lead to premature death.

By the way, I am not 100% vegetarian today. I still have seafood very rarely, when is very difficult to find veggy options in some fancy restaurants.

OOXML in Numbers 2 comments By AviPublished: Fri, 14 Mar 2008 20:08:38 -0300 Updated: Sun, 16 Mar 2008 08:46:57 -0300 Published: 14 Mar 2008 Updated: 16 Mar 2008 Published: 8:08 pm Updated: 8:46 am Categories: OpenDocument Format Tags:

This is a numerical photography of what is the Microsoft Office Open XML wannabe specification:

  • 6063 pages written in 12 months
  • Only 6 months of analysis pointed 3500 issues that span from intellectual property, to standard date & time representation, to malformed XML definitions, to binary proprietary bits
  • 3500 issues where summarized in “only” 1027
  • ECMA proposed 2293 pages of mutually conflicting changes to make happy those 3500 comments
  • Only 30 days to analyze those 6063+2293 pages against those 3500 comments
  • Only 5 days of BRM to discuss 6063+2293 pages
  • Only 18% of these 1027 problems where discussed in BRM
  • 82% of problems were not even discussed
  • BRM produced a short 12 pages document containing alterations to those 6063 pages long spec based on 2293+thousands of pages of comments from all countries+19 months of technical writing and global analysis work. By the way, those short 12 pages propose such nebulous alterations — as Resolution 25 on page 7 — that it is difficult to foretell how they will technically fit in the new specification. If applied, those alterations could turn the original spec upside down, so deeply that it could become a completely new specification, maybe even worse than the first one.
  • Now countries must vote if they approve or not this still unfinished new OOXML that will be divided in 4 independent parts for strict conformance class+4 parts for transitional (deprecated) conformance class. These final multipart wannabe standards don’t exist yet and will be released about the same day countries will have to vote for it.

Or graphically:

History and confusion of OOXML

And you still think OOXML is ready to become an International Standard Format for storing YOUR documents ?

Come on, give me a break !

My Ecological Footprint 6 comments By AviPublished: Thu, 13 Mar 2008 19:27:22 -0300 Published: 13 Mar 2008 Published: 7:27 pm Categories: Ecology & EnvironmentWeb 2.0 Tags:

I decided to take the test to see how much the planet gets stressed with me. This is the result:

Ecological Footprint

I have a lot to improve. Specially in goods (which was a weak test) and transportation.

OOXML na ISO e os números que na verdade não existem 4 comments By AviPublished: Thu, 06 Mar 2008 22:00:07 -0300 Published: 6 Mar 2008 Published: 10:00 pm Categories: OpenDocument Format Tags:

Li algumas coisas na Internet sobre o resultado final do BRM. Em alguns lugares encontrei números e interpretações das mais diversas sobre estes resultados. Como faço parte do comitê da ABNT que analisou o OOXML, resolvi conversar com o Jomar, que foi um dos delegados brasileiros em Genebra.

Ele me disse que não pode comentar nada sobre estes números e sobre o resultado, pois no último dia do BRM, a autoridade da ISO lá presente alertou a todos que nenhum número deveria deixar a sala de reuniões, pois sem conhecer os processos de decisão lá adotados, nenhum número ou estatística faz sentido.

Avisou ainda que qualquer divulgação ou utilização marketeira destes números é no mínimo irresponsável e segundo o entendimento dele uma
clara violação das regras estabelecidas (mas aliás… alguma regra foi seguinda neste processo todo ?).

Eu tentei insistir com o assunto (e olha que o cara é meu amigo), mas ele se recusou a me dar mais informações. Me pediu apenas para entrar em contato com quem divulgou as informações e pedir a ele os devidos esclarecimentos (incluíndo os critérios e regras de votação).

Como eu sou insistente mesmo, acabei arrancando pelo menos uma explicação metafórica dele:

“Se eu te disser que 85% da população mundial sobreviveu à II Guerra Mundial, você consegue concluir que esta guerra não foi tão ruim assim? Se não consegue é porquê conhece os detalhes do processo. Se consegue… vai ler os livros de história e estudar o processo e aproveite pois este episódio não teve uma “Lei do Silêncio” que obrigou todos os envolvidos a se calar. O BRM não vai ter “livro de história” para explicar a estatística.”.

Números são apenas números e marketing será sempre marketing (e o Jomar não abre a boca mesmo… que chato).

OOXML: Está rolando um barraco na ISO 4 comments By AviPublished: Tue, 04 Mar 2008 22:43:15 -0300 Updated: Tue, 04 Mar 2008 22:47:37 -0300 Published: 4 Mar 2008 Published: 10:43 pm Updated: 10:47 pm Categories: OpenDocument Format Tags:

Veja como as coisas são…

Segundo o post do Jomar que esteve no BRM da ISO, um cidadão chegou nele num intervalo e sutilmente pediu para que não levantasse uma questão importante no processo do OOXML da Microsoft virar ou não um padrão ISO: a inexistência do mapeamento entre o formato legado (ex: .doc) e o formato novo (ex: .docx).

Sem esse mapeamento, o propósito primordial da existência do OOXML como padrão ISO deixa de existir.

Só pra lembrar qual é o propósito do OOXML, extraido (em livre tradução) de sua especificação:

O objetivo deste padrão [OOXML] é [...] representar fielmente o corpo de documentos existentes [...]

Os tais “documentos existentes” são no caso todos os documentos em formato binário legado do MS Office (.doc, ,ppt, .xls), algo fora do escopo do OOXML.

Se esse mapeamento não fizer parte da especificação OOXML, seu objetivo primordial é inválido. A especificação é inválida. E a delegação brasileira queria levantar essa bola: cadê o mapeamento ?

Mas o barraco aqui é outro. Um cidadão pedir pra ele não levantar essa bola é uma coisa. Sei lá, tal cidadão deve ter razões políticas ou financeiras para querer ver uma especificação com sérios problemas conceituais [OOXML] virar um padrão internacional.

O que me escapa o entendimento é por que a ISO não deixou o Brasil apresentar esse questionamento ?

Só sei que a blogosfera vai desabar sobre esse assunto nos próximos dias e vou acompanhar de perto os blogs do Rob Weir, Bob Sutor, Andy Updegrove, Groklaw e a quantidade de reações que o post traduzido do Jomar recebe. Muitos desses blogs já estão descendo a lenha.

Entenda os Homens, uma visão real 12 comments By AviPublished: Tue, 04 Mar 2008 08:10:06 -0300 Updated: Tue, 19 Aug 2008 15:53:47 -0300 Published: 4 Mar 2008 Updated: 19 Aug 2008 Published: 8:10 am Updated: 3:53 pm Categories: Chronicles Tags:

Este texto pipocou na Internet no começo de 2008 e tenho um certo respeito por ele. Contaram que o autor é Arnaldo Jabor, mas tenho lá minhas dúvidas. Ao verdadeiro autor sugiro que apareça, visto que lhe é devido o mérito por ter documentado com irreverência, mas também bastante machismo, os instintos do homem.


Entenda Definitivamente os Homens: uma visão real

Foi lendo um monte de besteiras que as mulheres escrevem em livros sobre o ‘universo masculino’, que resolvi escrever esse artigo. Não tenho objetivo de ‘revelar’ os segredos dos homens, mas amigos, me desculpem. Não se trata de quebrar nosso código de ética. Isso vai ajudar as mulheres a entenderem os homens e, enfim, pararem de tentar nos mudar com métodos ineficazes. Vou começar de sola. Se não estiver preparada nem continue a ler. E digo com segurança: o que escrevo aqui se aplica a 99,9% dos homens brasileiros (sem medo de errar).

1º Não existe homem fiel.

Você já pode ter ouvido isso algumas vezes, mas afirmo com propriedade. Não é desabafo. É palavra de homem que conhece muitos homens e que conhecem, por sua vez, muitos homens. Nenhum homem é fiel, mas pode estar fiel ou porque está apaixonado (algo que não dura muito tempo — no máximo alguns meses — nem se iluda), ou porque está cercado por todos os lados (veremos adiante que não adianta cercá-lo, isso vai se voltar contra você).

A única exceção é o crente extremamente convicto. Se você quer um homem que seja fiel, procure um crente daqueles bitolados, mas agüente as outras conseqüências.

2º Não desanime.

O homem é capaz de te trair e de te amar ao mesmo tempo. A traição do homem é hormonal, efêmera, para satisfazer a lascívia. Não é como a da mulher. Mulher tem que admirar para trair; ter algum envolvimento. O homem só precisa de uma bunda. A mulher precisa de um motivo para trair, o homem precisa de uma mulher.

3º Não fique desencantada com a vida por isso.

A traição tem seu lado positivo. Até digo, é um mal necessário. O cara que fica cercado, sem trair é infeliz no casamento, seu desempenho sexual diminui (isso mesmo, o desempenho com a esposa diminui), ele fica mal da cabeça. Entenda de uma vez por todas: homens e mulheres são diferentes. Se quiser alguém que pense como você, vire lésbica (várias já fizeram isso e deu certo), ou case com um viado enrustido que precisa de uma mulher para se enquadrar no modelo social.

Todo ser humano busca a felicidade, a realização. E a realização nada mais é do que a sensação de prazer (isso é química, tá tudo no cérebro). A mulher se realiza satisfazendo o desejo maternal, com a segurança de ter uma família estruturada e saudável,com um bom homem ao lado que a proteja e lhe dê carinho.

O homem é mais voltado para a profissão e para a realização pessoal e a realização pessoal dele vêm de diversas formas: pode vir com o sentimento de paternidade, com uma família estruturada, etc., mas nunca vai vir se não puder acesso a outras fêmeas e se não puder ter relativo sucesso na profissão.

Se você cercar seu homem (tipo, mulher que é sócia do marido na empresa). O cara não dá um passo no dia-a-dia (sem ela) você vai sufocá-lo de tal forma que ele pode até não ter espaço para lhe trair, mas ou seu casamento vai durar pouco,ele vai ser gordo (vai buscar a fuga na comida) e vai ser pobre (por que não vai ter a cabeça tranqüila para se desenvolver profissionalmente. (Vai ser um cara sem ambição e sem futuro).

4º Não tente mudar para seu homem ser fiel.

Não adianta. Silicone, curso de dança sensual, se vestir de enfermeira, etc… nada disso vai adiantar.

É lógico que quanto mais largada você for, menor a vontade do homem de ficar com você e maior as chances do divórcio. Se ser perfeita adiantasse Julia Roberts não tinha casado três vezes. Até Gisele Bunchen foi largada por Di Caprio, não é você que vai ser diferente (mas é bom não desanimar e sempre dar aquela malhadinha).

O segredo é dar espaço para o homem viajar nos seus desejos (na maioria das vezes, quando ele não está sufocado pela mulher ele nem chega a trair, fica só nas paqueras, troca de olhares). Finja que não sabe que ele dá umas pegadas por fora. Isso é o segredo para um bom casamento.

Deixe ele se distrair, todos precisam de lazer.

5º Se você busca o homem perfeito, pode continuar vendo novela das seis.

Eles não existem nesse conceito que você imagina. Os homens perfeitos de hoje são aqueles bem desenvolvidos profissionalmente, que traem esporadicamente (uma vez a cada dois meses, por exemplo), mas que respeitam a mulher, ou seja, não gastam o dinheiro da família com amantes, não constituem outra família, não traem muitas vezes, não mantêm relações várias vezes com a mesma mulher (para não criar vínculos) e, sobretudo, são muuuuuito discretos: não deixam a esposa (e nem ninguém da sua relação, como amigas, familiares, etc saberem).

Só, e somente só, um amigo ou outro DELE deve saber, faz parte do prazer do homem contar vantagem sexual. Pegar e não falar para os amigos é pior do que não pegar.

As traições do homem perfeito geralmente são numa escapulida numa boite, ou com uma garota de programa (usando camisinha e sem fazer sexo oral nela), ou mesmo com uma mulher casada de passagem por sua cidade. O homem perfeito nunca trai com mulheres solteiras. Elas são causadoras de problemas. Isso remete ao próximo tópico.

6º ESSE TÓPICO NÃO É PARA AS ESPOSAS — É PARA AS SOLTEIRAS OU AMANTES:

Esqueçam de uma vez por todas esse negócio de que homem não gosta de mulher fácil. Homem adora mulher fácil. Se ‘der’ de prima então, é o máximo.

Todo homem sabe que não existe mulher santa. Se ela está se fazendo de difícil ele parte para outra. A demanda é muito maior do que a procura. O mercado está cheio de mulher gostosa. O que homem não gosta é de mulher que liga no dia seguinte. Isso não é ser fácil, é ser problemática (mulher problema). Ou, como se diz na gíria, é pepino puro.

O fato de você não ligar para o homem e ele gostar de você não quer dizer que foi por você se fazer de difícil, mas sim por você não representar ameaça para ele. Ele vai ficar com tanta simpatia por você que você pode até conseguir fisgá-lo e roubá-lo da mulher. Ele vai começar a se envolver sem perceber. Vai começar ELE a te procurar. Se ele não te procurar era porque ele só queria aquilo mesmo.

Parta para outro e deixe esse de stand by. Não vá se vingar, você só piora a situação e não lucra nada com isso. Não se sinta usada, você também fez uso do corpo dele — faz parte do jogo; guarde como um momento bom de sua vida.

7º 90% dos homens não querem nada sério.

Os 10% restantes estão momentaneamente cansados da vida de balada ou estão ficando com má fama por não estarem casados ou enamorados; por isso procuram casamento. Portanto, são máximas as chances do homem mentir em quase tudo que te fala no primeiro encontro (ele só quer te comer, sempre).

Não seja idiota, aproveite o momento, finja que acredita que ele está apaixonado e dê logo para ele (e corra o risco de fisgá-lo) ou então nem saia com ele. Fazer doce só agrava a situação, estamos em 2008 e não em 1958. Esqueça os conselhos da sua avó, os tempos são outros.

Para ser uma boa esposa e para ter um casamento pelo resto da vida faça o seguinte:

Tente achar o homem perfeito do 5º item, dê espaço para ele. Não o sufoque. Ele precisa de um tempo para sua satisfação.

Seja uma boa esposa, mantenha-se bonita, malhe, tenha uma profissão (não seja dona de casa), seja independente e mantenha o clima legal em casa. Nada de sufocos, de ‘conversar sobre a relação’, de ficar mexendo no celular dele, de ficar apertando o cerco, etc.

Você pode até criar ‘muros’ para ele, mas crie muros invisíveis e não muito altos. Se ele perceber ou ficar sem saída, vai se sentir ameaçado e o casamento vai começar a ruir.

9º A última dica:

Se você está revoltada por este artigo, aqui vai um conselho: vá tomar uma água e volte para ler com o espírito desarmado. Se revoltar quanto ao que está escrito não vai resolver nada em sua vida.

Acreditar que o que está aqui é mentira ou exagero pode ser uma boa técnica (iludir-se faz parte da vida, se você é dessas, boa sorte!). Mas tudo é a pura verdade.

Seu marido/noivo/namorado te ama, tenha certeza,senão não estaria com você, mas trair é como um remédio, um lubrificante para o motor do carro. Isso é científico. O homem que você deve buscar para ser feliz é o homem perfeito do item 5º. Diferente disso ou é crente, ou viado ou tem algum trauma (e na maioria dos casos vão ser pobres).

O que você procura pode ser impossível de achar, então, procure algo que você pode achar e seja feliz ao invés de passar a vida inteira procurando algo indefectível que você nunca vai encontrar.

Espero ter ajudado em alguma coisa. Agora, depois de tudo isso dito, cadê a coragem de mandar este artigo para minha mulher??

Vida Social Intensa 1 comment By AviPublished: Mon, 03 Mar 2008 11:52:13 -0300 Published: 3 Mar 2008 Published: 11:52 am Categories: Community and Society Tags:

Final de semana foi intenso.

No sábado, decidido a toque de caixa, almoço com vários amigos no terraço do apê de uma delas. Viva a comida simples: salada de folhas, macarronada com diversos molhos e sorvete.

Sábado a noite, festa de aniversário surpresa do meu cunhado. Uma das amigas preparou um filme tocante com fotos desde a infância dele. Todas as mulheres choraram de emoção.

No domingo, café da manhã de aniversário de uma grande amiga. Um casal de amigos não veio e suspeitamos que ela tinha dado a luz. Confirmou-se numa ligação no final da manhã e todos celebraram o nascimento da Nina.

De lá fomos direto pro almoço de aniversário de outra amiga, no Martin Fierro. Terminou quase 5 da tarde.

Tudo isso precedido por um jantar e ótimo filme na sexta a noite: Jogos de Poder.

Domingo a noite iríamos jantar com alguns amigos que estão recebendo um amigo da Holanda em São Paulo. Mas recusamos, simplesmente porque não dá.

Ficamos em casa assistindo o ótimo Inside Man e tomando chá e sopinha.

Essa vida ainda me cansa. Mas por enquanto eu adoro.

How to Make High Quality DVD Rips 26 comments By AviPublished: Sun, 02 Mar 2008 09:36:50 -0300 Updated: Tue, 20 May 2008 08:45:26 -0300 Published: 2 Mar 2008 Updated: 20 May 2008 Published: 9:36 am Updated: 8:45 am Categories: Multimedia Tags:

Some friends asked so the following is how I encode (rip) DVDs.

Choosing the file format: .AVI, .OGG, .MP4 or .MKV ?

The ripped video file format is a decision you must make. Currently my format of choice is .MKV or Matroska. I’ll explain why.

It is quite idiotic to say that an .MP4 movie has better quality than a .AVI or vice-verse (or any other combination of comparisons). OGG, MP4 (MPEG-4 Part 14), MKV (Matroska), AVI, WMV (or ASF) are just containers, envelopes. Video quality depends on what goes inside it.

“Multimedia” has this name because you have multiple types of media: video in multiple angles, multiple audio options including different languages and channels (stereo, 5.1, 6 channels etc), subtitles in several languages, chapter information, menu etc. Think about a DVD. So this is a graphical view of how things are organized inside a 900MB movie file in a modern format as MKV or MP4:

Header with tags, track names, chapters info, seek positions Main Video track (MPEG-4 AVC/H.264) Attachments as JPG images, documents, scripts or text files
Video segment showing another angle (MPEG-4 ASP/Xvid/DivX)
Audio track: English Dolby Surround 5.1 (AC3)
Audio track: Director’s comments stereo (MP3)
Audio track: Portuguese Dolby Surround 5.1 (DTS)
Subtitle track: Portuguese (Unicode text)
Subtitle track: Chinese (Unicode text)
Subtitle track: English (VobSub)
byte 100K byte 100M byte 200M byte 310M byte 420M byte 530M byte 650M byte 780M byte 895M byte 900M

A digital multimedia file format must be capable to contain all this different medias and multiplex them in parallel so you won’t have the video in the first 500MB of the file and the audio on the following 500MB (this can’t work for streaming). And this is exactly what modern file formats as MP4 and MKV do: they carry all your movie-related data together.

This is a comparison of all these file formats based on my personal experience with them (a more formal comparison can be found in Wikipedia):

.MKV .MP4 .AVI
Industry support Almost none Good and increasing, specially on Apple platforms, the mobile scene and Nero Digital ecosystem Treated as legacy popular format
Usage on the web Very popular on HD or high quality DVD rips Very popular on HD or high quality DVD rips, supported by Flash Player, YouTube, Google Video Popular amongst low-quality DVD rips
Support for advanced video formats and multiple video angles Yes. MPEG-4 ASP (DivX, Xvid), MPEG-4 AVC (a.k.a. H.264) etc Yes. Only MPEG-4 systems and a few others Problematic and No
Support for multiple audio tracks (channels, formats, languages and “director’s comments”) Yes Yes. Formats are only MP3, AAC and a few others not very popular Yes
Support for tags (artist, title, composer, etc as MP3’s ID3) Yes Can be supported by MP4 extensibility but this is not standardized across authoring tools (iTunes, GPAC etc) and players (Amarok, Media Player Classic, iPod, Windows Media Player etc) No
Support for attachments with mime-types (used to attach movie posters images or other files) Yes No
Support for chapter marks Yes No
Support for multiple language embedded soft-subtitles Yes. VobSub (as extracted from DVDs), plain timed UTF-8 text (SRT, SUB) etc No
Support for naming tracks with human names as “Director’s comments” or “Portuguese subtitles” etc Yes No No
Support for menus (as in DVDs) and interaction Yes through an XML idiom, but unsupported by most players Yes through SVG, but unsupported by most players No
The container overhead in bytes in the final file Very small Very small Very big
Supported by free and Open Source multiplatform authoring tools Perfect on Linux, Unix, Windows and Mac Yes, with some intellectual property issues and tools need to mature Yes

Personally I believe MP4 is the multimedia file format for the future because since it is getting popular, all these unstandardized features will get stabilized. MP4 is an ISO standard and the increasing industry support can be felt on iPods and portable devices, and most notable on home DVD players capable of playing the 700MB MP4 video file burned in a CD.

By the way, remember this:

  • MP4 is not an evolution of MP3. AAC (MPEG-4 Part 3) is.
  • MP5 and MP6 (used to classify portable media players) are things that simply doesn’t exist in the multimedia scene.
  • .M4A, .M4V, .MOV and .3GP files can safely be renamed to .MP4. MP4 is the generic standard name.

Meanwhile, MKV wins everything but on the Industry Support category. But this doesn’t really matter, and I’ll explain why. Since MKV is just a container, the large video, audio etc streams can be extracted and repackaged into MP4 and vice-versa in seconds. No transcoding (decoding followed by an encoding into another format) is needed.

So today I store my videos in the most feature rich and well supported by players format: MKV.

OGG or OGM (the container file format) is practically dead in my opinion. They were created as part of the Xiph initiative for a complete open source patent-free multimedia framework, but seems nobody uses it anymore for video. From the same family, Vorbis (the audio codec compared to MP3, a.k.a. .OGG) is very good but also very not popular. Theora (the video codec) is frequently comparable to old MPEG-1 in terms of quality and compression ration so currently, if you want quality and are not concerned about patents, MPEG-4 AVC is the best choice. FLAC, Xiph’s lossless audio codec, is the winner of the family: very popular, massively used, and recommended.

Encoding the DVD

I use HandBrake, the most practical Open Source (and overall) movie encoder. It runs on Linux, Mac and Windows and uses the same Open Source libraries as ffmpeg, mplayer/mencoder, xine, etc. While these programs are generic video handlers (with thousands of confusing configuration parameters to sustain this generalistic status) HandBrake is optimized only for ripping so it is very easy to use, yet extremely powerful.

#!/bin/bash

##
## This is the script I use to make hifi DVD rips including chapter markers and
## subtitles. It uses Handbrake.
## Contains what I found to be the best quality ripping parameters and
## also let me set simple parameters I need.
##
## Avi Alkalay <avi at unix dot sh>
## http://avi.alkalay.net/2008/03/mpeg4-dvd-rip.html
##
## $Id$
##

#set -vx

HANDBRAKE=${HANDBRAKE:=~/bin/HandBrakeCLI}
#HANDBRAKE=${HANDBRAKE:="/cygdrive/c/Program Files/Handbrake/HandBrakeCLI.exe"}
## Where is the Handrake encoder executable.
## Handbrake is the most practical free, OSS, DVD riper available.
## Download HandBrake for Linux, Mac or Windows at http://HandBrake.fr

INPUT=${INPUT:=/dev/dvd}
## What to process. Can also be a mounted DVD image or simply '/dev/dvd'

TITLE=${TITLE:=L}
## The title number to rip, or empty or "L" to get the longest title

#CHAPTERS=${CHAPTERS:=7}
## Example: 0 or undefined (all chapters), 7 (only chapter 7), 3-6 (chapters 3 to 6)

#VERBOSE=${VERBOSE:="yes"}
## Wether to be verbose while processing.

SIZE=${SIZE:=1200}
## Target file size in MB. The biggest the file size, the best the quality.
## I use to use from 1000MB to 1400MB for astonishing high quality H.264 rips.

OUTPUT=${OUTPUT:="/tmp/output.mkv"}
## Output file. This will also define the file format.
## MKV (Matroska) is currently the best but MP4 is also good.

AUDIO=${AUDIO:="-E ac3 -6 dpl2 -D 1"} # For AC3 passthru (copy).
#AUDIO=${AUDIO:="-E lame -B 160"} # For MP3 reencoding. Good when input is DTS.
## Audio parameters. If input is AC3, use it without transcoding.
## If is DTS, reencode to MP3.

MATRIX=${MATRIX:=`dirname $0`/eqm_avc_hr.cfg}
## x264 matrix to use. The matrix file may increase encoding speed and quality.
## This one is Sharktooth's as found
## at http://forum.doom9.org/showthread.php?t=96298

######### Do not change anything below this line ##############

## Make some calculations regarding title and chapters based on parameters.
SEGMENT=""
if [[ "$TITLE" == "L" || -z "$TITLE" ]]; then
	SEGMENT="-L"
else
	SEGMENT="-t $TITLE"
fi

[[ -n "$CHAPTERS" && "$CHAPTERS" -ne 0 ]] && SEGMENT+=" -c $CHAPTERS"

[[ "$VERBOSE" != "no" ]] && VERB="-v"

# Define args for the x264 encoder. These are some values I found on the net
# which give excelent results.
X264ARGS="ref=3:mixed-refs:bframes=6:b-pyramid=1:bime=1:b-rdo=1:weightb=1"
X264ARGS+=":analyse=all:8x8dct=1:subme=6:me=umh:merange=24:filter=-2,-2"
X264ARGS+=":ref=6:mixed-refs=1:trellis=1:no-fast-pskip=1"
X264ARGS+=":no-dct-decimate=1:direct=auto"
[[ -n "$MATRIX" ]] && X264ARGS+=":cqm=$MATRIX"

# Encode...
"$HANDBRAKE" $VERB -i "$INPUT" -o "$OUTPUT" \
	-S $SIZE \
	-m $SEGMENT \
	$AUDIO \
	-e x264 -2 -T -p \
	-x $X264ARGS

# Repackage to optimize file size, to include seek and to include this
# this script as a way to document the rip...
echo $OUTPUT | grep -qi ".mkv"
if [[ $? && -x `which mkvmerge` && -f $OUTPUT ]]; then
	mv $OUTPUT $OUTPUT.mkv
	mkvmerge -o $OUTPUT $OUTPUT.mkv \
		--attachment-name "The ripping script" \
		--attachment-description "How this movie was created from original DVD" \
		--attachment-mime-type application/x-sh \
		--attach-file $0

	[[ -f $OUTPUT ]] && rm $OUTPUT.mkv
fi

The script seems long because it is fully documented but it actually only collects some parameters and simply runs the HandBrake encoder like this (passed parameters are in red):

~/bin/HandBrakeCLI -v -i /dev/dvd -o /tmp/output.mkv \
    -S 1200 \
    -m -L \
    -E lame -B 160 \
    -e x264 -2 -T -p \
    -x ref=3:mixed-refs:bframes=6:b-pyramid=1:bime=1:b-rdo=1:weightb=1:analyse=all:8x8dct=1:subme=6:me=umh:merange=24:filter=-2,-2:ref=6:mixed-refs=1:trellis=1:no-fast-pskip=1:no-dct-decimate=1:direct=auto:cqm=~/src/randomscripts/videotools/eqm_avc_hr.cfg

All the rest is what I found to be the best encoding parameters.

The resulting video file (/tmp/output.mkv in this case) will contain correctly cropped video and audio quality as good as the DVD (it is almost lossless), and chapter breaks at the same positions read from the DVD.

In a Core Duo machine as my laptop running Fedora 8 or Windows XP, a 2 pass H.264 encoding (2 pass improves quality and H.264 is newer standard MPEG-4 technology better than DivX/Xvid) takes about 4 to 5 hours for a regular 2 hours movie, so leave it encoding while you go to sleep. A Pentium 4 machine running Ubuntu takes about 17 hours for the same rip.

I use to rip one chapter from the movie first (use your preferred video player or lsdvd command to find the shortest chapter), check quality, compare to DVD, fine tune, try again and then shoot full DVD ripping.

After encoding I use to repackage the audio/video stream with Matroska’s mkvmerge (or mmg, its GUI version available on any Linux distribution as “mkvtoolnix” package, and installable for Windows or Mac OS from Matroska’s website) to optimize seeks and to include soft subtitles (that can be turned on and off as on regular DVDs), but I’ll explain that in another HOWTO.

Give Your Ripped Movie a Descriptive File Name

I use to organize my media library in a standard way I invented for myself and which I suggest you to use too.

My movie file names shows everything that the file includes. Some examples:

  • Indiana_Jones_and_The_Raiders_of_the_Lost_Ark_IMDB{tt0082971}-Xvid{720×304_23.98fps}+MP3{ENG,POB_VBR}+Sub{ENG,SPA,POB}+Covers.mkv

    This is the Indiana Jone’s Raiders of the Lost Ark movie, whose IMDB index is tt0082971 (IMDB{tt0082971}). It was ripped with the old Xvid codec and contains 720×304 pixels frame size at a rate of 23.98 frames per second (Xvid{720×304_23.98fps}). It also contains selectable audio tracks in English and Brazilian Portuguese encoded in variable bit rate MP3 (MP3{ENG,POB_VBR}). In addition, there is also selectable subtitles in English, Spanish and Brazilian Portuguese (Sub{ENG,SPA,POB}). The file also contains the cover images as attachments.
  • Harold_and_Maude_IMDB{tt0067185}-H264{672×368_3Pass_25fps}+HEAAC{EN}+Sub{POR,EN,FRE}+Chapters+Covers.mkv

    The old Harold and Maude movie whose IMDB index is tt0067185 (IMDB{tt0067185}). It is encoded with H.264 in 3 passes and has 672×368 pixels frame size at a rate of 25 frames per second (H264{672×368_3Pass_25fps}). There is only one English audio track encoded in modern HE-AAC (HEAAC{EN}). Subtitles in Portuguese, English and French (Sub{POR,EN,FRE}), chapter information and attached cover images. This is very complete high quality DVD backup.
  • I_Am_Legend_IMDB{tt0480249}-H264{704×304_23.98fps}+AC3{ENG_5.1}+Sub{POR}.mkv

    The I Am Legend movie whose IMDB index is tt0480249 (IMDB{tt0480249}), video encoded in H.264 with 704×304 pixels frame size (H264{704×304_23.98fps}), original 5.1 channels AC3 audio in English (AC3{ENG_5.1}) and subtitles in Portuguese (Sub{POR}).

The advantages of this scheme are:

  • It is web safe with no spaces in filenames. All underlines. It is also DOS safe.
  • To have the IMDB index let me know exactly which movie this file contains. This is particularly good to avoid ambiguity for movies that have remakes as Ben Hur, or movies that have an official name but are well known by other names or have international titles.
  • To know the encoding method, subtitles included and chapters info give me the overall quality of the movie right away.
  • Special attention to audio and subtitle languages. Having them on the filename let me know I will understand its content without having to play. Sometimes I can’t play the file because I logged in my home computer remotely.

Playing the Ripped File

To play this advanced Matroska media file that contains such a rich set of metainformation and highly compressed digital content you will need an advanced player too. And happens that the best players are the Open Source ones. So use these players:

These are Media Player Classic screenshots demonstrating how to activate the advanced content inside a Matroska file. Players on other platforms have similar capabilities and menus.

Activating embedded subtitles and languages
The player lets you choose the audio language and subtitles. On MPC for example, this is how you turn on and off and choose the language for subtitles.
Choosing subtitles language

As you can see, the player found subtitles embedded in the MKV file in English, Hebrew and Portuguese.

If the MKV file contains many audio tracks (as different languages, director’s comments etc) this is how to select it:

Selecting audio track to play in Media Player Classic

And to jump directly to a specific chapter on the movie, if the MKV file contains this kind of information:

Using Media Player Classic to browse chapter in a movie file

Improving audio volume
If you ripped the movie without reencoding the audio, the final file will contain DVD’s original AC3 audio tracks in 6 channels (5+1). This may sound with a lower volume when played in a 2-speaker system as your laptop, iPod, etc because 4 channels are simply not being played. To remediate this the player will have to downsample the audio. In other words, it will remix the 6 channels into 2 stereo channels while playing. The Media Player Classic options should look like this:

Selecting Media Player Classic\'s Audio Options

Configuring audio downsample on Media Player Classic

Google Supports ODF and Defeats OOXML as Unnecessary 0 comments By AviPublished: Thu, 28 Feb 2008 10:51:18 -0300 Published: 28 Feb 2008 Published: 10:51 am Categories: OpenDocument Format Tags:

A few days ago I saw a post in Google Blog with Google’s position regarding the document format war.

Google supports OpenDocument Format.

The post also provides some short documents with Google’s findings (2 pages) and sample of technical issues unresolved in OOXML (4 pages). This is a fast reading for who wants to understand the main issues of OOXML.

Primeiro dia de BRM do OOXML e Violência em Genebra 0 comments By AviPublished: Mon, 25 Feb 2008 20:37:05 -0300 Updated: Mon, 25 Feb 2008 21:57:14 -0300 Published: 25 Feb 2008 Published: 8:37 pm Updated: 9:57 pm Categories: Community and SocietyOpenDocument Format Tags:

Não estou em Genebra, no Ballot Resolution Meeting do OOXML na ISO, mas falei pelo Google Talk com o Deivi do Serpro que é chefe da delegação brasileira, e em linhas gerais me contou o seguinte:

A delegação brasileira pediu para que eu tirasse as informações do ar para evitar problemas na ISO. O Jomar vai publicar algumas informações no blog dele.

Bob Sutor também publicou umas palavras.

A violência ficou para o sábado que antecedeu a reunião. Deivi saiu de um pub a noite para caminhar e foi atacado do nada por uns rapazes. Tomou um soco no rosto que lhe quebrou o maxilar. Fernando Gebara deu o maior apoio mas terá que ficar 6 semanas sem poder mastigar nada, nem o chocolate e queijo suiços que tanto prometeu degustar na viagem.

E agente achando que não há violência nas ruas da Europa…

Índice Linux Journal, Janeiro de 2008 0 comments By AviPublished: Sat, 23 Feb 2008 15:53:07 -0300 Updated: Sat, 23 Feb 2008 20:56:19 -0300 Published: 23 Feb 2008 Published: 3:53 pm Updated: 8:56 pm Categories: Linux Journal Index Tags:
  1. Receita de Linux da Novell, em milhões de dólares, no últimos 9 meses reportados: 100
  2. Aumento em porcentagem do anterior em relação ao ano fiscal passado: 243
  3. Número de metros quadrados do laboratório da aliança Microsoft-Novell: 232
  4. Receita da Red Hat, em milhões de dólares, no último trimestre reportado: 127.3
  5. Aumento em porcentagem representado pelo anterior: 28
  6. Porcentagem de computadores em escolas russas em que Linux será instalado até 2009: 100
  7. Número de computadores Linux na biblioteca pública Takoma Park, Maryland: 28
  8. Milhares de vezes que pessoas se logaram em tais computadores no último ano: 40
  9. Porcentagem de mercado de Linux em PCs conectados à Internet em janeiro de 2006: .29
  10. Porcentagem de mercado de Linux em PCs conectados à Internet em dezembro de 2006: .37
  11. Porcentagem de mercado de Linux em PCs conectados à Internet em setembro de 2007: .81
  12. Porcentagem da taxa de crescimento do mercado de Linux em PCs conectados à Internet em 2007, até agora: 219
  13. Milhões de dólares investidos em Linux e companhias Open Source por empresas de venture capital no terceiro trimestre de 2007: 77.8
  14. Milhões de dólares investidos em Linux e companhias Open Source por empresas de venture capital do primeiro ao terceiro trimestre de 2007: 226.7
  15. Milhões de dólares que a Citrix pagou pela XenSource (virtualização Open Source) em agosto de 2007: 500
  16. Milhões de dólares que o Yahoo pagou pela Zimbra (e-mail e colaboração Open Source) em setembro de 2007: 350
  17. Posição de “Faça Ubuntu laptops mais baratos que Windows laptops (em todos os países)” entre as mais populares idéias do Dell IdeaStorm: 1
  18. Posição de “Faça Linux e nenhum sistema operacional opções padrão em todos os futuros produtos” entre as mais populares idéias do Dell IdeaStorm: 2
  19. Posição de “Coloque Ubuntu na lista de sistemas operacionais quando construir um PC!” entre as mais populares idéias do Dell IdeaStorm: 3
  20. Número de resultados de uma busca por “linux” em dell.com: 648

Fontes

  • 1–5: CNET.com
  • 6: CNews Russian IT Review
  • 7, 8: Phil Shapiro in PCWorld.com
  • 9–12: NetApplications.com, via Datamation
  • 13, 14: The 451 Group, via InternetNews.com
  • 15, 16: InternetNews.com
  • 17–19: DellIdeaStorm.com em 11 de Outubro de 2007
  • 20: Dell.com em 11 de Outubro de 2007

Por Doc Searls. Original: http://www.linuxjournal.com/article/9925#mpart1

Linux on Dell IdeaStorm 0 comments By AviPublished: Sat, 23 Feb 2008 10:03:37 -0300 Updated: Sat, 23 Feb 2008 15:50:52 -0300 Published: 23 Feb 2008 Published: 10:03 am Updated: 3:50 pm Categories: Linux & Open SourceWeb 2.0 Tags:
Anúncio de Abertura de Formatos e Padrões da Microsoft 0 comments By AviPublished: Thu, 21 Feb 2008 20:53:26 -0300 Updated: Thu, 21 Feb 2008 20:58:31 -0300 Published: 21 Feb 2008 Published: 8:53 pm Updated: 8:58 pm Categories: Info & Biz TechnologyOpenDocument Format Tags:

Teve um remelexo hoje na indústria de TI quando a Microsoft fez seu anúncio “interoperability by design”.

Gato escaldado tem medo de água fria…

Quem se lembra da promessa de portar o Internet Explorer para Solaris? Cadê? Bem, não que agente estivesse esperando por isso, nem precisasse…

E da promessa de abrir o .NET? Falando nisso, pra que reinventar a roda com .NET quando Java já estava bombando no mercado de desenvolvimento de aplicações comerciais? Simplesmente porque — é o que a história nos mostrou — não está no DNA dessa empresa trabalhar de forma cooperativa, num esquema ganha-ganha.

Esse anúncio agente tem que contextualizar no tempo e no espaço. O tempo é 2 dias úteis antes da reunião da ISO que vai decidir o destino do OOXML como padrão. E usuários estão percebendo que seus documentos não são realmente deles e sim do dono da ferramenta que os lê e grava, o que se traduz em indignação. Então o espaço é de aperto, o aperto dos acionistas da Microsoft que pediram mais ética.

Da análise técnica do OOXML aprendi que aquilo não foi exatamente “desenhado para interoperabilidade”. As víceras tiveram que ser abertas na marra porque a vantagem do ODF era periclitante.

Em face de todos esses fatos do passado, esse anúncio, por enquanto, não passa de marketing.

Mas vamos esquecer o passado e ser otimistas. Se a Microsoft realmente estiver a fim de mudar, isso deve ser recebido de braços abertos. A Web nos ensinou que quanto mais gente colaborar melhor ela fica. Não é diferente no mundo dos padrões e tecnologias. Então Microsoft, seus clientes, programadores, concorrentes, comunidade de software livre e o mercado em geral só tem a ganhar se tanto otimismo se pagar.

Vou me manter otimista e esperar agora por ações práticas, porque o blablablá nós já ouvimos. E foi ± isso que eu disse na entrevista ao IDG.

ODF in the State of Paraná 1 comment By AviPublished: Wed, 20 Feb 2008 08:08:00 -0300 Updated: Wed, 20 Feb 2008 17:41:17 -0300 Published: 20 Feb 2008 Published: 8:08 am Updated: 5:41 pm Categories: Community and SocietyOpenDocument Format Tags:

The state of Paraná, here in Brazil, is the first to have laws that specifically promotes the use of OpenDocument Format. This is a free translation of such law:

  1. All public companies and institutions under the state of Paraná administration will adopt, preferably, open formats for creation, storage and public availability of digital documents.
  2. We understand open formats as the ones that:
    1. promote interoperability between multiple applications and platforms, internal and externally;
    2. let users chose applications free from royalties;
    3. can be freely and independently implemented by multiple computer software vendors, in multiple platforms, without any charge for the intellectual property of the technology.
  3. The companies cited in point 1 must be enabled for receiving, publishing, visualization and preservation of digital documents in open formats according to norm ISO/IEC 26300:2600 (OpenDocument format - ODF).

This law was signed by Roberto Requião, the state gorvernor, and Nizan Pereira Almeida, secretary for strategic initiatives.

Other states in Brazil, inspired by Paraná, are creating similar laws.

Folks related to the ODF initiative in Paraná

The folks in the photo, left to right, are: Henrique Menezes, government relations, IBM. Jomar Silva, ODF Alliance chapter Brazil. State congressman Edson Praczyk. Vitorio Furusho, Celepar (a state public company), BrOffice.org users group and Open Source Movement in Paraná. Reginaldo Radel, congressman Prazyk assistent.

Linux e ODF no Banco do Brasil 1 comment By AviPublished: Wed, 20 Feb 2008 07:28:00 -0300 Updated: Wed, 20 Feb 2008 09:19:27 -0300 Published: 20 Feb 2008 Published: 7:28 am Updated: 9:19 am Categories: