rgb to rgba

This commit is contained in:
Alex Eidt 2022-09-19 20:41:07 -07:00
parent 2f07344cb8
commit f6eaee9f1f
6 changed files with 51 additions and 59 deletions

View file

@ -90,7 +90,7 @@ func NewCamera(stream int) (*Camera, error) {
return nil, fmt.Errorf("unsupported OS: %s", runtime.GOOS)
}
camera := &Camera{name: device, depth: 3}
camera := &Camera{name: device, depth: 4}
if err := camera.getCameraData(device); err != nil {
return nil, err
}
@ -205,7 +205,7 @@ func (camera *Camera) init() error {
"-f", webcamDeviceName,
"-i", camera.name,
"-f", "image2pipe",
"-pix_fmt", "rgb24",
"-pix_fmt", "rgba",
"-vcodec", "rawvideo",
"-",
)