Friday, May 8, 2009

MPlayer And Mkv Linked Chapters VI

[2009/09/26: More recent info here]

Well, after upgrading to faster hardware, I tried styled subtitles with 720p video for the first time. Running through my test videos, I found a case which the patch does not handle. When the linked chapter is the first chapter, MPlayer does not display the subtitles from the main file. If the linked chapter occurs later in the chapter list, all subtitles work normally. Unfortunately, the opening title chapter is usually the first one in most anime videos, so this is big problem.

Faced with doing more serious digging into the source file, I was feeling the limitations of Subversion. While investigating MPlayer git repositories, I noticed the development branch logged some changes for “ordered chapters.” Was this yet another effort to add support for Matroska ordered chapters? Only one way to find out: try it!

The following will downloaded MPlayer source from the development branch. You will also need the FFmpeg source.
git clone git://repo.or.cz/mplayer.git
cd mplayer.git
git clone git://git.ffmpeg.org/ffmpeg/
Then configure, build and install as usual.
./configure
make
make install

This attempt at the linked chapter problem works very well. It plays all my test videos, even the ones where the encoding of the external files do not match the main file exactly. There is occasionally a slight hesitation in the video when switching between the linked chapters, but it is not consistent so it may be hard to track down. So far that is the only problem I've noticed but I'm sure I'll find something. This is the development branch after all, and I certainly wouldn't expect it to be completely problem free. However, it is a good sign that linked chapter support is finally in a repository rather than some random patches which may never be updated.

4 comments:

  1. It would seem you and I are on a similar quest. Ordered chapters (segment linking) is becoming more popular in the anime scene now. Before I could simulate the support using -fixed-vo and the files involved. However, this is a pain to do (and *know* to do).

    I'm gonna give this a try -- I'm also hoping this is using the recently released ffmpeg with the new WMA codecs.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. The implementation in git repo is different from the earlier patch, which wasn't successful in getting ffmpeg's interest...

    The git repository is in fact a fork of sorts, it's a personal undertaking of one of mplayer's devs, uau, and has other features that aren't in svn (better behaviour when video is paused for example). He's the one who wrote the segment linking support in that repo iirc.

    ReplyDelete
  4. Thanks for the information. The linked segment support from the git repository works very well. It's not perfect but it is the best effort so far.

    ReplyDelete