Hi10P Saga 第一話: FFmpeg-anime

This is the sequel of my post before. Story of a struggle to achieve the latest pride of fansubbers and anime-watchers: to encode and play an h264 Hi10P video (or simply h264-10bit). Not really a story, uh… actually it’s just a log of my trial-and-error in getting this damned Hi10P working on my system.

In the previous episode – the prolog – this lame hero compiled his Hi10P x264, created a Hi10P DVD-Rip, but can’t play it on his own system. The reason: the installed ffmpeg version didn’t support it. It got worse after I built x264 shared library: mplayer2 can’t play x264 videos at all because it was built against older x264. The solution is to rebuild mplayer2 from scratch, with a new ffmpeg too. At first I tried mplayer2-git from AUR, but quickly gave up since it involved cloning the entire git repository, which was not feasible for average Indonesians.

So I built my own FFmpeg package, dubbed FFmpeg-anime, from latest git snapshot. I guess snapshot means trouble in makepkg, since there’s no way to verify the source checksum, while makepkg mandates it for direct-download files. I built FFmpeg with external libraries enabled, to make sure that my Hi10P x264 takes effect. It compiled without trouble, but mplayer2 refused to use it: mismatched version, again.

Next quest: build mplayer2 against FFmpeg-anime. Oh, no… now it failed to compile. Time to plumb over the lines…. Fixed first two errors by explicitly telling the location of libav* headers. Finished? No. We have syntax errors from libavformat.h, avio.h, taglists.h and mp_taglists.h. There are syntax errors caused by several lines I don’t understand, function and type declarations that I’ve never been taught in my basic programming class. Facepalm.org, I give up this time.

And another problem appeared, my dear little mpd can’t get along with the new FFmpeg-anime. Oh, dear.. your time has come and I won’t listen to your last will. I can live without mplayer for several days, since I didn’t have much new downloads, but I can’t live without mpd. And I completed this ‘mpd-rebuild’ quest, after several dirty edits deleting lines to compensate with older FFmpeg.

Let’s call it a day, still can’t play Hi10P. Tomorrow I’ll just download the mplayer2 binary from the official site, use it as if it was successfully installed into my system, and profit. I still hope this will lead into an anticlimax, maybe I’ll find a PKGBUILD for Hi10P mplayer2 that doesn’t involve cloning git repo, or the next official binary from Archlinux will support it, in less than a month.

Shame for you, Linux distro teams! Even Windows users have a working Hi10P-compatible mplayer2. It’s srsfckn.biz since mplayer was originally developed for Linux.

Hi10P Saga 第一話: FFmpeg-anime

4 thoughts on “Hi10P Saga 第一話: FFmpeg-anime

  1. Just a random passer-by says:

    Since x264 doesn’t decode, mplayer2 being built against an old version doesn’t matter. Also, mplayer(2) usually builds against an internal ffmpeg, not system global. The easy way to way to do this, is to use the mplayer2-build repository: http://git.mplayer2.org/mplayer2-build/

    Since you already built an up-to-date ffmpeg, you can also try using ffplay to take a look at your 10bit encode.

    1. Oh, I realize it now, FFmpeg must have its internal h264 decoder. And it seemed that the errors are because I forced mplayer2 to build against installed FFmpeg instead of the internal source.

      I did what you suggest, testing with ffplay, but the binary asked for nonexistent, older version of shared library files. I must have made something wrong when building it.

      === Update ===
      It really turns out anticlimax, I get Hi10P playback with binary mplayer2 from the official site. Let’s call it the second part, if not the ‘good ending’ for this saga.

  2. Yeah says:

    I realize it’s a little late, but the problems you had with makepkg are actually quite easy to get around.

    It’s been a while since I compiled mplayer2 on Arch, but the AUR mplayer2-git is what you should’ve gone with, including a few modifications. Checksums are the least of your worries. You can add them manually to the PKGBUILD. Also, cloning the entire git repository is NOT necessary. Also, in the PKGBUILD, there should be a step where it runs the script named “init.” Changing that to “init –shallow” would’ve been sufficient. That option makes it only clone the latest version of repository instead of the entire history.

    1. Yeah…. I’ve abandoned my mplayer2 build-repo and use mplayer2-git instead. The internet connection gets better now and I have no more problem with git cloning(back then makepkg halted when cloning the git, somehow the speed dropped to several B/s or even zero without being disconnected) .
      I wonder what makes our beloved developer team leave mplayer2 in its obsolete state, even the ordinary mplayer (one without ordered-chapter support) already has h264-hi10p support.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s