{"id":19517782,"url":"https://github.com/shaybox/mon2cam","last_synced_at":"2025-04-26T06:31:25.349Z","repository":{"id":35158037,"uuid":"186196384","full_name":"ShayBox/Mon2Cam","owner":"ShayBox","description":"Workaround for multi-monitor Discord screensharing","archived":true,"fork":false,"pushed_at":"2022-05-13T16:47:31.000Z","size":92,"stargazers_count":338,"open_issues_count":10,"forks_count":33,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-12T09:37:30.801Z","etag":null,"topics":["deno","discord","linux","pulseaudio","v4l2loopback","workaround","xrandr"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShayBox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-12T00:59:28.000Z","updated_at":"2024-12-07T20:34:21.000Z","dependencies_parsed_at":"2022-08-17T23:10:18.087Z","dependency_job_id":null,"html_url":"https://github.com/ShayBox/Mon2Cam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShayBox%2FMon2Cam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShayBox%2FMon2Cam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShayBox%2FMon2Cam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShayBox%2FMon2Cam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShayBox","download_url":"https://codeload.github.com/ShayBox/Mon2Cam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250944147,"owners_count":21511704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","discord","linux","pulseaudio","v4l2loopback","workaround","xrandr"],"created_at":"2024-11-11T00:06:24.664Z","updated_at":"2025-04-26T06:31:24.209Z","avatar_url":"https://github.com/ShayBox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mon2Cam\r\n\r\nFix for multi-monitor Discord screensharing\r\n\r\n## Dependencies:\r\n\r\n- [Deno]\r\n- [xrandr] (X11)\r\n- [ffmpeg] (X11) or [wf-recorder] (wlroots)\r\n- [v4l2loopback] 0.12+\r\n\r\nNote:\r\nUbuntu 18.04 and below does not provide v4l2loopback 0.12, if you use older versions of Ubuntu you will need to [compile from source](https://github.com/umlaeute/v4l2loopback#install)\r\n\r\n## Instructions:\r\n\r\n- Install [Deno]  ***DO NOT USE UBUNTU SNAP***\r\n- Run `curl -s https://raw.githubusercontent.com/ShayBox/Mon2Cam/master/install.sh | sh`\r\n- Open a new terminal and type `mon2cam`\r\n- Switch discord webcam\r\n\r\nYou can also use the [AUR] package which is a deno bundle and a desktop file\r\n\r\n```\r\nMon2Cam - Monitor 2 Camera\r\n\r\nMon2Cam [options] [value]\r\n\r\noptions:\r\n-h,  --help,       Show help\r\n-f,  --framerate,  Set framerate\r\n-d,  --device,     Set device number\r\n-m,  --monitor,    Set monitor number\r\n-r,  --resolution, Set output resolution (W:H)\r\n-vf, --vflip,      Vertically flip the camera\r\n-hf, --hflip,      Horizontally flip the camera\r\n-b,  --border,     Add border when scaling to avoid stretching\r\n-s,  --sound,      Create virtual sink and route sound into it\r\n-v,  --verbose,    Show verbose output\r\n\r\nTo find out more, visit https://github.com/shaybox/mon2cam\r\n```\r\n\r\n```\r\n0: 1920x1080\r\n1: 1366x768\r\n2: 1366x768\r\nWhich monitor?\r\n0\r\nINFO CTRL + C to stop\r\nINFO The screen will look mirrored for you, not others\r\n```\r\n\r\n![Screenshot](images/discord_webcam.png)\r\n\r\n## Audio routing\r\n\r\nThere is audio routing built into Mon2Cam, which you can use with the -s flag. It's interactive, so it's not hard to use, but keep in mind that it may still have bugs. Also, it probably introduces some latency, however this wasn't tested and is probably quite tiny. (I haven't noticed any difference.)\r\n\r\nMon2Cam will try to detect if discord is trying to record, and then switch it's input to the Mon2Cam combined sink, but you may have to do it manually. You should also disable echo cancellation, because discord will detect most audio as echo.\r\n\r\n![Screenshot_Pavucontrol](images/pavucontrol.png)\r\n\r\n[deno]: https://deno.land/\r\n[xrandr]: https://www.x.org/releases/X11R7.7/doc/man/man1/xrandr.1.xhtml\r\n[ffmpeg]: http://ffmpeg.org/\r\n[v4l2loopback]: https://github.com/umlaeute/v4l2loopback\r\n[aur]: https://aur.archlinux.org/packages/mon2cam-git/\r\n[wf-recorder]: https://github.com/ammen99/wf-recorder\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaybox%2Fmon2cam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaybox%2Fmon2cam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaybox%2Fmon2cam/lists"}