{"id":2912,"date":"2021-01-11T19:44:58","date_gmt":"2021-01-11T10:44:58","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=2912"},"modified":"2021-01-11T19:44:58","modified_gmt":"2021-01-11T10:44:58","slug":"how-to-name-video-devices-created-with-the-v4l2loopback-module","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2021\/01\/11\/how-to-name-video-devices-created-with-the-v4l2loopback-module\/","title":{"rendered":"v4l2loopback\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u4f5c\u3089\u308c\u308b\u30d3\u30c7\u30aa\u30c7\u30d0\u30a4\u30b9\u3078\u306e\u540d\u524d\u306e\u4ed8\u3051\u65b9"},"content":{"rendered":"<div class=\"paragraph\">\n<p><code>v4l2loopback<\/code> module\u3092\u5229\u7528\u3057\u3066\u4eee\u60f3\u30ab\u30e1\u30e9\u306a\u3069\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u8907\u6570\u306e\u30c7\u30d0\u30a4\u30b9\u306b\u3057\u305f\u308a\uff0c\u305d\u308c\u305e\u308c\u306b\u30c7\u30d0\u30a4\u30b9\u306b\u540d\u524d\u3092\u3064\u3051\u305f\u308a\u51fa\u6765\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"quoteblock\">\n<div class=\"title\"><a href=\"https:\/\/github.com\/umlaeute\/v4l2loopback\/blob\/f55da057b8c1f6d1c7a5c57feeadbbf532058e59\/README.md\" class=\"bare\">https:\/\/github.com\/umlaeute\/v4l2loopback\/blob\/f55da057b8c1f6d1c7a5c57feeadbbf532058e59\/README.md<\/a> \u3088\u308a<\/div>\n<blockquote>\n<div class=\"paragraph\">\n<p>If you need several independent loopback devices, you can pass the &#8220;devices&#8221; option, when loading the module; e.g.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p># modprobe v4l2loopback devices=4<br \/>\nWill give you 4 loopback devices (e.g. \/dev\/video1 \u2026\u200b \/dev\/video5)<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>You can also specify the device IDs manually; e.g.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p># modprobe v4l2loopback video_nr=3,4,7<br \/>\nWill create 3 devices (\/dev\/video3, \/dev\/video4 &amp; \/dev\/video7)<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p># modprobe v4l2loopback video_nr=3,4,7 card_label=&#8221;device number 3&#8243;,&#8221;the number four&#8221;,&#8221;the last one&#8221;<br \/>\nWill create 3 devices with the card names passed as the second parameter:<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\/dev\/video3 \u2192 device number 3<br \/>\n\/dev\/video4 \u2192 the number four<br \/>\n\/dev\/video7 \u2192 the last one<\/p>\n<\/div>\n<\/blockquote>\n<\/div>\n<div class=\"paragraph\">\n<p>\u304a\u624b\u672c\u901a\u308a\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u547c\u3073\u51fa\u3059\u3068\uff0c<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ sudo modprobe v4l2loopback video_nr=3,4,7 card_label=\"device number 3\",\"the number four\",\"the last\none\"<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u60f3\u5b9a\u901a\u308a\u306b\u8a2d\u5b9a\u3055\u308c\u307e\u3057\u305f\uff0e(\u6700\u5f8c\u306eIntegrated Camera\u306f\u5185\u8535\u30ab\u30e1\u30e9\u3067\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u306f\u7121\u95a2\u4fc2)<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ v4l2-ctl --list-devices\ndevice number 3\" (platform:v4l2loopback-000):\n        \/dev\/video3\n\n\"the number four\" (platform:v4l2loopback-001):\n        \/dev\/video4\n\n\"the last one (platform:v4l2loopback-002):\n        \/dev\/video7\n\nIntegrated Camera: Integrated C (usb-0000:00:1a.0-1.6):\n        \/dev\/video0\n        \/dev\/video1\n        \/dev\/media0<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3057\u304b\u3057\u3053\u306e\u8a2d\u5b9a\u3092\u6c38\u7d9a\u5316\u3057\u3088\u3046\u3068\uff0c<br \/>\n<code>\/etc\/modprobe.d\/v4l2loopback.conf<\/code><br \/>\n\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u3066\u3053\u306e\u8a2d\u5b9a\u3092\u66f8\u3044\u3066\u547c\u3073\u51fa\u3059\u3068\u304a\u304b\u3057\u306a\u3053\u3068\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ sudo rmmod v4l2loopback <b class=\"conum\">(1)<\/b>\n$ echo 'options v4l2loopback video_nr=3,4,7 card_label=\"device number 3\",\"the number four\",\"the last one\"' | sudo tee \/etc\/modprobe.d\/v4l2loopback.conf <b class=\"conum\">(2)<\/b>\noptions v4l2loopback video_nr=3,4,7 card_label=\"device number 3\",\"the number four\",\"the last one\"\n$ sudo modprobe -v v4l2loopback <b class=\"conum\">(3)<\/b>\ninsmod \/lib\/modules\/5.10.0-1-amd64\/updates\/dkms\/v4l2loopback.ko video_nr=3,4,7 card_label=\"device number 3\",\"the number four\",\"the last one\"\n$ v4l2-ctl --list-devices | grep v4l2loopback -A1 <b class=\"conum\">(4)<\/b>\ndevice number 3\" (platform:v4l2loopback-000):\n        \/dev\/video3\n--\n\"the number four\" (platform:v4l2loopback-001):\n        \/dev\/video4\n--\n\"the last one (platform:v4l2loopback-002):\n        \/dev\/video7<\/pre>\n<\/div>\n<\/div>\n<div class=\"colist arabic\">\n<ol>\n<li>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a2\u30f3\u30ed\u30fc\u30c9<\/li>\n<li>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3078\u66f8\u304d\u8fbc\u307f<\/li>\n<li>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u518d\u8aad\u8fbc<\/li>\n<li>\u30c7\u30d0\u30a4\u30b9\u540d\u306e\u78ba\u8a8d<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u6271\u3044\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u3088\u3046\u3067\u3059\uff0e\u66f4\u306b\u540d\u524d\u81ea\u4f53\u306b\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u304c\u542b\u307e\u308c\u3066\u3057\u307e\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3068\u308a\u3042\u3048\u305a\u5168\u4f53\u30921\u30bb\u30c3\u30c8\u306e\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u56f2\u3080\u3068\u5927\u4e08\u592b\u306a\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ echo 'options v4l2loopback video_nr=3,4,7 card_label=\"device number 3,the number four,the last one\"' | sudo tee \/etc\/modprobe.d\/v4l2loopback.conf\noptions v4l2loopback video_nr=3,4,7 card_label=\"device number 3,the number four,the last one\"\n$ sudo modprobe -v v4l2loopback\ninsmod \/lib\/modules\/5.10.0-1-amd64\/updates\/dkms\/v4l2loopback.ko video_nr=3,4,7 card_label=\"device number 3,the number four,the last one\"\n$ v4l2-ctl --list-devices | grep v4l2loopback -A1\ndevice number 3 (platform:v4l2loopback-000):\n        \/dev\/video3\n--\nthe number four (platform:v4l2loopback-001):\n        \/dev\/video4\n--\nthe last one (platform:v4l2loopback-002):\n        \/dev\/video7<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3061\u306a\u307f\u306b\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u306a\u3057\u3060\u3068\u3053\u3046\u306a\u308a\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ sudo modprobe -v v4l2loopback\ninsmod \/lib\/modules\/5.10.0-1-amd64\/updates\/dkms\/v4l2loopback.ko video_nr=3,4,7 card_label=device number 3,the number four,the last one\n$ v4l2-ctl --list-devices | grep v4l2loopback -A1\ndevice (platform:v4l2loopback-000):\n        \/dev\/video3\n--\nDummy video device (0x0001) (platform:v4l2loopback-001):\n        \/dev\/video4\n--\nDummy video device (0x0002) (platform:v4l2loopback-002):\n        \/dev\/video7<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u6700\u8fd1\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f OBS Studio 26.1\u3067Linux\u7248, macOS\u7248\u306b\u3082\u4eee\u60f3\u30ab\u30e1\u30e9\u6a5f\u80fd\u304c\u5165\u308a\u307e\u3057\u305f\uff0e<br \/>\n\u3053\u308c\u3082 <code>v4l2loopback<\/code> \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\uff0c\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u3046\u307e\u304f\u52d5\u304b\u306a\u3044\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ dpkg-query -W v4l2loopback-* v4l-utils\nv4l-utils       1.20.0-2\nv4l2loopback-dkms       0.12.5-1\nv4l2loopback-modules\nv4l2loopback-utils      0.12.5-1\n$ lsb_release -dr\nDescription:    Debian GNU\/Linux bullseye\/sid\nRelease:        unstable\n$ uname -mv\n#1 SMP Debian 5.10.4-1 (2020-12-31) x86_64<\/pre>\n<\/div>\n<\/div>\n<p><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=matokensmeme-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B07QMKND9M&amp;linkId=f41df56771c723ba1a1f91e6a3e2e50d\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=matokensmeme-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B089KJXZVB&amp;linkId=ceba1947c444ab1ee0b23206ff64b678\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=matokensmeme-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B07VH3RGFJ&amp;linkId=391aaab22c8347bbfb2ba57c1fa7ae72\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>v4l2loopback module\u3092\u5229\u7528\u3057\u3066\u4eee\u60f3\u30ab\u30e1\u30e9\u306a\u3069\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\uff0e \u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u8907\u6570\u306e\u30c7\u30d0\u30a4\u30b9\u306b\u3057\u305f\u308a\uff0c\u305d\u308c\u305e\u308c\u306b\u30c7\u30d0\u30a4\u30b9\u306b\u540d\u524d\u3092\u3064\u3051\u305f\u308a\u51fa\u6765\u307e\u3059\uff0e https:\/\/g [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[7,6,199,1],"tags":[564,563,565],"class_list":["post-2912","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","category-sid","category-1","tag-obs-studio","tag-v4l2loopback","tag-vertualcamera"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=2912"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2912\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=2912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=2912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=2912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}