NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.3k stars 14.27k forks source link

webcamoid: can't create virtual webcam #104296

Closed freezeboy closed 4 years ago

freezeboy commented 4 years ago

Describe the bug

start the program

can't create virtual webcam

To Reproduce Steps to reproduce the behavior:

  1. nix run nixpkgs#webcamoid
  2. In the gui, create a virtual webcam, you get an error

Expected behavior

get a virtual webacm

Notify maintainers

@robaca

colemickens commented 4 years ago

I think you need to have one of the two supported virtual camera modules loaded for it to work: https://github.com/webcamoid/webcamoid/wiki/Virtual-camera-support

v4l2loopback is in nixpkgs, and this is an issue for the other: https://github.com/NixOS/nixpkgs/issues/84889

freezeboy commented 4 years ago

Fixed with akvcam, currently, the config file is not cleanly generated but just written.

srghma commented 4 months ago

I installed like

{ config, lib, pkgs, modulesPath, inputs, settings, localpkgs, ... }:

let
  mypkgs = pkgs.nixpkgsMaster.pkgs;

  configFile = pkgs.writeText "akvcam-configFile" ''
    [Cameras]
    cameras/size = 2

    cameras/1/type = output
    cameras/1/mode = mmap, userptr, rw
    cameras/1/description = Virtual Camera (output device)
    cameras/1/formats = 2
    cameras/1/videonr = 7

    cameras/2/type = capture
    cameras/2/mode = mmap, rw
    cameras/2/description = Virtual Camera
    cameras/2/formats = 1, 2
    cameras/2/videonr = 9

    [Connections]
    connections/size = 1
    connections/1/connection = 1:2

    [Formats]
    formats/size = 2

    formats/1/format = YUY2
    formats/1/width = 640
    formats/1/height = 480
    formats/1/fps = 30

    formats/2/format = RGB24, YUY2
    formats/2/width = 640
    formats/2/height = 480
    formats/2/fps = 20/1, 15/2
  '';
in {
  environment.systemPackages = [
    mypkgs.webcamoid
  ];

  boot.extraModulePackages = [ config.boot.kernelPackages.akvcam ];
  boot.kernelModules = [ "akvcam" ];
  boot.extraModprobeConfig = ''
    options akvcam config_file=${configFile}
  '';
}

but it asks to install script

2024-07-02_11-59-49

2024-07-02_12-09-28