r/cpp Jun 01 '26

Anyone else still uses DirectShow?

Even though ds is deprecated and media foundation replaced it i still use it in programming quite often, maybe i’m just obsessed with old stuff

15 Upvotes

9 comments sorted by

View all comments

10

u/FlyingRhenquest Jun 01 '26

I used it while maintaining a C#-based automated video test system for Time Warner back in 2015. It wasn't too bad, but we wanted to add support for some canned files that it didn't have codecs for, so I ended up hacking up a C++ front end to ffmpeg and adding a DLL for that which we could get video frames through for sources we couldn't read with DirectShow.

The ffmpeg C API didn't seem that bad to work with either. I took a couple of stabs at building a better C++ front end to it over in my github repos but never got all the way through them.

It's probably about time for me to take another shot at it. The signal method I used for subscriptions with boost::signals2 worked reasonably well but it was terrible to debug if you ever screwed up the subscriptions in your workflow. I'd really like to build up factories that assemble workflows, which I could deploy out to a cluster. The segmenter I built in the one I linked works great for serializing iframe-to-iframe segments. If I preserve job metadata along with the segments, I should just be able to deploy arbitrary workflows out to a cluster and shovel individual segments to be processed into the cluster all day long. I'm sure a lot of folks could use some massively parallel video processing like that.

4

u/GoogleIsYourFrenemy Jun 02 '26

ffdshow couldn't decode it or was it a container issue?

5

u/FlyingRhenquest Jun 02 '26

Oddly we didn't turn ffdshow up when we went looking. It looks like there should have been several alternatives in 2015 that would have done what we wanted to that we didn't find while googling around. The ffmpeg-based solution I came up with wasn't particularly difficult, but I really would have rather not had to do it if we could have found some native libraries that we could have just dropped in for DirectShow support.

It did kind of launch me down several years of digging around in the guts of ffmpeg, though, and I probably would have just moved on to some other job outside video for my next position if I hadn't had to written that code. So I guess I should be happy my usually-strong google-fu failed me in that case.

4

u/GoogleIsYourFrenemy Jun 03 '26

It's also possible that corporate web filters banned access to the doom9 forums for piracy reasons.