2015-08-24 03:11:13 +02:00
|
|
|
# dbus-soundrecorder
|
2015-08-26 21:45:59 +02:00
|
|
|
Records sound from Pulse Audio with ffmpeg while watching D-Bus to
|
|
|
|
determine tracks, song title, album, artist and other meta data
|
2015-08-25 19:53:54 +02:00
|
|
|
provided by the media player application via MPRIS D-Bus service.
|
|
|
|
|
2015-10-05 21:53:08 +02:00
|
|
|
When the next song starts, the recorder automatically starts recording
|
2015-08-26 21:45:59 +02:00
|
|
|
a new file and sets available meta data.
|
2015-08-25 19:53:54 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
```
|
|
|
|
dbus-soundrecorder record [options]
|
|
|
|
```
|
|
|
|
|
2015-08-26 21:52:10 +02:00
|
|
|
Here a simple example. First, get a list of your Pulse Audio sinks:
|
2015-08-25 19:53:54 +02:00
|
|
|
```
|
|
|
|
pactl list short sinks
|
|
|
|
```
|
|
|
|
|
|
|
|
You can also create a new virtual Pulse Audio sink:
|
|
|
|
```
|
|
|
|
pactl load-module module-null-sink sink_name=virtual1
|
|
|
|
```
|
|
|
|
In any case, you should ensure that the media player uses the sink (eg. using pavucontrol).
|
|
|
|
|
|
|
|
Then start the recorder. You need to specify the media player application and the sink:
|
|
|
|
```
|
2015-10-10 21:51:09 +02:00
|
|
|
dbus-soundrecorder record -a vlc -s virtual1.monitor -i "-sample_rate 44100" -o "-c:a libfdk_aac -vbr 4"
|
2015-08-25 19:53:54 +02:00
|
|
|
```
|
2015-10-23 23:21:17 +02:00
|
|
|
As you can see, it is also possible to specify options for ffmpeg. Input options can be specified
|
|
|
|
with *-i* and output options like audio codec and quality with *-o*.
|
|
|
|
|
|
|
|
However, input sink, output file and meta-data are provided by the recorder and shouldn't be specified.
|
2015-08-25 19:53:54 +02:00
|
|
|
|
|
|
|
For all available options, use the --help command.
|
|
|
|
|
2015-08-26 21:52:10 +02:00
|
|
|
After starting the recorder, start playing the songs you want to record. The recorder
|
|
|
|
should start ffmpeg automatically.
|
|
|
|
|
2015-10-23 23:21:17 +02:00
|
|
|
## Troubleshooting
|
|
|
|
* If you get *error, non monotone timestamps* and/or *This may result in incorrect timestamps in the output
|
|
|
|
file.*, try to add *-wallclock 0* to the ffmpeg input options.
|
|
|
|
|
2015-08-25 19:53:54 +02:00
|
|
|
## Build instructions
|
|
|
|
The application depends on the c++utilities library. It is built in the same way as c++utilities.
|
|
|
|
|
2021-07-03 20:03:43 +02:00
|
|
|
The following Qt modules are required (version 5.6 or higher): core dbus
|
2015-08-25 19:53:54 +02:00
|
|
|
|
2022-04-05 20:21:26 +02:00
|
|
|
## Copyright notice and license
|
|
|
|
Copyright © 2015-2022 Marius Kittler
|
|
|
|
|
2022-03-15 21:44:47 +01:00
|
|
|
All code is licensed under [GPL-2-or-later](LICENSE).
|