h264 Hi10P: There Another Mess for You to Deal Again, Linux Distro Devs…

Like it or not, Linux (along with *BSD and other open-source OSes) always lags behind Windows in multimedia functionality. It’s not really a big deal for average Hollywood Blockbuster Fags, since DVDRIP or even worse CAM-TS are still much the same as the prehistoric age, still the same AVI format and inferior SubRip external subtitles. But when it comes to anime-fags, surely they’ll be annoyed, since anime fansubbing (read:piracy) scene always pushing hard to the latest power-ups in multimedia technology. Substation Alpha, Matroska container are to name a few, and while only 5 out of 8 Windows desktop can play Matroska format, they came up with ordered-chapter Matroska, and now the latest h264 Hi10P format which puts frowns on the faces of Windows and Linux animefags alike.

But the pathos is always heavier for us Linux hipsters. The ordered chapter Matroska hasn’t made its way to mplayer, the most functional media player for Linux platform. A less popular but newer mplayer fork called mplayer2 has implemented it, but we can see it here that the Linux multimedia developers are reluctant when it comes to catching up with the latest developments. In ordered-chapter case, the reason is security, because they suspected that linked files can be manipulated to do some harm to the computer. An even worse case, Aegisub build for Linux is still less-stable than its Windows counterpart, crashing every now and then (Aegisubs developers are clearly Windows-minded, since the keyboard shortcut for ‘Quit’ is Alt+F4, even in the Linux port). Aegisub devel teams don’t seem to care much for other than Windows, as the failure of the latest source code to compile against newer FFmpeg versions indicates that they still use older (prehistoric) FFmpeg. To date, Assdraw hasn’t even seen a fork for OSes other than Windows.

The Firsthand Experience

Now my friends from Indonesian fansub community are blabbering about the shining-new h264 Hi10P. This is a format of h264 which encodes each color channel in 10 bits, as opposed to the older (and normal-world standard) h264 which uses 8 bits. This means more fidelity at a given bitrate, and possibly smaller file size (profit for those trapped in developed countries where broadband means 5kBps). Well, I put my trust on my rolling-release distro, checking repository, assuring x264 installed in my system was the newest, and it was. I checked the help texts, no option for Hi10P. I found a header file from x264 package which defined bit depth as 8. It seemed that my x264 from the distro was hardcoded for 8 bit encoding. Next step, I searched in x264 user-build package, none of which supported 10 bit.

OK, let’s do it the hard way. I grabbed the source, wrote a distro-specific build script. My guess was right, x264 is either hardcoded for 8 bit or 10 bit, but no switch to choose one of either on-the-fly. A compile-failure solved by disabling software scaler. Package build succeed. Here’s my distro-specific build script.

Time to test it. For the test material I used the live-action PV of Morning Arch from a DVD ISO. It is interlaced, and has 702×480 display size. For adjustment I run the source through these filters before passing them to x264: linear-blend to deal with the interlacing, crop filter to remove vertical black bands, contrast enhancement (the video looks like it was ripped from a bleached 16mm roll), and the last, denoise to suppress noise induced by contrast enhancement. The encoding is done by x264 and mplayer in tandem, using a yuv4mpeg FIFO. I set the quality as CRF 26.

It was pretty much a heavy burden for my Core2Duo, 1GB laptop. CPU load skyrocketed to 100% while CPU temp rose to 81’C (8 degrees below critical), and the chromium browser lagged. Nevertheless my laptop managed to finish it without getting overheated. The result seemed to be very promising: an 19MB raw h264 stream, or a total of 31MB Matroska file with Ogg audio, ripped from a 343MB DVD ISO. You can grab the torrent here.

Well, I was ready to test it with mplayer2. But it was not my lucky day, mplayer2 spat out error messages and refused to play the video. It turns out that the distro’s official version of FFmpeg doesn’t support Hi10P. The latest git version has the support, but it takes forever to clone the entire git branch, so I’ll save that later when I get a better internet.

Now I am waiting for feedback from leechers who had downloaded my rip.

Concluding Remarks

While being a tough guy in networking, programming and security area, Linux (and other *NIXen) is pretty weak in multimedia. Even a rolling-release, bleeding-edge distro couldn’t always provide support for newest multimedia quirks. Most fansubbers out there are working on Windows PCs. While things like stable Aegisub and encoder’s ‘Swiss Army Knife’ – the Avisynth with its powerful .avs script – are common staple stuffs for them, they are luxuries that we, Linux average users, can’t afford. This leaves a pretty big tasks for Linux multimedia developers, to catch up with Windows. The most important of them being the Avisynth frameserver, for its self-documenting format will save us from long, multiple line CLI arguments. Without a working Linux/*NIX fork of Avisynth, pretty much encoders out there will have no reason to leave Windows.

h264 Hi10P: There Another Mess for You to Deal Again, Linux Distro Devs…

春風 SHUN PUU (Harukaze SHUN PUU) – Translation

So far I’ve found no English translation for this awesome song. This is the first time I really translate a song to English from scratch, most of the times I’ve only translated from English to my native language. If you spot a mistaken translation, or you want to suggest for better English, feel free to leave them as comments.

Lyrics taken from singalonglyrics. There’s an official PV on youtube.

聞こえてくるのは君の優しい声
kikoete kuru no wa kimi no yasashii koe
僕の名前を幾度となく
boku no namae wo ikudo to naku
呼んでくれたのは春夏秋冬
yo’n de kureta no wa haru natsu aki fuyu
いつもいつもそばにいたね
itsumo itsumo soba ni ita ne

I hear your gentle voice
calling me countless times
spring, summer, fall or winter
you’ve always stayed by my side

悲しみの色に染まる
kanashimi no iro ni somaru
涙さえ分かち合える
namida sae wakachi aeru

in times when grief-tainted tears are falling
we’ve always share those moments together

君と笑うこの春の日に
kimi to warau kono haru no hi ni
咲いた咲いた桜の花が
saita saita sakura no hana ga
ひとつふたつみっつよっつと
hitotsu futatsu mittsu yottsu to
幸せ数えて花が舞う
shiawase kazoete hana ga mau

We spend this spring day with smile on our faces
when the cherry blossoms are blooming
one, two, three and four
I recall my happiness as I scatter the flowers

つないだこの手を離さないように
tsunai da kono te wo hanasanai you ni
君の歩幅で歩いていた
kimi no hohaba de aruite ita
これから始まる春夏秋冬
kore kara hajimaru haru natsu aki fuyu
どんな時もそばにいるよ
donna toki mo soba ni iru yo

I grab your hand, never going to let it go
take my steps on your pace as we walk
from now on, spring, summer, fall or winter
every time I’ll always stay by your side

水色の空に浮かぶ
mizu iro no sora ni ukabu
春風を捕まえたら
haru kaze wo tsukamaetara

Let’s grab those spring breeze, buried in water-colored sky,
into our arms

君と願い待ちわびた日に
kimi to negai machi wabita hi ni
咲いた咲いた桜の花が
saita saita sakura no hana ga
ひとつふたつみっつよっつと
hitotsu futatsu mittsu yottsu to
幸せ祈って春が舞う
shiawase inotte haru ga mau

We share hopes and forgiveness those days
in times when the cherry blossoms bloomed
one, two, three and four
I whisper my prayer for happiness to the dancing spring

君と笑うこの春の日に
kimi to warau kono haru no hi ni
咲いた咲いた桜の花が
saita saita sakura no hana ga
ひとつふたつみっつよっつと
hitotsu futatsu mittsu yottsu to
幸せ数えて花が舞う
shiawase kazoete hana ga mau

幸せ数えて花が舞う
shiawase kazoete hana ga mau

春風 SHUN PUU (Harukaze SHUN PUU) – Translation