Sascha-L / WPF-MediaKit

Microsoft Public License
367 stars 116 forks source link

Can I save camera input to video files? #76

Open laoniu2020 opened 6 years ago

laoniu2020 commented 6 years ago

Can I save camera input to video files?

xmedeko commented 6 years ago

No, it's not possible easily. You can save a screenshot, see the Wiki Basic Examples. So you can save a sequence of JPEG images, aka MPEG video (not optimal format, though). E.g. see this SO thread.

Maybe you can go to the DirectX level to make better solution, but I am weak in the DirectX stuff, so cannot make you better advice, just use Google. E.g. see File Writer Filter, or this blog and you find others.

jluisestrada commented 6 years ago

Yes, it is possible if you modify the code (specially the directshow graph) and insert the GMF Filter http://www.gdcl.co.uk/gmfbridge/ so you can save to a file in parallel without skipping frames. I should have a sample somewhere. Let me upload it