Log in

View Full Version : Hex Editing MPEG2 (Sequence Display Extension)


Incast
10th August 2007, 22:12
I want to tidy up some DVDs I've authored which have a different colorimetry value in the DVD menu to that of the DVD video.

This procedure is probably meaningless but I'd like to do it, and it should be pretty simple once I know which values to change.

The areas I wish to hex edit fall under the Sequence Display Extension and are:
1. color_primaries
2. transfer_characteristics
3. matrix_coefficients

At present they are all value 4 (FCC) or value 6 (SMPTE-170M) and I wish to change them to value 5 (BT-470-2 B/G).

Advice on a good hex editor to use to do this would also be greatly appreciated (or indeed a way to avoid hex completely, but restream nor DVD Patcher support changing the Sequence Display Extension unfortunately).

rcubed
10th August 2007, 22:37
Try Frhed,
I have found it useful.

Here is one link

http://www.codeproject.com/tools/frhed.asp

Others can be found with Google Search on Frehd.

Good luck,

Cuber

Incast
10th August 2007, 22:46
Thanks for your prompt reply, I've downloaded and configured that, it should be suitable for my needs.

I just need to get the values to edit now.

Incast
11th August 2007, 21:52
I have now resolved this on my own. In the unlikely case anyone searches this thread in the future, the hex is:

01 b5 23 0[a] 0[b] 0[c]

[a] = color_primaries
[b] = transfer_characteristics
[c] = matrix_coefficients

For each the following numeric code applies:
1: ITU-R BT.709
2: Unspecified
4: ITU-R BT 470-2 M (FCC)
5: ITU-R BT 470-2 B,G
6: SMPTE 170M
7: SMPTE 240M

Example:

01 b5 23 05 05 05

Color primaries, transfer characteristics and matrix coefficients in this case are all ITU-R BT 470-2 B,G

Guest
12th August 2007, 16:47
You're going to edit every sequence display extension in the file by hand?

Incast
12th August 2007, 22:45
Just that of the DVD menu, and these are home made menus so there's only about 5 or 6 Sequence Display Extensions.

That program rcubed kindly pointed me to allows me to automatically find and replace specified sections, so the whole procedure takes seconds.

I'm just tidying up some DVDs I authored a long time ago, to ensure compliancy for the future.

As long as there's no colorimetry information in the ifo file, I believe this is now resolved.