Feature Request for MP1.18 PRE - granular control of "Stop Playback on removal of audio renderer" (1 Viewer)

JimCatMP

Documentation Group
  • Team MediaPortal
  • April 1, 2010
    652
    283
    Leeds
    Home Country
    United Kingdom United Kingdom
    Change request - update options so audio playback CAN remain active on removal of HDMI connection for music and radio.

    Rational for request - when using separate amplifier for playback [but not a full AVR which probably handles the HDMI side rather better], the ability to turn off video device [HDMI TV] while leaving audio [radio and music] would be eco-friendly option for some [simple leaving radio running all day in background is still common enough or running a long background music play list] as no video requirement until need to navigate or change function.

    As I've no notion of how complex or otherwise the change may be, I fully accept is may simply be too complicated to progress and/or of no priority to the dev team:)

    Cheers - JCMP
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    update options so audio playback CAN remain active on removal of HDMI connection for music and radio.
    There is a setting in "MP Config" called "Stop playback on removal of an audio renderer". This is in the "General" section, subsection "Startup/Resume Settings". I have just disabled this setting, and then played a track captured from a CD. I switched off my TV, waited 30 seconds, then switched it on again. The audio track was still playing. :)

    My system is set up as:

    HTPC > (digital HDMI) > TV > (analogue audio) > audio amplifier

    So when I switch the TV off, the audio is no longer audible. But if your system is using analogue audio from the HTPC directly to the amplifier, the audio may still be audible even when the TV is switched off. Have you tried this? (There might be other reasons why this does not work.)

    -- from CyberSimian in the UK
     

    JimCatMP

    Documentation Group
  • Team MediaPortal
  • April 1, 2010
    652
    283
    Leeds
    Home Country
    United Kingdom United Kingdom
    Hi.

    Yes, it's changes to that config I'm asking to be considered:->

    My set will be MP -> audio amp direct + video to TV, acting as monitor with no sound - this was setup in earlier pc build but in latest build I couldn't get rid of the mains hum:mad:, so just ripped amp out:oops: - planned next build in old 1970's hifi chassis will {may if I can make it work} have 5.1 sound:whistle:

    Using audio via amp [Stop playback on removal of an audio renderer not selected], then if I'm in section where there is any video source playing [TV/MovingPictures/MPTVSeries/etc] and simply turn the TV off, I still hear the sound::(

    This is most commonly problem when viewing TV via MePo, so just turning off the TV leaves the sound on, so have to stop TV and then turn TV off [not wife friendly at all:censored:

    I did wonder if I could do this via EventGhost [never played with it but have read bits], but it think it would have to know & hold state [so if in TV section for example, it would know to stop playback when it sees TV off IR command, but ignore TV off IR command when in Radio section for example]:eek:

    Cheers - J.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    I half thought that "Stop playback on removal of an audio renderer" might not provide the solution that you were looking for; thanks for clarifying.

    -- from CyberSimian in the UK
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    @JimCatMP
    Hello :)

    My understanding is that "Stop playback on removal of an audio renderer" was introduced as a workaround - particular to HDMI connections - to prevent MP crashing (or worse) if/when the active audio renderer was removed. So for example, we don't want MP to crash if somebody's viewing TV and happens to turn the TV off without first stopping TV in MP.

    Given what you said about using a non-HDMI-connected amp, and the background info I've just given, my impression is that what you're asking for doesn't fit the intention of the setting very well.

    In fact I think there's a good chance of the setting being removed at some point in the not to distant future. Reason being: when the setting was first added, we had no way to know if the audio renderer that was removed was the one that MP was actively using. Therefore we were forced to take the safe path and stop playback on removal of any renderer. (The idea was that if you unticked the setting you were indicating that your audio path was always connected/available.) Recent developments in the audio sub-system mean that we should be able to identify when the active audio renderer is removed, and only stop playback in that case... and so the setting becomes superfluous.

    Using audio via amp [Stop playback on removal of an audio renderer not selected], then if I'm in section where there is any video source playing [TV/MovingPictures/MPTVSeries/etc] and simply turn the TV off, I still hear the sound::(
    This is expected.

    The fact that turning the TV off with "stop playback..." enabled stops audio for you could be seen as sheer luck. As I tried to explain above, the setting currently stops playback on removal of any audio renderer. Presumably turning off the TV removes the TV's [unused!] audio renderer path, and it's that which causes playback to stop. If/when we manage to get MP to only stop playback when the active audio renderer is removed, TV audio would continue regardless of the presence or state of the "stop playback..." setting.


    So, where does that leave the request?
    I think it would be more accurate to describe what you want as "stop video playback on removal of the active video display (with no implications implied for audio playback)". Don't know if it's possible to accurately detect/determine which display MP is currently displayed on, especially when dealing with RDP and multi-screen setups.
     

    JimCatMP

    Documentation Group
  • Team MediaPortal
  • April 1, 2010
    652
    283
    Leeds
    Home Country
    United Kingdom United Kingdom
    @JimCatMP
    Hello :)

    My understanding is that "Stop playback on removal of an audio renderer" was introduced as a workaround - particular to HDMI connections - to prevent MP crashing (or worse) if/when the active audio renderer was removed. So for example, we don't want MP to crash if somebody's viewing TV and happens to turn the TV off without first stopping TV in MP.

    Given what you said about using a non-HDMI-connected amp, and the background info I've just given, my impression is that what you're asking for doesn't fit the intention of the setting very well.

    As always, thanks for the feed back & history here MM.

    @JimCatMP

    In fact I think there's a good chance of the setting being removed at some point in the not to distant future. Reason being: when the setting was first added, we had no way to know if the audio renderer that was removed was the one that MP was actively using. Therefore we were forced to take the safe path and stop playback on removal of any renderer. (The idea was that if you unticked the setting you were indicating that your audio path was always connected/available.) Recent developments in the audio sub-system mean that we should be able to identify when the active audio renderer is removed, and only stop playback in that case... and so the setting becomes superfluous.


    This is expected.

    The fact that turning the TV off with "stop playback..." enabled stops audio for you could be seen as sheer luck. As I tried to explain above, the setting currently stops playback on removal of any audio renderer. Presumably turning off the TV removes the TV's [unused!] audio renderer path, and it's that which causes playback to stop.

    Yes, fully get that, although side effect may be better then luck as explanation;)

    @JimCatMP

    If/when we manage to get MP to only stop playback when the active audio renderer is removed, TV audio would continue regardless of the presence or state of the "stop playback..." setting.

    So, where does that leave the request?
    I think it would be more accurate to describe what you want as "stop video playback on removal of the active video display (with no implications implied for audio playback)". Don't know if it's possible to accurately detect/determine which display MP is currently displayed on, especially when dealing with RDP and multi-screen setups.

    Agreed, RDP - be very surprised if that was even slightly viable & multi-screen, that would be beyond ugly as well.

    However, if the 'function' was limited to 'screen count == 1 && interface == HDMI', which removes RDP as a consideration, - does request still have legs, as I've guess most [but by all means not all] MePo setup's are based on single HDMI screen?

    Given fairly common large LCD TV runs at 85W [from a sample of 1 I looked at:censored: - at 4hrs music per day, week day only [so easy maths], you could be looking at 85KWh/pa saved. MePo saves the World(y), tea and buns all round(y), probably a medal as well:eek:.

    Seriously however, real world time, it is a niche request only, and as per 1st posting, fully understand if dev's don't see value vs effort & potential problems, then that's cool, but if you don't ask, you don't know:)

    Cheers - JCMP
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    stop video playback on removal of the active video display
    There is some variation in the behaviour of TVs that may affect this.

    With my old Toshiba TV (dating from 2006), when I switched it to standby it would break the HDMI connection. This resulted in the display device disappearing from Windows device table. It also resulted in WMC subsequently waking with the wrong screen resolution, if it had previously woken for an unattended recording. :( (With no screen to query to determine the screen resolution, WMC used an inappropriate default resolution which sometimes persisted across subsequent wakes.)

    My current Sony TV (dating from 2014) does not break the HDMI connection when switched to standby, and so it remains present in the Windows device table. This is based on the output from the DEVCON command. I don't know whether there is some other query that could be used to determine that the TV is "connected but in a low-power state" (is that possible over HDMI?)

    I just tried switching the TV off whilst watching live TV and with "Stop playback on removal of an audio renderer" enabled, and indeed the video continued playing (i.e. MP 1.12 did not detect removal of the audio renderer).

    -- from CyberSimian in the UK
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I think both of you are on the right track when you ask about HDMI and the information that can be acquired about events. The only way for me - a non-HDMI user - to attempt to begin to answer the questions about what's possible is to look at log files.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    The only way for me - a non-HDMI user - to attempt to begin to answer the questions about what's possible is to look at log files.
    I have just done the following test (debug mode logs attached). The results were not what I was expecting:

    (1) Delete all existing log files.
    (2) Start MP 1.12f from the Windows desktop.
    (3) On the "Home" panel, press the GUIDE button on the remote.
    (4) On the "TV Guide" panel, press the OK button to start viewing a live TV programme.
    (5) Exactly 30 seconds after pressing OK, switch the TV to standby.
    (6) Exactly 30 seconds after switching the TV to standby, disconnect the TV from the electric mains.
    (7) Exactly 60 seconds after disconnecting the TV from the mains, reconnect it to the mains.
    (8) Exactly 30 seconds after reconnecting to the mains, switch the TV on.
    (9) Outcome: MP is still playing live TV! :eek: :eek: :eek:

    What I had expected is that switching the TV to standby would not be detected by MP (because my Sony TV maintains the HDMI connection in standby), but that disconnecting the TV from the mains would be detected by MP (since the TV has no power to maintain the HDMI connection).

    Looking in the logs, I can see no trace of anything changing with respect to the screen. :confused: Extract:

    12:55:39.363 ViewChannelAndCheck()
    12:55:44.303 Centarea cmd "39"
    (I think that this is the OK button, but in the log it occurs 5 seconds after trying to start viewing the channel -- possibly a result of log output from different threads?)

    As it is not clear exactly when the OK button was pressed, the TV being switched to standby should occur somewhere in the range 12:56:09 - 12:56:14. Disconnecting the TV from the mains should occur in the range 12:56:39 - 12:56:44. The MP logs show nothing of interest happening around these times, but the MP log does show the Sony TV as the audio renderer, so this is all very puzzling. :confused:

    -- from CyberSimian in the UK
     

    Users who are viewing this thread

    Top Bottom