Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222) +--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9) +--- Thread: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? (/showthread.php?tid=55764) |
RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - garretn - 2017-06-30 If anyone wants it here is my 17.3 windows build w/ the OrderedChapter commits from Moritz: http://www.mediafire.com/file/a6vvp1zuea32s0h/KodiSetup-20170626-8eb72fc-OC-x86.exe RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - EGOvoruhk - 2017-07-24 (2017-06-30, 18:58)garretn Wrote: If anyone wants it here is my 17.3 windows build w/ the OrderedChapter commits from Moritz: Is this only for external linking, or would it work for choosing an edition from a 2in1 file created with Xin1generator? (eg single file with Theatrical and Director's Cut) RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - garretn - 2017-07-24 (2017-07-24, 00:31)EGOvoruhk Wrote:(2017-06-30, 18:58)garretn Wrote: If anyone wants it here is my 17.3 windows build w/ the OrderedChapter commits from Moritz: This is only for external linking, I believe the code only uses the default edition currently. RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - Shine - 2017-08-01 From looking at the code, I think it just selects the first edition found. Not that it matters much, since the first edition is pretty much always the default edition anyway. It selects the first (not default) edition, which in almost all cases is the default edition anyway. However, it doesn't honor hidden chapters, so many X-in-1 MKVs still won't work properly. This patch should fix it: Code: xbmc/cores/VideoPlayer/DVDDemuxers/DemuxTimeline.cpp | 2 +- FFmpeg relevant issue - vertigo220 - 2017-09-04 This is, for me, a very important issue as I use Kodi via a Shield TV for 99% of my TV and movie watching, and I have several movies with 2 or more cuts (theatrical/director/etc) in one mkv but unfortunately I can only watch the first one, as all the other scenes are placed at the end of the file and Kodi doesn't handle them properly due to the FFmpeg limitation. I've also very recently come across a situation where it would be helpful to use chapter ordering to create different versions of a series of numerous chapters in which they play in different orders, instead of creating separate, large mkv files for each order. FFmpeg issue #3123 appears to be the critical step everyone is waiting for, so it would be a good idea for everyone wanting this functionality in Kodi to go upvote it. MKV Ordered Chapters support - Shine - 2017-09-06 (2017-09-04, 21:24)vertigo220 Wrote: FFmpeg issue #3123 appears to be the critical step everyone is waiting for, so it would be a good idea for everyone wanting this functionality in Kodi to go upvote it. Don't hold your hopes too high concerning that ticket. For one, the ticket has been opened 4 years ago with no progress whatsoever. In addition, this ticket completely ignores the fact that multi-edition files exist. It focuses on multi-file, single-edition MKVs only (just like mojo-hakase's patch does). As far as I understand, FFMPEG will do the same that Kodi does when encountering multi-edition files: It will play the file in encoded order, ignoring the edition/menu structure in the MKV. Secondly, FFMPEG devs have repeatedly stated that they see ordered chapter support as a player feature and won't implement it into FFMPEG, while Kodi devs have repeatedly stated that they see it as a demuxer feature and won't implement it in the player. So we have a deadlock here. IMO, the only viable approach would be, as mojo-hakase already proposed, to get FFMPEG devs to implement an API that presents all ordered chapter tables (the timelines) and segment IDs to the player, so the player can do with it as it pleases (ie. request the needed chapters from the demuxer, open any additional required files, etc.) Meaning, work has to be done on both sides, FFMPEG and Kodi. Chances of seeing that feature anytime soon? Frankly, if you ask me, zero. There have been multiple proposals and patches for both FFMPEG and Kodi in the past 10 or more years that implemented ordered chapters - none of them was accepted, and the patch authors gave up at some point. That being said, with mojo-hakase's excellent work implementing multi-file support, it's a piece of cake to add multi-edition support as well. It took me, all in all, little more than half an hour to get a first working version. Of course, it's an ugly ugly hack, since Kodi lacks multi-video-track support at this time, which would be required to get it implemented properly. And because I'm lazy and did as little work as possible, disregarding good coding practice ;-) Download my 17.4 17.5 17.6 build with Ordered Chapter and Xin1 support here. Or if you want to compile it yourself: Patches only I think it works, I just don't have many files to test. And honestly, I didn't feel like rewatching a full Xin1 movie to check whether it's being played back properly all through, all editions... So - take it as it is, it might or might not do what it's supposed to do. Currently, I don't plan on doing any more work on it or fixing any bugs. But I hope it's useful to some of you! How to use:
Enjoy. RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - vertigo220 - 2017-09-06 Thanks Shine. Believe me, I don't have high expectations for it, but I do hope that maybe by linking this thread and that issue, it will help people from either side to see the issue as a whole and, who knows, maybe the right person will see how important this is and work on it. Just trying to bring more attention to it is all. Unfortunately, your build wouldn't help me, since I run Kodi on my Shield TV. If the Kodi devs could and would use your work to add the functionality to Kodi, so it would be included in a future build which would also mean the Android version would have it, then I would be happy to help you test it out, as I have multiple MKVs with two editions and even one with three, and I could easily play them simultaneously at 2-3x speed and keep an eye on what they're doing. RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - garretn - 2017-09-06 Neato. It'd be cool to select edition via a Simple Menu, like how they're implemented for blu-rays. RE: Multiple videos in a Matroska MKV container with Ordered Chapters - Shine - 2017-09-07 (2017-09-06, 18:07)vertigo220 Wrote: Unfortunately, your build wouldn't help me, since I run Kodi on my Shield TV.Thats right, my build is Windows only, but the patches should work on all platforms, if you compile yourself or find someone who will compile for you. Unfortunately, I don't have the required Linux build environment for an Android build, so I can't be of help here. (2017-09-06, 18:20)garretn Wrote: Neato. It'd be cool to select edition via a Simple Menu, like how they're implemented for blu-rays.That would require actual work, including Kodi GUI work, so don't expect that from my side ;-) RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - sky42 - 2017-12-10 LibreELEC build with patches from Shine here https://my.hidrive.com/share/le54qfkku6 find details of my community build here https://forum.libreelec.tv/thread/10515-le-8-2-generic-rpi2-with-cryptsetup-for-luks-truecrypt-veracrypt/ There is only a Generic x86_64 build. The RPi2 version does not build because of a patch conflict. You need to use a version with mkv-Xin1-SL in the file name. @Shine First of all Thank You. I would love to see a version with automatic language selection by the configured audio language for Xin1generator mkv. Can you please add this feature to your patches and explain how to extend the chapters.xml with language tags. I have movies with german/english video e.g. Star Wars. I shortly tested your patches with some Alien movies i created wit Xin1generator and it works fine. RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - da-anda - 2017-12-11 if I'm not mistaken Kodi now does support multiple video streams you can choose from in the videosettings OSD during playback. Maybe this will help you guys to come up with an acceptable patch now? And with inputstream at hand, it might be possible to add a custom demuxer on top of whatever ffmpeg does - as the MPEG DASH stuff is also not part of ffmpeg and handled by inputstream.adaptive. So if you take inputstream.adaptive as an example and base your work on it, chances might be good to finally get your desired feature in. Hope that does help you guys in some way. RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - ashlar - 2017-12-13 Potentially good news from da-anda. I hope the coders will be able to make this shine. RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - the_bo - 2017-12-14 (2017-12-11, 10:11)da-anda Wrote: if I'm not mistaken Kodi now does support multiple video streams you can choose from in the videosettings OSD during playback. Maybe this will help you guys to come up with an acceptable patch now? And with inputstream at hand, it might be possible to add a custom demuxer on top of whatever ffmpeg does - as the MPEG DASH stuff is also not part of ffmpeg and handled by inputstream.adaptive. So if you take inputstream.adaptive as an example and base your work on it, chances might be good to finally get your desired feature in. Hope that does help you guys in some way. Hi da-anda Is there a way currently to map switching the video selection to a keyboard key instead of having to go into video settings each time? Audio track selection has a working map key. Maybe something look into for v18 Cheers RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - vertigo220 - 2017-12-14 (2017-12-11, 10:11)da-anda Wrote: if I'm not mistaken Kodi now does support multiple video streams you can choose from in the videosettings OSD during playback. Maybe this will help you guys to come up with an acceptable patch now? And with inputstream at hand, it might be possible to add a custom demuxer on top of whatever ffmpeg does - as the MPEG DASH stuff is also not part of ffmpeg and handled by inputstream.adaptive. So if you take inputstream.adaptive as an example and base your work on it, chances might be good to finally get your desired feature in. Hope that does help you guys in some way.Just tried on one of my videos made with xin1 and it only showed one available stream and wouldn't even let me select the option, presumably since there was nothing to change. So maybe this works if two completely separate streams are present (which I don't even know what the purpose of that would be) but not where only parts are different, as with a file made with xin1. This is on the Shield TV and my phone (latest version of Kodi on both, Shield and phone both up to date with phone on Nougat). RE: Multiple videos in a Matroska MKV container with Ordered Chapters / Segment Linking? - Karellen - 2017-12-15 (2017-12-15, 11:06)hainguyen1993 Wrote: I think it's fair to say that the devs aren't interested, certainly not without knowing for sure whether it's a matroska "feature" or whether it's something someone else has hacked on. Another copycat poster... https://forum.kodi.tv/showthread.php?tid=55764&pid=461532#pid461532 |