MP2 - V2.1 PIP + LAV audio bistream issues (1 Viewer)

Status
Not open for further replies.

Alberto83

Test Group
  • Team MediaPortal
  • August 7, 2012
    336
    108
    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?
     

    ge2301

    MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,702
    2,416
    Stuttgart
    Germany Germany
    Country flag
    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?
    Good finding. My HTPC in living room was on, so I gave a quick try. I can reproduce the mentioned situation.
     

    Alberto83

    Test Group
  • Team MediaPortal
  • August 7, 2012
    336
    108
    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.
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    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?
     

    Alberto83

    Test Group
  • Team MediaPortal
  • August 7, 2012
    336
    108
    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.
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,487
    7,018
    Germany Germany
    Country flag
    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.
     

    Alberto83

    Test Group
  • Team MediaPortal
  • August 7, 2012
    336
    108
    Italy Italy
    Ignore my last comment. It HAS to go through the sound mixer. Sorry.
     

    Alberto83

    Test Group
  • Team MediaPortal
  • August 7, 2012
    336
    108
    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.
     

    Owlsroost

    Development Group
  • Team MediaPortal
  • October 28, 2008
    5,540
    5,038
    Cambridge
    United Kingdom United Kingdom
    Country flag
    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).
    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.
     

    Alberto83

    Test Group
  • Team MediaPortal
  • August 7, 2012
    336
    108
    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:
    Status
    Not open for further replies.

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    K Wie funktioniert PiP mit der Fernbedienung? Allgemeines Support- und Diskussionsforum 3
    ge2301 [fixed] [MP2-807] Problem when switching player in PiP mode with audio files MediaPortal 2 32
    T MadVR + LAV Filters, Perfect in MPC-BE, Bad in MP1 MediaPortal 1 Talk 13
    rsbrux 1.23.0 MPE Manager Problem with LAV Filters Bugreports 2
    cbr954rr Videos flickering with lav Filter General 2
    A Audio sync problems on LAV filters 1.21 Pre Release 31
    Sebastiii [WiP] Audio delay when using LAV Audio codec Area 51 - Testing Area 6
    D [Rejected] LAV filter setup wizard Feature Requests 1
    A AAC 2.0 going out of sync Codecs, External Players 2
    Stephen O'Kane [SOLVED] TV Stream stuttering - both Video and Audio Watch / Listen Media 14
    M.Hulot MP plays in Internal Blu-ray-Player-mode always first audio stream not the one I chosen in settings General Support 1
    Golf4 TV-Records werden als Audio-Files importiert ? Allgemeines Support- und Diskussionsforum 0
    W [solved] Incorrect audio being reported Moving Pictures 4
    404 [solved] Live TV...video and audio freeze General Support 20
    ninja 12 Audio dropouts with Dolby / DTS watch/edit Videos 12
    bta489 [solved] DVB-T2 Recordings: Sometimes no Audio after muxing with mkvmerge Tools and other software 2
    T [solved] MP2 Switch off visualisation when listening to audio....PLEASE!!! General 23
    azzuro [fixed] [WIP MP2.3] - Audio files not imported to MP MediaPortal 2 18
    S Remote button to change audio and subtitle on / off General 10
    F Audio render and font error in my logs General Support 2
    R [solved] Command / Shortcut for changing subtitles or audio Archive 5
    K Multichannel audio and subtitles for TV not properly supported General Support 4
    Glith Audio out of sync after pause. Rewind 15sec gets it into sync again. MediaPortal 1 Talk 0
    C ARC Audio Renderer Changer: wo kann man es konfigurieren? Video & DVD 15
    joecrow No Audio after MP Start/Resume from Sleep General Support 0
    Similar threads

























    Top Bottom