Hi @dmp, sadly as you already figurate out datarate want a BytesValue, which is not yet implemented in the maxon API (as it's been said, currently the python maxon API is still on progress and they are some flaws or missings class like this one, which will be fixed in futures release).
And I'm afraid there is no workaround for it except switching to C++.
With that said. For all other parameters, maxon API also introduces some new types like maxon.Int (which point to maxon.Int64 if available or maxon.Int32).
According your issue with custom samplerate and audio kilobitrate, only few values are accepted.
MAXON_ATTRIBUTE(Int, AUDIO_SAMPLERATE, "net.maxon.mediasession.mf.export.audio.samplerate",
RESOURCE_DEFINE(ENUM_32000, 32000)
RESOURCE_DEFINE(ENUM_44100, 44100)
RESOURCE_DEFINE(ENUM_48000, 48000));
MAXON_ATTRIBUTE(Int, AUDIO_KILOBITRATE, "net.maxon.mediasession.mf.export.audio.kilobitrate",
RESOURCE_DEFINE(ENUM_96, 96)
RESOURCE_DEFINE(ENUM_112, 112)
RESOURCE_DEFINE(ENUM_128, 128)
RESOURCE_DEFINE(ENUM_160, 160)
RESOURCE_DEFINE(ENUM_192, 192)
RESOURCE_DEFINE(ENUM_224, 224)
RESOURCE_DEFINE(ENUM_256, 256)
RESOURCE_DEFINE(ENUM_320, 320));
If you have any question left, please let me know.
Cheers,
Maxime.