{"id":13490926,"url":"https://github.com/rom1v/sndcpy","last_synced_at":"2025-05-15T03:08:34.280Z","repository":{"id":37745117,"uuid":"271093272","full_name":"rom1v/sndcpy","owner":"rom1v","description":"Android audio forwarding PoC (scrcpy, but for audio)","archived":false,"fork":false,"pushed_at":"2023-12-06T19:00:29.000Z","size":171,"stargazers_count":3383,"open_issues_count":178,"forks_count":308,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-05-07T18:05:02.224Z","etag":null,"topics":["android","audio","mirroring","scrcpy"],"latest_commit_sha":null,"homepage":"","language":"Java","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/rom1v.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-09T19:36:57.000Z","updated_at":"2025-05-07T09:42:38.000Z","dependencies_parsed_at":"2022-07-12T16:44:39.264Z","dependency_job_id":"d16f0b8f-d4f8-4603-b98e-e67947f65630","html_url":"https://github.com/rom1v/sndcpy","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.0625,"last_synced_commit":"92f5f47ca49187e30bfb0473771f3a913b4812ab"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom1v%2Fsndcpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom1v%2Fsndcpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom1v%2Fsndcpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rom1v%2Fsndcpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rom1v","download_url":"https://codeload.github.com/rom1v/sndcpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264771,"owners_count":22041794,"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":["android","audio","mirroring","scrcpy"],"created_at":"2024-07-31T19:00:52.116Z","updated_at":"2025-05-15T03:08:29.260Z","avatar_url":"https://github.com/rom1v.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# sndcpy (v1.1)\n\nThis tool forwards audio from an Android 10 device to the computer. It does not\nrequire any _root_ access. It works on _GNU/Linux_, _Windows_ and _macOS_.\n\nThe purpose is to enable [audio forwarding][issue14] while mirroring with\n[scrcpy]. However, it can be used independently.\n\n**Update: [scrcpy 2.0] now supports audio forwarding natively.**\n\n[issue14]: https://github.com/Genymobile/scrcpy/issues/14\n[scrcpy]: https://github.com/Genymobile/scrcpy\n[scrcpy 2.0]: https://blog.rom1v.com/2023/03/scrcpy-2-0-with-audio/\n\n## Note\n\nThis application is a proof-of-concept. But as explained below, many apps are\nrestricted and could not forward the audio.\n\n## Requirements\n\n - The Android device requires at least Android 10.\n - [VLC] must be installed on the computer.\n\n[vlc]: https://www.videolan.org/\n\n\n## Get the app\n\nDownload the latest release:\n\n - [`sndcpy-v1.1.zip`][release]  \n   \u003csub\u003eSHA-256: `b045320ddddbc5a237d6d95213c664f03b2f46ef8bbfcef91c2d95644ed42bbc`\u003c/sub\u003e\n - [`sndcpy-with-adb-windows-v1.1.zip`][release-adb]  \n   \u003csub\u003eSHA-256: `0b93c846f574df3f38f53eeee44b1a35b863a49465da8f5cd5b1b69a29305901`\u003c/sub\u003e\n\n_On Windows, for simplicity, take the second archive, which also contains\n`adb`._\n\n[release]: https://github.com/rom1v/sndcpy/releases/download/v1.1/sndcpy-v1.1.zip\n[release-adb]: https://github.com/rom1v/sndcpy/releases/download/v1.1/sndcpy-with-adb-windows-v1.1.zip\n\nAlternatively, you could [build the app][BUILD].\n\n[BUILD]: BUILD.md\n\n## Run the app\n\nPlug an Android 10 device with USB debugging enabled, and execute:\n\n```bash\n./sndcpy\n```\n\nIf several devices are connected (listed by `adb devices`):\n\n```bash\n./sndcpy \u003cserial\u003e  # replace \u003cserial\u003e by the device serial\n```\n\n_(omit `./` on Windows)_\n\nIt will install the app on the device and start forwarding audio.\n\nPress `Ctrl`+`c` in the terminal to stop (except on Windows, just disconnect the\ndevice or stop capture from the device notifications).\n\nVLC may print this error message once:\n\n```\nmain stream error: connection error: Connection refused\n```\n\nIt is \"expected\", just ignore it.\n\nThe sound continues to be played on the device. The volume can be adjusted\nindependently on the device and on the computer.\n\n## Uninstall\n\nTo uninstall the app from the device:\n\n```bash\nadb uninstall com.rom1v.sndcpy\n```\n\n## Apps restrictions\n\n`sndcpy` may only forward audio from apps which do not prevent audio\ncapture. The rules are detailed in [§capture policy][rules]:\n\n\u003e - By default, apps that target versions up to and including to Android 9.0 do\n\u003e   not permit playback capture. To enable it, include\n\u003e   `android:allowAudioPlaybackCapture=\"true\"` in the app's `manifest.xml` file.\n\u003e - By default, apps that target Android 10 (API level 29) or higher allow their\n\u003e   audio to be captured. To disable playback capture, include\n\u003e   `android:allowAudioPlaybackCapture=\"false\"` in the app's `manifest.xml`\n\u003e   file.\n\nSo some apps might need to be updated to support audio capture.\n\n[rules]: https://developer.android.com/guide/topics/media/playback-capture#capture_policy\n\n## Audio delay\n\nThis is just a proof-of-concept, so it's far from perfect.\n\nFor example, jitter may cause VLC to automatically increase its buffering,\ncausing an unacceptable delay:\n\n```\nmain input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 377 ms)\n```\n\nIn that case, just restart it.\n\n## Environment variables\n\nThe scripts [`sndcpy`](sndcpy) and [`sndcpy.bat`](sndcpy.bat) use some default\nvalues which can be overridden by environment variables.\n\n - `ADB`: the full path to the `adb` executable\n - `VLC`: the full path to the `vlc` executable\n - `SNDCPY_APK`: the full path to `sndcpy.apk`\n - `SNDCPY_PORT`: the local port to forward to communicate with the device\n\n\n## Blog post\n\n - [Audio forwarding on Android 10][blogpost]\n\n[blogpost]: https://blog.rom1v.com/2020/06/audio-forwarding-on-android-10/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2From1v%2Fsndcpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2From1v%2Fsndcpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2From1v%2Fsndcpy/lists"}