multiple recorder-configs for recorder-qt

I’m having some trouble using the recorder-qt with other config files than the default.

I’m running

/usr/local/driveworks/tools/recorder-qt --config-file=/usr/local/driveworks/tools/config1.json

but I get the following output

nvidia@nvidia:/usr/local/driveworks/tools$ ./recorder-qt --config-file=/usr/local/driveworks/tools/recorder-config.json
User specific cache directory  /home/nvidia/.cache/1001/.dw/recorder  created
1510262852173465[E]: Could not write default config file: ./recorder-qt-config.json
1510262852174197[E]: Config file: /usr/local/driveworks/tools/recorder-config.json has no member 'configurations'
1510262852174515[F]: Cannot parse configuration file, quit

I’m basically using a copy of the default “record-config.json” file.

Try as root sudo /usr/local/driveworks/tools/recorder-qt --config-file=/usr/local/driveworks/tools/config1.json
There might also be something wrong in your config file. Can you share it?

Hello Samrustan,

I’m having the same issue, may you share the config file?

Thanks in advance,
Adrien

Hi Adrien,

I’m no longer using that particular recorder-qt config file.

If I remember correctly, there was simply a typo in the json syntax --which can be very annoying.

What issue are you having specifically?

-Sam

Hello Sam,

I’m using the original file recorder-qt-configuration for the app and i have the error: file.json has no member ‘configurations’: Cannot parse configuration file, quit

Thanks for your rely,

Adrien

Hi Adrian,

Apologies for the late reply, I missed the notification of your last message. The following output for a default config works for me.

{
    "_comments": [
        "'configurations' is an array of recorder configurations. 'name' is what appears in the application's 'Type' dropdown list.",
        "In order to start recorder on multiple devices simultaneously, add 'record-group' to the settings.",
        "For example:",
        "\"record-group\": {",
        "    \"name\": \"default-peer\"",
        "    \"master\": false",
        "}",
        "If the peer is a master, it needs to pass slaves the JSON configuration files needed.",
        "It is done by the `peer-info` array in `record-group` object as the following:",
        "\"record-group\": {",
        "    \"name\": \"default-peer\"",
        "    \"master\": true",
        "    \"peer-info\": [",
        "        {",
        "            \"name\": \"slave-peer-a\",",
        "            \"configurations\": [",
        "                {\"name\": \"default\", \"path\":\"${CONFIG_FILE_DIR}/slave-a-recorder-config.json\"}",
        "            ]",
        "        },",
        "        {",
        "            \"name\": \"slave-peer-b\",",
        "            \"configurations\": [",
        "                {\"name\": \"default\", \"path\":\"${CONFIG_FILE_DIR}/slave-b-recorder-config.json\"}",
        "            ]",
        "        }",
        "    ]",
        "}",
        "By default it creates multicast network transporter, but you can override by defining broadcast object.",
        "For example:",
        "\"record-group\": {",
        "    \"name\": \"default-peer\"",
        "    \"master\": false",
        "    \"broadcast\": {",
        "        \"preferred-ip\": \"192.168.1.1\" // Optional",
        "    }",
        "}",
        "In example above, \"// Optional\" means this field is optional.",
        "You can also specify group address and preferred IP for multicast transporter",
        "For example:",
        "\"record-group\": {",
        "    \"name\": \"default-peer\"",
        "    \"master\": false",
        "    \"multicast\": {",
        "        \"preferred-ip\": \"192.168.1.1\", // Optional",
        "        \"group-address\": \"239.127.12.15\" // Optional",
        "    }",
        "}",
        "Again, \"// Optional\" means fields are optional.",
        "",
        "Log levels are 'verbose', 'debug', 'info', 'warning', 'error', 'fatal'. 'verbose' is the default level.",
        "For example:",
        "    \"log-level\": \"verbose\"",
        "",
        "To execute some script as a recording pre-req (ex. MODS), you need to set 'pre-requisite-script'. For example:",
        "\"pre-requisite-script\": \"${APP_DIR}/scripts/bash/default-pre-requisite-script.sh\",",
        "",
        "By default, pre-requisite failure won't be failure. Change this value to false, if that is desired",
        "\"pre-requisite-override\": true,",
        "",
        "To execute some script right before recording starts, you need to set 'pre-record-script'. For example:",
        "\"pre-record-script\": \"${APP_DIR}/scripts/bash/default-pre-record-script.sh\",",
        "",
        "To execute some script right after record stopped, you need to set 'post-record-script'. For example:",
        "\"post-record-script\": \"${APP_DIR}/scripts/bash/default-post-record-script.sh\",",
        "",
        "Macro definitions in path:",
        "${APP_DIR}: application executable directory",
        "${CONFIG_FILE_DIR}: directory contains this config file"
    ],

    "vin": "150322",

    "configurations": [
        {"name":"default", "path":"${CONFIG_FILE_DIR}/recorder-config.json"}
    ]
}

And this is just simply the default config.

sudo ./recorder-qt

is all that is needed to generate the file. Note that it generates both a recorder-config.json and a recorder-qt-config.json

JSON files can be a little difficult to work with due to some of the syntax --brackets and spacing, etc.

-Sam

Hello sam,

Thanks for your answer, you’re right: the json file is automatically recreated if it isn’t in the folder but i still not able to record CANbus with this default config. I’m trying to resolve this problem by installing the new version of DriveWorks (1.2), i’ll keep this post updated when it will be installed.

And yes you’re right, JSON files are pretty hard to modify because of their syntax but to help you there is the website https://jsonlint.com/ where you can verify if your file is well written.

Thanks for the help, i’ll update this post in few days