Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > (HD) DVD, Blu-ray & (S)VCD > (HD) DVD & Blu-ray authoring

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 22nd September 2008, 17:55   #1  |  Link
kaid
Registered User
 
Join Date: Jul 2008
Posts: 96
.bdmv, .clpi, .mpls and .m2ts - Exact specs of AVCHD/BD structure and files

Okay, since I was simply unable to find anything specific on the structure and binary contents of the files on a BD/AVCHD, i thought it warrants its own thread (sorry if there already is one, I couldn't find anything upon searching!).

On making my AVCHD menu generator I learned a few things about the structure and the files, but the majority of the bytes remain a mystery to me. Since it's near impossible to get roman76 to react to queries we also don't know how he generates his files in tsMuxer when using the BD mux option. The official AVCHD Info site doesn't tell you shit about exact specs, all they give you is some vague info how the video streams should look like..

So here's my findings:
1) Structure:
Root is always the folders BDMV and CERTIFICATE. On FAT32 this needs to be within a folder called AVCHD and on optical media BDMV and CERTIFICATE need to be on the root level.
CERTIFICATE seems to be mandatory (probably for keyfiles) and contains an (empty) BACKUP folder for redundancy, AFAIK it is always empty for self-authored discs.

BDMV is where it's at, and in there we have:
AUXDATA: Auxilliary Data judging by the name. Probably bonus material for your computer like screensavers etc goes here.
BACKUP: Contains backups of the CLIPINFO and PLAYLIST directories along with the two .bdmv files in the BDMV directory. For redundancy
BDJO: Probably has to do with the Bluray Java, but I'm not sure in how far. This NES emulator for PS3 has a .bdjo file in there
CLIPINF: This contains one .clpi file for each .m2ts stream (also split ones) of the same name with exact specs about the stream
JAR: The Java Applets probably go in here.
META: Dunno. Metadata? D'oh, what kind of Metadata?
PLAYLIST: Contains a .mpls file for every track (not stream!) on the disc. So if a disc made with my script has 4 tracks, there's gonna be 4 mpls files in there, one for each, no matter into how many chunks the stream was split up (plus there must be -also with m2ts and clpi- 00000.mpls, which is what the BD/AVCHD starts with, in my case the menu track!)
STREAM: All .m2ts streams go in here. These are the actual content!

This structure must be followed 100% as far as I know, so even though they might be empty all these directories need to be there in this structure, with the exact names in caps!

2) Differences between AVCHD FAT32/UDF:
The only difference between AVCHD stored on a FAT32 volume and optical media lies in the filenames, because 8.3 naming is used on FAT32, and it's all caps:
*.clpi (UDF) becomes *.CLP (FAT32), *.mpls becomes *.MPL, *.m2ts becomes *.MTS, MovieObject.bdmv becomes MOVIEOBJ.BDM and index.bdmv becomes INDEX.BDM
Even though the .mpls files reference the .m2ts files internally, it seems there is some fault tolerance, probably required by the spec, so there's no need to change the string in the .mpls files accordingly from M2TS to MTS and vice versa.

3) File contents:
Unfortunately I was only able to find out something about the structure of .mpls playlist files by looking at it in a binary editor:
First there's a header, "MPLS0200", which is probably a file identifier with version number. Some bytes later (not always the same offset!), the M2TS file that is played first is referenced, (aways with a P infront).. Around 60 bytes later seems to be the language code, preceded with an "a" (so e.g. it's aeng for english). All of this minus the header is repeated in the same mpls file if one track has more chunks to be played sequentially.
The rest of the bytes is mostly zeroes, so reverse-engineering it should be possible...
.clpi files don't give much away, there's a header again (HDMV0200) and further down after lots of zeroes there's that language code with 'a' infront again..
index.bdmv is the same thing: Header (INDX0100) and mostly zeros...
MovieObject.bdmv: Header (MOBJ0100) and mostly zeros...

So. Does anyone know where to get further specs about this? I'd especially like to know how the menu m2ts (00000.m2ts) is structured so I could inject my own graphics in the menu generator! ;-) I would guess it is rather similar to the structure of those VTSx_0.VOBs on a DVD that contain the track's menu gfx!...

Last edited by kaid; 22nd September 2008 at 22:50.
kaid is offline   Reply With Quote
 

Tags
avchd, bluray, clpi, m2ts, structure

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.