New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use FFmpeg instead of EmguCV #236
Comments
Please provide details on how you plan to implement it as well. |
From what I understand, all we need is to get the raw bytes of the image from the webcam. Then you can refer to https://trac.ffmpeg.org/wiki/Capture/Webcam. # Windows
ffmpeg -f vfwcap -i $device_index -pix_fmt rgba -f rawvideo -
# Linux
ffmpeg -f v4l2 -i /dev/video$device_index -pix_fmt rgba -f rawvideo - to take raw RGBA pixels from the desired webcam. ❯ v4l2-ctl -d 0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'MJPG' (Motion-JPEG, compressed)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
[1]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 1280x720
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps) You can test that the ffmpeg -f vfwcap -i 0 -pix_fmt rgba -f rawvideo - | ffmpeg -f rawvideo -pix_fmt rgba -s $sizeofwebcamhere -i - camerout.mkv then cancel the command after a bit and open |
per the Discord discussion, we're re-assigning this to Encore 1 instead since this is more of something we wanna fix as Encore 1 is a stable client. |
As Vignette Debut has been released, I and @adryzz have begun to engage in that task. We will create a small and agnostic library using FFmpeg.Autogen, which is a one-to-one mapping of the FFmpeg C API in C#, as it is preferable to use the low level API rather than the command line tool. The lack of documentation doesn't make this task easy, but thankfully, most of the important stuff has been figured out. |
Yay! SeeShark exists now. |
Currently, EmguCV is being used only to handle webcam input.
We've had various problems with runtimes not being in the right place and cameras not being detected.
Thus I propose that we use FFmpeg for that task.
I think that it will be much easier to deal with as we can just use it as a system-installed binary.
Not to mention that the library is LGPL which is just perfect for our use-case.
The text was updated successfully, but these errors were encountered: