Repository navigation
Commit af8cafd
fix(dv5): force canonical color signaling on Profile 5 mp4 output
Some DV Profile 5 MP4 encoders write a `dvh1` sample entry and a
well-formed `dvcC` record but omit the HEVC SPS VUI transfer fields
and the container `colr` atom (issue #19 Wandering Earth 2 WEB-DL:
codec_tag=dvh1, dv_profile=5 L6 compat_id=0, color_transfer=unknown,
color_primaries=unknown, color_space=unknown, no nclx). AVPlayer
refuses to engage the DV decoder on a `dvh1` sample entry without an
explicit PQ signal, so the engine's output fMP4 (which preserved the
gap) failed at item.status. The same content as MKV plays cleanly
because matroska's Colour element gives FFmpeg explicit codecpar
color fields that the mp4 muxer writes as a colr nclx atom; the mp4
demuxer has no equivalent fallback.
Force the canonical P5 color tuple (BT.2020 / PQ / BT.2020-NCL /
limited range) on the muxer's stream codecpar before write_header.
P5 is defined as IPT-PQ-c2; the dvcC record alone implies that, so
the override has no risk of misclassifying a non-PQ source as PQ.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 7aedad7 commit af8cafd
3 files changed
Lines changed: 72 additions & 5 deletions
File tree
- Sources/AetherEngine/Video
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
560 | 565 | | |
561 | 566 | | |
562 | 567 | | |
563 | | - | |
| 568 | + | |
| 569 | + | |
564 | 570 | | |
565 | 571 | | |
566 | 572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
578 | 603 | | |
579 | 604 | | |
580 | 605 | | |
581 | 606 | | |
582 | | - | |
| 607 | + | |
| 608 | + | |
583 | 609 | | |
584 | 610 | | |
585 | 611 | | |
| |||
1324 | 1350 | | |
1325 | 1351 | | |
1326 | 1352 | | |
1327 | | - | |
| 1353 | + | |
| 1354 | + | |
1328 | 1355 | | |
1329 | 1356 | | |
1330 | 1357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
110 | 128 | | |
111 | 129 | | |
112 | 130 | | |
| |||
124 | 142 | | |
125 | 143 | | |
126 | 144 | | |
| 145 | + | |
| 146 | + | |
127 | 147 | | |
128 | 148 | | |
129 | 149 | | |
130 | 150 | | |
131 | 151 | | |
132 | | - | |
| 152 | + | |
| 153 | + | |
133 | 154 | | |
134 | 155 | | |
135 | 156 | | |
136 | 157 | | |
137 | 158 | | |
| 159 | + | |
138 | 160 | | |
139 | 161 | | |
140 | 162 | | |
| |||
349 | 371 | | |
350 | 372 | | |
351 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
352 | 380 | | |
353 | 381 | | |
354 | 382 | | |
| |||
487 | 515 | | |
488 | 516 | | |
489 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
490 | 524 | | |
491 | 525 | | |
492 | 526 | | |
| |||
0 commit comments