Skip to main content

recdroidvid

Monitor and record video from Android devices remotely, pulling, renaming, and optionally previewing the videos when recording stops. Has very basic integration capability with DAW software (Ardour is currently the default setting).

Currently only works over USB (via the ADB interface). Only tested with OpenCamera on Android, controlled from Linux. (Windows could work in principle, but there are various Linux-specific commands which would need to be replaced.) No attempt is made to unlock a locked phone.

Disclaimer: This is beta-level software that works for what I need it to do. It is, however, written fairly generally to be customizable.

Screenshot of the program being used to record music a performance (along with the Ardour DAW and Hydrogen drums):

[screenshot of recdroidvid in action]

Installation

The easiest way to install the basic program is to install from PyPI using pip:

pip install recdroidvid

Dependencies

The required and optional dependencies are described below.

scrcpy

The scrcpy program needs to be installed and set up to be runnable via USB. It functions as the computer-screen monitor for what is being recorded on the phone. (All the actual recording is done on the phone, however.) The program is available in many linux repos, or can be compiled from the scrcpy site at https://github.com/Genymobile/scrcpy.

On Ubuntu the repos are out of date as of 2026. The easiest way to install is to get the pre-compiled version from the scrcpy repo at https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md Download the tarball, untarzip it, and run the executable in the main dir:

scrcpy-linux-x86_64-v4.1/scrcpy

Installing via snap is also possible but the snap installs can be harder to get working and the packaged version of adb may or may not match your device. This worked at one point, but now my need more connect commands to work:

sudo snap install scrcpy
snap connect scrcpy:camera
sudo snap connect scrcpy:raw-usb # Required to use OTG mode.

Device setup for scrcpy

Setup requires that developer mode be activated on the mobile device to allow ADB commands via USB:

  • Go to Settings > About phone and tap the Build number at the bottom seven times to activate developer mode.

  • Then go to Settings > System > Advanced > Developer Options and turn on USB debugging.

  • Connect the mobile device via USB and authorize it on the Android notification.

See the scrcpy Github page for more information. Use scrcpy --help | more for information about the available options.

ffmpeg

The ffmpeg program is used to print out information about the pulled movies, as well as to optionally extract audio from the video files:

sudo apt install ffmpeg

previewing

Previewing by default assumes the mpv movie player is installed (though there is an option to set any movie player program from the command line or option file):

sudo apt install mpv

DAW transport synchronization

When the --sync-daw-transport-with-video-recording option is selected, recording in the DAW is started when video recording is detected on the phone, and the DAW transport is stopped when the video recording stops. With the --add-daw-mark-on-transport-start option a mark is also added at the start of each recording. The marks are named to match the start of the saved video names, such as rdv_03 or, with the --date-and-time-in-video-name option, rdv_03_2026-10-03. (The date in the video name is the date the video is pulled from the phone, so the two can differ by a day if a recording runs past midnight.)

By default the DAW is controlled by sending Open Sound Control (OSC) messages to Ardour with the oscsend program, which is in the liblo-tools package:

sudo apt install liblo-tools

The xdotool program is used to check that Ardour is running and to raise its windows when the --raise-daw-on-* options are selected:

sudo apt install xdotool

Enabling OSC in Ardour

OSC is not enabled in Ardour by default. To turn it on:

  1. Open Edit > Preferences and select the Control Surfaces page.

  2. In the lower Control Surfaces list, check the box next to Open Sound Control (OSC). In Ardour 9.7 and later the list is grouped by vendor and sorted alphabetically. The OSC entry is a top-level row with no vendor, so it appears just after the Novation group, where it can easily be mistaken for one of the Novation devices.

  3. The enabled entry then appears in the Active Surfaces list. Its Settings button shows the OSC settings, including the UDP port Ardour is listening on (3819 by default).

Ardour normally remembers this setting, but if OSC stops working check that it is still enabled.

See the Ardour manual’s OSC section for more information: https://manual.ardour.org/using-control-surfaces/controlling-ardour-with-osc/

The commands used are set by the --start-daw-recording-cmd, --stop-daw-transport-cmd, and --add-daw-mark-cmd options, so they can be changed (for example to use a different OSC port, or a different DAW). In the mark command the string RDV_MARK_NAME is replaced by the mark name.

Options and Customization

To see the command-line options, run recdroidvid --help | more. The output of that command follows. Note that any options can also be set in the config file ~/.recdroidvid_rc.py. The file will be imported and the strings on the list rdv_options will be used as the default command-line options. See the example config file.

This is the help command output:

usage: recdroidvid [-h] [--scrcpy-cmd CMD-STRING] [--numbering-start INTEGER]
                   [--loop] [--wait-loop] [--autorecord] [--preview-video]
                   [--preview-video-cmd CMD-STRING]
                   [--preview-video-cmd-jack CMD-STRING]
                   [--date-and-time-in-video-name]
                   [--sync-daw-transport-with-video-recording]
                   [--start-daw-recording-cmd CMD-STRING]
                   [--stop-daw-transport-cmd CMD-STRING]
                   [--add-daw-mark-on-transport-start]
                   [--add-daw-mark-cmd CMD-STRING]
                   [--raise-daw-on-camera-app-open]
                   [--raise-daw-on-transport-toggle]
                   [--raise-daw-to-top-cmd CMD-STRING]
                   [--is-daw-running-cmd CMD-STRING] [--audio-extract]
                   [--camera-save-dir DIRPATH]
                   [--camera-package-name PACKAGENAME]
                   [--config-conditional STRING] [--no-color]
                   [PREFIXSTRING]

Record a video on mobile via ADB and pull result. All config options can be
set in a file `.recdroidvid_rc.py`. The file is evaluated and the list
`rdv_options` in the file is used as the options list. See the example config
file.

positional arguments:
  PREFIXSTRING          The basename or prefix of the pulled video file.
                        Whether name or prefix depends on the method used to
                        record.

options:
  -h, --help            show this help message and exit
  --scrcpy-cmd CMD-STRING, -y CMD-STRING
                        The command, including arguments, to be used to launch
                        the scrcpy program. Otherwise a default version is
                        used with some common arguments. Note that the string
                        `--window-title=RDV_SCRCPY_TITLE` can be used to
                        substitute-in a more descriptive title for the window.
  --numbering-start INTEGER, -n INTEGER
                        The number at which to start numbering pulled videos.
                        The number is currently appended to the user-defined
                        prefix and defaults to 1. Allows for restarting and
                        continuing a naming sequence across invocations of the
                        program.
  --loop, -l            Loop the recording, querying between invocations of
                        `scrcpy` as to whether or not to continue. This allows
                        for shutting down the scrcpy display to save both
                        local CPU and remote device memory (videos are
                        downloaded and deleted from the device at the end of
                        each loop), but then restarting with the same options.
                        Video numbering (as included in the filename) is
                        automatically incremented over all the videos, across
                        loops.
  --wait-loop, -w       The '--loop' option always starts the scrcpy video
                        monitor immediately on the first loop. This option
                        delays the action until the user responds to a query.
                        This avoids the CPU cost of scrcpy if you are not
                        planning to start video recording right away. This
                        option implies the '--loop' option.
  --autorecord, -a      Automatically start recording when the scrcpy monitor
                        starts up.
  --preview-video, -p   Preview each video that is downloaded. Currently uses
                        the mpv program.
  --preview-video-cmd CMD-STRING
                        The command used to invoke a movie player to view the
                        preview. The default uses the mpv movie viewer. The
                        string 'RDV_PREVIEW_FILENAME', if present in the
                        command, will be replaced with the title of the video
                        being previewed.
  --preview-video-cmd-jack CMD-STRING
                        The command used to invoke a movie player to view the
                        preview when the jack audio system is detected to be
                        running. The default uses the mpv movie viewer. The
                        string 'RDV_PREVIEW_FILENAME', if present in the
                        command, will be replaced with the title of the video
                        being previewed.
  --date-and-time-in-video-name, -t
                        Include the date and time in the video names in a
                        readable format.
  --sync-daw-transport-with-video-recording, -s
                        Start the DAW transport when video recording is
                        detected on the mobile device. May increase CPU loads
                        on the computer and the mobile device.
  --start-daw-recording-cmd CMD-STRING
                        A system command to start DAW recording. Used when the
                        `--sync-daw-transport-with-video-recording` option is
                        chosen. The default uses oscsend to send an OSC
                        message to Ardour to run its `Transport/record-roll`
                        action.
  --stop-daw-transport-cmd CMD-STRING
                        A system command to stop the DAW transport. Used when
                        the `--sync-daw-transport-with-video-recording` option
                        is chosen. The default uses oscsend to send a
                        transport-stop OSC message to Ardour.
  --add-daw-mark-on-transport-start, -m
                        Whether to add a mark in the DAW when the transport
                        starts, to help in syncing with the video.
  --add-daw-mark-cmd CMD-STRING
                        A system command to add a mark to the DAW at the
                        playhead. The default uses oscsend to send an add-
                        marker OSC message to Ardour. The string
                        'RDV_MARK_NAME', if present in the command, is
                        replaced with a shell-quoted name for the mark, such
                        as `rdv_03_2026-10-03`, which matches the start of the
                        name the corresponding video will be saved as.
  --raise-daw-on-camera-app-open, -q
                        Raise the DAW to the top of the window stack when the
                        camara app is opened on the mobile device. Works well
                        when scrcpy is also passed the `--always-on-top`
                        option.
  --raise-daw-on-transport-toggle, -r
                        Raise the DAW to the top of the window stack whenever
                        the DAW transport is toggled by the `--sync-to-daw`
                        option. Works well when scrcpy is also passed the
                        `--always-on-top` option.
  --raise-daw-to-top-cmd CMD-STRING
                        A system command to raise the DAW windows to the top
                        of the window stack. Used when either of the
                        `--raise_daw_on_camera_app_open` or `--raise-daw-on-
                        transport-toggle` options are selected. The default
                        uses xdotool to activate any Ardour windows.
  --is-daw-running-cmd CMD-STRING
                        A system command to test if the DAW is actually
                        running. A zero return code means it is, and a nonzero
                        return code means it isn't.
  --audio-extract, -e   Extract a separate audio file (currently always a WAV
                        file) from each video.
  --camera-save-dir DIRPATH, -d DIRPATH
                        The directory on the remote device where the camera
                        app saves videos. Record a video and look at the
                        information about the video to find the path. Defaults
                        to the OpenCamera default save directory.
  --camera-package-name PACKAGENAME, -c PACKAGENAME
                        The Android package name of the camera app. Defaults
                        to "net.sourceforge.opencamera", the OpenCamera
                        package name. Look in the URL of the app's PlayStore
                        web site to find this string.
  --config-conditional STRING
                        The `.recdroidvid_rc.py` config file contains
                        interpreted Python code, so conditionals can be set
                        for different use-cases. This option allows one to set
                        a string value from the command line which can then be
                        used to choose a case in the config file. To set such
                        a variable, pass the value to this option. The default
                        value is the string "default". To access this
                        variable, use `from recdroidvid import
                        config_conditional` at the top of the config file.
  --no-color            Do not use color highlighting on the terminal output.

Metadata

Release files for recdroidvid 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recdroidvid 0.2.0
File Size Uploaded
recdroidvid-0.2.0.tar.gz 26.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for recdroidvid 0.2.0
File Interpreter ABI Platform
recdroidvid-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.8 kB

Release files / recdroidvid-0.2.0.tar.gz

Download URL recdroidvid-0.2.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
77cec01abe7be35891a26a2ac867ec3a032c403ca161fcf8c5be884ff0d34b74
BLAKE2b-256 checksum
How to use checksums
340539ad9a22f076157019830e05f44e2bb782bd551b6ee776fef9af7a6d4151
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / recdroidvid-0.2.0-py3-none-any.whl

Download URL recdroidvid-0.2.0-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9731e2f66177d576e98780236505ac770c94815abbbaf13378b39f2e971164a
BLAKE2b-256 checksum
How to use checksums
85eeda42b92e01184d6bfa7c93bcf2c7466fb7e983710e79b872a173966794ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.0

1 release file

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page