[MPlayer-users] Feature request : Segment Link with Matroska

Diogo Franco diogomfranco at gmail.com
Thu May 15 18:28:22 CEST 2008


Em Qua, 2008-05-14 às 23:34 -0700, Eddie H escreveu:
> On Fri, May 18, 2007 at 8:04 AM, xavier souron <xavier.souron at gmail.com> wrote:
> > First of all thank you for mplayer, in my opinion it is the best player ;)
> >
> > I think it would be great to have the support of segment link for matroska,
> > a guy on IRC (Arneb) made this :
> > http://www.ps-auxw.de/ordered/
> >
> > "<ArneB> http://www.ps-auxw.de/ordered/ - FWIW, I made two ordered chapter
> > samples. One with single file, one with three linked files.
> > <ArneB> First edition should play "Part A", then "Part B" twice. Second
> > should play "Part A version 2", then "Part B" twice"
> >
> > Also you can find here an example of the chapters.xml :
> > http://reivax2.free.fr/mkv-test/chapters.xml
> >
> > What for ? To gain disk space, example :
> > An episode of One Piece in HD 720 = 500 mo for an episode of 23 min
> > The opening = 3 min
> > This opening is the same since the 284 and now the last episod was the 309
> >
> > => (500/23) x 3 = 65
> > => 65 x ( 309-284) = 1625 mo
> > I let you imagine for HD 1080 ;)
> >
> >
> > It also be useful for videos with part1 and part2.
> >
> > Thanks in advance
> 
> Is this feature under consideration for MPlayer? It is also known as
> Ordered Chapters, and is part of the .mkv specification. AFAIK, even
> in Windows, only Haali's supports Ordered Chapters, and no player in
> Linux supports it.
> 
> This feature is being increasingly used, since many shows have static
> opening and closing credit sequences. Once those sequences have been
> downloaded, the viewer only needs to download the main body of the
> show (plus any specific intro and ending sequences that play
> before/after the credits), thus saving bandwidth and storage space.
> 
> Playlists could be used, but any intro/ending sequences will be played
> out of order. The other alternative is to split and remux the .mkv,
> which is beyond the abilities of many casual users.
> 
> I hope it wasn't bad form to resurrect this old feature request
> instead of starting a new one.
> 
> --
> 
> agent
One way to use this feature, as you said, is with playlists or by
passing the files in order. The problem is that segment linking would be
no longer automatic and the movie would pause/the screen flicker for a
few milliseconds while loading the next file even when you use
-fixed-vo.

To find the next/previous segment, you have to read a 128-bit number,
then find every matroska file in the same folder and read another
128-bit number from each of them; comparing until you find a match, and
repeat for each segment. That would take a while on big folders. To ease
that, there's an attribute in matroska that allows you to specify the
next/previous segment filename, but is not always used and is unreliable
if the user, for example, renames the file.

I don't understand much of the codebase, but I think the problem is how
to send streams from multiple files sequentially and make them appear as
coming from a single file.

As demuxer development is happening around libavformat, I think it would
be a good idea to forward this to ffmpeg-users; not sure tough as most
developers work on both projects. If I'm not mistaken, libmpdemux is
"trying to be" deprecated in favor of libavformat.




More information about the MPlayer-users mailing list