天神十三煞 发表于 2009-11-16 16:52

[说明]蓝光影视媒体索引结构详解

本帖最后由 天神十三煞 于 2014-6-12 18:58 编辑

本文按照目录类别编写
助于自己修改制作补正

本文后面凡是带h字母的,则为16进制**,hexagon
本文后面凡是带d字母的,则为10进制**,decimal

打开系统自带计算器
程序员模式可以换算

subpath菜单:
在JAR下无文件,CERTIFICATE下无cert文件
CERTIFICATE播放无用,subpath类原盘此目录都完全相同

BD-java菜单:
在JAR下有文件,CERTIFICATE下有cert文件
CERTIFICATE播放索引,BD-java类原盘此目录文件不一样

天神十三煞 发表于 2009-11-16 16:53

本帖最后由 天神十三煞 于 2014-1-14 21:47 编辑

index.bdmv



如果想手动移除 UIAppInfoAVCHD
可以用 16 进位编辑器打开 Index.bdmv
然后找地址 0x0000000c ~ 0x0000000f
一般用 tsMuxeR 之类的软件生成的 AVCHD
这个值有很高的机率是 00 00 00 78
把这个值改成 00 00 00 00
接着再把上述地址 (依照原来的数值判断, 上例是 0x00000078 ) 之后的内容全部删除
如此一来就能删除 UIAppInfoAVCHD 了

替 Blu-ray 打 UIAppInfoAVCHD 补丁也是利用相同的原理
先计算出 Index.bdmv 的总长
然后把 0x0000000c ~ 0x0000000f 写入 Index.bdmv 的总长
最后再到档案末端加入 406 byte 含 UIAppInfoAVCHD 的 IDEX 扩充数据
这样就能当成 AVCHD 播放了
那 406 个 byte 是 Index.bdmv 的扩充数据
并非全部都是 UIAppInfoAVCHD
UIAppInfoAVCHD 只是扩充数据内容的一部分而已

天神十三煞 发表于 2009-11-16 18:52

本帖最后由 天神十三煞 于 2014-6-7 16:32 编辑

MovieObject.bdmv


设置直接播放正片
找到first play所在的movieObject
十六进制修改:21810000 00000001
导航命令修改:Branch Jump Jump Title Imm 1

预设字幕或者音轨
找到正片title所在的movieObject
十六进制修改:51C00001 8001C001
导航命令修改:Set SetSystem SetStream Imm Au1,PG1

天神十三煞 发表于 2009-11-16 19:58

本帖最后由 天神十三煞 于 2020-3-20 21:52 编辑

PLAYLIST

一些常用术语

Playlist
目录结构里的mpls文件,播放列表索引

MainPath
主要路径剪辑信息串流,仅一条独立存在于playlist,可多项PlayItem串联
MainPlayItem
又作PlayItem,基本单位clip,即m2ts。m2ts可并联[多角度]

SubPath
次要路径剪辑信息串流,可多条并联依存于playlist,每条均可多SubPlayItem串联
SubPlayItem
基本单位clip,即m2ts。m2ts也可串联来对应多个MainPlayItem

UO mask
Unavailable Operation mask,禁用功能标签,在播放此列表或段落时禁止某些功能操作

STN
Stream Track Number,流轨数量,包含Vi/Au/PG/IG/sV/sA/PIP

Vi
Video,主片视频
Au
Audio,主片音轨
PG
Presentation Graphics,字幕
IG
Interactive Graphics ,菜单
sV
SecondaryVideo
Video,副片视频
sA
SecondaryAudio
Audio,副片音轨

sync pts是subpath里in time首项在main playitem里的起始同步时间
实际不一定是等于main playitem的in time时间的
现在和playitem首项一致的原因是 字幕添加首项0起,免除了计算麻烦
也就是说,如果没有首项0,你得按照第一项字幕时间轴换算来得同步pts

019BFCC0=27000000/45
10min=10x 60s x 1000ms = 600000





1.0 000C-000F是章节信息的起始地址(图例020A就是4.1起地址)
1.1 0010-0013是扩展信息的起始地址(图例无扩展信息,值零。若有,信息则追加在章节信息以后)
1.2 002D-002D是播放类型三种值:顺序、随机、无重复随机
1.3 002F-002F是播放重复次数
1.4 0030-0037是两段UO mask值,对整个播放列表有效
1.5 0038-0039是random access和audio mix以及bypass的flag
1.6 003A-003D是此地址后所有剪辑块索引信息长度,结束位置:3D+01CC=0209
1.7 0040-0041是标记MainPath的剪辑数量
1.8 0042-0043是标记SubPath的剪辑数量
2.1 0044-00D5是MainPath里第一个剪辑块索引信息集,与后个为串联关系
2.2 00D6-0173是MainPath里第二个剪辑块索引信息集,与前个为串联关系
   2.200 00D6-00D7是该剪辑块信息长度,结束位置:D7+9C=0173
   2.201 00D8-00DC是该剪辑块视角一m2ts序号,与后个m2ts为并联关系
   2.202 00E2-00E2是该剪辑块与前者关系:1独立、5无缝、6无缝连接、15多视角无缝
   2.203 00E3-00E3是ref to stc的ID
   2.204 00E4-00E7是该剪辑块的开始时间,大于等于相关m2ts开始时间戳
   2.205 00E8-00EB是该剪辑块的结束时间,小于等于相关m2ts结束时间戳
   2.206 00EC-00EF是一段UO mask值,仅对该剪辑块有效
   2.207 00F0-00F3是另段UO mask值,仅对该剪辑块有效
   2.208 00F8-00F8是多角度数量
   2.209 00F9-00FE是MainPath里第二个剪辑块视角二m2ts序号,与前个m2ts为并联关系
   2.210 0104-0105是该剪辑块所含轨道流索引信息集的长度,结束位置:0105+6E=0173
   2.211 0108-010E是STN table分别代表Vi/Au/PG/IG/sV/sA/PIP,根据值分配后面标签所属类型
   2.212 0154-0163是该剪辑块第五轨的标签信息,对应STN的1/2/2/1/0/0/0就是第二条PG标签
      2.2121 0155-0155是该流所属剪辑块来源路径,1是MainPath、2是SubPath、3是IM PIP
      2.2122 0156-0156是该流所对应SubPath序号
      2.2123 0157-0157是该流所对应SubPath里SubPlayItem的序号
      2.2124 0158-0158是该流在clip的具体标签ID,此值与相应clpi值相同(注:来源路径1时向前偏移两位)
3.1 0174-019B是第一条subpath索引信息集
3.2 019C-01E1是第二条subpath索引信息集
   3.20 019C-019F是该subpath信息长度,结束位置:019F+42=01E1
   3.21 01A1-01A1是该subpath类型,2为p.audio、3为IG、4为text、5为OoM Sync、6为OoM Async、7为IM Sync
   3.22 01A5-01A5是该subpath包含的剪辑块个数[串联]
   3.23 01A6-01C3是该subpath里第一剪辑块索引信息集
   3.24 01C4-01E1是该subpath里第二剪辑块索引信息集
      3.24001C4-01C5是该剪辑块信息长度,结束位置:01C5+1C=01E1
      3.24101C6-01CF是该剪辑块序号和名称
      3.24201D0-01D3是该剪辑块与后面连接类型[值意义同2.202]、是否多角度、STC
      3.24301D4-01D7是该剪辑块的开始时间,大于等于相关m2ts开始时间戳
      3.24401D8-01DB是该剪辑块的结束时间,小于等于相关m2ts结束时间戳
      3.24501DC-01DD是该剪辑块与MainPath对应PlayItem的同步序号
      3.24601DE-01E1是该剪辑块的同步时间,大于等于相关m2ts开始时间戳
4.1 020A-020D是所有章节标签信息长度,结束位置:20D+1E=022B
4.2 020E-020F是章节标签条数
4.3 0210-0211是第一条章节标签的类型,1为entry-mark、2为link-point
4.4 0212-0213是第一条章节对应的MainPath里PlayItem的序号
4.5 0214-0217是第一条章节时间戳
4.6 0218-0219是entry PID
4.7 021A-021D是duration值
4.8 021E-022B是第二条章节的信息

playlist全段或子段皆可使用uo mask,此为达成部分菜单功能必要手段,原版有时不建议清0全解锁
通常这种禁用命令会在菜单或首段播放时启用,建议只改部分,像是有副音轨的片全解可能会菜单出错
UOmask对播放器来说是bit码,如果子段有uomask需要修改不知道怎么改的话,打开系统自带计算器
计算器->查看->程序员->,下面选择十六进制,中间框位码可点,对比bdedit顶部[悬停]确认哪些需要解禁

关于多角度,例如有个多角度并且无缝连接16进制值是0x15,00010101(binary)
高四位存的是多角度存在及其数量,低四位放的的是无缝连接方式的几种标记值

串联、并联概念一定要分清楚
各种媒体也是建立在时间轴上的流
并联:同个时间轴你可在两个m2ts切换[多角度],例如,画面里广告牌不同语言可能会有不同m2ts或画中画
串联:只能按前后时间顺序播放,一般的剧集多段连接,或opening、正片、ending等连续播放情况

connection type
这是串联时很重要的一个值,会影响很多的修改,无论是重灌或外挂都会遇到
通常建议所有的非真正无缝连接都改成1,独立形式,可以避免很多不要的麻烦
判断是不是真的无缝连接,看两段是不是关键帧断开或黑的,不懂什么是关键帧请问搜索引擎
或者看前一段最末尾画面是不是有和后一段最前面画面有重复的部分,有一般就不能改
当然也有可能重复的那些段落并不在列表in/out内,所以关键还是看时间轴断点是否关键帧相连的

playlist里多段clip串联播放时,subpath仅一条OoM sync对应其一轨,然后内用多段出字幕clip串联分别对应正片分段
而不是用多条subpath多个OoM Sync去对应多段字幕,虽然播放器可以正常识别,但不同情况会造成字幕失效等现象

正确做法:
playlist
00001.m2ts-00002.m2ts-00003.m2ts-00004.m2ts
subpath1
00101.m2ts-00102.m2ts-00103.m2ts-00104.m2ts

错误方式:
playlist
00001.m2ts-00002.m2ts-00003.m2ts-00004.m2ts
subpath1
00101.m2ts
subpath2
         00202.m2ts
subpath3
                      00303.m2ts
subpath4
                                 00404.m2ts

解流放Scenarist BD这段应该很好理解,如果不想不想搞解流的复杂操作
目前BDedit无法完成这部分操作,就只有理解详细的结构,手工hex修改


STN table可以使用dummy clone[相同轨信息克隆]
STN table可以交换排序[不影响m2ts本身]

原本的STN里的Au排列
09 01 11 00 00 00 00 00 00 00 05 80 31 6A 70 6E
09 01 11 01 00 00 00 00 00 00 05 80 31 6A 70 6E
09 01 11 02 00 00 00 00 00 00 05 80 31 6A 70 6E
09 01 11 03 00 00 00 00 00 00 05 80 31 6A 70 6E
修改后STN里的Au排列
09 01 11 01 00 00 00 00 00 00 05 80 31 6A 70 6E
09 01 11 00 00 00 00 00 00 00 05 80 31 6A 70 6E
09 01 11 00 00 00 00 00 00 00 05 80 31 6A 70 6E
09 01 11 00 00 00 00 00 00 00 05 80 31 6A 70 6E

在修改菜单或有其他需求时,可以更改排序,导航或菜单命令识别的是playlist里STN里的排序位
例如预设51C00001 00008002,没改前是第二行的1101,改了后依然第二行,变成了m2ts内的1100
STN的数量和关联的m2ts内实际流轨数可以不同,可封装很多轨到m2ts却只显示出几条
亦可以在playlist使用复数个Au或PG的ID让菜单或播放器识别为多轨,实际为同样的一轨;

完整信息读出对比
以下看不懂请无视00000.mpls
type_indicator: MPLS
version_number: 0200
PlayList start address: 58
PlayListMark_start_address: 522
ExtensionData_start_address: 0
AppInfoPlayList
Length: 14
PlayList_playback_type: 1
User operations
   Chapter search: Prohibited
   Time search: Prohibited
   Skip to next point: Permitted
   Skip back to previous point: Permitted
   Stop: Permitted
   Pause on: Prohibited
   Still off: Prohibited
   Forward play: Permitted
   Backward play: Prohibited
   Resume: Prohibited
   Move up selected button: Prohibited
   Move down selected button: Prohibited
   Move left selected button: Prohibited
   Move right selected button: Prohibited
   Select button: Prohibited
   Activate button: Prohibited
   Select button and activate: Prohibited
   Primary audio stream number change: Prohibited
   Angle number change: Prohibited
   Popup on: Prohibited
   Popup off: Prohibited
   PG text ST enable disable: Prohibited
   PG text ST stream numbre change: Prohibited
   Secondary video enable disable: Prohibited
   Secondary video stream number change: Prohibited
   Secondary audio enable disable: Prohibited
   Secondary audio stream number change: Prohibited
   PIP PG text ST stream number change: Prohibited

PlayList_random_access_flag: 1
audio_mix_app_flag: 1
lossless_may_bypass_mixer_flag: 1

PlayList
Number_of_PlayItems: 2
Number_of_SubPaths: 3
PlayItem ( ID=0 )
   Length: 144
   Clip info FileName: 00000
   Clip codec id: M2TS
   Is Multi angle: 0
   Connection condition: 1
   Ref to STC id: 0
   IN time: 27000000
   OUT time: 54000000
   User operations
    Chapter search: Permitted
    Time search: Permitted
    Skip to next point: Permitted
    Skip back to previous point: Permitted
    Stop: Permitted
    Pause on: Permitted
    Still off: Permitted
    Forward play: Permitted
    Backward play: Permitted
    Resume: Permitted
    Move up selected button: Permitted
    Move down selected button: Permitted
    Move left selected button: Permitted
    Move right selected button: Permitted
    Select button: Permitted
    Activate button: Permitted
    Select button and activate: Permitted
    Primary audio stream number change: Permitted
    Angle number change: Permitted
    Popup on: Permitted
    Popup off: Permitted
    PG text ST enable disable: Permitted
    PG text ST stream numbre change: Permitted
    Secondary video enable disable: Permitted
    Secondary video stream number change: Permitted
    Secondary audio enable disable: Permitted
    Secondary audio stream number change: Permitted
    PIP PG text ST stream number change: Permitted

   Random access flag: 0
   Still mode: 0
   STN Table
    Length: 110
    Number of primary Video streams: 1
    Number of primary Audio streams: 2
    Number of PG text streams: 2
    Number of IG streams: 1
    Number of secondary Audio streams: 0
    Number of secondary Video streams: 0
    Number of PiP PG textST stream entries plus: 0
    Primary Video (ID=0)
   Stream entry length: 9
   Stream entry type: 1
   Ref to stream PID of mainClip: 4113
   Stream attributes length: 5
   Stream coding type: 27
   Video format: 4
   Frame rate: 4

    Primary Audio (ID=0)
   Stream entry length: 9
   Stream entry type: 1
   Ref to stream PID of mainClip: 4352
   Stream attributes length: 5
   Stream coding type: 128
   Audio presentation type: 3
   Sampling freq: 1
   Audio language code: jpn

    Primary Audio (ID=1)
   Stream entry length: 9
   Stream entry type: 2
   Ref to SubPath id: 0
   Ref to SubClip entry id: 0
   Ref to stream PID of SubClip: 4352
   Stream attributes length: 5
   Stream coding type: 129
   Audio presentation type: 6
   Sampling freq: 1
   Audio language code: eng

    PG text stream (ID=0)
   Stream entry length: 9
   Stream entry type: 1
   Ref to stream PID of mainClip: 4608
   Stream attributes length: 5
   Stream coding type: 144
   Presentation stream language code: eng

    PG text stream (ID=1)
   Stream entry length: 9
   Stream entry type: 2
   Ref to SubPath id: 1
   Ref to SubClip entry id: 0
   Ref to stream PID of SubClip: 4608
   Stream attributes length: 5
   Stream coding type: 144
   Presentation stream language code: zho

    IG stream (ID=0)
   Stream entry length: 9
   Stream entry type: 2
   Ref to SubPath id: 3
   Ref to SubClip entry id: 0
   Ref to stream PID of SubClip: 5120
   Stream attributes length: 5
   Stream coding type: 145
   Interactive stream language code: jpn



PlayItem ( ID=1 )
   Length: 166
   Clip info FileName: 00001
   Clip codec id: M2TS
   Is Multi angle: 1
   Connection condition: 5
   Ref to STC id: 0
   IN time: 54000000
   OUT time: 108000000
   User operations
    Chapter search: Permitted
    Time search: Permitted
    Skip to next point: Permitted
    Skip back to previous point: Permitted
    Stop: Permitted
    Pause on: Permitted
    Still off: Permitted
    Forward play: Permitted
    Backward play: Permitted
    Resume: Permitted
    Move up selected button: Permitted
    Move down selected button: Permitted
    Move left selected button: Permitted
    Move right selected button: Permitted
    Select button: Permitted
    Activate button: Permitted
    Select button and activate: Permitted
    Primary audio stream number change: Permitted
    Angle number change: Permitted
    Popup on: Permitted
    Popup off: Permitted
    PG text ST enable disable: Permitted
    PG text ST stream numbre change: Permitted
    Secondary video enable disable: Permitted
    Secondary video stream number change: Permitted
    Secondary audio enable disable: Permitted
    Secondary audio stream number change: Permitted
    PIP PG text ST stream number change: Permitted

   Random access flag: 0
   Still mode: 0
   Number of Angles: 2
   Is different audios: 0
   Is seamless angle change: 1
   Angle 1
    Clip info FileName: 00002
    Clip codec id: M2TS
    Ref to STC id: 0

   STN Table
    Length: 110
    Number of primary Video streams: 1
    Number of primary Audio streams: 2
    Number of PG text streams: 2
    Number of IG streams: 1
    Number of secondary Audio streams: 0
    Number of secondary Video streams: 0
    Number of PiP PG textST stream entries plus: 0
    Primary Video (ID=0)
   Stream entry length: 9
   Stream entry type: 1
   Ref to stream PID of mainClip: 4113
   Stream attributes length: 5
   Stream coding type: 27
   Video format: 4
   Frame rate: 4

    Primary Audio (ID=0)
   Stream entry length: 9
   Stream entry type: 1
   Ref to stream PID of mainClip: 4352
   Stream attributes length: 5
   Stream coding type: 128
   Audio presentation type: 3
   Sampling freq: 1
   Audio language code: jpn

    Primary Audio (ID=1)
   Stream entry length: 9
   Stream entry type: 2
   Ref to SubPath id: 0
   Ref to SubClip entry id: 0
   Ref to stream PID of SubClip: 4352
   Stream attributes length: 5
   Stream coding type: 129
   Audio presentation type: 6
   Sampling freq: 1
   Audio language code: eng

    PG text stream (ID=0)
   Stream entry length: 9
   Stream entry type: 1
   Ref to stream PID of mainClip: 4608
   Stream attributes length: 5
   Stream coding type: 144
   Presentation stream language code: eng

    PG text stream (ID=1)
   Stream entry length: 9
   Stream entry type: 2
   Ref to SubPath id: 1
   Ref to SubClip entry id: 1
   Ref to stream PID of SubClip: 4608
   Stream attributes length: 5
   Stream coding type: 144
   Presentation stream language code: zho

    IG stream (ID=0)
   Stream entry length: 9
   Stream entry type: 2
   Ref to SubPath id: 3
   Ref to SubClip entry id: 0
   Ref to stream PID of SubClip: 5120
   Stream attributes length: 5
   Stream coding type: 145
   Interactive stream language code: jpn



SubPath ( ID=0)
   Length: 36
   Type: 5
   Is repeat: 0
   Number of SubPlay items: 1
   SubPlayItem (ID=0)
    Length: 28
    Clip info FileName: 00005
    Clip codec id: M2TS
    Sp connection condition: 1
    Is multi clip entries: 0
    Ref to STC id: 0
    IN time: 27000000
    OUT time: 108000000
    Sync PlayItem id: 0
    Sync Start PTS of PlayItem: 27000000


SubPath ( ID=1)
   Length: 36
   Type: 5
   Is repeat: 0
   Number of SubPlay items: 2
   SubPlayItem (ID=0)
    Length: 28
    Clip info FileName: 00003
    Clip codec id: M2TS
    Sp connection condition: 1
    Is multi clip entries: 0
    Ref to STC id: 0
    IN time: 27000000
    OUT time: 54000000
    Sync PlayItem id: 0
    Sync Start PTS of PlayItem: 27000000

   SubPlayItem (ID=1)
    Length: 28
    Clip info FileName: 00004
    Clip codec id: M2TS
    Sp connection condition: 1
    Is multi clip entries: 0
    Ref to STC id: 0
    IN time: 54000000
    OUT time: 108000000
    Sync PlayItem id: 1
    Sync Start PTS of PlayItem: 54000000


SubPath ( ID=2)
   Length: 36
   Type: 3
   Is repeat: 0
   Number of SubPlay items: 1
   SubPlayItem (ID=0)
    Length: 28
    Clip info FileName: 00006
    Clip codec id: M2TS
    Sp connection condition: 1
    Is multi clip entries: 0
    Ref to STC id: 0
    IN time: 27000000
    OUT time: 27022500
    Sync PlayItem id: 0
    Sync Start PTS of PlayItem: 0



PlayListMark
Length: 30
Number of PlayList Marks: 2
PlayListMark (ID=0)
   Mark type: 1
   Ref to PlayItem id: 0
   Time Stamp: 27000000
   Entry ES PID: 65535
   Duration: 0

PlayListMark (ID=1)
   Mark type: 1
   Ref to PlayItem id: 1
   Time Stamp: 54000000
   Entry ES PID: 65535
   Duration: 0


ExtensionData
Length: 0
Data block start address: 0
Number of extension data entries: 0

PiP Extension

天神十三煞 发表于 2014-1-15 13:49

clip      info

天神十三煞 发表于 2014-1-15 13:49

AUXDATA









天神十三煞 发表于 2014-1-15 13:50

   META
   

天神十三煞 发表于 2014-1-15 13:51

                   JAR

天神十三煞 发表于 2014-1-15 13:52

            BDJO

天神十三煞 发表于 2014-1-15 13:53

            

STREAM
页: [1] 2
查看完整版本: [说明]蓝光影视媒体索引结构详解