brutella/hkcam

USB Webcam -> /dev/video99

Opened this issue · 1 comments

Hey,

having some troubles with my external webcam as video99 is not found. Any ideas what i can do?

andreas@raspberrypi:~ $ sudo ./hkcam -data_dir=/var/lib/hkcam/data -multi_stream=true -port=8080 -verbose
INFO 2024/01/06 19:29:16 main.go:73: version v0.1.0 (built at 2022-03-04T21:28:23Z+0100)
DEBUG 2024/01/06 19:29:16 camera_control.go:194: {"assets":[]}
DEBUG 2024/01/06 19:29:16 server.go:208: listening at [::]:8080
DEBUG 2024/01/06 19:29:17 logger.go:161: "POST http://Camera._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.10.73:60212 - 200 140B in 34.100924ms
DEBUG 2024/01/06 19:29:17 logger.go:161: "POST http://Camera._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.10.73:60212 - 200 3B in 18.593959ms
DEBUG 2024/01/06 19:29:17 accessories.go:25: {"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"value":"Matthias Hochgatterer","format":"string"},{"iid":4,"type":"21","perms":["pr"],"value":"-","format":"string"},{"iid":5,"type":"23","perms":["pr"],"value":"Camera","format":"string"},{"iid":6,"type":"30","perms":["pr"],"value":"-","format":"string"},{"iid":7,"type":"52","perms":["pr"],"value":"v0.1.0","format":"string"}]},{"iid":8,"type":"111","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"value":false,"format":"bool"},{"iid":10,"type":"ACD9DFE7-948D-43D0-A205-D2F6F368541D","perms":["pr","ev"],"value":"eyJhc3NldHMiOltdfQ==","format":"tlv8"},{"iid":11,"type":"6A6C39F5-67F0-4BE1-BA9D-E56BD27C9606","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":12,"type":"3982EB69-1ECE-463E-96C6-E5A7DF2FA1CD","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":13,"type":"E8AEE54F-6E4B-46D8-85B2-FECE188FDB08","perms":["pw"],"description":"Take Snapshot","format":"bool"}]},{"iid":14,"type":"110","characteristics":[{"iid":15,"type":"114","perms":["pr"],"value":"AbYBAQACHQEBAAAAAQEBAAABAQICAQAAAAIBAQAAAgECAwEAAwsBAoAHAgI4BAMBHgAAAwsBAgAFAgLQAgMBHgAAAwsBAoACAgJoAQMBHgAAAwsBAuABAgIOAQMBHgAAAwsBAkABAgK0AAMBHgAAAwsBAgAFAgLAAwMBHgAAAwsBAgAEAgIAAwMBHgAAAwsBAoACAgLgAQMBHgAAAwsBAuABAgJoAQMBHgAAAwsBAkABAgLwAAMBDw==","format":"tlv8"},{"iid":16,"type":"115","perms":["pr"],"value":"AQ4BAQMCCQEBAQIBAAMBAgAAAQ4BAQICCQEBAQIBAAMBAQIBAA==","format":"tlv8"},{"iid":17,"type":"116","perms":["pr"],"value":"AgEA","format":"tlv8"},{"iid":18,"type":"117","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":19,"type":"120","perms":["pr","ev"],"value":"AQEA","format":"tlv8"},{"iid":20,"type":"118","perms":["pr","pw"],"value":"","format":"tlv8"}]}]}]}
DEBUG 2024/01/06 19:29:17 logger.go:161: "GET http://Camera._hap._tcp.local/accessories HTTP/1.1" from 192.168.10.73:60212 - 200 1833B in 10.554977ms
DEBUG 2024/01/06 19:29:17 characteristics.go:133: {"characteristics":[{"aid":1,"iid":7,"value":"v0.1.0"}]}
DEBUG 2024/01/06 19:29:17 logger.go:161: "GET http://Camera._hap._tcp.local/characteristics?id=1.7 HTTP/1.1" from 192.168.10.73:60212 - 200 56B in 4.56399ms
DEBUG 2024/01/06 19:29:19 main.go:136: {Type:image Width:1280 Height:720}
DEBUG 2024/01/06 19:29:19 main.go:177: snapshot 1280w x 720h
DEBUG 2024/01/06 19:29:19 loopback.go:49: Starting loopback
DEBUG 2024/01/06 19:29:19 loopback.go:114: /usr/bin/ffmpeg -f v4l2 -i /dev/video0 -codec:v copy -f v4l2 /dev/video99
DEBUG 2024/01/06 19:29:22 logger.go:161: "POST http://Camera._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.10.102:61523 - 200 140B in 61.194902ms
INFO 2024/01/06 19:29:22 pair-verify.go:154: not paired with DAAFEC5A-942C-40DE-A273-ACD0EFBEA012 yet
DEBUG 2024/01/06 19:29:22 logger.go:161: "POST http://Camera._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.10.102:61523 - 200 6B in 3.466994ms
DEBUG 2024/01/06 19:29:22 logger.go:161: "POST http://Camera._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.10.102:61524 - 200 140B in 84.940864ms
DEBUG 2024/01/06 19:29:22 logger.go:161: "POST http://Camera._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.10.102:61524 - 200 3B in 29.293954ms
DEBUG 2024/01/06 19:29:22 accessories.go:25: {"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"value":"Matthias Hochgatterer","format":"string"},{"iid":4,"type":"21","perms":["pr"],"value":"-","format":"string"},{"iid":5,"type":"23","perms":["pr"],"value":"Camera","format":"string"},{"iid":6,"type":"30","perms":["pr"],"value":"-","format":"string"},{"iid":7,"type":"52","perms":["pr"],"value":"v0.1.0","format":"string"}]},{"iid":8,"type":"111","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"value":false,"format":"bool"},{"iid":10,"type":"ACD9DFE7-948D-43D0-A205-D2F6F368541D","perms":["pr","ev"],"value":"eyJhc3NldHMiOltdfQ==","format":"tlv8"},{"iid":11,"type":"6A6C39F5-67F0-4BE1-BA9D-E56BD27C9606","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":12,"type":"3982EB69-1ECE-463E-96C6-E5A7DF2FA1CD","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":13,"type":"E8AEE54F-6E4B-46D8-85B2-FECE188FDB08","perms":["pw"],"description":"Take Snapshot","format":"bool"}]},{"iid":14,"type":"110","characteristics":[{"iid":15,"type":"114","perms":["pr"],"value":"AbYBAQACHQEBAAAAAQEBAAABAQICAQAAAAIBAQAAAgECAwEAAwsBAoAHAgI4BAMBHgAAAwsBAgAFAgLQAgMBHgAAAwsBAoACAgJoAQMBHgAAAwsBAuABAgIOAQMBHgAAAwsBAkABAgK0AAMBHgAAAwsBAgAFAgLAAwMBHgAAAwsBAgAEAgIAAwMBHgAAAwsBAoACAgLgAQMBHgAAAwsBAuABAgJoAQMBHgAAAwsBAkABAgLwAAMBDw==","format":"tlv8"},{"iid":16,"type":"115","perms":["pr"],"value":"AQ4BAQMCCQEBAQIBAAMBAgAAAQ4BAQICCQEBAQIBAAMBAQIBAA==","format":"tlv8"},{"iid":17,"type":"116","perms":["pr"],"value":"AgEA","format":"tlv8"},{"iid":18,"type":"117","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":19,"type":"120","perms":["pr","ev"],"value":"AQEA","format":"tlv8"},{"iid":20,"type":"118","perms":["pr","pw"],"value":"","format":"tlv8"}]}]}]}
DEBUG 2024/01/06 19:29:22 logger.go:161: "GET http://Camera._hap._tcp.local/accessories HTTP/1.1" from 192.168.10.102:61524 - 200 1833B in 17.697971ms
DEBUG 2024/01/06 19:29:22 characteristics.go:133: {"characteristics":[{"aid":1,"iid":7,"value":"v0.1.0"}]}
DEBUG 2024/01/06 19:29:22 logger.go:161: "GET http://Camera._hap._tcp.local/characteristics?id=1.7 HTTP/1.1" from 192.168.10.102:61524 - 200 56B in 2.507996ms
DEBUG 2024/01/06 19:29:24 loopback.go:72: ffmpeg version 4.3.6-0+deb11u1+rpt5 Copyright (c) 2000-2023 the FFmpeg developers
DEBUG 2024/01/06 19:29:24 loopback.go:72:   built with gcc 10 (Raspbian 10.2.1-6+rpi1)
DEBUG 2024/01/06 19:29:24 loopback.go:72:   configuration: --prefix=/usr --extra-version=0+deb11u1+rpt5 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libavutil      56. 51.100 / 56. 51.100
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libavcodec     58. 91.100 / 58. 91.100
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libavformat    58. 45.100 / 58. 45.100
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libavdevice    58. 10.100 / 58. 10.100
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libavfilter     7. 85.100 /  7. 85.100
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libavresample   4.  0.  0 /  4.  0.  0
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libswscale      5.  7.100 /  5.  7.100
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libswresample   3.  7.100 /  3.  7.100
DEBUG 2024/01/06 19:29:24 loopback.go:72:   libpostproc    55.  7.100 / 55.  7.100
DEBUG 2024/01/06 19:29:26 loopback.go:72: Input #0, video4linux2,v4l2, from '/dev/video0':
DEBUG 2024/01/06 19:29:26 loopback.go:72:   Duration: N/A, start: 148.728301, bitrate: 110592 kb/s
DEBUG 2024/01/06 19:29:26 loopback.go:72:     Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x360, 110592 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
DEBUG 2024/01/06 19:29:26 loopback.go:72: [video4linux2,v4l2 @ 0xa973d0] Unable to open V4L2 device '/dev/video99'
DEBUG 2024/01/06 19:29:26 loopback.go:72: Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
DEBUG 2024/01/06 19:29:26 loopback.go:72: Stream mapping:
DEBUG 2024/01/06 19:29:26 loopback.go:72:   Stream #0:0 -> #0:0 (copy)
DEBUG 2024/01/06 19:29:26 loopback.go:72:     Last message repeated 1 times
INFO 2024/01/06 19:29:31 In both multicast query and multicast response messages, the Recursion Available bit MUST be zero on transmission. (RFC6762 18.7)
INFO 2024/01/06 19:29:31 In both multicast query and multicast response messages, the Recursion Available bit MUST be zero on transmission. (RFC6762 18.7)
DEBUG 2024/01/06 19:29:35 logger.go:161: "POST http://Camera._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.10.73:60228 - 200 140B in 40.070965ms
DEBUG 2024/01/06 19:29:35 logger.go:161: "POST http://Camera._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.10.73:60228 - 200 3B in 21.903527ms
DEBUG 2024/01/06 19:29:35 accessories.go:25: {"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"value":"Matthias Hochgatterer","format":"string"},{"iid":4,"type":"21","perms":["pr"],"value":"-","format":"string"},{"iid":5,"type":"23","perms":["pr"],"value":"Camera","format":"string"},{"iid":6,"type":"30","perms":["pr"],"value":"-","format":"string"},{"iid":7,"type":"52","perms":["pr"],"value":"v0.1.0","format":"string"}]},{"iid":8,"type":"111","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"value":false,"format":"bool"},{"iid":10,"type":"ACD9DFE7-948D-43D0-A205-D2F6F368541D","perms":["pr","ev"],"value":"eyJhc3NldHMiOltdfQ==","format":"tlv8"},{"iid":11,"type":"6A6C39F5-67F0-4BE1-BA9D-E56BD27C9606","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":12,"type":"3982EB69-1ECE-463E-96C6-E5A7DF2FA1CD","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":13,"type":"E8AEE54F-6E4B-46D8-85B2-FECE188FDB08","perms":["pw"],"description":"Take Snapshot","format":"bool"}]},{"iid":14,"type":"110","characteristics":[{"iid":15,"type":"114","perms":["pr"],"value":"AbYBAQACHQEBAAAAAQEBAAABAQICAQAAAAIBAQAAAgECAwEAAwsBAoAHAgI4BAMBHgAAAwsBAgAFAgLQAgMBHgAAAwsBAoACAgJoAQMBHgAAAwsBAuABAgIOAQMBHgAAAwsBAkABAgK0AAMBHgAAAwsBAgAFAgLAAwMBHgAAAwsBAgAEAgIAAwMBHgAAAwsBAoACAgLgAQMBHgAAAwsBAuABAgJoAQMBHgAAAwsBAkABAgLwAAMBDw==","format":"tlv8"},{"iid":16,"type":"115","perms":["pr"],"value":"AQ4BAQMCCQEBAQIBAAMBAgAAAQ4BAQICCQEBAQIBAAMBAQIBAA==","format":"tlv8"},{"iid":17,"type":"116","perms":["pr"],"value":"AgEA","format":"tlv8"},{"iid":18,"type":"117","perms":["pr","pw"],"value":"","format":"tlv8"},{"iid":19,"type":"120","perms":["pr","ev"],"value":"AQEA","format":"tlv8"},{"iid":20,"type":"118","perms":["pr","pw"],"value":"","format":"tlv8"}]}]}]}
DEBUG 2024/01/06 19:29:35 logger.go:161: "GET http://Camera._hap._tcp.local/accessories HTTP/1.1" from 192.168.10.73:60228 - 200 1833B in 9.881238ms
DEBUG 2024/01/06 19:29:35 main.go:136: {Type:image Width:1280 Height:720}
DEBUG 2024/01/06 19:29:35 main.go:177: snapshot 1280w x 720h
DEBUG 2024/01/06 19:29:39 loopback.go:87: Loopback failed to start
INFO 2024/01/06 19:29:39 ffmpeg.go:164: starting loopback failed: Loopback failed to start
ffmpeg version 4.3.6-0+deb11u1+rpt5 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 10 (Raspbian 10.2.1-6+rpi1)
  configuration: --prefix=/usr --extra-version=0+deb11u1+rpt5 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-mmal --enable-neon --enable-rpi --enable-v4l2-request --enable-libudev --enable-epoxy --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[video4linux2,v4l2 @ 0xfd1930] Cannot open video device /dev/video99: No such file or directory
/dev/video99: No such file or directory

Same problem here