For your own good we enforced real-time protection…

Ostatnio spedzilem dosc duzo czasu na sprawdzaniu problemu z nieoczekiwanie slaba wydajnoscia w… Oh wait I am writing in English here. So, recently I spent rather a lot of time checking a problem with unexpectedly poor performance in a legacy DirectShow real-time video encoding pipeline based on NVIDIA GPU hardware encoding.

There was also a pre-history in this story. A colleague engineer in a contracted organization complained on a similar symptom and it took me not too much time to see that some third party antivirus is showing unexpected load numbers along with video recording activity. It appeared that it was not so easy to disable the antivirus because it was managed by his company on the corporate development system, so I just left him with suggestion to find ways to kill the offender.

However then later a similar thing happened on my own system as well. Even though it was a good reason to fine tune other aspects of the pipeline it came to my attention that freezing parts are happening in disk access to produced file in MP4 Multiplexer filter here.

The whole situation is ridiculous. Geraint designed these filter back in 2009 and then those would work nicely even ten years earlier if they existed earlier. Now with all the performance progress in hardware the same code exhibits extremely weird performance behavior because… of this thing:

Real-time protection of Windows defender interferes with recording so bad that it holds the entire upstream pipeline and forces frame drops in already a few second after start. This thing is also known to automatically re-enable itself if you turn it off so ironically even when I turn the switch on the image above off, after just a few minutes of rock solid operation it re-enabled the protection and the recording defect immediately returned back (okay, maybe it popped a notification about disabled protection and I accidentally clicked).

What’s wrong with this thing at all? Is it really that important to routinely check MP4 files being written with an impact so high that you can no longer use the hardware to do that original most important operation.

Knowing this, of course, it is important to restrain the scoundrel:

Kharkov Today

A fresh tour around Kharkov. Over last a few months the city is air-attacked daily and locals refer to these events as “Belgorod Express” because rockets are launched from neighborhoods of Belgorod in Russian Federation, where people see the launches and report to messengers. Then in a couple of minutes people on Ukrainian side in Kharkov see the air arrivals.

The video is long, almost an hour, just a couple of highlights:

  1. 00:52 is the Northern high density residential area “Northern Saltovka“, which is severely depopulated due to prolonged damages
  2. 49:10 captured an air attack as they walk around and film the content

Daily missiles

This used to be a secondary school 500 meters away from where I used to live. Russian Federation keeps attacking Kharkov nightly firing a few guided missiles from Belgorod region (40+ kilometers away). People from Belgorod, Russian Federation see outgoing missiles and write into Telegram IM chat: “Hey, another one is heading to you”, then in a while people from Kharkov, Ukraine see it destroying something new on the Ukrainian side.

src: https://t.me/place_kh/21868

Windows 11 Virtual Video Camera

Just a quick hookup of my test Media Foundation media source into new Windows 11 MFCreateVirtualCamera API.

Software video source is presented by Windows 11 as a video capture device. Finally, there is a nice way to create virtual cameras, even though Windows 11 (Windows Build 22000) is a minimal requirement.

Application produced video stream is accepted by both Media Foundation and DirectShow APIs:

Media Foundation API based Windows Camera application showing virtual camera
DirectShow API based GraphStudioNext application showing virtual camera

The new API works throough earlier introduced Frame Server subsystem: the new API pulls video frames from provided Media Foundation media sources and distributes data among the connected applications, the same way things happen with regular driver backed video sources.

  1. Download MediaFoundationVirtualCamera.7z and extract the contents
  2. Run “regsvr32 MediaFoundationVirtualCameraMediaSource.dll” from elevated command line prompt
  3. Run MediaFoundationVirtualCamera.exe
  4. While MediaFoundationVirtualCamera.exe is running, a new camera is registered with the system and is available for the applications

Vivek’s VCam is finally to be phased out, but it will still take some time.

Humanitarian aid in Kharkov, Ukraine

My friend remains in Kharkov, Ukraine, the city experiencing ongoing shelling and destruction.

He is running a team of over 40 volunteers whose daily activity is delivery of food and medication to people throughout the city and villages around. They supply over 2000 people with essentials weekly.

Donations and funds to fuel the support are greatly appreciated, and are directly used for humanitarian aid. Please share the information, and I highly recommend these people to those who seek how to pass help directly to those helping civilians in hotspots.

I leave contact and other details below:

Continue reading →

Suspended (or closed?)

As my city of Kharkov, on the North-East of Ukraine, is attacked by MLRS and artillery, I am not really sure that I would want to continue when the fog of war is gone. Thanks everyone for reading over years!

True media of local events, “open in web” gets you the stream if you don’t use Telegram: https://t.me/truexanewsua Pictures and videos of military damage to civil infrastructure, which is happening right now.

Beyond the Possible

I am replaying a pretty much regular MPEG TS recording taken from air, just with a MPEG TS rollover condition inside.

  1. Microsoft Media Foundation – ? FAIL
  2. Microsoft Movies & TV Application – ? FAIL (obviously because of #1 above, but let me double this down)
  3. Media Player Classic MPC-HC – ? FAIL
  4. VLC – ? FAIL
  5. DirectShow with one commercial MPEG demultiplexer filter – ? FAIL
  6. GStreamer 1.18 – ? FAIL

Oh, come on! Anyone? The recording is absolutely known to be one hundred percent valid!

Sounds like we have a new industry standard.

Microsoft Media Foundation drops sample times at MPEG TS rollover at 30.000s on audio leg, but not on video.