File Stacking - different file formats
#1
This post is for those of you who are seeing duplicate movies in their library when two of the parts have different file extensions, like this:

movie.name.cd1.avi
movie.name.cd2.wmv

I had the same problem, and after banging my head against the wall for two days straight I figured out a couple of ways to make this work.

After looking at the wiki page about file stacking, and checking this post, it seemed like adding a couple lines to the advancedsettings.xml file was the way to go. Unfortunately, that post fell short of actually having a working regex, but it was close.

The wiki states that:
Quote:4. For each consecutive filename where all tokens except Volume match, the file's index in the file list is stored in a vector.
So rather than move the Extension part of the regex to the Ignore section, I moved it to the Volume section. After some trial and error I got this:
Code:
<moviestacking action="append">
    <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[0-9]+.*?)()()$</regexp>
</moviestacking>

And it worked... for the most part. Unfortunately, it seems like movies that end in wmv would still be separated, even though the regex was only different by the volume like the rules say. For whatever reason, it works if the last file is not wmv, or maybe it needs to be the same format as the first part. I didn't test that too thoroughly, because it was easy to work around.

All I did for the problematic movies, was to create a very tiny mkv file and relabel it as cd1 and cd# so that it "wrapped" the other files. Using the above example, it would look like this:

movie.name.cd1.mkv
movie.name.cd2.avi
movie.name.cd3.wmv
movie.name.cd4.mkv

Why mkv? I highly doubt it matters, as long as the first part and last part are the same. I had just been working with some mp4 wrapped in mkv stuff earlier so it was easiest to test, and it worked.

Other tips:
  • Make sure the first part of the movie name is exact! Sometimes the simplest answer is the best one
  • Originally I was going to mux the different formats using mkvmerge so they all had the same file type. This works, but unfortunately wmv can't be muxed into mkv

Hopefully this post saves someone else the time I wasted figuring it out. If someone has a better way to handle this, feel free to this.
Reply
#2
Doesn't work...
Reply
#3
Wait! It's actually working now!!

It's ridiculously annoying that you have to use that workaround though. What's a good small .mkv to use? Right now I'm using an episode of Friends to wrap around my UFC collection. Which as you can imagine, doesn't tie in too well.
Reply
#4
I just used AVI Demux to split the first few frames of a random AVI file. It's literally less than 1 second long and only 25 KB. I then used MKVToolnix (specifically MKVMerge) to mux it into an MKV file. I'm pretty sure it would be fine as an AVI, but didn't bother testing it once it was working.

I agree though, it would be really nice if XBMC just ignored file extensions for movie stacking.
Reply
#5
I wish you could stack an .mkv with an .iso;

That way you could grab a nice 720/1080p rip of just the movie, and then have the DVD ISO with the movie stripped out...

HD movie, and all the special features available from a menu; best of both worlds...
Kodi: Kodi 17.4, with Transparency!
50 TB Unraid Server: Docker Apps: SABnzbd, Sickrage, mariaDB
HTPC: Win10 (cause Steam), i7, GTX 1080
Watching on: Panasonic TC65-PS64 with lowend Sony 5.1 HTIB
Other devices: rMBP 15", MBA 13", nvidia shield
Reply
#6
(2012-09-03, 18:46)munchester Wrote: I just used AVI Demux to split the first few frames of a random AVI file. It's literally less than 1 second long and only 25 KB. I then used MKVToolnix (specifically MKVMerge) to mux it into an MKV file. I'm pretty sure it would be fine as an AVI, but didn't bother testing it once it was working.

I agree though, it would be really nice if XBMC just ignored file extensions for movie stacking.

I just found a UFC related video on YouTube and used a YouTube downloader to get the first fraction of a second of it, works well as it now shows up with the UFC logo when I hover over the files in XBMC.

Anyone who wants me to send them this file can PM me for it.
Reply

Logout Mark Read Team Forum Stats Members Help
File Stacking - different file formats0