Chapter support in Matroska (MKV)
By cfz | January 6, 2009
and better : add jpg picture to illustrate chapters ... *:thumbsup:
maybe this could be fine new features ?! :saint:
thanks to coders for this fabulous work !!! *:bowdown:
I've now also added so the > works fine for non dvd's with chapters, which didn't work before.
Thanks elupus.
The "up/down" works well on my xbox, I just didn't know how to do it.
I think the > will be nice too, though.
Wes
I use Handbrake to rip our family's DVD's to MKV files (using xVid) with the chapter markers preserved. A MediaInfo dump of the meta information in the MKV looks like this:
General #0
Complete name : C:Documents and SettingsAdministratorDesktopDVDsxVidsBatmanBe ginsxVidAC3.mkv
Format : Mk
File size : 1.91 GiB
PlayTime : 2h 19mn
Bit rate : 1953 Kbps
Writing application : HandBrake 0.9.1
Writing library : libmkv 0.6.1.2
Video #0
Codec : MPEG-4 ASP
Codec/Info : MPEG4 ISO advanced simple profile
PlayTime : 2h 19mn
Width : 720 pixels
Height : 360 pixels
Display Aspect ratio : 2.35
Frame rate : 23.976 fps
Audio #0
Codec : AC3
Codec/Info : Dolby AC3
Channel(s) : 2 channels
Sampling rate : 48 KHz
Language : English
Chapters #0
1 : 00:00:00.000 Chapter 01
2 : 00:03:38.301 Chapter 02
3 : 00:07:30.324 Chapter 03
4 : 00:11:33.025 Chapter 04
5 : 00:16:14.682 Chapter 05
6 : 00:19:43.348 Chapter 06
7 : 00:24:18.373 Chapter 07
8 : 00:28:23.785 Chapter 08
9 : 00:31:24.299 Chapter 09
10 : 00:35:52.859 Chapter 10
11 : 00:38:23.676 Chapter 11
12 : 00:41:13.679 Chapter 12
13 : 00:43:07.167 Chapter 13
14 : 00:46:56.855 Chapter 14
15 : 00:49:42.896 Chapter 15
16 : 00:53:25.076 Chapter 16
17 : 00:55:54.100 Chapter 17
18 : 00:58:01.352 Chapter 18
19 : 01:03:30.848 Chapter 19
20 : 01:05:51.989 Chapter 20
21 : 01:08:37.822 Chapter 21
22 : 01:11:24.822 Chapter 22
23 : 01:13:18.435 Chapter 23
24 : 01:16:15.112 Chapter 24
25 : 01:19:49.743 Chapter 25
26 : 01:23:53.361 Chapter 26
27 : 01:29:01.627 Chapter 27
28 : 01:32:35.716 Chapter 28
29 : 01:37:47.987 Chapter 29
30 : 01:40:32.651 Chapter 30
31 : 01:45:08.135 Chapter 31
32 : 01:49:31.106 Chapter 32
33 : 01:51:28.348 Chapter 33
34 : 01:54:48.006 Chapter 34
35 : 01:58:10.083 Chapter 35
36 : 02:01:54.015 Chapter 36
37 : 02:05:00.159 Chapter 37
38 : 02:06:05.891 Chapter 38
39 : 02:09:17.541 Chapter 39
40 : 02:10:56.056 Chapter 40
What I'm specifically requesting is the ability to press << or >> on the remote control and skip to the previous/next chapter marker in the Matroska file, using either DVDPlayer or MPlayer.
Would be great if this worked in AVI files and other containers that support chapters as well, but Matroska is the most desirable, I think.
Hope this helps.
-Wes
MKV (Matroska) chapters is not yet supported in XBMC as far as I know, ...however I think I remember reading recently that chapter support for MVK has now been implemented in FFmpeg (http://ffmpeg.mplayerhq.hu) (can anyone confirm this?), and since FFmpeg is used in XBMC's DVDPlayer (http://xboxmediacenter.com/wiki/index.php?title=DVDPlayer) (one of XBMC's video player) it could possibly be as simple for our developers as updating FFmpeg (http://ffmpeg.mplayerhq.hu) in XBMC and then activating/linking that feature in the DVDPlayer (http://xboxmediacenter.com/wiki/index.php?title=DVDPlayer), though I am not sure.
Revision: 13293
Author: elupus
Date: 2008-05-28 16:04:26 -0700 (Wed, 28 May 2008)
added: chapter support for mkv files.
Modified Paths:
--------------
trunk/XBMC/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
trunk/XBMC/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
trunk/XBMC/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h
trunk/XBMC/xbmc/cores/dvdplayer/DVDPlayer.cpp
trunk/XBMC/xbmc/cores/dvdplayer/DVDPlayer.h
http://damienbt.free.fr/index.php
has support for mkv chapters. The impression I get is that the requisite chapter coding comes from Haali splitter
http://damienbt.free.fr/phpBB2/viewtopic.php?t=275
I don't know much beyond that. XBMC doesn't use haali splitter for audio streams purposes, right?
MKV (Matroska) chapters is not yet supported in XBMC as far as I know, ...however I think I remember reading recently that chapter support for MVK has now been implemented in FFmpeg (http://ffmpeg.mplayerhq.hu) (can anyone confirm this?), and since FFmpeg is used in XBMC's DVDPlayer (http://xboxmediacenter.com/wiki/index.php?title=DVDPlayer) (one of XBMC's video player) it could possibly be as simple for our developers as updating FFmpeg (http://ffmpeg.mplayerhq.hu) in XBMC and then activating/linking that feature in the DVDPlayer (http://xboxmediacenter.com/wiki/index.php?title=DVDPlayer), though I am not sure.
Thanks I'll check it out!
Tried playing it with mplayer & dvdplayer
I checked my test video & the chapters work fine using vlc media player on the pc.
I have i missed something ?
Switching gears slightly, for anyone who doesn't want to wait for this to get properly integrated into skins, here's the change for PM3 I used for testingIndex: skin/Project Mayhem III/PAL/DialogFullScreenInfo.xml
================================================== =================
--- skin/Project Mayhem III/PAL/DialogFullScreenInfo.xml (revision 13974)
+++ skin/Project Mayhem III/PAL/DialogFullScreenInfo.xml (working copy)
@@ -268,8 +268,8 @@
-
-
+
+
right
font10
Index: skin/Project Mayhem III/PAL/DialogSeekBar.xml
================================================== =================
--- skin/Project Mayhem III/PAL/DialogSeekBar.xml (revision 13974)
+++ skin/Project Mayhem III/PAL/DialogSeekBar.xml (working copy)
@@ -200,7 +200,7 @@
center
center
-
+
right
font13
http://xbmc.org/trac
@waldo22, you should also create new ticket on trac for your feature request.
thank you for any reply.
right now if i press the skip-next button on the remote (the one you use to skip to next chapter in a dvd movie) xbmc just terminates the video and drop me back to the xbmc gui. i don't know if this is best implemented by loading the bookmarks for the video-file with the chapter-information extracted from the mkv-file or using similar routines as in the xbmc dvdplayer or some other solution, but hopefully some good dev familiar with the mkv-format could implement this.
I've now also added so the > works fine for non dvd's with chapters, which didn't work before.
Is this functionality in the xbox build too, or just the Linux/Mac/Windows builds?
Assuming that is OK, it looks fine. Mind checking?
Cheers,
Jonathan
Capn,
This thread has quickly gone over my head, but could you explain this statement?
Do you mean "DVDPlayer core" as opposed to the DVDPlayer that is in all branches?
Isn't the ffmpeg demuxer used for DVDPlayer for the xbox build as well?
Is it a lot of work to compile this version of DVDPlayer for xbox as well?
Clearly, DVDPlayer is now the player of choice for all platforms.
I can finally play Apple's h.264 product demos on my xboxex perfectly in DVDPlayer, when they jerk like crazy in mplayer.
Thanks for the work you're doing for the other platforms, even if I don't understand :o
-Wes
afaik, We no longer rely on > in OSD to change chapter
Do you think you'll have time to roll this into the xbox build?
I'd send beer, but I think all the good stuff is already on your side of the Atlantic.
-Wes
Do you think it's a simple matter of DVDPlayer "catching" and handling the << and >> buttons for non-DVD content, jumping to the previous or next chapter's timestamp, and refilling the buffers, or is it something that will have to be implemented in the demuxer (ie. does ffmpeg have to support it?)
Wes
CapnBry, looks like this is done now. (Thanks Jezz_X!)
Thanks for all your work on this Elupus, Jezz_X, FFMPEG guys, and others.
I'll look for the next T3ch build. (next week maybe).
Wes
I've now also added so the > works fine for non dvd's with chapters, which didn't work before.
I don't even have the xbox controller, I only use the remote, so how would I do chapter fwd with that?
In a DVD, using DVDPlayer, I use the > key on my remote control (Yamaha Home Theater remote programmed for RCA DVD Player) and it skips forward to the next chapter.
Is this not the way it works in the other builds?
-Wes
http://xbmc.org/wiki/?title=Appendix_D:_Development_Notes#Contact_metho ds
This chapter code only appears to be in the DVDPlayer core and support for MKV chapters is only in the ffmpeg demuxer, so unless Xbox builds don't use the mplayer any more there's no chance of it being in Xbox.
To change topic: I'm really shaky on how things should be coded but here's a go at a patch to add support for chapter names for mkv files, which can be accessed through skins via the player.chaptername $INFO tag. I welcome comments from developers
Link to diff vs r13974 since sf's tracker is down (http://capnbry.net/~bmayland/fi/code/chaptername_support.diff)
Things I'm not sure if I did the XBMC Way:
-- When adding a GUI Info constant (i.e. PLAYER_CHAPTERNAME) should it go with the other constants related to chapter and move the rest down, or just at the end like I did?
-- Should IPlayer::GetChapterName() return a string vs modify a passed one? Other functions in the class seem to work with the passed string, so I copied that.
Tested on the Win32 and Linux builds on DVDs, mkvs with chapters, mkvs with no chapters, mp4s with chapters and without (although chapters do not work at all in mp4), and avi files.
Ok so when xbmc wants to play something it needs a player, and that top level object is called the Player Core. XBOX has DVDPlayer, MPlayer, PAPlayer and maybe ModPlayer. By default xbox hardware prefers the mplayer core to the dvdplayer core. And I've just realized that you've already realized that you can override the default core with the "Play using..." context menu option sooooo you know all this already. But to finish the concept for academic purposes: then player core picks a demux, and the demux picks the codecs.
I guess the question is does the > button chapter skip, right? Yeah it was added to trunk's ffmpeg demux in r13293 (May 28) and DVDPlayer in r13533 (Jun 11). It should be bound to the "skipplus" and "skipminus" actions in your remote map.
Sorry for the long delay... I didn't get a notification that you replied.
I tried using DVDPlayer on the November 25th SVN build, and it doesn't work.
I'll try updating to the latest SVN and report back.
Wes
no ideas ? ...
eh ?! i'm in feature suggestion ?! :nuts:
if it's in feature suggestion : it could be very fine to associate a small picture to chapter, in mkv it's not very hard i think, like "chapter001.jpg", "chapter002.jpg" ... and display it in bookmark window ... :evil:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-May/thread.html#46915
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-May/046915.html
XBMC doesn't use haali splitter for audio streams purposes, right?No, XBMC only use native code (FFmpeg (http://www.ffmpeg.org)), and not DirectShow. Read this (http://xbmc.org/wiki/?title=Codec_and_Format_requests).
No external decoders or demuxers/splitters is possible to plugin like that.
And thanks Gamester for noticing this in the ffmpeg svn.
-Wes
Will get it in to SVN later tonight if someone else doesn't beat me to it.
Cheers,
Jonathan
Maybe it's just extraordinarily difficult to do?
Wes
#If you have any other info about this subject , Please add it free.# |
Topics: enart.xn--fiqs8sjn5by0n.com | edit
