Jump to content

Container file for multiple related files


Lehm

Recommended Posts

I've recently had the desire to start including special features in my media library as I quite enjoy those.  I was reading up on the current way to do it with a specific directory structure.  I would like to propose an alternate way to organize related media files, a new container format.  As far as I can tell there does not seem to be a container to hold related media files together, other than a compression archive like zip.  What I'm imagining is a file that would contain multiple mkv, mp4 mp3 etc  files in their original format and compression.  This file would get listed as a single title in Emby once you select it you would be given a list of contained titles to play.  Since I could not find an existing format I threw together kind of what I was thinking.  It's possible something like this already exists and I just couldn't find it.  But something like this would really help organize media if you have Special Features or multiple versions of the same media.

 

 

 

 

Multi-Title Media (MTM) File Format

 

Version: 0a

 

Jeffrey Adams

 

2016 Dec 06

 

 

                The purpose of the MTM file format is to contain related titles into a single package for easier organization.  One example would be to be able to store the extra features of a movie with the movie itself without cluttering up the file structure or it could be used to contain multiple versions of the same movie.  It is meant to be as simple as possible.  Each title should be a byte array that contains an existing single media container such as mp4, mkv, mp3 etc.  As each title should already be compressed no support for compression is defined.

 

 

The MTM file format consists of a header, a table containing the list of titles and a byte array containing all the media files

 

 

File Header

 

 

3 Bytes – ASCII Letters MTM

 

4 Bytes – Version number of the MTM format.  Version numbers are integers.

 

1 Byte – Number of titles contained within the package.  Can contain up to 255.

 

 

Title Table

 

 

2 Bytes – Length of this record in title table

 

4 Bytes – Format in ASCII (ex “MKV “).

 

8 Bytes – Start position of the byte array for this title from beginning of file

 

8 Bytes – Length of the byte array for this title

 

0-65514 Bytes – Name of the Title in Unicode

 

 

Byte Array

 

 

The remainder of the file is a single byte array.  It should be equal to the sum of the lengths of all the titles contained in the table.

 

 

 

Anyway just an idea I had.  Thanks for reading.

 

Link to comment
Share on other sites

Deathsquirrel

Have you considered that the amount of work to create the format and tools to support it may vastly outweigh the time saved in managing a few extras by hand?

Link to comment
Share on other sites

Have you considered that the amount of work to create the format and tools to support it may vastly outweigh the time saved in managing a few extras by hand?

 

Maybe, but one could also ask if setting up a media server and ripping all your discs outweighs the time simply to put your discs on a shelf and pull them out when you want to watch them :)

 

Just for fun I think I'll try this.  It's been awhile since I've done anything with file structures, it would be good practice.  I think I'll go ahead and write a simple packaging app.  If that goes well, see how difficult adding playback support in Emby would be.  Again this is just for my own amusement, no expectation of anything I do being incorporated.

Link to comment
Share on other sites

Deathsquirrel

Maybe, but one could also ask if setting up a media server and ripping all your discs outweighs the time simply to put your discs on a shelf and pull them out when you want to watch them :)

 

Not to derail things, but I would argue that utterly misses the point of my effort in maintaining this server at my house.  Moving the discs out of my living space and into binders shoved up in the guest room closet has saved me a ton of floor space.  I have a LOT of discs.  It has allowed me to preserve my discs from physical damage, preserving my investment.  It has made my movie collection vastly more usable, as demonstrated by the massive increase in the use of that collection in our home.  Browsing through my Emby collection is far, far simpler than walking around, opening various dvd storage devices.  There's really no comparison.

 

I'm sure none of us started our projects just to avoid putting discs in trays to watch a movie.

 

Good luck with your project, even if it does strike me as the software equivalent of a nuclear powered fly-swatter ;)

Link to comment
Share on other sites

Koleckai Silvestri

Archive formats already exist. With and without compression.  Not sure why a new format would be needed. Would be much easier just to write a plugin that allows Emby to read JAR, ZIP, 7Z or RAR archives.  

Edited by Koleckai Silvestri
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...