•   
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 9
  •   
Release AUTOMATIC (and/or manual) AUDIO SWITCHER for different Audio Output
#46
(2014-12-15, 12:41)slainemcr Wrote: http://pastebin.com/7sza1CZM

(2014-12-14, 21:16)marv_el Wrote:
(2014-12-14, 14:06)slainemcr Wrote: Hi, thankx for great addon,this is exactly what I neet. But is there any chance to add switch for PVR (Live TV) not only for video/film and music/audio. When I switch from music to Live TV the output does not change to HDMI e.g.

xbmc/kodi shouldn't make any difference between live tv or any other video source. can you provide a debug log?

sorry, this debug log doesn't help me further. can you enable debug log in the xbmc settings and send the whole file. thanks.
for now the only thing you can do is to map a key for the manual switch.

(2014-12-22, 10:53)Solo0815 Wrote: I just tried this addon on Kodi RC3 on a RPi with HifiBerry Digi and it works, but here are a some bugs/feature requests:
1. switching from video to audio does not enable the audio-settings the first time. You have to stop and restart the audio to get the right audio-output device
2. Please add a Message on the screen "Audio Device changed to : xxxxxx (Music)" or "Video" so that the user knows, whats going on.
I'm using the Amber skin, tried with confluence: the same
3. maybe add a audioconfig.xml and videoconfig.xml to userdata, so that the user can see, what settings he applied.

Heres the Log for Nr. 1: http://sprunge.us/WeVV

hi,

1. that's the first time i hear of this behaviour. i haven't tested it yet on kodi. i saw that you use the dvdplayer for music as well. can you try another audio player and see if it works better?
2. i will add a setting to enable/disable a notification msg.
3. it's there, have a look in ...userdata/addon_data/script.audioswitch/ (they are called "device audio.cfg" and "device video.cfg". the "problem" is, that xbmc/kodi uses the internal names, so they seem a bit cryptic. afaik there's no way to get the names like in the xbmc/kodi settings with python/json.
Reply
#47
Hey all!

I´m running Kodi 14 final with plugin Version 0.1.1 and all is working fine. After a long time happy with it, i wanted to look for an update to switch manualy, but the link to dropbox isn't working.

So could someone tell me, where to download?
Reply
#48
(2015-01-08, 13:33)Smille Wrote: Hey all!

I´m running Kodi 14 final with plugin Version 0.1.1 and all is working fine. After a long time happy with it, i wanted to look for an update to switch manualy, but the link to dropbox isn't working.

So could someone tell me, where to download?

It works. Just click on the following address: https://www.dropbox.com/s/v1gvutur8l5hvp....0.2.3.zip

Cheers!
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
Reply
#49
Thank you and sorry, think it was ´my fault..
Reply
#50
Hello marv_el,

First of all, great job!!

Believe it or not… I also tried to create a similar add-on last year (May 2014).

Image

The source code is here: https://github.com/henricos/script.quick.audio.switch/ (you can check the commit dates)

It was working on Gotham but may need some adjustments on the addon.xml to work on Helix.

It is only a “manual” switcher but it was created to be “generic” (not only music/video scenario)

So, I’m writing here to publicly ask:

1) Do you mind if I release my add-on now? They are similar but not exactly the same. I can recommend using yours for automatic/music/video in my release

or

2) Are you interested in “merge” some functionalities from mine to create a more “generic” add-on ?

If you don’t want 1 and 2, I can still use mine only to myself. No problem!


Quote:If you want to know, here is my story (very similar to yours):

I’ve always wanted a script to switch audio settings with “one key press” and since I didn’t find any, I decided to write one myself (at least try to). I’ve never coded in python before and this seemed like a good challenge.

In my case, I only wanted to switch “manually” because most of the time I use HDMI (stereo) to TV and a few times I user SPDIF (multichannel) to my receiver. I know there are other users that constantly switch between HDMI and Headphones (Analog).

Basically, my idea was:

Step 1: The user configures audio “profiles” (initially 2 but it could be more) in the add-on settings using tabs that where “exact copies” of the audio settings page, with some additional fields like profile name and enable/disable.

Image

Step 2: The user runs the add-on using a command mapped to a key or from “Programs” section. The script automatically sets the audio with the next profile (cycling) and shows a notification with the name of the profile that was applied.

Although I managed to make it work, I was never satisfied with step 1. The thing is that to perfectly reproduce the audio setting GUI, I needed to dynamically enable/disable some items, based on values of other items. And there is no documentation on how this works. For example: if you choose an HDMI output, some items became enabled that are not enabled when the output is Analog. I had to hardcode this behavior based on tests but, since I don’t have all kinds of audio devices, I was not sure it was correct to all scenarios.

I also wanted to better document the code and finish translations… Then… many things happened after that and I never got any more time to work on the script and never shared it with anyone…

Comparing both solutions, here is what I think is better in each one:

Yours (script.audioswitch):
- Automatic switch (amazing!!)
- Can set volume
- Script “reads” current audio configuration to create config files

My addon (script.quick.audio.switch):
- Can be used in any scenario where the user wants to switch audio settings (more generic), not only music/video switching.
- User can “see” the settings of each profile

So, if you agree to merge our solutions, here is my suggestion:

Use the “generic profiles” approach to expand the use of the add-on to more scenarios and change the way the settings are saved. Instead of play a song and play a video, use the add-on settings

For example:

Create 4 profile tabs, where the user can name the profile, and with a button, “load” the current audio settings (instead of fill each item).

Then, on a general tab you can put all other settings and 3 of them could be:
- Default profile for music
- Default profile for video
- Default profile for navigation

And then the automatic service uses this information to switch between music/video



Again... this is just a suggestion.


Take care

Henrico
Reply
#51
Hi marvel and henricos!

I personally followed (and tried to help) the automathic switch script development since the beginning and I was not aware of this other one (sorry henricos!).

Just to say that I would be in favour of a merge...of course if the two "script's fathers" will agree!

Thanks in advance for any result guys!

And, of course, please consider my effort for the italian translation!
Light IMDb Ratings Update - Keep updated the IMDb ratings for your movies and TV shows.
In case you found useful my work, feel free to offer me a cappuccino!
Reply
#52
(2015-03-01, 15:14)henricos Wrote: Hello marv_el,

First of all, great job!!

Believe it or not… I also tried to create a similar add-on last year (May 2014).

Image

The source code is here: https://github.com/henricos/script.quick.audio.switch/ (you can check the commit dates)

It was working on Gotham but may need some adjustments on the addon.xml to work on Helix.

It is only a “manual” switcher but it was created to be “generic” (not only music/video scenario)

So, I’m writing here to publicly ask:

1) Do you mind if I release my add-on now? They are similar but not exactly the same. I can recommend using yours for automatic/music/video in my release

or

2) Are you interested in “merge” some functionalities from mine to create a more “generic” add-on ?

If you don’t want 1 and 2, I can still use mine only to myself. No problem!


Quote:If you want to know, here is my story (very similar to yours):

I’ve always wanted a script to switch audio settings with “one key press” and since I didn’t find any, I decided to write one myself (at least try to). I’ve never coded in python before and this seemed like a good challenge.

In my case, I only wanted to switch “manually” because most of the time I use HDMI (stereo) to TV and a few times I user SPDIF (multichannel) to my receiver. I know there are other users that constantly switch between HDMI and Headphones (Analog).

Basically, my idea was:

Step 1: The user configures audio “profiles” (initially 2 but it could be more) in the add-on settings using tabs that where “exact copies” of the audio settings page, with some additional fields like profile name and enable/disable.

Image

Step 2: The user runs the add-on using a command mapped to a key or from “Programs” section. The script automatically sets the audio with the next profile (cycling) and shows a notification with the name of the profile that was applied.

Although I managed to make it work, I was never satisfied with step 1. The thing is that to perfectly reproduce the audio setting GUI, I needed to dynamically enable/disable some items, based on values of other items. And there is no documentation on how this works. For example: if you choose an HDMI output, some items became enabled that are not enabled when the output is Analog. I had to hardcode this behavior based on tests but, since I don’t have all kinds of audio devices, I was not sure it was correct to all scenarios.

I also wanted to better document the code and finish translations… Then… many things happened after that and I never got any more time to work on the script and never shared it with anyone…

Comparing both solutions, here is what I think is better in each one:

Yours (script.audioswitch):
- Automatic switch (amazing!!)
- Can set volume
- Script “reads” current audio configuration to create config files

My addon (script.quick.audio.switch):
- Can be used in any scenario where the user wants to switch audio settings (more generic), not only music/video switching.
- User can “see” the settings of each profile

So, if you agree to merge our solutions, here is my suggestion:

Use the “generic profiles” approach to expand the use of the add-on to more scenarios and change the way the settings are saved. Instead of play a song and play a video, use the add-on settings

For example:

Create 4 profile tabs, where the user can name the profile, and with a button, “load” the current audio settings (instead of fill each item).

Then, on a general tab you can put all other settings and 3 of them could be:
- Default profile for music
- Default profile for video
- Default profile for navigation

And then the automatic service uses this information to switch between music/video



Again... this is just a suggestion.


Take care

Henrico

I'm searching for a switch to enable/disable passthroug on the fly (for my wife and son) so your script sounds great but i tried on kodi 15 beta and it doesn't install cause it ask for dependency

Or if someone could suggest a script
Reply
#53
(2015-03-02, 12:40)axlt2002 Wrote: I personally followed (and tried to help) the automathic switch script development since the beginning and I was not aware of this other one (sorry henricos!).

axlt2002,

I never released my script. That's why you were not aware Big Grin

(2015-03-03, 23:38)Roby77 Wrote: I'm searching for a switch to enable/disable passthroug on the fly (for my wife and son) so your script sounds great but i tried on kodi 15 beta and it doesn't install cause it ask for dependency

Or if someone could suggest a script

Roby77,

As I said, it was developed for XBMC Gotham (or Kodi 13). It's pretty easy to fix the dependencies problem but I'll wait to marv_el answer...

If I’m not mistaken (I never tested it), you may accomplish your task with marv_el script.

Try this:

1) Set you audio settings “with” pass-through
2) Play a music (this should save this settings as music config)
3) Set up you audio settings “without” pass-through
4) Play a video (this should save this settings as video config)
5) Map a key on your remote to run the script (see first post to better instructions)

Now, whenever you press this key, it should change between settings.

[]s
Henrico
Reply
#54
In the Meantime (lol thing that i searched for it for months and never found it) i tried this script 200081 (thread) and works perfectly

I will also try your suggest

Thank you
Reply
#55
(2015-03-04, 02:51)Roby77 Wrote: In the Meantime (lol thing that i searched for it for months and never found it) i tried this script 200081 (thread) and works perfectly

I will also try your suggest

Thank you

Wow!!! Looks like audio switching is a much-requested functionality. I didn’t knew this one.

I guess this ends my questioning.


There is no point for me to release another script that is very similar (in idea) to that “Audio Profle” add-on. Apparently marv_el already knew about that other one.

Sorry for the confusion..

Henrico
Reply
#56
Imho better to have more solutions than zero Big Grin
Reply
#57
(2015-03-01, 15:14)henricos Wrote: Hello marv_el,

First of all, great job!!

Believe it or not… I also tried to create a similar add-on last year (May 2014).

Image

The source code is here: https://github.com/henricos/script.quick.audio.switch/ (you can check the commit dates)

It was working on Gotham but may need some adjustments on the addon.xml to work on Helix.

It is only a “manual” switcher but it was created to be “generic” (not only music/video scenario)

So, I’m writing here to publicly ask:

1) Do you mind if I release my add-on now? They are similar but not exactly the same. I can recommend using yours for automatic/music/video in my release

or

2) Are you interested in “merge” some functionalities from mine to create a more “generic” add-on ?

If you don’t want 1 and 2, I can still use mine only to myself. No problem!


Quote:If you want to know, here is my story (very similar to yours):

I’ve always wanted a script to switch audio settings with “one key press” and since I didn’t find any, I decided to write one myself (at least try to). I’ve never coded in python before and this seemed like a good challenge.

In my case, I only wanted to switch “manually” because most of the time I use HDMI (stereo) to TV and a few times I user SPDIF (multichannel) to my receiver. I know there are other users that constantly switch between HDMI and Headphones (Analog).

Basically, my idea was:

Step 1: The user configures audio “profiles” (initially 2 but it could be more) in the add-on settings using tabs that where “exact copies” of the audio settings page, with some additional fields like profile name and enable/disable.

Image

Step 2: The user runs the add-on using a command mapped to a key or from “Programs” section. The script automatically sets the audio with the next profile (cycling) and shows a notification with the name of the profile that was applied.

Although I managed to make it work, I was never satisfied with step 1. The thing is that to perfectly reproduce the audio setting GUI, I needed to dynamically enable/disable some items, based on values of other items. And there is no documentation on how this works. For example: if you choose an HDMI output, some items became enabled that are not enabled when the output is Analog. I had to hardcode this behavior based on tests but, since I don’t have all kinds of audio devices, I was not sure it was correct to all scenarios.

I also wanted to better document the code and finish translations… Then… many things happened after that and I never got any more time to work on the script and never shared it with anyone…

Comparing both solutions, here is what I think is better in each one:

Yours (script.audioswitch):
- Automatic switch (amazing!!)
- Can set volume
- Script “reads” current audio configuration to create config files

My addon (script.quick.audio.switch):
- Can be used in any scenario where the user wants to switch audio settings (more generic), not only music/video switching.
- User can “see” the settings of each profile

So, if you agree to merge our solutions, here is my suggestion:

Use the “generic profiles” approach to expand the use of the add-on to more scenarios and change the way the settings are saved. Instead of play a song and play a video, use the add-on settings

For example:

Create 4 profile tabs, where the user can name the profile, and with a button, “load” the current audio settings (instead of fill each item).

Then, on a general tab you can put all other settings and 3 of them could be:
- Default profile for music
- Default profile for video
- Default profile for navigation

And then the automatic service uses this information to switch between music/video



Again... this is just a suggestion.


Take care

Henrico

hi henrico,

you don't need my permission if you want to release your addon ;-).
i appreciate your work and i think all solutions have their pros and cons. i am certainly gonna take a peek at your source how you manage to implement the device name in the settings.
so maybe, when i find the time, i will improve my addon by learning (and copying) from you. :-p

thanks for sharing your addon!
Reply
#58
Hi,
Thanks for this addon. Probably just what I need.
My setup: Raspberry pi B + hifberry digi with openelec . Want video sound normally go through HDMI. Music always through hifiberry digi. Sometimes I want to switch the video sound to go through hifiberry digi to have DTS/DD sound.

I only have the problem that I seem to get stuck in an endless loop in the setup.
I installed the addon and enabled the setup.
It asked me to do the settings for music and play a music file. That went well.
Then it asked me to do the same for video. Also went fine.
Then is asks me again to do it for music. etc, etc...

Just stopping the setup/restarting kodi seems to make audio switcher not to remember the settings.
Could use some help here. Thanks in advance
Reply
#59
(2015-04-27, 16:25)richardstam Wrote: Hi,
Thanks for this addon. Probably just what I need.
My setup: Raspberry pi B + hifberry digi with openelec . Want video sound normally go through HDMI. Music always through hifiberry digi. Sometimes I want to switch the video sound to go through hifiberry digi to have DTS/DD sound.

I only have the problem that I seem to get stuck in an endless loop in the setup.
I installed the addon and enabled the setup.
It asked me to do the settings for music and play a music file. That went well.
Then it asked me to do the same for video. Also went fine.
Then is asks me again to do it for music. etc, etc...

Just stopping the setup/restarting kodi seems to make audio switcher not to remember the settings.
Could use some help here. Thanks in advance

pls provide a debug log!
Reply
#60
Got it: http://xbmclogs.com/pucmpfc8n

In this log:
- started setup of Auto audio switch.
- Made audio settings for music
- Play audio file
- got msg box
- Made audio settings for video
- Play video
- got msg box
- repeated the settings for audio and video.

Result: the setup keeps asking me to change settings and play a file.
Stopping the setup or restarting kodi does not result in automatic audio switch to switch to one of the outputs.
Reply
  •   
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 9
  •   
 
Thread Rating:
  • 1 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
AUTOMATIC (and/or manual) AUDIO SWITCHER for different Audio Output51
This forum uses Lukasz Tkacz MyBB addons.