Hi Nidhin Unni,
The behavior you’re seeing is expected, Media Foundation (Server‑Media‑Foundation) is not supported inside Windows Server Core LTSC 2022 containers. Containers are designed to run a minimal footprint of Windows components, and features that depend on multimedia frameworks like Media Foundation are excluded by design. That’s why the same command works fine on a full Windows Server VM but fails consistently in the container image.
At this time, there isn’t a supported way to layer Media Foundation into a Server Core container. If your workload requires Media Foundation APIs (such as mfplat.dll), the recommended approach is to run it on a full Windows Server installation or a Windows client container image that includes multimedia components. Alternatively, you can consider restructuring the workload so that the container handles non‑media tasks, while media processing runs on the host or a VM with Media Foundation enabled.
If you find this answer helpful, please hit “Accept Answer” so I know your concern is resolved.
Jason.