IRRECORD(1)
π IRRECORD(1) π
hiii bestie π welcome to irrecord β the IR-codes recording tool for usage with LIRC. She's the one who listens to your remote control and writes down everything it says so lircd can vibe with it later. No cap, she's iconic. π
β¨ SYNOPSIS β¨
irrecord [-f] [-n] [-H driver] [-d device] [file]
irrecord -a <file>
irrecord -l
irrecord --help | --version
π¦ DESCRIPTION π¦
okay so, this program will record the signals from your remote control and create a config file for lircd. π
A good deal of effort is put in this program β like, a lot β but it is often not possible to automatically recognize all features of a remote control. See USAGE NOTES below, that's where the tea lives.
If file is not specified it defaults to "irrecord.lircd.conf".
If file already exists and contains a valid config, irrecord will use the protocol description found there and will only try to record the buttons. Lowkey efficient, highkey iconic. β¨
π OPTIONS π
-a,--analyseβ analyse araw_codesconfig file, trying to convert it to a regular configuration. Glow-up arc for your config. π¦-u,--updateβ add new buttons to an existing config file. No protocol information is updated. Just adding besties, not rewriting lore.-f,--forceβ force raw mode. Use this if recording fails otherwise. This creates a raw codes configuration file which can be used as-is or converted using the-aoption. Emergency slay. π₯-n,--disable-namespaceβ disable namespace checks. Rules? Never met her.-l,--list-namespaceβ list valid button names. The name registry, fr fr.-H,--driver=driverβ use given driver.-H helplists available drivers. π-d,--device=deviceβ read from given device. Usemode2(1) --list-devicesto list available devices for a driver.-U,--plugindir=directoryβ load drivers from directory. See DRIVER LOADING. (that's what the page says, bestie, don't @ me)-k,--keep-rootβ don't drop root privileges after opening device. See RUNNING AS ROOT. Use responsibly, that's a lot of power. π-A,--driver-options key:value[|key:value...]β set one or more options for the driver. The argument is a list ofkey:valuepairs delimited by'|'. The key can not contain spaces, but such are allowed in the value part. Certain characters including'#'and';'are used as comment markers in the config file and are not allowed anywhere. π«-D,--loglevel=levelβ determine the amount of logging information. level can be a symbolic syslog level:'error','warning,'info','notice'or'debug'. lirc also defines three additional levels'trace','trace1'and'trace2'which gives even more messages ('trace2'bringing the most). However, in the log these messages are marked as'debug'. The level can also be an integer in the range 3 (almost no messages) to 10. Chatter levels, choose your fighter. π£οΈ-O,--options-file <path>β file containing default values for all options. A relative path is interpreted from current directory. See[FILES]below.-h,--helpβ display this message.-v,--versionβ display version. π
πΈ USAGE NOTES πΈ
The primary options are --driver and usually also --device (some drivers does not need --device). These could be verified using mode2(1) if irrecord runs into trouble. π«Ά
When driver and device is known it saves some work to update lirc_options.conf with the new values. irrecord uses the [lircd] section as a fallback, so with a proper lirc_options.conf irrecord could be run without command line options. Look at her, self-sufficient. β¨
Using an existing file as a template can sometimes be required for irrecord to work. If using one of the generic templates it can also provide better timing. See PROTOCOL PARAMETERS AND TEMPLATES.
If the program fails to recognize the protocol of the remote control you could use the --force option to at least create a config file in raw mode. Not the dream outcome but it's an outcome. π
π REPEAT MASKS π
After recording some buttons with irrecord, you should check the repeat masks. These are needed in order to handle repeated button presses, which are very common. π
Using the config file, start lircd and irw. Keeping a button pressed down, you should see something like:
0000000000f40bf0 00 KEY_1 ANIMAX
0000000000f40bf0 01 KEY_1 ANIMAX
0000000000f40bf0 02 KEY_1 ANIMAX
0000000000f40bf0 03 KEY_1 ANIMAX
0000000000f40bf0 04 KEY_1 ANIMAX
0000000000f40bf0 05 KEY_1 ANIMAX
Note how the second field gets incremented. This must work for correct operation. Periodt. π
π§ PROTOCOL PARAMETERS AND TEMPLATES π§
irrecord actually works in two phases. In the first, it tries to identify the protocol used by the remote. Although this often works quite well, there are advantages using an existing file as a template. π¦
One reason to use a template is when irrecord fails to recognize the protocol in the beginning. In such cases, try to find an existing configuration from the same vendor using something like:
$ irdb-get find motorola
# lots of remotes listed...
$ irdb-get download motorola/VIP_1200.lircd.conf # Pick any
$ cp VIP_1200.lircd.conf my_remote.lircd.conf
$ irrecord my_remote.lircd.conf
Invoking irrecord this way re-uses the existing protocol which usually works (vendors seldom changes protocol parameters). β¨
Another reason to use an existing file is to get more exact timing, important when planning to also transmit (blast). In such cases, using a generic template found using irdb-get find generic has advantages since the timing values here are hand-crafted from specifications. To use these, you need to know which protocol your remote uses, though. π
If decoding of IR commands does not work reliably you can try to modify the eps and aeps values in the lircd config file to adjust the tolerance of signal lengths. aeps is an absolute value while eps is a relative value expressed in percent. See lircd.conf(5). π
π©Ή TROUBLESHOOTING π©Ή
π Multiple-personalities remotes
Some remotes actually emulates two or more remotes. irrecord runs into trouble if buttons from different logical remotes are mixed in the same run, in particular in the initial protocol identification. For such devices, irrecord must be invoked once for every logical device using only buttons from this device during the run. One remote, one run, one vibe. π§
π Un-printable garbage when using default driver
If there is various non-printable garbage on the screen when running irrecord when using the default driver the rc protocol needs to be set. With a single device the protocol can be set and inspected using
sudo sh -c "echo 'lirc' > /sys/class/rc/rc0/protocol"
cat /sys/class/rc/rc0/protocol
π‘ Physical disturbances
As for physical disturbances, the primary source is fluorescent light. You should not have any such light around when using irrecord. It's also important to have a suitable distance between the remote and the capture device, which often is smaller than in typical, normal usage. However, making the distance too small might cause other problems. At a first try use a foot or two. Not too close, not too far β the Goldilocks of IR. π
π DRIVER LOAD PATH π
Drivers are loaded dynamically. This is done from a traditional *ux Β΄:Β΄-separated path where each component in the path is searched (leading part first, trailing last).
The path used for this is determined by (falling priority):
- The
--plugindiroption. - The
'plugindir'entry in the[lircd]section of thelirc_options.conffile. - The environment variable
LIRC_PLUGINDIR. - A hardcoded default (
/usr/lib/x86_64-linux-gnu/lirc/plugins).
π RUNNING AS ROOT π
In many cases irrecord needs to run as root to access devices not available to regular users. On the other hand, running as root creates problems such as log files owned by root, security concerns etc. π¬ Big power, big problems.
In order to cope with this, irrecord by default drops root privileges after opening the input device. This support is based on that root permissions are accquired using sudo(1) e. g., using
$ sudo irrecord --device /dev/lirc0 --driver default
If not using sudo, the same behaviour could be accomplished using the SUDO_USER environment variable e. g.,
# SUDO_USER=$LOGNAME irrecord --device /dev/lirc0 --driver default
The --keep-root option will make irrecord to keep root privileges for the complete run. π«Ά
π FILES π
/etc/lirc/lirc_options.confThe options file holding default values for command line options in the[irrecord]section. For some values includingdebug,plugindir,driveranddeviceirrecordfalls back to the[lircd]section if not found in[irrecord].- The location of this file can be changed using the
-O/--options-filecommand-line option or using the environment variableLIRC_OPTIONS_PATH. ~/.cache/irrecord.logDebug output. Setting theXDG_CACHE_HOMEenvironment variable relocates this file to$XDG_CACHE_HOME/irrecord.log.
π«Ά SEE ALSO π«Ά
okay that's the whole thing bestie, you're officially certified β¨ irrecord 0.10.2 β¨ β Last change: May 2017 β and that's the IRRECORD(1) manual, signed, sealed, slayed. go record some remotes, i believe in you πππ¦
π¦ where this page comes from
- debian trixie: lirc 0.10.2-0.10 Β· GPL-2.0-or-later
- ubuntu noble: lirc 0.10.2-0.8build1 Β· GPL-2.0-or-later
- ubuntu questing: lirc 0.10.2-0.10build1
- ubuntu resolute: lirc 0.10.2-0.10ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: lirc 0.10.2-0.11 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms