MP2 - V2.1 - PIP + LAV audio bistream issues

Discussion in 'Older releases' started by Alberto83, May 21, 2017.

Thread Status:
Not open for further replies.
  1. Alberto83
    • Team MediaPortal

    Alberto83 Test Group

    Joined:
    August 7, 2012
    Messages:
    336
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +119 / 1
    Home Country:
    Italy Italy
    MePo: 2.1 Final
    Audio Codec: All using Lav Audio: 0.69.0.42-git | Bitstream checked for all formats available.
    Video Codec: All using Lav Video: 0.69.0.42-git
    Audio Renderer: Default DirectSound Device.
    Prefer multichannel audio streams: NO.

    I found a problem when using LAV Audio bitstreaming in conjunction with the PIP feature, but I can't really say it's a bug, more a way bitstream works.
    When you start PIP, you actually start a second player with its instances of LAV Audio and LAV Video codecs (at least that is what is happening on my PCs).

    Everything works fine until one of your track is supported by LAV audio for bitstreaming and LAV is configured to bitstream.
    In this configuration, the first audio track with DD or DTS chosen takes precedence and starts bitstreaming to the AMP. There's no way to switch to the other player tracks but stop the current bitstreaming instance first.

    I think this happens because both player actually streams one of their track to LAV Audio, and when bitstream is enabled, it immediately pass it to the amp.
    Let me make an example for you to reproduce the issue:
    Requisites: Have LAVAudio codec with DD bitstream enabled.
    • Tune a channel with simple MPEG2 Tracks. We'll call this player1
    • Tune a second channel (or a movie) with ONLY Dolby Digital Tracks available on PIP. We'll call this player2
    Result: Your amp should now be playing the first DD track available from the player2, and not the original track from the player1. You can't switch back to any other track of player1 until you stop the playback of the DD track on player2, either by choosing an MPEG2 track or stopping the player completely.

    This happens on both my MePo 2.1 final installations, with two different amps connected, so I think it's not an hardware problem (of the amp) or the pc, but more a configuration issue or an issue by design. The problem stops the very moment I disable bitstreaming (obviously).



    Can some of you with bitstreaming enabed reproduce this issue, or it's an issue with my configuration?
    Is it possible to configure MePo to always reproduce one audio track only and disable the others completely, before they go to the LAV audio codec?
     
    • Like Like x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    6,113
    Likes Received:
    1,538
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart (But living abroad)
    Ratings:
    +2,314 / 2
    Home Country:
    Germany Germany
    Good finding. My HTPC in living room was on, so I gave a quick try. I can reproduce the mentioned situation.
     
    • Like Like x 1
    • Thank You! Thank You! x 1
  4. Alberto83
    • Team MediaPortal

    Alberto83 Test Group

    Joined:
    August 7, 2012
    Messages:
    336
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +119 / 1
    Home Country:
    Italy Italy
    I think we should move this to the Bug Reports section, even if it's not really a bug.
    Maybe it can be solved by allowing only one track to be sent to the LAV Audio codec.
     
  5. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Note - I'm not an MP2 user, so this is a general comment/analysis...

    This is almost certainly caused by the way Windows sound mixer operates (which is between the audio renderers and the output).

    If multiple audio streams are all decoded (PCM) audio, then it can mix them together. If one of the streams is 'bitstreamed' it can only be sent directly to the audio output (other audio streams cannot be mixed with it), so it presumably overrides all the other streams. This is also the reason there is no volume control for bitstreamed audio.

    If you have a PiP situation (with bitstreamed PiP audio) and open up Windows 'volume mixer' (right click on the speaker icon in the systray), are there two active inputs (volume sliders) from MP2?

    If there are and you mute the 'bitstreamed' input (click on the speaker icon at the bottom of the relevant volume slider), do you then hear the main audio stream?
     
  6. Alberto83
    • Team MediaPortal

    Alberto83 Test Group

    Joined:
    August 7, 2012
    Messages:
    336
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +119 / 1
    Home Country:
    Italy Italy
    I can't check right now, because i'm not at home, but when I come back i'll have a look.

    I don't think the problem is the Windows Sound mixer itself but the fact that two LAV Audio instances exists. As far as I know (but I might be wrong), the bitstreamed stream should go directly to the amp untouched, so it shouldn't even go through the sound mixer. EDIT: or if it goes, it doesn't touch it at all.
    When two streams exists, only the first one goes out, the second is lost somewhere. Indeed, when you pause or stop the current playing bitstream, you have to pause an play the second stream in order to get the sound.
     
  7. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,994
    Likes Received:
    4,744
    Ratings:
    +6,789 / 11
    Home Country:
    Germany Germany
    Show System Specs
    I'm afraid that switching audio streams can not be done in bit stream mode easily.

    Currently we only switch between audio streams in mixer mode, which is controlled by Windows. With LAV using bitstream (I guess it does this exclusively on device), we probably would need to "detach" the audio renderer before switching to another stream. Not sure how this could work, i.e. if the graph can continue playback if there is no audio renderer attached (a/v sync is done there).

    In short, I see no quick solution to this behavior.
     
  8. Alberto83
    • Team MediaPortal

    Alberto83 Test Group

    Joined:
    August 7, 2012
    Messages:
    336
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +119 / 1
    Home Country:
    Italy Italy
    Ignore my last comment. It HAS to go through the sound mixer. Sorry.
     
  9. Alberto83
    • Team MediaPortal

    Alberto83 Test Group

    Joined:
    August 7, 2012
    Messages:
    336
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +119 / 1
    Home Country:
    Italy Italy
    @morpheus_xx it should still use the system mixer. I think i heart system sounds and notification while watching movies and tv channels. I'm gonna check this evening.
     
  10. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    TsReader.ax can't handle video-only playback so I assume you need a functional audio renderer in the graph for TV playback to work.
     
  11. Alberto83
    • Team MediaPortal

    Alberto83 Test Group

    Joined:
    August 7, 2012
    Messages:
    336
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +119 / 1
    Home Country:
    Italy Italy
    I can confirm what Morpheus says. The bitstream is exclusive indeed, and when it plays NO other sound gets out but the stream itself. Not even system sounds. And it should be this way, since the bistream has to remain untouched.
    There's no information of the stream in the volume mixer, so it is bypassed completely. You can only mute the whole playback device.
    Since I'm using the PIP feature mainly for TV I'll change the graph for ts files not to use LAV audio with graphedit, and this will fix it.

    Question, I have really few notions about DirectShow Filters and how they work, so I really don't know if this can be an actual solution: is it possibile to develop a very simple stream mixer to place before the LAV Audio codec in the graph chain to control from mediacenter which stream to send to the codec?
    It's not something urgent, but i think bitstreaming will become popular for movies since PCM is not really a good choice to stream latest object based audio formats like Atmos or DTS:X, considering the position of the ceiling speakers are available only to the AVR.

    Edited few times to correct typos.
     
    Last edited: May 24, 2017
    • Like Like x 2
Loading...
Thread Status:
Not open for further replies.

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!