locked
How to enable Dolby Digital bitstream output (HDMI) with MediaElement?

    Question

  • In my app, I use MediaElement to play videos with MPEG2 video and Dolby Digital 5.1 audio (.ts files).  When playing these files, I only get PCM 2.0 output to my AVR via HDMI.  However, when I play videos with surround audio in the Netflix app, Dolby Digital Plus is bitstreamed to my AVR as expected so I know my system audio configuration is correct and it seems like I should be able to bitstream DD from my app since Netflix is able to do it with DD+.  Note that when I play these same files in WMC on the same system I get DD 5.1 as expected.  Thanks.
    • Edited by cncb3 Wednesday, March 5, 2014 4:57 PM
    Wednesday, March 5, 2014 4:55 PM

All replies

  • This is a list of the supported codecs.  Some types do not do DD:

    http://msdn.microsoft.com/en-us/library/windows/apps/hh986969.aspx

    Are you finding something different with your input?  Do you have a repro if that is the case?


    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Thursday, March 6, 2014 8:12 PM
    Moderator
  • According to that chart MPEG-2 video is not supported at all which is certainly not the case.  But I will try an .m2ts file with DD to see if I can get bitstreaming to work. 
    Friday, March 7, 2014 1:40 AM
  • I seem to have found the issue.  These are TV recordings that contain a second (Spanish) audio track.  If I remux them to the same file type (.ts) and just strip out the second audio track then DD 5.1 is bitstreamed correctly.  So, the second audio track seems to mess up bitstreaming somehow.  Note that it lists both audio tracks in the built-in MediaElement transport controls but I have tried selecting both and each results in PCM 2.0 output to my AVR.  I hope this issue can be addressed.  I would be happy to send you a short sample file if you would be willing to look into this for me.  Thank you.
    Friday, March 7, 2014 6:04 PM
  • Beautiful!  Is it small enough you can put it up on OneDrive?  http://onedrive.live.com


    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Friday, March 7, 2014 6:08 PM
    Moderator
  • Yes - is there any way I can send you the link privately?
    Friday, March 7, 2014 6:19 PM
  • yes

    http://blogs.msdn.com/jpsanders/contact.aspx

    Thanks!


    Jeff Sanders (MSFT)

    @jsandersrocks - Windows Store Developer Solutions @WSDevSol
    Getting Started With Windows Azure Mobile Services development? Click here
    Getting Started With Windows Phone or Store app development? Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

    Friday, March 7, 2014 6:42 PM
    Moderator
  • I was finally able to upload the sample and I sent you the link.  Thanks very much for looking into this.
    Friday, March 7, 2014 8:00 PM
  • Hello,

    We do not currently supply an in-box TS stream parser or MPEG2 codecs that can be called from 3rd party code. If you wish to support the TS container format or the MPEG2 codecs you will need to supply your own Media Foundation source (for the TS container) and your own transform for the MPEG2 codec.

    If you have the media center pack installed you may have access to the MPEG2 codec that ships with the Media Center pack. This codec is not intended for use by 3rd parties and has been modified so that it has reduced or limited functionality when loaded in the context of 3rd party apps. This was a regrettable decision but was necessitated by licensing restrictions.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, March 7, 2014 9:18 PM
    Moderator
  • That is disappointing but thanks for the information.  So, is not handling multiple audio streams properly part of the limited functionality and can't be fixed? 
    Friday, March 7, 2014 10:21 PM
  • I guess on second thought it doesn't really matter if this can be fixed since it is not reasonable to require potential users to buy Windows 8 Pro plus the Media Center Pack just to play videos in my app (and it sounds like this not really supported anyways).  So, I guess I will have to abandon my app and just call my development efforts so far as time wasted.  Frustrating.

    I don't claim to understand the licensing issues and why the MPEG2 decoder can be used in desktop apps but not in Store apps, however, at the very least there should be a MPEG2 decoder available for purchase at a reasonable cost to use with Store apps.  Some decisions made for the Windows OS don't make much sense and are quite maddening. 


    • Edited by cncb3 Monday, March 10, 2014 2:42 PM
    Monday, March 10, 2014 2:41 PM
    • Edited by slyi Friday, March 21, 2014 2:11 PM
    Friday, March 21, 2014 2:08 PM
  • Did you already review https://github.com/lucas-j/libmpeg2-winrt or https://ffmpegwinrtarm.codeplex.com/?
    Yes, I saw the first one but I'm not sure if I would have to make my app OpenSource to use it but I will have to look into it further.  Thanks.
    Tuesday, March 25, 2014 2:34 PM