Hello.
I've been playing with Dolby Vision in AV1 and currently MP4Box doesn't support parsing the metadata OBUs to set the config properly.

Currently when trying to mux with `MP4Box` we get this error:
```console
❯ MP4Box -add av1-dovi-reencode-small-rpu.ivf:dvp=f10.hdr10:hdr=none:stype=av01 -new av1-dovi-reencode-small-rpu.mp4
Track Importing AOM AV1 Video - Width 3840 Height 2014 FPS 24000/1001
DV profile can only be set on AVC or HEVC tracks
Failure while setting DV profile: Bad Parameter
Error importing av1-dovi-reencode-small-rpu.ivf:dvp=f10.hdr10:hdr=none:stype=av01: Bad Parameter
```
&nbsp;

So far I've had to patch out the restriction and force the muxer to create the box.
The files work afterwards on the two devices I tested:
- LG OLED C2 with the internal player
- Amazon FireTV Stick 4K Max with ExoPlayer.

I'll leave an example file here, but I think it would essentially just require detecting the ITU-T T.35 metadata OBUs and check the first couple of bytes for Dolby Vision.

`rav1e` encoded IVF with small (< 256 bytes) RPU: https://www.mediafire.com/file/4ip5wknqecn43j8/av1-dovi-reencode-small-rpu.ivf/file
The files from https://github.com/gpac/gpac/issues/1925 also work after patching: [video_dovi_3840x2160_30fps_av01_10.mp4](https://github.com/gpac/gpac/assets/39477805/c23fe31c-bfcd-40f9-be38-58afb99bd148)

Some notes:
- The metadata OBU has `itu_t_t35_country_code` set to `0xB5`.
- The metadata OBU has `itu_t_t35_payload_bytes` starting with the following bytes:
  - `0x00, 0x3B, 0x00, 0x00, 0x08, 0x00, 0x37, 0xCD, 0x08`
- The profile must be set to 10, otherwise demuxers assume HEVC.
- I'm not sure what the `dv_version` should be set, but `1.0` works fine. The old Dolby samples used `2.1` but the specification constrains `dv_version_major` to 1, and `dv_version_minor` to 0.

It might also be good to follow the [Dolby specification](https://dolby.my.salesforce.com/sfc/p/#700000009YuG/a/4u000000l6FB/076wHYEmyEfz09m0V1bo85_25hlUJjaiWTbzorNmYY4), but from my testing the `compatible_brands` are not necessary.
Add support for Dolby Vision dvvC box with AV1 video
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Add support for Dolby Vision dvvC box with AV1 video
Issue date:

--- start body ---
Hello.
I've been playing with Dolby Vision in AV1 and currently MP4Box doesn't support parsing the metadata OBUs to set the config properly.

Currently when trying to mux with `MP4Box` we get this error:
```console
❯ MP4Box -add av1-dovi-reencode-small-rpu.ivf:dvp=f10.hdr10:hdr=none:stype=av01 -new av1-dovi-reencode-small-rpu.mp4
Track Importing AOM AV1 Video - Width 3840 Height 2014 FPS 24000/1001
DV profile can only be set on AVC or HEVC tracks
Failure while setting DV profile: Bad Parameter
Error importing av1-dovi-reencode-small-rpu.ivf:dvp=f10.hdr10:hdr=none:stype=av01: Bad Parameter
```
&nbsp;

So far I've had to patch out the restriction and force the muxer to create the box.
The files work afterwards on the two devices I tested:
- LG OLED C2 with the internal player
- Amazon FireTV Stick 4K Max with ExoPlayer.

I'll leave an example file here, but I think it would essentially just require detecting the ITU-T T.35 metadata OBUs and check the first couple of bytes for Dolby Vision.

`rav1e` encoded IVF with small (< 256 bytes) RPU: https://www.mediafire.com/file/4ip5wknqecn43j8/av1-dovi-reencode-small-rpu.ivf/file
The files from https://github.com/gpac/gpac/issues/1925 also work after patching: [video_dovi_3840x2160_30fps_av01_10.mp4](https://github.com/gpac/gpac/assets/39477805/c23fe31c-bfcd-40f9-be38-58afb99bd148)

Some notes:
- The metadata OBU has `itu_t_t35_country_code` set to `0xB5`.
- The metadata OBU has `itu_t_t35_payload_bytes` starting with the following bytes:
  - `0x00, 0x3B, 0x00, 0x00, 0x08, 0x00, 0x37, 0xCD, 0x08`
- The profile must be set to 10, otherwise demuxers assume HEVC.
- I'm not sure what the `dv_version` should be set, but `1.0` works fine. The old Dolby samples used `2.1` but the specification constrains `dv_version_major` to 1, and `dv_version_minor` to 0.

It might also be good to follow the [Dolby specification](https://dolby.my.salesforce.com/sfc/p/#700000009YuG/a/4u000000l6FB/076wHYEmyEfz09m0V1bo85_25hlUJjaiWTbzorNmYY4), but from my testing the `compatible_brands` are not necessary.
--- end body ---
