Analysis on the menu structure of Blu-ray film and television media [Subtitle retention highlights/Main Menu/pop-up menu and separate the corresponding PS3]

Source: Internet
Author: User

Although the title is analyzed, the actual content may be complicated, and it is very cumbersome to modify the original disk at this stage.
This article is intended to modify the original diskSubtitleStream orAudioStream users can skip it if they are not interested.

This article mainly uses the basic menu type as an example. In other cases, the instance operation will be further explained.
This article may be incorrect or inaccurate. Please make it clear that I will correct or supplement it.

Preparations and required tools
Tsmuxer
Bdedit
Avchd-Patcher
Hxd
Download the connection (the tsmuxer package contains the first three tools)
Http://gilleco.2alien.net/MediaTools/tsMuxer.rar
Http://gilleco.2alien.net/MediaTools/HxD.rar

Then, you need to understand hexadecimal andAlgorithm[Hex]. If you don't understand it, ask the search engine first and learn to come back.
Big enough to moveHard DiskFor the PS3 test, although PC is relatedPlayBut hardware BDPlayerAccurate

Be patient and careful, because it is cumbersome.
Always pay attention to backup, mainly refers to menu structure file backup, data is modified a lot, often backup to reduce the amount of redo work

The structure information in this article is definitely not comprehensive. I 'd like to explain it mainly. Other details need to be summarized.
Bdedit can modify a lot of structure information, but the software has a write operation bug, so use hxd instead of the operation as much as possible.

Any character with letters h after this article is in hexadecimal notation, hexagon
Any character with letters d after this article is in decimal notation.

 

Menu file data structure

Index
Index of the serial number of the playlist

This file does not need to be modified.
This file corresponds to the object information

Object
Corresponding menus and instruction tables during video playback

Media playlist
MPLS indicates the playlist information.

MPLS contains a complete piece of media information, which may be composed of multiple clip blocks.

Clip Information
Clpi is the information of the media clip block.

 

 



Offset 0030 H from 0008 H bytes 0004050c40000000h is the menu function information allowed by this playlist
See bdedit to view the top two rows of MPLS

Starting from offset 000eh, 0002 H bytes 058eh indicates the start position of the time code information storage area of the entire video section in the list.
Starting from offset 003ch, 0002 H bytes 0550h indicates the total length of all clip block information storage areas of the entire video in the list.
It is also the chapter time code start position offset length, 3DH + 550 H = 58dh

The offset value starts from 0040 H and 0002 H bytes indicate the number of clips contained in the entire video segment in the list.
The 054ah byte starting from offset 0044 H is the information area of all clip blocks of the entire video in the list.
Offset 0044 H from 0092 H is the first clip block information area in the list.
Offset 0050 H from 0001 H bytes is the relationship between the clip block and the Front block type [1 h for the start, 6 h for the connection, 15 h for the difference]
The starting time of the clip block [in time] And the ending time [out time] are 0052 H bytes starting from 0008 H.
Offset 0066 H from 0002 H is the length of the stream tag information storage area contained in the clip block, 6eh + 67 h = d5h
0007 H bytes starting from offset 006ah indicates the number of streams contained in the clip block. STN [vi/Au/PG/IG/SV/SA/PIP]
0076 H from 0060 H offset indicates the stream tag information contained in the clip block, and 10 H [16D] indicates a stream information.
0010 H from offset 00c6h indicates the pop-up menu tag information of the clip block.
I will not go into details about the clip blocks. Follow the rules and so on.

The offset value starts from 0566 H and 0024 H bytes indicate the information of the media block corresponding to the pop-up menu used by the entire video segment in the list.

0004 H bytes starting from offset 058eh are the total length of the time code information storage area of the entire video section in the list, 591 H + 286 H = 817 H
Offset 0592 H from 0002 H bytes is the number of time codes of the entire video section in the list, 2EH [46d]

Offset 0594 H from 0284 H bytes is the time code information area of all sections of the video in this list
000eh bytes starting from offset 0594 H are the first information in the time code of the entire video section in the list.
Offset 0598 H from 0004 H bytes is the specific time value of the chapter Time Code
Offset 0596 H from 0002 H bytes is the sequence number of the media clip block corresponding to the chapter Time Code [add 1 to the bit storage value]



The 0034 H bytes starting from offset 0004 H are the clip block rate value. This value is recorded in status after viewing clipinf in bdedit.
The value of packet in the clip block is 0038 H from offset 0004 H. This value is recorded in status after viewing clipinf in bdedit.

Starting from offset 00eeh, 0008 H bytes are the start time of the clip block [in time] and end time [out time].

Starting from offset 00f8h, 0084 H bytes are the stream tag information storage area contained in the clip block.
Starting from offset 00f8h, 0002 H bytes 0082h indicates the length of the storage zone f9h + 82 H = 17bh
The offset value starts from 0102 H and 0001 H bytes indicate the number of streams contained in the block. This block contains five streams, one video stream, two audio streams, and two subtitle streams.
Offset 0104 H from 0018 H bytes is the information of the first stream tag of the block, and the following several times and so on

 

Brief description of modification process steps

1. Extract chapter time codes
Use bdedit to open the original version to be modified, and select time in the chapter format of options.
In the playlist item, select the MPLS of the media segment you want to modify, and click Save chapters to obtain a text

Merge and split a stream
Now we use tsmuxer to add subtitles or audio tracks to the original disk.
For multiple segments, add and join each m2ts in the order listed in playlist.
If the source is segmented, it does not matter if subtitles or audio tracks are not segmented, as long as the total length of time can be matched.
Select m from the Blu-ray item chapters and copy the content in the text in the first step.
Set the m2ts number in option to a number greater than the maximum m2ts number in the original directory.
For example, if the maximum value of bdmv/stream is 00200. m2ts, set this parameter to 201, which is used for convenient replacement during splitting.
If you want to play the video on a mobile hard disk, you can choose to split it by entering 4.29 [unit: GB] Or 3.99 [unit: gib].
Choose Blu-ray or avchd to encapsulate the output. Here there are many tsmuxer tutorials related to other details, so I will not go into details here.

3. replace files
REFERENCEOriginal MPLSRemove or delete all the listed m2ts and their corresponding clpi
SetOriginal MPLSBack up the data to any directory, and move the m2ts and clpi in the new directory to the corresponding directory of the original version.

4. Modify the playlist
Now open hxd to generate MPLS andOriginal MPLSDrag in, clear the basic MPLS data structure, and then begin to modify
InOriginal MPLSMove to the start position of the unit time code information storage area, write down the number, etc.

CopyNew MPLSThe new stream Tag Information in the first clip block information area, and thenOriginal MPLSInsert at location
The length of a stream is 10 H [16 d]. Do not check the error and modify it.Original MPLSTo increase the value of the tag stream.
Next, modifyOriginal MPLSThe length of the stream tag information storage area contained in the first clip block. Add a label for 10 h.

If the new one is split, copy the modified one.Original MPLSIn all the information areas of the first clip block, pressNew MPLSNumber of split Blocks
Insert an information block at the end of the first clip block information area.Original MPLSAll subsequent clip block information will be deleted]
The number of times to insert and paste here is, of course, the number of newly generated m2ts is reduced by 1. After this operation, modify the number of cutting blocks contained in the MPLS.

ComparisonNew MPLS, ModifyOriginal MPLS[In time] and [out time] of each clip block. Modify the relationship type between the block and the block.
Original MPLSChange the start position of the unit time code storage area at 000eh, and change the total length of the clip block information storage area at 003ch.

InNew MPLSAt 000eh of, move this value to the start position of the chapter time code information storage area, copy all the information thereafter
InOriginal MPLSAt 000eh of, move this value to the start position of the unit time code information storage area, delete all information thereafter, and paste it.

(Note: it is also feasible to move the chapter code without major operations if there are no chunks)
(Original MPLS[In time] and [out time] that have not been modified can be overwritten with the new clpi)

At this point, all the necessary modifications have been completed. If you want to burn, simply burn BD in the normal way.
If you need to simulate the playback of a mobile hard disk, you just need to drag the original index to patch it with avchd-Patcher.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.