ffmpeginteropx / FFmpegInteropX

FFmpeg decoding library for Windows 10 UWP and WinUI 3 Apps
Apache License 2.0
205 stars 52 forks source link

Dynamic format changes #406

Closed brabebhin closed 7 months ago

brabebhin commented 7 months ago

I'm going to start working on this. PR to come in the following week(s).

brabebhin commented 7 months ago

I took a FHD video - 1920 x 1080 and applied video filter scale=w=200:h=100 to resize the video frame. The quality of the video immediately goes down, but the video is not resized correctly in MPE.

So the existing code has some effect:

        VideoDescriptor().EncodingProperties().Width(outputFrameWidth);
        VideoDescriptor().EncodingProperties().Height(outputFrameHeight);

The same thing seems to happen if I do the Microsoft approach

encodingProperties.Insert(MF_MT_FRAME_SIZE, PropertyValue::CreateUInt64(Pack2UINT32AsUINT64(outputFrameWidth, outputFrameHeight)));