• 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 17
Release Audio Profiles (for Kodi 18 and later)
#91
(2020-08-09, 14:54)mblovell Wrote: (Would it be possible for auto-switching mode to switch back to the previous profile at the end of media playback?  This capability, unfortunately, wouldn't help with the stereo-vs-multi channel music setup, but it may be helpful in some scenarios.)
Sort of.  You can set a profile for the Kodi GUI, so anytime you exit back to the GUI you can have a specific profile. But that isn't quite "the previous" profile depending on what you were doing before you switched.
Reply
#92
(2020-08-09, 14:06)eldrik Wrote: Hi, 

stumbled over this perfect addon while searching for an audio switcher, one question can I switch through the profiles using kodi jsonrpc? And what would a json string look like?
Probably (that's the best answer I can give).

There is a JSONRPC call for ExecuteAddon:

https://kodi.wiki/view/JSON-RPC_API/v10#...ecuteAddon

You'll need to figure out how to send the extra parameter for "rotate through the audio profiles," which you can find in the Audio Profiles wiki:

https://kodi.wiki/view/Add-on:Audio_Prof...ng_Keymaps

The item after the comma in the RunScript command is the extra parameter you'd need to send.  I've never used the ExecuteAddon JSONRPC call, so I'm not sure exactly how that would be done.
Reply
#93
(2020-08-09, 20:54)pkscout Wrote:
(2020-08-09, 14:06)eldrik Wrote: Hi, 

stumbled over this perfect addon while searching for an audio switcher, one question can I switch through the profiles using kodi jsonrpc? And what would a json string look like?
Probably (that's the best answer I can give).

There is a JSONRPC call for ExecuteAddon:

https://kodi.wiki/view/JSON-RPC_API/v10#...ecuteAddon

You'll need to figure out how to send the extra parameter for "rotate through the audio profiles," which you can find in the Audio Profiles wiki:

https://kodi.wiki/view/Add-on:Audio_Prof...ng_Keymaps

The item after the comma in the RunScript command is the extra parameter you'd need to send.  I've never used the ExecuteAddon JSONRPC call, so I'm not sure exactly how that would be done.

figured it out 

I can switch to profile 1 via 

Code:
{"jsonrpc": "2.0", "id": 1, "method": "Addons.ExecuteAddon", "params": { "addonid": "script.audio.profiles", "params": ["1"] } }

and profile 2 via

Code:
{"jsonrpc": "2.0", "id": 1, "method": "Addons.ExecuteAddon", "params": { "addonid": "script.audio.profiles", "params": ["0"] } }
Regards
Eldrik
Reply
#94
Is it possible to switch (and save) CEC-settings from Kodi also with audio profiles?

I have set CEC to put my Odroid N2 in standby, when I switching of the TV. I want to listen to music via a bluetooth speaker connected to Kodi (CoreELEC and snapcast) without having the TV running.
Therefore I have 2 audio profiles, which are working great:
#1 for Movies, TVShows, PVR, Videos, etc. (Sound over HDMI -> TV)
#2 for Music (Sound over Bluetooth/Snapcast)

Now, when I'm listen to music, I have to leave my TV on, but it's not needed. If I turn it off, my Kodi-device is also turned off.
It would be nice, if this addon saves the CEC-config also and would set it corresponding to the profile.

Then I can have 2 CEC-settings:
#1 turns the device off when turning TV off -> audio profile #1 for videos
#2 keeps the device running of TV is turned off -> audio profile #2 for music

btw: The CEC-settings are in $KODI/userdata/peripheral_data/cec_CEC_Adapter.xml
Thx
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Reply
#95
(2020-08-18, 11:05)Solo0815 Wrote: Is it possible to switch (and save) CEC-settings from Kodi also with audio profiles?

I have set CEC to put my Odroid N2 in standby, when I switching of the TV. I want to listen to music via a bluetooth speaker connected to Kodi (CoreELEC and snapcast) without having the TV running.
Therefore I have 2 audio profiles, which are working great:
#1 for Movies, TVShows, PVR, Videos, etc. (Sound over HDMI -> TV)
#2 for Music (Sound over Bluetooth/Snapcast)

Now, when I'm listen to music, I have to leave my TV on, but it's not needed. If I turn it off, my Kodi-device is also turned off.
It would be nice, if this addon saves the CEC-config also and would set it corresponding to the profile.

Then I can have 2 CEC-settings:
#1 turns the device off when turning TV off -> audio profile #1 for videos
#2 keeps the device running of TV is turned off -> audio profile #2 for music

btw: The CEC-settings are in $KODI/userdata/peripheral_data/cec_CEC_Adapter.xml
Thx
It may very well be possible to save and change these settings, but at some point I have to decide where to draw the line between this being Audio Profiles and a generic profile switching app.  The more that gets added, the more complicated the addon gets to use, and it is already very complicated IMHO. So while I'm not going to outright no, I am saying probably not.
Reply
#96
Hi.

Is it possible to add an auto-switch option that detects the name of what's being played?

I listen to some YouTube live radio streams, and would like to upmix those to 5.1. There's currently no way to do that now, without also upmixing other stereo streams.
Reply
#97
(2020-09-09, 11:59)Vanguard88 Wrote: Hi.

Is it possible to add an auto-switch option that detects the name of what's being played?

I listen to some YouTube live radio streams, and would like to upmix those to 5.1. There's currently no way to do that now, without also upmixing other stereo streams.
Probably not.  In my experience from dealing with Artist Slideshow's "support" of streaming files, there are too many different ways a stream can be named (or not named at all) to make anything like that reliable.  The best thing I can suggest is to assign a key to the 5.1 set of options.  Then at least it's one keystroke (or remote press) away.
Reply
#98
Hi there,

Is it possible to add a "Bluetooth connected" option to the Auto Switch section?
I have a tv with ac3/dolby/dts decoder so I'm using KODI with passthrough mode most of the time, but in the evenings I have to put on the Bluetooth headphones usually.
(and there is no sound in passthrough mode with bluetooth).

I found another addon named Bluetooth Audio Device Changer that can change the audio device when connected, but nothing can do with all the other settings.

Regards
Reply
#99
(2020-11-24, 23:27)redbiro Wrote: Hi there,

Is it possible to add a "Bluetooth connected" option to the Auto Switch section?
I have a tv with ac3/dolby/dts decoder so I'm using KODI with passthrough mode most of the time, but in the evenings I have to put on the Bluetooth headphones usually.
(and there is no sound in passthrough mode with bluetooth).

I found another addon named Bluetooth Audio Device Changer that can change the audio device when connected, but nothing can do with all the other settings.

Regards
Unfortunately probably not. This addon isn't designed to look at the connection selected, it's designed to look at the audio stream and then select a profile based on that. Adding what you want would require an almost complete rewrite.  One thing you might do is set a hotkey to bring up the menu of connections. At least then if AP switches to a passthrough profile you can toggle it back easily.
Reply
Is it able to e.g. launch a script or batch file (windows 10) when stereo is played ? I want to switch my equalizer apo config

interresting for me is this feature: "option to automatically select a profile based on audio codec/number of audio channels used in stream"
Reply
(2020-12-02, 13:39)Gee11 Wrote: Is it able to e.g. launch a script or batch file (windows 10) when stereo is played ? I want to switch my equalizer apo config

interresting for me is this feature: "option to automatically select a profile based on audio codec/number of audio channels used in stream"

I've never used this so I am not sure if the profiles this creates are normal Kodi system ones or whether it's just something within the addon. If it creates and uses system profiles then you can use this https://kodi.wiki/view/Autoexec_Service#...g_profiles which allows you to run a script when a profile is loaded.
Reply
what is the pyton 3 (i only use Kodi Matrix) command for copying a text file froam a to b witch unasked autoverwrite ?

i simply want to do this:

if "audiochannels" = 2 then copy config_2ch.txt to /myFOLDER
elseif "audiochannels" > 2 then copy config_mch.txt to /myFOLDER
Reply
(2020-12-02, 13:39)Gee11 Wrote: Is it able to e.g. launch a script or batch file (windows 10) when stereo is played ? I want to switch my equalizer apo config

interresting for me is this feature: "option to automatically select a profile based on audio codec/number of audio channels used in stream"
Unfortunately, AP does not have the ability to launch a script. Launching an external script usually has to be done using calls that are not cross platform, or are insecure, or both.  As for your other question, here's a URL I found by doing an internet search for "python3 copy file."

https://www.geeksforgeeks.org/how-to-cop...n-python3/
Reply
my solution: i modified your "audioprofiles.py"

if channels:
if channels > 2:
channels_set = 'auto_multichannel'
# path where original file is located
sourcePath = "c:\\Program Files\\EqualizerAPO\\config\\mch.txt"
# path were a copy of file is needed
destinationPath = "c:\\Program Files\\EqualizerAPO\\config\\config.txt"
# call copyfile() method
shutil.copyfile(sourcePath, destinationPath)
else:
channels_set = 'auto_stereo'
# path where original file is located
sourcePath = "c:\\Program Files\\EqualizerAPO\\config\\2ch.txt"
# path were a copy of file is needed
destinationPath = "c:\\Program Files\\EqualizerAPO\\config\\config.txt"
# call copyfile() method
shutil.copyfile(sourcePath, destinationPath)
else:
channels_set = 'none'

now i can controll Equalizer APO thx

only problem: when i play music with Kodi it dosnt change the audio profile to stereo
Reply
Hi, I have a problem with auto-switching. Two profiles are set.
1. TV (HDMI)
2. 5.1 (Sound card in PC)

Profile set 1. TV as default at startup. The problem is as follows.

I turn on the PC => Start Kodi => AudioProfiles sets the profile 1. TV correctly, it even displays a change message = >> the sound does not come, there is no sound from the TV or other output ... then I go => Settings => System => One press down to Sound => Sound will start working without a problem without changing the sound output, just view the sound settings.

I tried to update all sound drivers, graphics card drivers, sound cards, install old drivers, official drivers from the manufacturer's website, download drivers using device manager, update Win, replace HDMI cable, reinstall Kodi, tested to version 17.6 - 18.9 - 19.0 BETA everywhere the same. Unfortunately, I did not find a solution anywhere, I started using AudioProfiles two weeks ago.

Windows 10-64bit
Reply
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 17

Logout Mark Read Team Forum Stats Members Help
Audio Profiles (for Kodi 18 and later)0