Skip to content
Snippets Groups Projects
frequently-asked-questions.md 6.34 KiB
Newer Older
  • Learn to ignore specific revisions
  • David Trattnig's avatar
    David Trattnig committed
    # Frequently Asked Questions
    
    <!-- TOC -->
    
    
    David Trattnig's avatar
    David Trattnig committed
    1. [Frequently Asked Questions](#frequently-asked-questions)
       1. [Which Audio Interface or Soundcard is compatible with Engine Core?](#which-audio-interface-or-soundcard-is-compatible-with-engine-core)
       2. [How can I find the audio output device IDs, required for settings in engine-core.ini?](#how-can-i-find-the-audio-output-device-ids-required-for-settings-in-engine-coreini)
       3. [I have configured an audio device in my `engine-core.ini` but still hear no sound](#i-have-configured-an-audio-device-in-my-engine-coreini-but-still-hear-no-sound)
       4. [I have configured an audio device in my `docker.engine-core.ini` but still hear no sound](#i-have-configured-an-audio-device-in-my-dockerengine-coreini-but-still-hear-no-sound)
    
    David Trattnig's avatar
    David Trattnig committed
       5. [I'm getting [clock.wallclock_alsa:2] Error when starting output lineout: Failure("Error while setting open_pcm: No such file or directory")!\*\*](#im-getting-clockwallclock_alsa2-error-when-starting-output-lineout-failureerror-while-setting-open_pcm-no-such-file-or-directory)
    
    David Trattnig's avatar
    David Trattnig committed
       6. [How to solve 'Error when starting output output_lineout_0: Failure("Error while setting open_pcm: Device or resource busy")!'?](#how-to-solve-error-when-starting-output-output_lineout_0-failureerror-while-setting-open_pcm-device-or-resource-busy)
       7. [How to avoid stutter, hangs, artifacts or in general glitchy sound?](#how-to-avoid-stutter-hangs-artifacts-or-in-general-glitchy-sound)
       8. [Are there any commands to directly control the playout-server for development, debugging or testing?](#are-there-any-commands-to-directly-control-the-playout-server-for-development-debugging-or-testing)
       9. [Read More](#read-more)
    
    David Trattnig's avatar
    David Trattnig committed
    
    <!-- /TOC -->
    
    ## Which Audio Interface or Soundcard is compatible with Engine Core?
    
    Basically any audio device which is supported by Linux Debian/Ubuntu and has ALSA, JACK or Pulse Audio support.
    
    
    David Trattnig's avatar
    David Trattnig committed
    ## How can I find the audio output device IDs, required for settings in engine-core.ini?
    
    - To see only the physically available sound cards: `cat /proc/asound/cards`
    - To see sound cards with all additional devices (e.g. HDMI): `aplay -l`
    - To see devices configured by ALSA with additional plugins: `aplay -L`
    - The default devices that should be used: `aplay -L | grep default`
    
    
    Check out the [Audio Device Configuration](docs/audio-device-configuration.md) page for more details on the input/output settings.
    
    ## I have configured an audio device in my `engine-core.ini` but still hear no sound
    
    To test if you device is able to output audio at all, independently from Engine Core, try executing `speaker-test`. Also checkout out the `-D` argument to test specific devices. If you system doesn't provided `speaker-test` you have to install or use your preferred way of testing also audio.
    
    David Trattnig's avatar
    David Trattnig committed
    
    
    ## I have configured an audio device in my `docker.engine-core.ini` but still hear no sound
    
    If you are running Engine Core using Docker, run the aforementioned `speaker-test` from within your docker container by perform following:
    
    1. Start Engine Core in debug mode using `./run.sh docker:debug`
    2. To login to your Docker container you can use the command `docker exec -it aura-engine-core bash`.
    3. Now run `speaker-test`. It that's working, you now know that your audio device is at least available from within Docker and you'll need to further check your Liquidsoap device configuration.
    4. Next you can run `liquidsoap tests/test_alsa_default.liq`. This is a basic script which tries to play the supplied MP3 using the default ALSA device.
    
    
    David Trattnig's avatar
    David Trattnig committed
    ## I'm getting [clock.wallclock_alsa:2] Error when starting output lineout: Failure("Error while setting open_pcm: No such file or directory")!\*\*
    
    David Trattnig's avatar
    David Trattnig committed
    Assure you have set the correct device ID. To do so check the aforementioned question. Check the audio interface configuration section in `engine-core.ini`. Verify if the default settings `input_device_0` and `output_device_0` are valid device IDs.
    
    David Trattnig's avatar
    David Trattnig committed
    In case your are _not_ running Engine Core within Docker, also check if your executing user (è.g. `engineuser`) belongs to the group `audio`.
    
    David Trattnig's avatar
    David Trattnig committed
    
    ## How to solve 'Error when starting output output_lineout_0: Failure("Error while setting open_pcm: Device or resource busy")!'?
    
    You probably have set a wrong or occupied device ID. The device could be reserved by another software using the ALSA sound system. Or you might be accessing a device using ALSA which is already assigned to the Pulse Audio sound system. Here it could help to [remove the device from PulseAudio](https://jamielinux.com/blog/tell-pulseaudio-to-ignore-a-usb-device-using-udev/) before accessing it.
    
    ## How to avoid stutter, hangs, artifacts or in general glitchy sound?
    
    
    David Trattnig's avatar
    David Trattnig committed
    This can have various reasons, but first of all it's good to check the `engine-core.log` logs. Also check your CPU usage. Lastly review the settings of your audio device.
    
    David Trattnig's avatar
    David Trattnig committed
    
    **Incorrect ALSA buffer settings**: If the ALSA settings provided by your system are not working cleanly the `engine-core.ini` settings provide to option to override parameters such as `alsa_buffer`. The correct settings are individual to the used soundcard but in general this is a tricky topic. In our case we had more success using PulseAudio or JACK instead. Recommendations are welcome.
    
    
    David Trattnig's avatar
    David Trattnig committed
    **These problems occur while having Icecast streaming enabled**: Try to reduce the quality of the stream, especially when you are experiencing hangs on the stream. Check your Icecast connection. Is it up and running? Maybe there is some authentication issue or an [Icecast limitation for max clients](ttps://github.com/savonet/liquidsoap/issues/524).
    
    David Trattnig's avatar
    David Trattnig committed
    
    **The hardware is hitting its limits**: Also check the relevant logs and the system utilization. Are there other processes using up the machines resources? You might even be hitting the performance limit of your hardware. Maybe using a realtime linux kernel could help too.
    
    
    ## Are there any commands to directly control the playout-server for development, debugging or testing?
    
    Connect to Liquidsoap via [Telnet](https://en.wikipedia.org/wiki/Telnet)
    
    
    `telnet 127.0.0.1 1234`
    
    
    List available commands
    
    
    
    List all available channels
    
    
    
    List all input channels connected to the mixer
    
    
    David Trattnig's avatar
    David Trattnig committed
    `mixer.inputs`
    
    
    Set the volume of mixer `input 0` to `100%`
    
    
    `mixer.volume 0 100`
    
    Push some audio file to the filesystem `in_queue_0`
    
    `in_queue_0.push /path/to/your/file.mp3`
    
    David Trattnig's avatar
    David Trattnig committed
    ## Read More
    
    - [Overview](/README.md)
    
    David Trattnig's avatar
    David Trattnig committed
    - [Frequently Asked Questions (FAQ)](docs/frequently-asked-questions.md)