Monday, April 10, 2006

HDTV Playback and general directshow info

The objective was to find out roughly what are the minimum requirements are to decode and playback HDTV OTA streams.

I recorded a sample clip:
1 min HDTV OTA recording of david letterman in 1080i using the fusion 5 gold card.

zoom player

Changing the merit of a decoder can change the way directshow picks a decoder when playing back media in media player, zoom player, and other similar players. You can usually "force" the player to use a particular decoder by increasing the merit. Becareful and do this only at your OWN RISK as you can screw up playback if you are not careful!

direct show file merit changing app:
filemerit
click on the ? icon to go to preferences and uncheck read only mode.
find the decoder you want and display the merit editor. up it to something like:
00800001

REBOOT!

also make sure gspot shows this as your mpeg-2 demultiplexer and not something else
MPEG-2 Demultiplexer
C:\WINDOWS\system32\mpg2splt.ax

gspot to determine directshow rendering paths
gspot

You can also see this while playing a video in media player and right click properties.

Cyberlink decoders come with installing powerdvd 6
CyberLink Audio Decoder is especially important to decode ac3 sound from a mpeg file.

Playing in powerdvd vs zoomplayer/media player is DIFFERENT. I had a case where powerdvd wouldn't play it smooth but zp/mp worked just fine (on the htpc). In other words use cyberlinks directshow decoders but NOT their application. Save that for just playing dvd's.

If you want to playback .ts files you need to install this:
hdtvpump
but I say why bother when the fusion can record directly to .mpg format.

1) main gaming rig with x800xl
(S) --> MPEG-2 Demultiplexer --> Nero Video Decoder --> (R)
(S) --> MPEG-2 Demultiplexer --> CyberLink Audio Decoder --> (R)
cpu utilization while playing in zp 40%

Played in zoomplayer, media player just fine. No dropped frames and very smooth.

videolan
vlc mpeg2 - 5% no sound
vlc ts - 2% perfect

After switching to cyberlink decoder cpu dropped to about 12%

2) HTPC, athlon 2400 xp stock, ati 9600 non pro
CyberLink Video/SP Decoder
CyberLink Audio Decoder
about 45% cpu
9600
9600 is a full dx9 part

works just fine in zp, smooth, no dropped frames

netpersec showed only 13mbps network bandwidth (I know this is variable and can get as high as 17mbps like during the olympics). 802.11g streaming would be possible I believe.

3) dev box, athlon 2000 xp, geforce 3 ti 200
tried the same decode path as #2
cpu shows 80%
stutters and dropped frames
gf3
gf3 is a dx 8.1 part

4) athlon 2400 xp, ati 9200se
same decode path as #2 but powerdvd 5 instead of 6
stutters
cpu again 80+%
9200
9200 is a dx8.1 part

5) laptop Inspiron 8600c pentium M 1.6ghz, ati 9600 pro turbo
first I tried it with nero video decoder and cpu was 100% and stuttery video. Then I uninstalled powerdvd5, installed powerdvd6, increased the merit on cyberlink video decoder, rebooted. Now it was decoding using the paths just like #2. I ran it in zp perfectly smooth, cpu at 40%, streamed over 802.11g. Wow HDTV looks very nice on a widescreen laptop. AVOID the nero decoders that get installed with nero burning rom. They SUCK! Obviously you can still brute force through them like my main gaming rig was able to do but man are they inefficient.

6) mediaMvp thinks the mpg is pal format. I guess that's the generic message for it isn't NTSC resolution compliant!

comskip seems to work just fine on the hdtv mpeg. I ran it from the command line:

C:\mvp\2b-dev>comskip letterman.mpg
ComSkip 0.65, made using:
mpeg2dec-0.4.0 - by Michel Lespinasse and Aaron Holtzman
The commandline used was:
comskip letterman.mpg

Opening letterman.mpg
No INI file found in current directory. Searching PATH...
Path for comskip.ini: C:\rcTV\comskip\comskip.ini
Path for comskip.dictionary: C:\rcTV\comskip\comskip.dictionary
Path for comskip.exe: C:\rcTV\comskip\comskip.exe
INI file found at C:\rcTV\comskip\comskip.ini
Using C:\rcTV\comskip\comskip.ini for initiation values.
0:18:56 - 1805 frames in 42.68 sec (42.29 fps), 1.01 sec (43.56 fps)
1826 frames decoded in 44.15 seconds (41.36 fps)
Commercials were not found.


My current theory:
Video card is more critical than cpu for HDTV playback. Athlon 2400xp is plenty of cpu for HDTV IF you have the right video card. I think you have to have a dx9 card when your cpu is in the 2400xp range. It's not an option. I also think the powerdvd 6 decoders work quite well and probably has quite a bit of dx9 accleration code in there.

PowerDVD 6 readme
PowerDVD 6.0 supports Microsoft DirectX Video Acceleration (DXVA) in display chips or integrated chipsets from ATI, Intel, NVidia, SiS, and VIA/S3. Acceleration functions include Inverse Discrete Cosine Transform, Hardware Motion Compensation and Subpicture Alpha Blending units. Not only Windows ME and Windows 98 but also Windows XP and Windows 2000 are supported.

I'm still betting that nvidia purevideo would be a good option too:
newegg 6200
pure video

My best guess at MINIMUM HDTV payback requirements:
- record in .mpg format and NOT .ts with the fusion software
- athlon 2400 xp or greater cpu (maybe you can squeak by with a 2000xp)
- a fully compliant directx 9 video card
- powerdvd 6 installed and make sure the directshow rendering path is:
(S) --> MPEG-2 Demultiplexer --> CyberLink Video/SP Decoder --> (R)
(S) --> MPEG-2 Demultiplexer --> CyberLink Audio Decoder --> (R)

Specs are much lower than I expected.

One cheap option on video is the ati 9550
9550
# MPEG1/2/4 decode and encode acceleration

* DXVA Support
* Hardware Motion Compensation, iDCT, DCT and color space conversion

# All-format DTV/HDTV decoding
# YPrPb component output for direct drive of HDTV displays†

Prices start around $50
9550

this one has dvi and svideo out and is only $45 walkout after MIR
saphire 9550
rebate ends 4/16/06

My friend Rendition over at firstadopter.com recommends this card from newegg. It seems like a really good deal for $55. HDTV cables included (that's like $30 right there from the ati side), MSI name brand card, dvi support, and good price.

UPDATE 4/11/06
http://www.nvidia.com/page/purevideo_support.html
It looks like 6200 might not be ideal for 1080i mpeg2 playback.

UPDATE: 4/3/08
Haali Media Splitter - my favorite splitter for mkv and mpeg2 TS (better than nero, cyberlink)
http://haali.cs.msu.ru/mkv/

vsfilter - handle all your subtitle needs. Just regsrv32 this then configure haali media splitter to use it.
http://sourceforge.net/project/showfiles.php?group_id=82303

ac3filter - for all your 5.1 spdif output needs
http://ac3filter.net/projects/ac3filter

ffdshow tryouts - THE codec pack to get. Clean install/uninstall, handles merit for you, you can restrict it to a list of exe's to work with or just let it work with all apps, toggle specific media formats on/off, x264 decoding works well with multiple cores. You can use it to decode mpeg 1/2/4,x264,divx,xvid, pretty much everything. Same on the audio side. The only thing is if you are going to use spdif 5.1 out then uncheck those audio options on install (ac3filter will take care of that for us). If you are just doing analog out then yeah let ffdshow decode all those 5.1 sound formats too. I usually like to enable de-interlacing to prevent comb artifacts. Play withe OSD options too which shows a wealth of information including bitrate all in real time. Also, play with the subtitle options if you want subs. It even decodes CC from pvr 250 analog mpeg2 recordings.
http://ffdshow-tryout.sourceforge.net/
Get the latest nightly build (by clsid or xxl. It doesn't matter. Just pick the latest)
http://sourceforge.net/project/showfiles.php?group_id=173941

zoomplayer
http://www.inmatrix.com/files/zoomplayer_download.shtml

UPDATE: 6/24/08
Updated consolidated video playback strategy:

Haali Media Splitter - my favorite splitter for mkv and mpeg2 TS (better than nero, cyberlink) (turn on auto load vsfilter if you want subtitles)
http://www.free-codecs.com/download/Haali_Matroska_Splitter.htm

vsfilter - handle all your subtitle needs. Just regsrv32 (as admin if in vista). To push the subs down to the bottom of the screen access the filter properties (zoom player, filter 0002) and set general: vertical padding: extend to 16:9.
http://www.free-codecs.com/download/DirectVobSub.htm

coreavc - I was a bit weary about their claims being the fastest h.264 decoder out there. Well, I tried the trial version and what do you know. It's the truth! On an old p4 machine where it struggled with 1080p h.264 content I can now play it back smoothly with coreavc. It beats ffdshow tryouts and powerdvd8 cyberlink h.264/avc decoders with dxva acceleration (on an ati hd 2400 agp with cat 8.3). It's also very well threaded since I see much more even loads across cpu cores. I liked it so much I went ahead and bought the pro version for $15. Just run the configuration as admin and check preferred decoder to bump up the merit.
http://www.coreavc.com/

ac3filter - for all your 5.1 spdif output needs
http://ac3filter.net/projects/ac3filter

ffdshow tryouts - I still like this codec pack and it's still a good alternative for free h.264 decoding that is if you have the cpu to do it. This is still my preferred mpeg2 decoder. THE codec pack to get. Clean install/uninstall, handles merit for you, you can restrict it to a list of exe's to work with or just let it work with all apps, toggle specific media formats on/off, x264 decoding works well with multiple cores. You can use it to decode mpeg 1/2/4,x264,divx,xvid, pretty much everything. Same on the audio side. The only thing is if you are going to use spdif 5.1 out then uncheck those audio options on install(ac3filter will take care of that for us). If you are just doing analog out then yeah let ffdshow decode all those 5.1 sound formats too. I usually like to enable de-interlacing to prevent comb artifacts. Play withe OSD options too which shows a wealth of information including bitrate all in real time. Also, play with the subtitle options if you want subs. It even decodes CC from pvr 250 analog mpeg2 recordings.
http://ffdshow-tryout.sourceforge.net/
Get the latest nightly build (by clsid or xxl. It doesn't matter. Just pick the latest)
http://sourceforge.net/project/showfiles.php?group_id=173941

zoomplayer - I use it to see what filters are being used and change filter properties.
http://www.inmatrix.com/files/zoomplayer_download.shtml

VLC - Sure it uses internal filters but it's still handy to have around to play more obscure file formats like FLV. It's ability to read .iso files is also handy. Still, I find my self using this less and less each day as coreavc and ffdshow take care most of my decoding needs.
http://www.videolan.org/vlc/

powerdvd 8 ultra - The latest still has a pretty nice h.264/avc decoder that uses gpu acceleration through dxva though now I prefer coreavc. They dropped hd-dvd support but it has good blu-ray compatibility. You can install this along side powerdvd 7 if you still have some hd-dvd's you want to play.
http://www.cyberlink.com/multi/products/main_1_ENU.html

UPDATE: 9/4/08
Media Player Classic - Home Cinema - I think this is my new favorite media player.  I has a lot of internal filters but has the flexibility to turn them individually off to use an external filter if you want.  It feels almost like a version VLC that takes advantage of the windows directshow model.  You get the clean install of VLC with a lot of media support right off the bat but still have the flexibility to tweak things and use external filters if you want.  The home cinema version has some DXVA support now for h264 decoding.  Also, there are none of the 5.1 SPDIF issues in vista that VLC has.  On top of that it's free and open source and still activily developed unlike zoomplayer.

1 comment:

Anonymous said...

Making clear the distinction between performance as action and performance as act-ual production is very important indeed for goood outcomes.. . re- "Performance" as action see also Brissett & Edgley Life As Theaterbaju distro