Archive for the ‘Uncategorized’ Category

We’re sorry, but your DNA contains violations of our intellectual property

Пятница, Февраль 3rd, 2012

First of all, I’m not native English spoken person. I’m writing/reading in English with purpose of learning. So, you warned, my sentences could be awful :)

 

Current situation in digital data world is sad, and ridiculous. Why ridiculous? Because Big companies told us what to do, how to live. Why sad? Because if you not obey, you can go to jail. Long time ago, when knowledge was almost as valued as gold, peoples likes to hear bards, musicians,  singers, sages. No one cared about copyrighting as now. You could write down someone’s music and words and try to perform it. If you was not decent the only reward you could got — rotten tomatoes and laughs. First books required crazy amount of work, and was mostly knowledge, not entertainment. Copying was not much concern of authors, because initially it was difficult and expensive. Then appeared movies, and world begin to be more care about money axis. And somewhere there, «art» lost it’s value, replaced by $ signs and many zeros. So, let me present to you some hypothetical situation, which can have it’s place in some near future:

… All happens in some court room, while trial processing. This all happens in world where government allowed media companies to make arrest.

- Your Honor, can you look at this evidence? — said tall attorney, giving to judge a paper sheet. Judge took it, put his glasses on, and calmly said:

- Hmm, seems here only three numbers. Let me read it to you all: 64, 48, 0. That’s all. What this means? — anticipatively he asked.

- Your Honor, let me … But attorney was interrupted by two guys wearing white tuxedo came into court room, swinging some stamped paper.

- Judge Trelawney, you’re under arrest for copyright violating. You just distributed part of book «Howling Pecker and Half-Ink Printer«. The numbers you’ve read are belong to this best selling book, and you have no right to redistribute it, wholly or partially in any way. So, our estimate of losses is approximately 115 millions, plus minus 10%.

-Whaa?.. Eyes of judge were almost so wide as he mouth became. — It’s only three numbers!.. How you claim it’s from your book?

- We don’t need to claim or prove this. As law states very clearly, citing: «… redistribution prohibited wholly or partially… «. You sir just broke the law, and your punishment will be lawful, be sure.

Judge skin whitened, and at these moments, doors burst ajar and two guys wearing havana shirts came in. One with big mouth briefly show some paper with big stamp, and claimed:

-  Judge Trelawney, you’re under arrest for copyright violating. You just distributed part of our property — popular song «Even Numbers». The numbers you’ve read are belong to this song, and fully licensed from book  »Howling Pecker and Half-Ink Printer». Our estimate of losses is approximately 865 millions, and counting.

At this moment, doors of court once opened and three guys appeared, all in black tuxedo with black sunglasses. Center one stepped forward, and stated:

-  Judge Trelawney, you are under arrest for copyright violating.  You just distributed part of each of 232 411 movies for which we held the rights. You said aloud three numbers, of course it was width and height of movie frame, and it’s background color. As you can guess, we are used this frame in beginning and in end, sometimes in middle of almost any movie you ever seen. As law makes no difference in any part of «product of art» in favor of other, these black screen frames as valuable for our company as any others. And you make for us colossal losses, estimate is near to 1400 billions, and counting. Please, come with … at this words glass windows broke, and some voice said in loudspeaker:

- This is F.B.I.! Please all remain at your places, do not move, we coming!

After these words few field agents quickly rushed inside, all with gun trailed at judge. Judge standing with ashe skin, and hand near heart. One of agents loudly said:

- This is agent Sherman, IP division! You’re violating our super secret innovating patent US PT Number 239,965,1984,758,359 («Representing video frames with only three numbers — width, height and pixel color»). Besides, we stored our program which can do conversion in CIA servers, so you are accused in hacking them too. How else you could convert those movies in our format?..

After these words, judge passed out.

He found himself in comfortable bed in white room. Neat nurse stand near him, smiling.

- Hello Mr. Trelawney! How are you feeling now?

- How do I feel? Damn, didn’t know that some stupid numbers could make me some problems. I’m out of my mind?

- Of course not, — said smiling nurse, treating him as child. — You’re just fine. For at least 2 minutes more.

- What do you mean? What will be after two minutes pass?

- I’m sorry, Mr. Trelawney, but we unfortunately have to sleep you. For good.

- Emm… Are you joking? This is killing!!!

- Technically no. You see, when you passed out, we made for you blood analysis, and… I’m really, really sorry, but your DNA contains patented bit-sequences. You know, it’s like bytes in computer, of course you know, you are smart one. We contacted patent holder, and this company not interested in licensing these bit-sequences to you. Thus we as a government medical health care center had to remove this little violation.

- Little??? Violation?.. My god, you got to be crazy. What kind of law is this???

- It’s above law, it’s ACTA, Sir.

These whole madness ended with Silent Hiss of injection.

Of course, this all is hyperbola. My point here is not «Let’s stole music/video/books!», but «Where’s exact and thoroughly thought rules regarding informational content.» In current patent/IP/author rights world, soon or later such important questions will arise:

  • Where is the border after which my bytes can be treated as patented/copyrighted by anyone? Is it 1Mb? 1Kb? or 3 bytes?
  • Imagine that this border is X bytes (X >=2). What prevent me to distribute one sequence of them (of length less than X)?
  • Am I allowed (as written in many Constitutions) to freely post to internet some bytes? Who decides which bytes are allowed, which not? Speaking figuratively, which «words» I can speak, which not.

Assume that someone split any file to bytes, and distribute information in bits to 8 peoples. Each people have only information about one single bit in each byte, and no information about whole file. So you can distribute some bytes, even don’t know what’s there. This like torrents, but difference is that there’s no one with full file, so you can’t be technically accused of distributing some licensed content, as you have no such.

With this sad copyrighted note I end this post, in hope that there will be hope.

FFmpeg convert 3D Video for Nintendo 3DS

Пятница, Декабрь 9th, 2011

There’s already manuals, but either they aren’t splitting, or splitting and «forgetting» about 2nd Video, or they producing files which Nintendo 3DS not seeing.

I’m proposing here short info about how to make 3D Video for Nintendo 3DS :)

1. First of all, you get somewhere 3d-video file, open it, and look, if it top/bottom or left/right. Anaglyph variants are not supposed to be splitted, so dump them.

2. Supposing you got «super-video-3d.mkv», and it’s top-bottom variant. First step — convert it to required size:

ffmpeg -y -i «super-video-3d.mkv» -s 400×480 -r 20 -aspect 10:6 -vcodec mjpeg -qscale 1 -vf crop=400:240:0:0 -acodec pcm_s16le -ac 2 «new_l.avi»
ffmpeg -y -i «super-video-3d.mkv» -s 400×480 -r 20 -aspect 10:6 -vcodec mjpeg -qscale 1 -vf crop=400:240:0:240 -an «new_r.avi»

If you have side-by-side video, then you need to run these commands:

ffmpeg -y -i «super-video-3d.mkv» -s 800×240 -r 20 -aspect 10:6 -vcodec mjpeg -qscale 1 -vf crop=400:240:0:0 -acodec pcm_s16le -ac 2 «new_l.avi»
ffmpeg -y -i «super-video-3d.mkv» -s 800×240 -r 20 -aspect 10:6 -vcodec mjpeg -qscale 1 -vf crop=400:240:400:0 -an «new_r.avi»

If you need mirror left-right videos, simply exchange «new_l.avi» and »new_r.avi».

Explaining parameters. -i specified input file; -s specified rescale size;  -r 20 meant that video must be 20 FPS (3DS doesn’t support more than that)

-vcodec mjpeg -qscale 1 specifies that video stream will be recoded with best quality. You can change quality here (1=best, 31=worst).

-vf  crop specified part of screen that need to be cuted (to get needed frame). Audio converted to PCM format (which is pretty big), but it’s better to have it, than to have some weird problems with audio (For example, if you recode video, and copy aac audio, you pretty sure will have broken file). And also make 2 channels with -ac 2 (If there 5.1 or more)

3. After we got two files  «new_l.avi» and «new_r.avi», we need to find out how many parts we need: simply divide length of movie by 10 minutes. For example, you need 10 parts.

4. Splitting + converting is as simple as cuting, here’s command example:

ffmpeg -y -i «new_l.avi» -i «new_r.avi » -vcodec copy -acodec adpcm_ima_wav -ar 22050 -ab 32 -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 -ss 00:00:00 -t 00:09:59.90 «HTD_0001.AVI»
ffmpeg -y -i «new_l.avi» -i «new_r.avi » -vcodec copy -acodec adpcm_ima_wav -ar 22050 -ab 32 -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 -ss 00:10:00 -t 00:09:59.90 «HTD_0002.AVI»

ffmpeg -y -i «new_l.avi» -i «new_r.avi » -vcodec copy -acodec adpcm_ima_wav -ar 22050 -ab 32 -ac 2 -vcodec copy -map 0:0 -map 0:1 -map 1:0 -ss 01:30:00 -t 00:09:59.90 «HTD_0010.AVI»

5. In this example, I’ve got encoded How To Train Your Dragon 3D for mine Nintendo 3DS. Totally cool picture, maybe not so cool in dark places (strong banding), but looks great with scenes with tiny details, and/or with fresh colors.

Cheers!

P.S. I updated this post, to cover side-to-side video as well.

Residual with Russian Grim Fandango

Суббота, Август 20th, 2011

If you want to play Grim Fandango with russian subtitles (this is not about horrible voice, available in internet, only translation), then you need get latest Residual, and two more files.

Here, you can download archive with translation file GRIM.TAB and font file, you need to extract it where your GRIM.TAB placed. This translation made by well-known group, Enpy, kudos and credits to them!

After this, you need to get Residual, either download from their site, or build from git.

Git way:

git clone https://github.com/residual/residual.git

cd residual

./configure

gmake

After you built residual executable, you should try to add your game directory and play. If all went good, you can enjoy one of the greatest games ever with Russian translation, and great original voices :)

FreeBSD Java Plugin x64

Пятница, Январь 28th, 2011

Here’s manual how to make installed diablo java x64 work in browsers, like in Opera for example.

If you installed JDK or JRE via PC-BSD PBI, then you should make soft-links

/usr/Programs/JavaJDK/diablo-jdk1.6.0 -> /usr/local/diablo-jdk1.6.0

Also, you need create additional link:

/usr/local/diablo-jdk1.6.0/jre/lib/amd64/server -> /usr/local/diablo-jdk1.6.0/jre/lib/amd64/client

After this, Opera will find installed JRE automatically, and enable it.

To play some games/launch some apps, you need to tweak java permissions (to allow sound, graphics, filesystem access, etc).

For Opera:

edit (under root) file /…. opera.policy

and add there some of this lines (the choice is yours!):

grant {

permission java.net.SocketPermission  #to allow applets access whole internet

permission java.awt.AWTPermission «accessClipboard»;

permission java.net.SocketPermission «localhost:5577″ ,  «accept, connect, listen»;

permission java.lang.RuntimePermission «loadLibrary.<library name>»;

permission javax.sound.sampled.AudioPermission «play»

permission java.security.AllPermission; #Not recommended at all ;)

}

How’s there FreeBSD

Среда, Январь 26th, 2011

FreeBSD Quarterly Status Report is out — now it’s time to check what’s new in Q4 2010 happened.

BSDInstall is on going — not rewritten sysinstall, but new program to replace it. It’s pretty good with advanced features, like gpt, PXE install, live CD as installation media, etc.

In few weeks from Jan 2011, Chromium could conquer FreeBSD’s minds as well as other OSes. Great work, porters!

ZFS v28 which will bring a lot of use, and probably a lot of license problems, almost done. Eager to wait for it :)

Also, I glad that FreeBSD is on it’s way for wider audience - FreeBSD as Home Theater PC will be GGrrreat feature as for me.

And of course, EC2 ans PS3 platforms. One of them is for fun, while other — for mature and efficient products. Honestly, I’m lacking of some FreeBSD solution like DRBD, Heartbeat or whatever. Or maybe it’s just me.

Resource containers, interesting project which is very close to its release, will bring to platform even more stability, allowing to give some level of access to untrusted users. Or to unexperienced ones :)

Many, many other small things which maybe didn’t even mentioned in report are important too. The rain it’s not a ten big or cool drops, it’s all of them.

FreeBSD Rocks! Go, Beastie, Go!