|
| 1 | +# [DirectShow Metadata Injector Filter](https://github.com/defl/directshow_metadata_injector_filter) |
| 2 | + |
| 3 | +**Warning: This is feature complete yet - there is no way to configure without recompiling** |
| 4 | + |
| 5 | +This is a DirectShow filter that can inject metadata related to high dynamic range (HDR) and wide color gamut (WCG) |
| 6 | +into a directshow graph. |
| 7 | + |
| 8 | +This is usable for sources which do not properly relay this information like consumer video capture cards |
| 9 | +[AVerMedia Live Gamer 4K - GC573](https://www.avermedia.com/us/product-detail/GC573) who technically do HDR |
| 10 | +data but refuse to forward the correct HDR metdata through their DirectShow source filters. |
| 11 | +This leads to downstream renderers making a mess of the picture as they don't know how to interpret it. |
| 12 | +Example [before](images/without.png) and [after](images/with.png) screenshots probably speak for themselves. |
| 13 | + |
| 14 | +With this and a select few other bits and bobs you can build something like a poor mans' [madVR labs envy](https://madvrenvy.com/) if you're willing to forego the updates, ease of use and potential HDCP issues. If you like this, and have the means, please buy a real envy to support further madVR development. |
| 15 | + |
| 16 | +## Features |
| 17 | + |
| 18 | +* Supported metadata |
| 19 | + * HDR primaries & whitepoint as xy coordinates |
| 20 | + * HDR min/max mastering luminance |
| 21 | + * HDR content light levels (MaxCLL, MaxFALL) |
| 22 | + * HDR Transfer Matrix (BT.2020 etc) |
| 23 | + * HDR Primaries (DCI-P3, BT.2020 etc) |
| 24 | + * HDR Video transfer function (SMPTE ST 2084 (PQ), HLG etc) |
| 25 | +* Tested players |
| 26 | + * Potplayer |
| 27 | +* Tested DirectShow sources |
| 28 | + * AVerMedia Live Gamer 4K - GC573 |
| 29 | +* Tested DirectShow renderers |
| 30 | + * madVR |
| 31 | + |
| 32 | +## Install |
| 33 | + |
| 34 | +Potplayer |
| 35 | + |
| 36 | +* Download directshow_metadata_injector_filter.ax to a location you will not delete |
| 37 | +* Install VS2019 runtime |
| 38 | +* Open potplayer |
| 39 | +* Open preferences (F5) |
| 40 | +* In the tree menu go to: Filter Control -> Filter Priority (Overall) ([screenshot](images/potplayer_settings.png)) |
| 41 | +* Click Add external filter |
| 42 | +* Go to the directory where you downloaded the directshow_metadata_injector_filter.ax, select the file and press open |
| 43 | +* There should be a new filter in the Custom Filter Manager called "Metadata Injector" |
| 44 | +* Select Metadata Injector |
| 45 | +* Bottom right of screen set priority to "Prefer" |
| 46 | + |
| 47 | +*(If you're running a AVerMedia Live Gamer 4K - GC573 don't forget to set it's output to P010 for 10bit, you can do this in preferences under device->webcam->format, see [here](images/potplayer_avermedia_settings.png))* |
| 48 | + |
| 49 | +## Build |
| 50 | + |
| 51 | +Open with Visual Studio 2019 VC++, should just work out of the box. |
| 52 | + |
| 53 | +## FAQ |
| 54 | + |
| 55 | +Is this plug and play? No, because this filter does not offer anything new to get an video stream decoded it will not automatically be added to a DirectShow graph. It needs to be forced to be included, see install for an example. |
| 56 | + |
| 57 | + |
| 58 | +## Credits |
| 59 | + |
| 60 | +Thanks to WP for the initial introduction to DirectShow |
| 61 | + |
| 62 | +Thanks to Hendrik Leppkes' for his excellent [LAV](https://github.com/Nevcairiel/LAVFilters/releases) filter. |
| 63 | + |
| 64 | +Thanks to madshi for [madVR](http://madvr.com/). |
| 65 | + |
| 66 | +No thanks to all capture card manufacturers who are willing to sell you half implemented hardware. |
0 commit comments