Preventing from Scanning Irrelevant Folders (BDMV, Stream, etc.)?
#1
Hey Kodi enthusiasts,
I'm facing an issue I've managed to conquer before but seem to have forgotten the solution. I have several Bluray movies in non-converted MKV format, organized in the original folder structure containing directories like BDMV, Stream, Playlist, Certificate, etc.
Now, the problem starts when I scrape the info to rebuild the database. Kodi creates multiple movie entries with names like "Certificate," "Playlist," "Stream," and so on. A while back, I had the same issue and had selected an option to prevent Kodi from scanning these specific folders inside the movie folders, but now I can't recall what that option was.
Recently, I had to rebuild my Kodi setup after a crash. Before the crash, Kodi was running flawlessly for several years, and I didn't have this issue.

So here's what I'm looking to do:
**Remove the countless irrelevant entries** that are showing up in my movie list due to this issue.
**Find the right option to prevent Kodi from scraping these irrelevant folders again.**
If anyone remembers the specific setting or method to achieve this, I would greatly appreciate your help. It's been driving me crazy, and I know it's something simple that I've just forgotten over time.
Thanks in advance! 🙏
Reply
#2
Try adding this to your advancedsettings.xml file...

xml:
<excludetvshowsfromscan action="append">
<regexp>[\\/](auxdata|backup|clipinf|playlist|stream|certificate)[\\/]</regexp>
<regexp>movieobject\.bdmv</regexp>
<regexp>/extras/</regexp>
<regexp>[\\/]extras[\\/]</regexp>
</excludetvshowsfromscan>

Though I would like to know why you have mkv files in the original bluray folders, when it's not meant to be there.

Honestly, do yourself a favour and convert those bluray folders into single file mkv files.
Drop the index.bdmv into MKVToolnix and convert it.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
Karellan's post is best way to handle this issue.

This is the dirty way to Exclude Folders Smile

Using the file browser of your operating system locate the folder to be excluded.
Inside the folder to be excluded, place an empty text file and name it as follows: Windows systems- . nomedia. Create an empty text file. ...
Kodi will read the filename and ignore the folder and its contents.
Reply
#4
(2023-08-02, 21:54)Karellen Wrote: Try adding this to your advancedsettings.xml file...

xml:
<excludetvshowsfromscan action="append">
<regexp>[\\/](auxdata|backup|clipinf|playlist|stream|certificate)[\\/]</regexp>
<regexp>movieobject\.bdmv</regexp>
<regexp>/extras/</regexp>
<regexp>[\\/]extras[\\/]</regexp>
</excludetvshowsfromscan>

Though I would like to know why you have mkv files in the original bluray folders, when it's not meant to be there.

Honestly, do yourself a favour and convert those bluray folders into single file mkv files.
Drop the index.bdmv into MKVToolnix and convert it.
Thank you immensely. I possess an extensive collection of full Blu-ray folders. I remain skeptical that MKV files can match the supreme audio/video quality, as HandBrake inevitably introduces some compression. My passion revolves around Home Theaters and audiophile-grade content. I utilize the Trinnov and MadVR Envy video processing 9.4.6 system, complemented by top-tier subs and speakers. To truly maximize my Home Theater experience, pristine Blu-ray content is imperative. Having employed HandBrake and subsequently uploading to private trackers with rigorous quality control, I'm acutely aware of the potential differences in quality.

Your provided code snippet meets my needs seamlessly. Once again, thanks for helping out wtih this.
Reply
#5
(2023-08-11, 04:00)MANswers Wrote: Your provided code snippet meets my needs seamlessly. Once again, thanks for helping out wtih this.
You are welcome.

(2023-08-11, 04:00)MANswers Wrote: as HandBrake inevitably introduces some compression.
Yep, I definitely wouldn't be using Handbrake to rip your blurays to mkv.
I have the same sentiments as you regarding quality. I also have a high end system with hundreds of blurays (and now moving into 4k)
I originally had my entire bluray library ripped as bluray folders, like you. I found it very problematic. Wrong audio streams becoming default. A pain in the a** to find the correct subtitle stream. Forced subtitles sometimes did not work and needed to be manually activated.

Drop the index.bdmv into MKVToolnix, and select the correct streams there, then you can convert without compression. Then you can correctly tag all the streams and everything just works.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#6
At a file system level you should also be able place a file called

.nomedia

into any folder you don't want scanned. Been a while since I tested this, but unless something has broken this it should still work.
Reply
#7
@jjd-uk Does that work with Kodi on Android as well and for music files? Also, does it matter what the name of the file before the "." is? So could it be "noscan.nomedia" for example?

NM, figured it out. It does work for Kodi on Android and for music files. I just used ".nomedia" with no file name before the ".".
Reply
#8
That should work on any version of Kodi as it's a file created on the filesystem and it tells the scraper to ignore that folder, it must be named exactly

.nomedia

With nothing before the dot, as files which start with a . dot are hidden files by default in all OS's. I believe the .nomedia naming is taken from the practice used on Linux filesystems to not index media.

[edit] It's been a long time since I tested so I'm not sure if it's case sensitive, so it maybe .NOMEDIA
Reply
#9
Oh and I think it should be supported for music files, but I've never tested with them so can't say with any certainty. If it doesn't work with music scrapers then that would be something to raised as an issue on github to find out if it's a bug or a feature request if it's something you believe would be useful.
Reply
#10
(2023-08-11, 04:29)Karellen Wrote:
(2023-08-11, 04:00)MANswers Wrote: Your provided code snippet meets my needs seamlessly. Once again, thanks for helping out wtih this.
You are welcome.
(2023-08-11, 04:00)MANswers Wrote: as HandBrake inevitably introduces some compression.
Yep, I definitely wouldn't be using Handbrake to rip your blurays to mkv.
I have the same sentiments as you regarding quality. I also have a high end system with hundreds of blurays (and now moving into 4k)
I originally had my entire bluray library ripped as bluray folders, like you. I found it very problematic. Wrong audio streams becoming default. A pain in the a** to find the correct subtitle stream. Forced subtitles sometimes did not work and needed to be manually activated.

Drop the index.bdmv into MKVToolnix, and select the correct streams there, then you can convert without compression. Then you can correctly tag all the streams and everything just works.
Thank you so much for introducing me to this tool. I wasn't aware that you could mux without compromising the film's quality. As for DolbyVision, opinions vary, but I'm leaning towards muxing all my Blu-ray and DVD collections now.

I explored MKVToolNix on YouTube and stumbled upon several MakeMKV tutorials. After checking out both programs, MakeMKV seems more straightforward. In MKVToolNix, under 'Properties' and 'General Options', there are numerous settings available. The 'compression' option was a bit intimidating for me, especially when faced with the "No EXTRA? Compression" choice, which I opted for. These settings don't appear in MakeMKV.

By the way, do you retain other audio formats like AC, or do you stick with the main DTS audio format?
I am sorry i know this is Kodi forum and not muxing, but this helps with my Kodi journey big time. What are the other options u choose in MKVToolNix under general options. A screenshot be great.
Reply
#11
Another option to retain the full integrity of a complete untouched rip is to place the 2 loose folders (BDMV and CERTIFICATE) in an iso container.  I use https://www.imgburn.com which is very quick and simple.  This is the most common practice when a user wants to backup an exact copy of the physical disc in digital format.  Fwiw, this also means the digital format iso file can be burned back to a blank physical disc and it will be identical to the original physical disc because it's that perfect unlike an mkv or something similar.

As mentioned, "loose folders" are very problematic.  Placing the BDMV and CERTIFICATE folders in an iso container prevents any of the folders from becoming contaminated with scraping files or any other corruption when using software like Kodi because the iso container is just that... a container that 'locks' the folders and files.  Any file additions like artwork and such are placed beside the iso... not in it.

Although many find these perfect iso's hard to work with, personally I do not.  Kodi is more iso user friendly than most other common software players when it comes to certain things such as presenting complete menus - mimicking the physical disc exactly as if it was spinning in a physical hardware ROM player.  While stripping a rip to mkv format using something like mkvtoolnix cherry picks files you want to keep and tossing files you don't might be desirable, you also lose the full backup integrity of the original disc not to mention things like menus the original disc was designed for.  Then there is Directors Cut vs Theatrical cut vs this audio vs that audio vs this subtitle vs that subtitle and multitudes of other options you may think you don't need today but will find out you wish you kept in the future.

I see "A pain in the a** to find the correct subtitle stream" mentioned here.  Let's face it.  EVERY BD contains PGS subtitles.  They are horrible... usually plopping themselves in the video field interrupting the view.  Although I have created a way to press a button on my remote control that moves the PGS subtitle down out of the video and within the black bar where it is not intrusive, I still prefer .srt subtitles and obtain them from https://subscene.com/ either internally via the Kodi option or externally by visiting the site.  There are also online converters when subs are not readily available. When I begin playback of a title I haven't played before, I press one button on my remote control and the .srt is automatically selected from all of the existing PGS subtitles and activated.  Kodi displays it at the top of the video screen for a moment showing as 'External Subtitle'.  Subsequent playbacks remember and auto play the .srt.  There can be multiple .srt's too.

Fwiw, I also use madVR to process some videos but not all.  Because I use MPC players, since they are madVR compatible, they are not capable of many of the things that Kodi is - like 'mounting' the iso, menus and easy peasy subtitle selection.  In this case while MPC players are also iso capable with a little help 'mounting', they only render the main movie.

There is no right or wrong way to do things.  The majority of folks use mkv's giving up lot's of stuff because none of it is important to them and iso's can be a hassle if you're not familiar with what to do with them.  I just wanted to present another option for you to digest and contemplate before dedicating and converting your entire collection to one format you may or may not regret.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
#12
(2023-08-11, 16:06)MANswers Wrote: The 'compression' option was a bit intimidating for me, especially when faced with the "No EXTRA? Compression" choice, which I opted for. These settings don't appear in MakeMKV.
This is not compressing any of the streams. This is compressing the Headers in the streams, making them more efficient. (think old format headers converted to newer format and removing redundancy) Leave it at Automatic.
MKVToolNix can't re-encode files.

(2023-08-11, 16:06)MANswers Wrote: I explored MKVToolNix on YouTube and stumbled upon several MakeMKV tutorials. After checking out both programs, MakeMKV seems more straightforward
Yes MakeMKV is another excellent program. It is used for decrypting and ripping encrypted disks like bluray and dvd. But it is a bit clumsy for tagging.

MKVToolNix is a different tool. It is used to create and manipulate mkv files and covert other file formats into mkv files as well as some other bonus, and very useful features. It makes it extremely easy to correctly tag video files, just like tagging music files.

Why do you need to tag video files? So the player knows which streams to use and when, like Forced subtitles, Hearing Impaired subtitles and also to name the tracks so they are easier to pick at a glance.
As I said earlier, bluray folders and m2ts files don't contain tags, so players have to guess which stream to use, and that usually is the first stream. That becomes a problem when AC-3 is the first stream, but DTS-MA is the second or third stream.
And don't get me started on subtitles....

But like @brazen1 stated, you need to decide what you want from the disk. Some people want the entire disk with menus, bonus tracks, and all the other stuff that is added. That's about 50GB
Other people (me included) only want the movie, trailer and maybe some of the interesting bonus material, like the video comics in Alita: Battle Angel.
The "making of", the "inspiration for this scene" type bonus videos I have no interest in.

I use a two step process for ripping blurays (this method does not work with DVD's)
1.
First I decrypt and copy the "Full disk" to my local c:\ drive. You would use MakeMKV for this, or DVDFab.

2.
Then find the index.bdmv file and drop it into MKVToolNix then pick the required video files from the list. You can check what each one is by simplying playing them from the /stream/ folder.


Once you select the required video files, they will be imported into MKVToolNix, then you deselect the streams you don't want and tag each one as shown in the images. In the images, I have chosen to keep all the streams...


Once you do this, Kodi will become your best friend. Everything will just work as it's supposed to. Hope that helps.

Let me know if there are any errors or omissions @brazen1
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#13
(2023-08-12, 02:22)Karellen Wrote: Let me know if there are any errors or omissions @brazen1

Many titles, choosing the correct .mpls video stream is impossible afaik.  This is because the entire movie is made up of multiple .mpls files while other titles just use 1 (The largest .mpls file).  I can think of a couple off the top of my head - Cowboys And Aliens (2011) and Star Wars, Rogue One - A Star Wars Story (2016) for examples.  Here's what happens:

Drop index.bdmv into mkvtoolnix.  You get this:

Image

Next you highlight the HEVC/H.265/MPEG-H playlist mkvtoolnix selected so the ADD button isn't greyed out and you can proceed.  The playlist is comprised of MANY .mpls files.  Only certain ones are correct fwiw.  How to determine the correct ones and in what order?  Beats me.  Beats mkvtoolnix too apparently. Press Add Video file which is the playlist of .mpls streams mkvtoolnix selected and you get this:

Image

Problem is, the completed .mkv (using the bdmv playlist - not stream, mkvtoolnix auto selected) has problems.  1st, the completed mkv mux is 73.5GB of the disc intro playing over and over and over for 3hrs and 53mins.  Nothing else was muxed except the intro multiple times back to back.  2nd, the true runtime for this title is 2hrs and 14mins.  

ImageImageImage

Not all titles use multiple .mpls files but this one and others do.  Afaik, you are SOL with these but I could be wrong.  I do know if I don't tamper with the integrity of the file system and simply drop it into an iso, I have none of this screwy business.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
#14
(2023-08-12, 03:57)brazen1 Wrote: Drop index.bdmv into mkvtoolnix.  You get this:
The error you have made is by picking the longest title, which is not necessarily the feature movie.
If you had picked 00807.mpls, it would have worked for you.
00020.mpls is the bluray Main Menu background and music, which is meant to be the same one or two files played over and over again until a user leaves the menu and goes to the movie or stops playback. Go to the /stream/ folder and play the 0040.m2ts file and you will see. I also use Audacity to extract the audio from that file to create the Theme file in Kodi. In many cases it also provides a really nice quality fanart.
Pay attention to the "duration" and the "chapters".

And there are a few reasons some blurays have complicated playlists with multiple m2ts files. The main two reasons being -
1. different language in the credits
I am pretty sure this is the reason why the main movie is listed 8 times in your image. All 8 playlists have the same duration (2:13:58), so it is a language difference in the start and end credits.
2. extra footage.
A good example of 2. is A Million Ways to Die in the West (2014) where there is about 10 minutes extra footage and this is made up of all the gags that were cut from the theatrical release. Geez I was so happy when I discovered that extra footage as it is hilarious.
So in this example, there would be a number of video files in the playlist because the movie has been broken up so the extra footage can be inserted into the movie

But you are right, some blurays are quite easy. you pick the one item and done. Others are complicated, with multiple playlists for the movie. In this case you just need to scroll through those files in the /stream/ folder to figure out what the difference is. But you get the hang of it quite quickly.
Of course you can use an automated process like what DVDFab does, but then you don't know what version of the feature movie you are getting and what other goodies are available on the disk because the case does not list all the special features.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#15
(2023-08-12, 04:36)Karellen Wrote: Of course you can use an automated process like what DVDFab does, but then you don't know what version of the feature movie you are getting and what other goodies are available on the disk because the case does not list all the special features.

Indeed.  I find this approach much less complicated and far less time consuming.  Smile  It is rare that I find the special features and other extra stuff of real interest.  


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply

Logout Mark Read Team Forum Stats Members Help
Preventing from Scanning Irrelevant Folders (BDMV, Stream, etc.)?0