Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

configuration file set to avconv not looking for avconv #178

Closed
4 of 7 tasks
theraspb3rry opened this issue Oct 11, 2016 · 6 comments
Closed
4 of 7 tasks

configuration file set to avconv not looking for avconv #178

theraspb3rry opened this issue Oct 11, 2016 · 6 comments

Comments

@theraspb3rry
Copy link

theraspb3rry commented Oct 11, 2016

Before submitting this issue, please acknowledge that you have done the following:

  • I've at least skimmed through the README
  • I have checked that I am running the latest version of MumbleDJ (use mumbledj --version when starting the bot or use the MumbleDJ version command in Mumble)
  • I have searched through the existing issues to see if my issue has been answered already

What type of issue is this?

  • Bug report (encountered problems with MumbleDJ)
  • Feature request (request for a new functionality)
  • Question
  • Other:

Log output of bot with --debug flag (likely only for bug reports):

$ mumbledj --debug
INFO[0000] Checking for duplicate aliases...
INFO[0000] Performing startup checks...
INFO[0000] Checking for availability of services... num_services=3
WARN[0000] A startup check discovered an issue. The service will be disabled. error=No YouTube API key has been provided service=YouTube
WARN[0000] A startup check discovered an issue. The service will be disabled. error=No SoundCloud API key has been provided service=SoundCloud
INFO[0000] Checking YouTubeDL installation...
INFO[0000] Checking ffmpeg installation...
FATA[0000] ffmpeg is either not installed or is not discoverable in $PATH. If you would like to use avconv instead, change the defaults.player_command value in the configuration file.


Description of your issue:

I can't seem to get mumbledj to use avconv, I have edited the config file so it says to use avconv. I have tried directly referencing the config file with -c. I have a feeling it's not reading the configuration file correctly since the error is saying that ffmpeg is not installed, not sure if this is my fault or not.

--version MumbleDJ version v3.1.4
Debian 8.x with avconv version 11.8-6:11.8-1~deb8u1

Thanks for looking though my issue. :3

Config file:

# MumbleDJ
# By Matthieu Grieger
# Copyright (c) 2016 Matthieu Grieger (MIT License)
# config.yaml

api_keys:

    # YouTube API key.
    youtube: ""

    # SoundCloud API key.
    # NOTE: The API key is your client ID.
    soundcloud: ""


defaults:

    # Default comment to be applied to bot.
    # NOTE: If you do not want a comment by default, set to empty string ("").
    comment: "Hello! I am a bot. Type !help for a list of commands."

    # Default channel for the bot to enter upon connection.
    # NOTE: If you wish for the bot to connect to the root channel, set to empty string ("").
    channel: ""

    # Command to use to play audio files. The two supported choices are "ffmpeg" and "avconv".
    player_command: "avconv"


queue:

    # Ratio that must be met or exceeded to trigger a track skip.
    track_skip_ratio: 0.5

    # Ratio that must be met or exceeded to trigger a playlist skip.
    playlist_skip_ratio: 0.5

    # Maximum track duration in seconds. Set to 0 for unrestricted duration.
    max_track_duration: 0

    # Maximum tracks per playlist. Set to 0 for unrestricted playlists.
    max_tracks_per_playlist: 50

    # Is shuffling enabled when the bot starts?
    automatic_shuffle_on: false

    # Announce track information at the beginning of audio playback?
    announce_new_tracks: true


connection:

    # Address bot should attempt to connect to.
    address: "127.0.0.1"

    # Port bot should attempt to connect to.
    port: "64738"

    # Password for connecting to server.
    # NOTE: If no password, set to empty string ("").
    password: ""

    # Username for MumbleDJ.
    username: "MumbleDJ"

    # Filepath to user p12 file for authenticating as a registered user.
    # NOTE: If no p12 file is needed, set to empty string ("").
    user_p12: ""

    # Should the bot attempt an insecure connection?
    # An insecure connection does not verify the certificate of the server for
    # consistency. It is best to leave this on, but disable it if you are having
    # issues connecting to a server or are running multiple instances of MumbleDJ.
    insecure: false

    # Filepath to certificate file.
    # NOTE: If no certificate file is needed, set to empty string ("").
    cert: ""

    # Filepath to certificate key file.
    # NOTE: If no key is needed, set to empty string ("").
    key: ""

    # Access tokens to initialize the bot with, separated by commas.
    # NOTE: If no access tokens are needed, set to empty string ("").
    access_tokens: ""

    # Should the bot automatically attempt to retry connection to a server after disconnecting?
    retry_enabled: true

    # How many times should the bot attempt to reconnect to the server?
    retry_attempts: 10

    # How many seconds should the bot wait in-between connection retry attempts?
    retry_interval: 5


cache:

    # Cache songs as they are downloaded?
    enabled: false

    # Maximum total file size of cache directory in MiB.
    maximum_size: 512

    # Period of time that should elapse before a song is cleared from the cache, in hours.
    expire_time: 24

    # Period of time between each check of the cache for expired items, in minutes.
    check_interval: 5

    # Directory to store cached items. Environment variables are able to be used here.
    directory: "$HOME/.cache/mumbledj"


volume:

    # Default volume.
    default: 0.2

    # Lowest volume allowed.
    lowest: 0.01

    # Highest volume allowed.
    highest: 0.8


admins:

    # Enable admins?
    # NOTE: If this is set to false, any command can be executed by any user.
    enabled: true

    # List of admin names.
    # NOTE: It is recommended that the names in this list are registered on the
    # server so that imposters cannot execute admin commands.
    names:
        - "SuperUser"
        - "raspberry"
        - "raspberry|win"
        - "raspberry|l04"


commands:

    # Character used to designate commands from normal text messages.
    # NOTE: Only one character (the first) is used.
    prefix: "!"

    common_messages:
        no_tracks_error: "There are no tracks in the queue."
        caching_disabled_error: "Caching is currently disabled."

    # Below is a list of the commands supported by MumbleDJ. Each command has
    # three configurable options:
    # aliases: A list of names that can be used to execute the command.
    # is_admin: true = only admins can execute the command, false = anyone can execute the command.
    # description: Description shown for the command when the help command is executed.
    # messages: Various messages that may be sent as a text message from the command. Useful for translating
    #           strings to other languages. Do NOT remove strings that begin with "%" (such as "%s", "%d", etc.)
    #           as they substituted with runtime data. Removing these strings will cause the bot to misbehave.
    add:
        aliases:
            - "add"
            - "a"
        is_admin: false
        description: "Adds a track or playlist from a media site to the queue."
        messages:
            no_url_error: "A URL must be supplied with the add command."
            no_valid_tracks_error: "No valid tracks were found with the provided URL(s)."
            tracks_too_long_error: "Your track(s) were either too long or an error occurred while processing them. No track(s) have been added."
            one_track_added: "<b>%s</b> added <b>1</b> track to the queue:<br><i>%s</i> from %s"
            many_tracks_added: "<b>%s</b> added <b>%d</b> tracks to the queue."
            num_tracks_too_long: "<br><b>%d</b> tracks could not be added due to error or because they are too long."

    addnext:
        aliases:
            - "addnext"
            - "an"
        is_admin: true
        description: "Adds a track or playlist from a media site as the next item in the queue."
        # addnext uses the messages defined for add.

    cachesize:
        aliases:
            - "cachesize"
            - "cs"
        is_admin: true
        description: "Outputs the file size of the cache in MiB if caching is enabled."
        messages:
            current_size: "The current size of the cache is <b>%.2v MiB</b>."

    currenttrack:
        aliases:
            - "currenttrack"
            - "currentsong"
            - "current"
        is_admin: false
        description: "Outputs information about the current track in the queue if one exists."
        messages:
            current_track: "The current track is <i>%s</i>, added by <b>%s</b>."

    forceskip:
        aliases:
            - "forceskip"
            - "fs"
        is_admin: true
        description: "Immediately skips the current track."
        messages:
            track_skipped: "The current track has been forcibly skipped by <b>%s</b>."

    forceskipplaylist:
        aliases:
            - "forceskipplaylist"
            - "fsp"
        is_admin: true
        description: "Immediately skips the current playlist."
        messages:
            no_playlist_error: "The current track is not part of a playlist."
            playlist_skipped: "The current playlist has been forcibly skipped by <b>%s</b>."

    help:
        aliases:
            - "help"
            - "h"
        is_admin: false
        description: "Outputs this list of commands."
        messages:
            commands_header: "<br><b>Commands:</b><br>"
            admin_commands_header: "<br><b>Admin Commands:</b><br>"

    joinme:
        aliases:
            - "joinme"
            - "join"
        is_admin: true
        description: "Moves MumbleDJ into your current channel if not playing audio to someone else."
        messages:
            others_are_listening_error: "Users in another channel are listening to me."
            in_your_channel: "I am now in your channel!"

    kill:
        aliases:
            - "kill"
            - "k"
        is_admin: true
        description: "Stops the bot and cleans its cache directory."

    listtracks:
        aliases:
            - "listtracks"
            - "listsongs"
            - "list"
            - "l"
        is_admin: false
        description: "Outputs a list of the tracks currently in the queue."
        messages:
            invalid_integer_error: "An invalid integer was supplied."
            track_listing: "<b>%d</b>: <i>%s</i>, added by <b>%s</b>.<br>"

    move:
        aliases:
            - "move"
            - "m"
        is_admin: true
        description: "Moves the bot into the Mumble channel provided via argument."
        messages:
            no_channel_provided_error: "A destination channel must be supplied to move the bot."
            channel_doesnt_exist_error: "The provided channel does not exist."
            move_successful: "You have successfully moved the bot to <b>%s</b>." 

    nexttrack:
        aliases:
            - "nexttrack"
            - "nextsong"
            - "next"
        is_admin: false
        description: "Outputs information about the next track in the queue if one exists."
        messages:
            current_track_only_error: "The current track is the only track in the queue."
            next_track: "The next track is <i>%s</i>, added by <b>%s</b>."

    numcached:
        aliases:
            - "numcached"
            - "nc"
        is_admin: true
        description: "Outputs the number of tracks cached on disk if caching is enabled."
        messages:
            num_cached: "There are currently <b>%d</b> items stored in the cache."

    numtracks:
        aliases:
            - "numtracks"
            - "numsongs"
            - "nt"
        is_admin: false
        description: "Outputs the number of tracks currently in the queue."
        messages:
            one_track: "There is currently <b>1</b> track in the queue."
            plural_tracks: "There are currently <b>%d</b> tracks in the queue."

    pause:
        aliases:
            - "pause"
        is_admin: false
        description: "Pauses audio playback."
        messages:
            no_audio_error: "Either the audio is already paused, or there are no tracks in the queue."
            paused: "<b>%s</b> has paused audio playback."

    register:
        aliases:
            - "register"
            - "reg"
        is_admin: true
        description: "Registers the bot on the server."
        messages:
            already_registered_error: "I am already registered on the server."
            registered: "I am now registered on the server."

    reload:
        aliases:
            - "reload"
            - "r"
        is_admin: true
        description: "Reloads the configuration file."
        messages:
            reloaded: "The configuration file has been successfully reloaded."

    reset:
        aliases:
            - "reset"
            - "re"
        is_admin: true
        description: "Resets the queue by removing all queue items."
        messages:
            queue_reset: "<b>%s</b> has reset the queue."

    resume:
        aliases:
            - "resume"
        is_admin: false
        description: "Resumes audio playback."
        messages:
            audio_error: "Either the audio is already playing, or there are no tracks in the queue."
            resumed: "<b>%s</b> has resumed audio playback."

    setcomment:
        aliases:
            - "setcomment"
            - "comment"
            - "sc"
        is_admin: true
        description: "Sets the comment displayed next to MumbleDJ's username in Mumble."
        messages:
            comment_removed: "The comment for the bot has been successfully removed."
            comment_changed: "The comment for the bot has been successfully changed to the following: %s"

    shuffle:
        aliases:
            - "shuffle"
            - "shuf"
            - "sh"
        is_admin: true
        description: "Randomizes the tracks currently in the queue."
        messages:
            not_enough_tracks_error: "There are not enough tracks in the queue to execute a shuffle."
            shuffled: "The audio queue has been shuffled."

    skip:
        aliases:
            - "skip"
            - "s"
        is_admin: false
        description: "Places a vote to skip the current track."
        messages:
            already_voted_error: "You have already voted to skip this track."
            voted: "<b>%s</b> has voted to skip the current track."

    skipplaylist:
        aliases:
            - "skipplaylist"
            - "sp"
        is_admin: false
        description: "Places a vote to skip the current playlist."
        messages:
            no_playlist_error: "The current track is not part of a playlist."
            already_voted_error: "You have already voted to skip this playlist."
            voted: "<b>%s</b> has voted to skip the current playlist."

    toggleshuffle:
        aliases:
            - "toggleshuffle"
            - "toggleshuf"
            - "togshuf"
            - "tsh"
        is_admin: true
        description: "Toggles automatic track shuffling on/off."
        messages:
            toggled_off: "Automatic shuffling has been toggled off."
            toggled_on: "Automatic shuffling has been toggled on."


    version:
        aliases:
            - "version"
            - "v"
        is_admin: false
        description: "Outputs the current version of MumbleDJ."
        messages:
            version: "MumbleDJ version: <b>%s</b>"

    volume:
        aliases:
            - "volume"
            - "vol"
        is_admin: false
        description: "Changes the volume if an argument is provided, outputs the current volume otherwise."
        messages:
            parsing_error: "The requested volume could not be parsed."
            out_of_range_error: "Volumes must be between the values <b>%.2f</b> and <b>%.2f</b>."
            current_volume: "The current volume is <b>%.2f</b>."
            volume_changed: "<b>%s</b> has changed the volume to <b>%.2f</b>."
@matthieugrieger
Copy link
Owner

I removed the link to your paste and included it inline as you left your server address and port in there. I removed it to make sure no random people connect to your server. :)

An easy way to test if the configuration file is being read properly is to change some other configuration value (the easiest would probably be a command's aliases or something), and see if those changes are reflected when the bot is running. Try that and let me know what happens.

@theraspb3rry
Copy link
Author

ah, its a local IP anyway tis why I didn't change it.

The bot doesn't start up or even join to my server, just crashes there when it cant find ffmpeg. Not sure if I'm missing a argument that forces a startup.

@matthieugrieger
Copy link
Owner

Ah, I see your point. The bot closes right after it discovers that ffmpeg isn't available on your system.

What happens if you launch the bot with the flag --defaults.player_command="avconv"?

@theraspb3rry
Copy link
Author

All I get is Incorrect Usage.and the help page.

I have a feeling I have mucked some build steps up, the build process wasn't that smooth for me, I have a feeling it was because I set paths wrong or something similar to that.

I will try rebuilding to get the desired effect.

@theraspb3rry
Copy link
Author

Looks like I was mucking up the build steps, sorry for wasting your time D:

Just for future reference: I was copying the files from the git folder to my GO source folder instead of just exporting the path and I imagine that ended up having the make file not properly process all the source files.

I have it joining my server now reading the configuration file correctly, thanks for your help though. Looks like a great project.

@matthieugrieger
Copy link
Owner

Ah, that makes sense. Glad you got it working!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants