Author: Roman

Microsoft’s MPEG-DASH client implementation inaccurately handles SSR flavor of streaming media

Recent additions to MPEG-DASH specification (ISO/IEC 23009-1 5th ed., AMD3; also SCTE 214-6) offer new ways to implement low-latency low-delay playback: using so called Segment Sequence Representations (SSR). MPGE-DASH manifests advertise this flavor of data by including a respective EssentialProperty. Before Shaka Player Demo added support for this technology, they ignored the respective adaptation set…

Read the full article

Legacy Code and Overengineering: The MJPEG Decoder Saga

So, hashtag#DirectShow virtual cameras — those elusive creatures that always turn heads. We’ve chatted about them before on LinkedIn (check out our post here https://lnkd.in/dYte5SQ5). But let’s rewind to 2011 when we decided to play mad scientist. Our mission? Whip up a batch of DirectShow filters that could snag JPEG and M-JPEG video streams from network sources (think IP cameras) and seamlessly slot them into DirectShow applications.

But wait, there’s more! We cranked it up a notch. Picture this: a secret lab, flickering monitors, and a dash of overengineering. Our filters cozied up to the stock Microsoft JPEG decoder — the one that’s been less than stellar since forever. And guess what? We wrapped it all in a nostalgic bow — a wrapper around the ancient VCM JPEG Decoder from 1992 https://lnkd.in/dYRUi84x. Yep, that’s right — the same decoder that predates most of us.

Why, you ask? Because that’s how Microsoft Windows rolls. It clings to legacy features like your favorite worn-out hoodie. The “MJPEG Decompressor” (sounds fancy, right?) is still documented https://lnkd.in/dBZzBbKK as a relic . But honestly, no one should touch it with a ten-foot pole. Not now, not 13 years ago — never.

And here’s the twist: Our Alax.Info IP Video Source DirectShow extension https://lnkd.in/diB_3vBf, born from this wild experiment, lives on. It’s like that quirky friend who insists on wearing mismatched socks. People still use it, still recommend it. Maybe it’s the retro charm or the sheer audacity. Who knows?

So next time you’re streaming video from a network source, tip your hat to those unsung heroes — the DirectShow filters that made it all happen. And raise a banana (yes, a banana) to the MJPEG Decompressor. It’s been around longer than your grandma’s favorite recipe.

There you have it — a tale of tech, tenacity, and a touch of madness. ????????????

LDS Temples and Technology: The DirectShow Journey

A while back, we were working on a media subsystem for The Church of Jesus Christ of Latter-day Saints. They needed software-controlled multimedia playback with specific requirements for their temples worldwide.

Now, the attached image isn’t an exact representation of our work, but it captures the essence: LDS and technology go hand in hand.

Back in the day, we used #DirectShow as our multimedia framework, and boy, did we face some interesting challenges. One that sticks out in memory is related to audio delivery. Picture this: we had a multi-channel audio output card from AudioScience, Inc., and our task was to schedule audio delivery in perfect sync across multiple physical audio connectors. But wait, there’s more! We also had to toggle outputs on and off while others were already belting out sound. And when we turned on a fresh audio stream, it had to seamlessly match the signal already in play. Oh, and don’t forget — the video part of this signal was streaming nonstop and couldn’t be interrupted.

Now, let me tell you, this wasn’t a walk in the park. The multimedia framework was designed back in the ’90s, with the quaint notion that once you set up your playback topology, you couldn’t tweak anything while the show was running.

But guess what? Our software spread its wings and flew to over a hundred locations worldwide. Many moons have passed, but who knows — it might still be chugging along out there.

Legacy Filters, Modern Solutions: MP4 Support in DirectShow

Microsoft #DirectShow API was introduced long before the widespread adoption of MPEG-4. As MPEG-4 codecs and container formats became standard, DirectShow was, by Microsoft’s own admission, nearing the end of its life.

That’s how this once-popular media framework for Windows found itself without support for MP4 files. Fortunately, there was a handy solution: freely available filters https://gdcl.co.uk/mpeg4/ developed by Geraint Davies. Originally published in 2006, these filters gained popularity over time. Since Geraint had other commitments after the last update, we took the liberty of placing a copy of his work on GitHub https://lnkd.in/dPsZEfpE somewhere around 2015.

Despite the state of DirectShow, these filters still play a role in DirectShow applications. We’ve even made a few updates ourselves — a little bit of everything: a unit test project, some modern C++ and #COM code based on Microsoft WIL https://lnkd.in/de5nxif, a COM type library with an integration interface, and various features. One particularly valuable addition is the ability to recover broken recordings.

You see, sometimes applications crash — whether due to external factors or just plain bad luck. And sometimes the cost of “re-doing things right” is too high. Oh, and the cost of data loss is high too! In such cases, we can salvage the broken recording from the crashed application and recover its content. It’s like a digital rescue mission. And in some instances, it’s even automated — like in our partner’s medical software https://lnkd.in/dCrJJRjy, where multi-hour recordings are the norm these days.

Breaking the Rules: A Quick and Dirty Approach to FX Trading Automation

One of the truly unconventional development projects was our development of specialized automated agent for foreign exchange (FX) trading.

The customer wanted to implement their unusual ideas at one (and then another) of the popular electronic Forex market trading platforms. The key idea was to be a market maker and a liquidity provider agent, and also to be able to provide the fastest reaction to market events.

Applications like this, that are touching big/real money are normally developed in respective way: robust tooling, a well-established software stack, comprehensive unit test coverage, peer-reviewed code, and thorough documentation.

We were breaking all the rules! That time we took a different approach — a quick and dirty one.

Singlehandedly and rather straightforwardly, we implemented a #FIX (Financial Information eXchange) client in C++ addressing ultra-low latency, and the application was running on a box connected via secure fiber connection with the platform data center located in neighboring building.

At the peak of the swing, we had positions at CurrenEx worth a jaw-dropping $15 million. Yeah, you read that right. Fifteen million bucks!

Custom Filters to the Rescue: Diagnosing and Solving Media Stream Woes

In a recent customer project, we encountered a longstanding problem related to a broadcasted media stream captured by software.

Our customer application, built on the hashtag#DirectShow framework, was responsible for capturing the media stream. The application needed to operate 24/7 and maintain stability during continuous live media broadcasting.

Unfortunately, sporadic crashes occurred due to a third-party DirectShow filter within the topology. This filter triggered memory access violations and crashed the entire application. The vendor of this problematic component was unavailable for maintenance. Given the low incident frequency, the customer was concerned about possible regressions in the case of any update of this part of the application.

The issue manifested only in the production signal, complicating troubleshooting, and the customer’s data center required remote access via VPN and several remote desktops.

To diagnose and solve the problem effectively, we introduced a lightweight DirectShow filter. This custom filter transparently captured a dump of the recently captured MPEG-TS signal, mirroring the data flow to the faulty component. In the production environment, this solution allowed us to analyze the content in sufficient detail to reproduce the problem outside the production setup.

Eventually, we replaced the problematic third-party DirectShow filter with an in-house development that handled that particular processing step reliably and maintainably.

In summary, our custom DirectShow filter provided crucial insights, enabling us to address the issue and enhance stability in the customer’s live media broadcasting application.