Monday, May 4, 2009

MPlayer And Mkv Linked Chapters V

An updated patch for MPlayer Matroska linked chapter support is available here. The patch should apply cleanly to a recent Subversion checkout of the MPlayer source. You will also need the development header files for the libraries that you expect to use with MPlayer. You can figure what is missing by examining the output at the end of the ./configure command. I did not pass any flags to ./configure.

Download the source:
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
Compile:
cd mplayer
./configure
make
make install
Test MPlayer thoroughly with some files that you know should work. If they do not play properly, you should figure out why before applying the patch. At this point you can still expect to get some help from the MPlayer-users mailing list.

Apply the patch and recompile:
patch -p0 <mplayer_matroska_linked_chapters.diff
./configure
make
make install
MPlayer will now play a .mkv file with linked chapters. The external files must be in the same directory as the main file, otherwise MPlayer will not find them.

The original patches that I used, can be found here for those who are curious, but you don't need them, as the updated patch includes everything from the originals. My only addition forces MPlayer to always play the external chapters even if they appear to be incompatible. I did this because there no command line option to control the flag. If the external files are really incompatible, it will be obvious anyway, and you must delete them or move them out of the directory so that MPlayer cannot find the files. Renaming will not work.

Please do not expect support for this patch on the MPlayer mailing lists since the devs did not accept the original patches. We are on own with this one. The work to add linked chapter support has moved to ffmpeg (here and here), but I couldn't find any sign that those patches were ever accepted. We may be stuck using a feature without developer support.

1 comment:

  1. There is a problem with the patch but a better option is available.

    ReplyDelete