0

I'm looking for a way to extract a set of specific pixels from a video (and possibly store them in JSON)

So far i have found FFmpeg which looks like it should do the heavy lifting if i can find the correct commands.

Alternatively I could try using the source and building my own project that just leverages FFmpeg to extract frame data, but i think/hope that's unnecessary.

So if its possible, What commands could accomplish this?

Or perhapse there is a whole different approach i could take, any help would be great!

Neros
  • 1,139
  • 3
  • 14
  • 22
  • How many pixels? – Gyan Apr 30 '18 at 05:28
  • An arbitrary number of individual pixels, not a contiguous block. – Neros Apr 30 '18 at 06:02
  • We generally do not discuss building new stuff on stackoverflow - most of it is like "I need to do this. I've already come this far - this is my code snippet. I'm facing this issue now, how to resolve?" rather than a simple "how to do this?" But perhaps this might help: https://github.com/caprica/vlcj/blob/master/src/test/java/uk/co/caprica/vlcj/test/snapshot/SnapshotTest.java There seems to be a .net version too: Does VLC media player have a C# interface? Use these as a reference for your custom snapshot taking code. Hope this helps. – Shree Harsha May 10 '18 at 14:12

1 Answers1

0

After a solid day of research into various tools, i stumbled across Accord.NET which is a machine learning SDK, and one of the big parts of machine learning is image processing.

Simply adding the 'Accord.Video.FFMPEG' NuGET package allows me to access their 'VideoFileReader.ReadVideoFrame' and combined with the standard .Net 'Bitmap.GetPixel' i now have a super simple little CLI that can output a pixel colour for my position of choice.

http://accord-framework.net/

Neros
  • 1,139
  • 3
  • 14
  • 22