Hacker News new | ask | show | jobs
by laex 2851 days ago
Looks great!! Can it can load and play mp4 files ?
2 comments

It looks like if you're able to produce a stdlib image.Image implementation or some other types, you can use it.

re: https://godoc.org/gocv.io/x/gocv#Mat

Hiya,

I wasn't able to find that support, but I am no expert.

Can you explain your use case?

Well, to process video streams in computer vision applications.
Ah, the demo I saw pulled in a camera feed and processed it, but it's not clear to me what formats are supported.
Support for mp4, or any other video format, isn't necessarily related directly to how camera feeds are handled. Video files are extensively used to test and benchmark cv applications. It's far easier, faster, and more convenient to feed a collection of video streams to your module instead of enabling a camera, which may require deploying the whole application, and capture the same sort of scene over and over again.
on linux opencv uses ffmpeg to videos iirc, i needed to install the gstreamer ffmpeg plugin (gst-libav on arch) and then it handled whatever format i threw at it (including mp4), although i used the python bindings if that makes any difference