Author: Roman

Bug in Media Foundation MPEG-4 File Source related to timestamping video frames of a fragmented MP4 file

Some recent update in Media Foundation platform introduced a new bug related to fragmented MP4 files and H.264 video. The bug shows up consistently with file versions: mfplat.dll – 10.0.14393.351 (rs1_release_inmarket.161014-1755)    15-Oct-16 05:48 mfmp4srcsnk.dll – 10.0.14393.351 (rs1_release_inmarket.161014-1755)    15-Oct-16 05:45 The nature of the problem is that MPEG-4 File Source is incorrectly time stamping the data:…

Read the full article

Applying Hardsubs to H.264 Video with GPU

Video adapters currently offer a range of services which enables transcoding of H.264 content with certain modifications (including but not limited to flexible overlays, scaling, mirroring, effects and filters) end-to end on GPU keeping data as DirectX Graphics Infrastructure resource at all processing stages. Such specialized processing capabilities are pretty powerful compared to traditional CPU…

Read the full article

C++ #import and x64 builds

I already wrote earlier on 32/64-bit issues with Visual Studio. The problems are not frequent but when they happen they are pretty confusing. Here is another one today. C++ code is simple: #import “libid:59941706-0000-1111-2222-7EE5C88402D2” raw_interfaces_only no_namespace CComPtr<IObject> pObject; ATLENSURE_SUCCEEDED(pObject.CoCreateInstance(__uuidof(Object))); BYTE* pnData; ATLENSURE_SUCCEEDED(pObject->Method((ULONG_PTR) (BYTE*) pnData)); A COM method returns a pointer to data – pretty straightforward,…

Read the full article

Small correction for DirectShow BaseClasses CTransInPlaceFilter::Copy

False assertion failure in DirectShow BaseClasses transip.cpp, in CTransInPlaceFilter::Copy: ASSERT(lDestSize >= lSourceSize && lDestSize >= lDataLength); […] CopyMemory((PVOID) pDestBuffer, (PVOID) pSourceBuffer, lDataLength); The code asserts on “lDestSize >= lSourceSize” which is true in most cases, but it does not have or need to be true. The code below copies just lDataLength bytes and assertion on…

Read the full article

Screen recording using Desktop Duplication API and hardware H.264 encoder

The application takes advantage of three powerful Windows APIs at a time: Desktop Duplication API Media Foundation Hardware H.264 Video Encoders MediaFoundationDesktopRecorder initializes a desktop duplication session and sends obtained desktop images to H.264 video encoder producing a standard MP4 recording. Optionally, it can add an audio track capturing data from one of the standard…

Read the full article