MP4 Chapter support not working for me
#1
Hi

I've read on various posts, via the IIRC and on the wiki that the internal player should support chapters in MP4 files. However, they aren't showing up in any of my MP4 files.

First off, here is my debug log when trying to play an MP4 file with chapters built in (The_Green_Mile.mp4):
http://www.prupert.co.uk/images/xbmc.log

Here is the output from mediainfo for the file, showing that the file has chapters (VLC sees them fine):
http://www.prupert.co.uk/images/thegreenmile.txt

And if you really wanna check, here is the MP4 file itself (it's 1GB though Wink)
http://www.prupert.co.uk/images/The_Green_Mile.mp4

For completeness, here is the command used to create the MP4 file:
ffmpeg -deinterlace -y -i "$1" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -acodec libfaac -ab 128k -ac 2 -ar 48000 -vsync 1 -async 1000 -map 0.0:0.0 -map 0.1:0.1 "$1".mp4

And here is the command I use to add chapters to the MP4 file:
MP4Box -chap "file.chap" -out "file.mp4" -tmp "/mnt/media/documents/ruperts/TV/tmp" "$VIDEO"

I am using comskip to create the .chap files, all the source files are mythtv DVB-T transport streams (.ts).

Should I just revert to using .edl files instead (shame, since having the chapter files built in is so much more elegant)?
Reply
#2
Bump: Any views on this?
Reply
#3
OK, I've now tested it by creating an accompanying EDL file and a standard TXT file from Comskip.

It obviously recognises either the EDL file or the Comskip file, since it automatically skips to the scene markers. However, I can't manually skip from one marker to the other.

I have added the following to my remote.xml (and not to my keymap.xml, since that seems to have been depreciated, though there is no mention of this in the wiki anywhere):

<FullscreenVideo>
<remote>
<skipplus>NextScene</skipplus>
<skipminus>PreviousScene</skipminus>

As suggested in the wiki, but nothing happens.

Press period/comma on my keyboard just skips forward/back a minute. Since I have no keymap.xml I have no clue how to modify keyboard bindings.

When I press Play to get codec settings during a playing video which has bookmarks, a EDL file and a Comskip file, it shows:

edl:c6

My question is, is there a way to get XBMC to see these chapter markers, but not to automatically use them, allowing me to manually use them...Huh

It'd be nice to get a response from someone here, as I have (I believe) submitted all the correct info as requested in the forum FAQs....
Reply
#4
OK, so reading through the logs, it looks like keymap.xml has been broken down into a folder, full of various xml files for each individual type of input, one of which is:

11:30:34 T:3030800272 M:2804592640 INFO: Loading special://xbmc/system/keymaps/keyboard.xml

So I guess this is the one you edit to change your keyboard settings. It'd be cool if the wiki was updated to reflect this - if someone confirms that this is the case, I would happily update the wiki myself....

Now, back to Chapter support:
From reading this post, the discussion between the comskip coder and the person who added in EDL support to XBMC:

http://www.kaashoek.com/comskip/viewtopi...c&start=15

It seems that EDL and .vpr files were initially chosen to allow for skipping of adverts and for creating scene markers. Comskip has the option to create vdr files specifically for XBMC (in comskip.ini), but there is no mention of vdr files in the EDL section of the XBMC wiki:

http://wiki.xbmc.org/?title=EDL_%28comme...er_support

From the wiki page, it seems the only way to get scenemarkers (aka Chapters??) from a file is by your EDL files having a special code 2 action for scenemarker. However, as far as I can tell, there is no way of creating this special code 2 (http://www.mplayerhq.hu/DOCS/HTML/en/edl.html) since the codes are usually only either 1 or 2.

Currently (from my logs) it seems the XBMC reads the EDL file and adds cut points and scenemarkers from it:

11:39:48 T:2677906288 M:2712875008 DEBUG: ReadEditDecisionLists - checking for any edit decision lists (EDL) on local drive or remote share for: /home/xbmc/videos/Deathwatch.mp4
11:39:48 T:2677906288 M:2712875008 DEBUG: AddCut - Pushing new cut to back [00:00:00.000 - 00:09:12.000], 0
11:39:48 T:2677906288 M:2712875008 DEBUG: AddCut - Pushing new cut to back [00:25:51.000 - 00:27:14.000], 0
11:39:48 T:2677906288 M:2712875008 DEBUG: AddCut - Pushing new cut to back [00:54:01.000 - 00:58:19.000], 0
11:39:48 T:2677906288 M:2712875008 DEBUG: AddCut - Pushing new cut to back [01:01:12.000 - 01:10:48.000], 0
11:39:48 T:2677906288 M:2712875008 DEBUG: AddCut - Pushing new cut to back [01:37:59.000 - 01:40:56.000], 0
11:39:48 T:2677906288 M:2712875008 DEBUG: AddCut - Pushing new cut to back [01:43:58.000 - 01:49:58.000], 0
11:39:48 T:2677906288 M:2712875008 DEBUG: ReadEdl - Read 6 cuts and 0 scene markers in EDL file: /home/xbmc/videos/Deathwatch.edl
11:39:48 T:2677906288 M:2712875008 DEBUG: WriteMPlayerEdl - MPlayer EDL file written to: special://temp/xbmc.edl

However, if a typical EDL file never has action 2, then this seems pointless...

So, why invent this code 2 if there is no way of creating (apart from manually) an EDL that supports code 2Huh??

This is all incredibly confusing.

Could someone who knows PLEASE help out. Which is the correct way to add scenemarkers to MP4 files (and any other file for that matter) in XBMC. And if it is EDL files, how can one create an action 2, if they aren't a commonly recognised format of EDL filesHuh?

Anyone?
Reply
#5
Ok, I am loving this conversation with myself, really useful. I find I am really adding a lot.....

Anywayyyy

So, it turns out, relating to the original question about Chapter support, that that is down to Mplayer, which XBMC uses internally. Thus MP4 chapter support is an Mplayer issue and something that XBMC has no control over.

The current version of Mplayer does not support chapters in MP4 files, so XBMC does not support chapters in MP4 files. It'd be nice if there was somewhere to update the Wiki to reflect this fact, but there is no Chapters section in the wiki. Hopefully if people do a forum search they will find this post.

So, until Mplayer supports MP4 Chapters and that they gets ported to XBMC, there is no MP4 Chapter support.

It would have been nice if someone who knew this just piped in from teh start, rather than leaving me to talk to myself here.

But hey, since no one bothered, I'll just continue to rant away until someone tells me to shut up.






Since I have found out there are inconsistencies with the EDL support in XBMC, I have created a new post on that one and hopefully some one will decide to reply.....else I'll have to keep on bumping it.....:
http://forum.xbmc.org/showthread.php?p=4...post453593

So, this topic can be considered closed, all thanks to me.......
Reply
#6
XBMC only uses Mplayer on XBox.
On all other platforms we use the homegrown aptly named DVDPlayer.
Whatever that supports is for others to answer.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
Thanks for answering this post, good to not only be talking to myself.

Aha, out-dated info again I guess. It seems like there is a lot stuff on the wiki that is Xbox specific (understandable giving XBMC's roots) but that don't apply to builds for other platforms, shame, as this can be very confusing. If I had the knowledge myself, I'd offer to update the Wiki, but since I don't know any of this I can't. And I guess the guys who do know are all to busy coding...catch22 I guess.

Ok, so, the DVDPlayer uses ffmpeg, which doesn't support chapter files in MP4 either, so until ffmpeg supports chapters, then we are back at the same place.

It seems that there has been some effort to use EDL files to get around this, but as I posted in this thread and then in my new thread, there are problems with XBMC's use of EDL files.

Anyway, good to have this issue cleared up and clarified, thanks again.
Reply
#8
Yes and no.. I could be doing that and I sure as hell am not busy coding (just with other stuff).
Could you please point out the offending page?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#9
OK, I'll look back through my history to find it.
Reply
#10
OK, I am gonna put my hands up here and say whoops.

I misread the Wiki. It does state that MPlayer is for Xbox only (it says it in Bold too).

Totally my bad and sorry for wasting your time on this one.
Reply
#11
as i told you on irc earlier: if ffmpeg supports the chapters, we should. until you have tested that there's not much we can tell you except they appear not to be working from your tests. bark up that tree (ffmpeg)
Reply
#12
Tree already barked, it is an ffmpeg problem, not a XBMC problem, since ffmpeg has limited chapter support at best. It supports it in MKV but not in MP4.

Thus it's a dead issue.
Reply
#13
Just to finish this one up, I can confirm that XBMC fully supports Chapters in MKV files. I trancoded (using ffmpeg and x264) a TV recording last night from MythTV, using Comskip to scan it first for ads and to create a .chap file. I then used mkvmerger to mux the .chap file information into the transocoded MKV file.

Next and Previous scene works flawlessly when in Fullscreen in XBMC, so that's the way forward.
Reply

Logout Mark Read Team Forum Stats Members Help
MP4 Chapter support not working for me0