Comprehensive Report of Relevant Container and Codec Support in Windows 7 and Media Center

Containers

  FF/RW Subtitles Selectable audio tracks Useful metadata Chapters
AVI No No No *** No No
MP4 Yes No * No **** No ***** No
TS No No * No **** No ****** No
M2TS No No * No **** No ****** No
WTV Yes Maybe ** Yes Yes No *******

* Despite the spec requiring this, Microsoft decided not to implement MPEG-4 Part 17 “Timed Text”.

** According to this Microsoft Whitepaper, WTV supports most standard types of “captioning” however captioning isn’t what we normally think of as “subtitles”.

*** Note that AVI does support multiple audio tracks, however there is no way to change tracks and all tracks play at the same time, mixed together.

**** Only first audio track plays. There is no method for selecting alternate tracks.

***** MP4 does support metadata but Media Player and Media Center don’t recognize it. Tagging an MP4 based TV episode in the Zune software generates Windows Media style “WM/TagName” tags as a sub-tag of a custom MP4 “Xtra” tag, however, despite the use of Windows Media tags, TV episodes and movies do not show up in the Media Center Recorded TV area or Movie Library.

****** Zune software won’t recognize TS or M2TS files so I’m not able to test Windows Media tags on these files since no other known software can generate such tags.

******* It may be possible to simulate “chapter” support by using Microsoft’s “iTV” system but this looks like a lot of engineering work and the work versus payoff probably isn’t worth it.

MPEG-4 Video Codecs

  Part 10/AVC/H264 Part 2/ASP/DivX/XviD
AVI Yes Yes *
MP4 Yes Yes *
TS Yes No **
M2TS Yes No **
WTV Yes ***

Note that I didn’t cover MPEG-4 Part 2/SP (Simple Profile) because it is a low quality codec designed for low-end devices such as mobile phones and portable media players.

* Most, but not all, MPEG-4 Part 2 Profiles are supported. Nothing using "DivX 3” is supported.

** These containers do not support MPEG-4 Part 2 by design.

*** As of this moment, I’m unable to convert anything other than AVC/H264 to WTV. I assume MPEG-2 files will work but I didn’t test due to lack of material to test with and increasing irrelevance of the codec for our purposes. Plus we already know MPEG-2 works because all TV broadcast in the US uses MPEG-2.

Audio Codecs

  MP3 AAC AC3 DTS
AVI Yes * Yes No
MP4 Yes Yes No *** No
TS No Yes Yes No ****
M2TS No Yes Yes No ****
WTV No No ** Yes No *****

* Although I’ve read that AVI supports AAC, I wasn’t able to test due to lack of content.

** I was able to create a WTV file with an AAC audio track but the file won't play in Media Center at all. It does, however, play in Media Player with some issues. The sound works and, according to GraphStudio, is being decoded by “Microsoft DTV-DVD Video Decoder”. The only real problem is that moving the slider around causes the video playback to become corrupted and sketchy. According to the PBDA whitepaper linked to above, WTV should support AAC so I’m quite confused as to why AAC has issues in WTV.

*** The AC3 decoder included with Windows 7 is DirectShow based but the MP4 container source is handled with Media Foundation, which has no AC3 decoder, so AC3 doesn’t work despite being part of the MPEG-4 ISO specification.

**** Despite DTS being part of the specification requirements for TS and M2TS files, Microsoft hasn’t implemented a DTS codec in either DirectShow or Media Foundation. The mildly good news is that if you have a TS/M2TS file with multiple audio tracks, the first track that is supported is the one that plays.

For example, my ripped copy of Big Trouble in Little China has five tracks:

  1. H264 video
  2. DTS main audio
  3. AC3 main audio
  4. AC3 director commentary
  5. SRT / Timed Text / Presentation Graphic Stream

However, the only streams that actually play are (1) the main H264 video and (3) the main AC3 audio. Note that there is no method to change to (4) director commentary from within Media Player or Media Center.

***** I was able to create a WTV file with a DTS audio track but the file won't play in Media Center at all. The strange thing is that the file did play in Media Player and the System Tray icon appeared for “ac3filter” but only when I have “ac3filter” set to handle SPDIF audio. I suspect it may be possible to get DTS working in WTV with some major hacking and/or DTS may work via SPDIF passthru, however I have no SPDIF hardware to test this theory.

Comments

MPEG-2 was not covered because it isn’t efficient enough, the files take up way too much space and everyone already has their collection in either H264 or DivX/XviD already anyway

Interestingly, WTV doesn’t seem to be Media Foundation based since WTV files can be loaded in GraphStudio but TopoEdit won’t touch them. H264 in WTV is handled by “Microsoft DTV-DVD Video Decoder” which is, according to the PBDA whitepaper, both a DirectShow filter and Media Foundation Transform, so apparently there simply isn’t a Media Foundation Source to handle WTV files.

At the very least, Microsoft should be supporting MPEG-4 Part 17, or Timed Text, as the ISO specification does require it. Microsoft is a very “accessibility” centric company and not supporting subtitles in MPEG-4 media files seems very not-accessible to those with hearing problems. Plus a lot of us have ripped media with community based subtitle solutions (SRT, ASS, etc.) that could easily be converted to MP4 and take advantage of Timed Text.

Conclusion

This is a good start but I don’t think we can really call MPEG-4 “supported” out-of-the-box. The lack of subtitles or “Timed Text”, no DTS codec and no support for standard metadata really make Windows 7’s MPEG-4 support feel unfinished. I’m also confused as to why some Part 2 (ASP) files didn’t work. It seems like DivX 3 should work since the code was apparently based on code that leaked from Microsoft that was eventually used as one of the WMV codecs. Even more confusing is why some XviD files wouldn’t play despite DivX and XviD being based on the Part 2 ASP specifications.

Media Foundation is supposed to be the successor to DirectShow, and from what I can tell, Media Foundation is a much cleaner system and supports some nice features, like transcoding, but without support for WTV files, AC3, DTS and hit-or-miss MPEG-4 support, it feels very unfinished as well.

Fun With ToDVRMS v1.0.1.0

I managed to get a hold of the “Early Access” version of Andy’s ToDVRMS tool specifically to test out the WTV file creation features. So far, every h264 encoded Matroska file I’ve tried converted to WTV and played back properly in Media Center.

There are a few issues however:

  • ToDVRMS doesn’t support much metadata embedding and the few commands I tried didn’t work (-title, –year) with the exception of –m which flags the file as a “IsMovie” (this means the file will show up in the Media Center Movie Library).
  • There’s no direct path for converting scene subtitles (SRT, SSA, ASS, etc.) to “line 21”. Line 21 is apparently the only subtitle system supported by WTV and even though I was able to find tools to convert SRT files to SCC and then from SCC to “raw” (supposedly the format “line 21” uses), ToDVRMS doesn’t have an option to use subtitle files from any source other than a stream in the original MKV file. MKV only supports a handful of subtitle formats and “raw” wasn’t one of them so I was unable to get any subtitles working.
  • “Forced subtitles” are going to be an issue. Unless there’s something to “force” a subtitle track to play by default (like Matroska has), the only solution for forced subtitles will be to transcode the file with the subtitles “burned” into the stream.
  • DTS doesn’t work at all. ToDVRMS crashes when trying to convert a file with DTS audio. This was expected as I don’t believe WTV supports DTS anyway.
  • I’m assuming MKV “chapters” won’t work but I didn’t test this as there are no command line options to enable chaptering and WTV probably doesn’t support chapters anyway.

Things that did work:

  • Multiple audio tracks. I have a copy of Akira with the original Japanese track and a dubbed English track. I was able to switch tracks using the “i” button on the remote and sliding over to the “language” area.
  • No transcoding was required. The WTV container supports h264 streams.
  • Fast forward and rewind on the remote work as expected when playing from Media Center. The fast forward and rewinds buttons didn’t work in Media Player, but we don’t really care about Media Player, do we?

I have no idea if these will play on Extenders as I don’t have one to test with (no 360 either) but, based on what I’ve read, they should play fine on any Extenders that support h264.