GraphEdit Tips and Tricks

HDTV Wonder: Transport Streams and HDTV2MPEG2

HDTV Wonder: Transport Streams and HDTV2MPEG2

With reference to low rez's excellent post and in case you missed it....Here You can capture the native Broadcast Transport Streams using the HDTV Wonder card.(Tip: Leave the GetFile writer disconnected to configure the tuner, after that you can then remove everything downstream of the Smart tee for low CPU utilization capture)

Also, as mentioned in rbq's post Here......, HDTVtoMPEG2 can be used to Select the Audio and Video PID's you want from the Transport Stream, also convert it to MPEG2 and include/exclude a range(s) of the video, as well as give you information about the transport stream. I used v1.11 Beta 3, and it converted the TP transport Stream to MPEG2, and cut a range of video perfectly, with sync'd audio.
---------------------------------------------------------
This makes for a very powerful combination, and I'll be using it shortly in a couple of examples I'm working on.
---------------------------------------------------------

(click on thumbnail for larger image)

I Opened the TP file captured using low rez method with HDTV2MPEG2.



Found a single 720p Transport Stream. The Red/Green Stripe below the preview window is where I configured my cut, the green portion indicates the kept part. Note it even shows the size and timestamp of the included video.
 
Last edited:
VMR9 hue adjust

VMR9 hue adjust

As for programmatically building your filter graphs I've gotten some code to work to adjust hue (or black level,contrast,saturation).

global vars:

VMR9ProcAmpControl g_pVMR9PAC;

int g_videomode; //0=overlay,1=vmr7,2=vmr9


if (g_videomode==2) // check for VMR9
{
VMR9ProcAmpControlRange pVMR9PACR;
pVMR9PACR.dwSize=sizeof(VMR9ProcAmpControlRange); // initialize structure
pVMR9PACR.dwProperty=ProcAmpControl9_Hue; //get hue range
hr = /*IVMRMixerControl9*/g_pVMR9MC->GetProcAmpControlRange(0, &pVMR9PACR); //Get range, add if SUCCEEDED(hr) here

g_pVMR9PAC.dwSize=sizeof(VMR9ProcAmpControl); // initialize structure
g_pVMR9PAC.dwFlags=ProcAmpControl9_Hue; // what to set?
g_pVMR9PAC.Hue+=100; // add 100 to hue (todo: check if within range)
hr = g_pVMR9MC->SetProcAmpControl(0, &g_pVMR9PAC); // invoke
}

Here's a sample pic:

conan-hueadjust-1.png
 
Last edited:
xtknight, thanks for the contribution. A simple graph player would be awesome wouldn't it?, and control over various filters would make it sweet.
 
rbV5 said:
xtknight, thanks for the contribution. A simple graph player would be awesome wouldn't it?, and control over various filters would make it sweet.

No problem. Pretty much what I've been making ("MPlayer") is just a simple filter graph renderer. It uses the filter graph manager to automatically render the file, then I alter the renderer at the end to whatever I want. So it guarantees universal playback while having configurable renderers.

Now I'm just trying to get VC2003+ toolkit to work because my VS2003 is screwed up. Hopefully I can get together a whole kit with the (free from Microsoft) compiler and code included. Still have to get DX9 SDK separately though.

I'm probably grasping at straws, but maybe everyone can add on to it and soon enough get the most useful player ever. Most useful doesn't mean littered with features that won't be used 99% of the time. Mostly settings like hue,contrast,etc. that so many players lack, while ignoring stuff like manual graph building that hardly anyone's going to do (might as well use Graphedit right?) Well I'm not saying it's useless, but that would take a while to implement and having it hardly be used isn't a good mix.

While DX9SDK/DirectShow isn't that hard to start off of, I think "MPlayer" would make a good beginner's sandbox. So far I have not seen any code on the web to do hue adjustment with VMR9. What if someone was a master at math but couldn't get the grasp of that VMR9 function? Now they can have somewhere to start if they figured out some awesome equation that makes the video look very vibrant.
 
Last edited:
Hue for VMR9 rendering is easily adjusted with the property sheet within graphedit. You can also adjust hue in your decoder if you have access to it, and the software supports it.
 
rbV5 said:
Hue for VMR9 rendering is easily adjusted with the property sheet within graphedit. You can also adjust hue in your decoder if you have access to it, and the software supports it.

That's odd, I never see any option to adjust hue in the "Video Mixing Renderer 9" property sheet. All I see is a tab called Quality which includes basic info like FPS, dropped frames, etc. Accessing properties while the video was playing didn't make anything else show up in the properties either.

What versions do you have?

Windows XP Professional SP2 32-bit
DirectX: 9.0c (4.09.0000.0904)
GraphEdit: 9.04.78.0000 - Build: 041201
system32\quartz.dll (DirectShow Runtime-contains VMR9): 6.5.2600.2180

Is there a newer version of graphedit?
 
Last edited:
Check the OP for the property sheet fix if you're not seeing all your filter property sheets.

quartz.dll = 6.05.2600.2508, and I'm running MCE 2005 SP2 instead of XP...all else the same
 
Last edited:
AC3Filter info / ATI HDTV WONDER Example

AC3Filter info / ATI HDTV WONDER Example

AC3Filter ver 0.70b

The AC3Filter is a free program which can be downloaded from sourceforge.

http://ac3filter.sourceforge.net/

I never tried the AC3Filter program until I started using DIVX convert which actually recommends this program.

One really nice feature of this filter is the ability to handle 5.1 from HD content. When viewing channels built with GraphEdit for the ATI HDTV WONDER you will see the input bitstream audio being feed to the codec.
You will also see the output generated. Some OTA stations are capable of 5.1 but do not allways broadcast in 5.1. I don't know of any other filter for AC3 that makes this job so easy.

The filter works well and is free. You need to run the "AC3Filter Configuration" program to set the AC3Filter for system wide usage.
You can setup you speaker type in use in the "Main" tab.
You can also set the AC3Filter as the prefered AC3 filter in the "System" tab.
There is also a great amount of control over the filter in the" mixer" setting tab.


AC3Filter - it is DirectShow filter for AC3 decoding to play .AVI with AC3 audio tracks and MPEG2 (DVD). Distributed absolutely for free (FREEWARE, OpenSource). Sorry if my English is bad, but I think it is better to have something than nothing.

Main features:

* Full AC3 standard compliance.
* S/P DIF passthrough support.
* Decode MPEG2 PES streams.
* Multichannel output support.
* LFE support.
* Dynamic Range Compression (DRC) support.
* Overflow control and automatic gain control.
* Gain levels control.
* Bitstream information (channel format, bitrate, sample rate, coupling freq and maximun freq).
* Input/output levels.
* Matrix mixer with direct control of mixing matrix.
* Stereo to multichannel mixing.
* DolbySurround/ProLogic/ProLogicII downmixing.
* Delays for each channel.
* Equalizer.


Example ATI HDTV Graph using AC3Filter


Direct link to image
http://img344.imageshack.us/img344/2121/ac30016xi.jpg

Greg
 
Demux any media file's audio/video

Demux any media file's audio/video

g4tvxvid.avi is Source
rawaud.raw is Moonlight DumpPos filter
rawvid.raw is Moonlight DumpPos filter
dsavi.avi (video only) is File Writer

Just replace video renderer and audio renderer at the end by the following:

demux.png


Click the green Run button, and it shouldn't take very long for the demuxing to take place.
 
Last edited:
Thanks grog and xtnight, I've added your examples to the OP.

AC3 filter is nice for multi-channel audio, thanks for including the graph grog! There are a number of other freeware directshow filters you can add to your graphedit arsenal that others may find useful. Some examples forthcoming:)

Thanks again.
 
Filter Configurator

Filter Configurator

Filter Configurator by Trombettworks Link is a very handy filter that allows you to configure VFW codecs (think Huffyuv, Divx...ect.) from within Graphedit!

Take a read through Trombettworks Software site, as he has some valuable resources for the graphedit user. Here's an example of access to xvid's codec configuration pages as an illustration of what the Filter Configurator allows you to do within graphedit:
 
Video for Windows x264 optimized builds

Video for Windows x264 optimized builds

Cool, thanks for adding to OP.

To complement the post above me (on Trombettworks' Filter Configurator), I'll post my build of the x264 trunk here. This includes the Video for Windows codec which is what you'll configure with Filter Configurator. Seems like a perfect opportunity to post these which I compiled last night. :cool:

The following builds are optimized for A64 and P4. They are also multithreaded so hyper-threading, the Pentium D, and the Athlon 64 X2 can be used to their fullest. AVISynth input and MP4 output also enabled. These are for Win32 only. To anyone unfamiliar with x264: it's a (looking very good) open-source H.264 encoder. Decode is done with ffdshow.

The included readme is from the official x264.nl release. However it serves its purpose only to provide general information. There is no automatic installer in this build, but installation is easy with the inf file.

x264 rev.327 Athlon (K6+) package (gcc 3.4.2 mingw-special)

x264 rev.327 Pentium (MMX+) package (gcc 3.4.2 mingw-special)

BTW, latest ffdshow x264 decoder here:
http://mirror01.x264.nl/x264/ffdshow-20051009.exe

UPDATE: Rev. 327 and fixed the crash.
 
Last edited:
I'm getting an error with the x264 encoder, here's my crashinfo.txt from vdub
Code:
VirtualDub crash report -- build 23350 (release)
--------------------------------------

Disassembly:
0db46080: 118af0000000    adc    [edx+f0], ecx
0db46086: f20f118a000100  movsd  [edx+100], xmm1
          00              
0db4608e: 8bbc2440020000  mov    edi, [esp+240]
0db46095: 8b8c24d8010000  mov    ecx, [esp+1d8]
0db4609c: 8b9f84010000    mov    ebx, [edi+184]
0db460a2: 895924          mov    [ecx+24h], ebx
0db460a5: f20f2a9f840100  cvtsi2sd xmm3, [edi+184]
          00              
0db460ad: c7042400000000  mov    dword ptr [esp], 00000000
0db460b4: c7442404000000  mov    dword ptr [esp+04h], 40000000
          40              
0db460bc: f20f5c1da0edb7  subsd  xmm3, [0db7eda0]
          0d              
0db460c4: f20f591dd8ecb7  mulsd  xmm3, [0db7ecd8]
          0d              
0db460cc: f20f115c2408    movsd  [esp+08h], xmm3
0db460d2: e8794a0300      call   0db7ab50
0db460d7: dd5c2448        fstp   qword ptr [esp+48h]
0db460db: 8bb42440020000  mov    esi, [esp+240]
0db460e2: 31d2            xor    edx, edx
0db460e4: f30f1005f0ecb7  movups xmm0, [0db7ecf0]
          0d              
0db460ec: 660f126c2448    movlpd xmm5, [esp+48h]
0db460f2: f30f10beac0100  movups xmm7, [esi+1ac]
          00              
0db460fa: f20f592de0ecb7  mulsd  xmm5, [0db7ece0]
          0d              
0db46102: 0f54f8          andps  xmm7, xmm0
0db46105: db2d10edb70d    fld    real80 ptr [0db7ed10]
0db4610b: f30f            db     0fh
0db4610d: 5a              pop    edx
0db4610e: cf              iretd  
0db4610f: 0f298424500100  movaps [esp+150], xmm0      <-- FAULT
          00              
0db46117: f20f5ee9        divsd  xmm5, xmm1
0db4611b: d9c0            fld    st(0)
0db4611d: f20f592d00edb7  mulsd  xmm5, [0db7ed00]
          0d              
0db46125: f20f116c2448    movsd  [esp+48h], xmm5
0db4612b: dd442448        fld    qword ptr [esp+48h]
0db4612f: d9f1            fyl2x  
0db46131: d9c1            fld    st(1)
0db46133: d9c9            fxch   st(1)
0db46135: dd5c2448        fstp   qword ptr [esp+48h]
0db46139: dd05a8edb70d    fld    qword ptr [0db7eda8]
0db4613f: 660f12542448    movlpd xmm2, [esp+48h]
0db46145: d9f1            fyl2x  
0db46147: f20f5915b0edb7  mulsd  xmm2, [0db7edb0]
          0d              
0db4614f: d9e8            fld1   
0db46151: dd9c2400010000  fstp   qword ptr [esp+100]
0db46158: dd5c2448        fstp   qword ptr [esp+48h]
0db4615c: 660f12742448    movlpd xmm6, [esp+48h]
0db46162: f20f5ed6        divsd  xmm2, xmm6
0db46166: f20f5815a0edb7  addsd  xmm2, [0db7eda0]
          0d              
0db4616e: f20f581598edb7  addsd  xmm2, [0db7ed98]
          0d              
0db46176: f20f2cc2        cvttsd2si eax, xmm2
0db4617a: 83f800          cmp    eax, 00h
0db4617d: 7c08            jl     0db46187
0db4617f: b2              db     0b2h

Windows 5.1 (Windows XP build 2600) [Service Pack 2]

EAX = 4010027f
EBX = 0000001a
ECX = 77c604b8
EDX = 00000000
EBP = 00000000
ESI = 0de90010
EDI = 0de90010
ESP = 0013f274
EIP = 0db4610f
EFLAGS = 00210246
FPUCW = ffff027f
FPUTW = ffff3fff

Crash reason: Access Violation

Crash context:)

x264-327-install.exe win32 binary I downloaded from VL worked OK.
 
rbV5 said:
I'm getting an error with the x264 encoder, here's my crashinfo.txt from vdub

Damn...must be that it's not compatible with SSE or something. I just assumed it would work but I'll try to fix that tonight with different compiler arguments.

OK, fixed it, and updated my links 2 posts ago.
 
Last edited:
Hey Guys,
I posted this over at avs but got no response so I figured that I might get one here. It's about watchhdtv and it's graph. Here's the original post. I hope that it's in the right section.
"First, I want to say that this is an awesome program! It has always worked even if the ati mmc didn't.
Recently I lost the ability to watch a couple of channels here in Toronto. I lost 40-1 CFTO and 39-1 CBS. The signal comes in at over 80% in watchHDTV and mmc as well. I get no audio or video in either channel. As an experiment I fired up graphedit and ran the graph for watchHDTV. I was able to get CFTO (40-1) on 40-4 with no problems, I had no luck with 39-1 though. So I changed the value from 40-1 to 40-4 in the channel list but it doesn't work even though the signal is strong. Does anyone have any ideas as to why this is happening?
thanks,
rbq"

thanks,
rbq
 
Not sure why GraphEdit is able to handle 40-4 and yet WatchHDTV and MMC/DTV do not in your case.

We have PBS here and it includes 9-1,9-2,9-3 and 9-4 so it should not be a failure to scan beyond "x.3" issue.

Since the same filter is used for tuning in all cases I am puzzled as to why one would tune and another would not.

Still in your case this seems to be a PSIP problem.
You may find that 40-x has moved to 9-x in the Toronto area. At least that is what some are reporting.

It may also be of interest that many are playing hit or miss with the 40-1 and working on 40-4 workaround, some HDTV tuners are seeing 40-4 others are not.

http://digitalhomecanada.com/forum/showthread.php?t=27173
http://www.remotecentral.com/hdtv/

Greg

rbq said:
Hey Guys,
I posted this over at avs but got no response so I figured that I might get one here. It's about watchhdtv and it's graph. Here's the original post. I hope that it's in the right section.
"First, I want to say that this is an awesome program! It has always worked even if the ati mmc didn't.
Recently I lost the ability to watch a couple of channels here in Toronto. I lost 40-1 CFTO and 39-1 CBS. The signal comes in at over 80% in watchHDTV and mmc as well. I get no audio or video in either channel. As an experiment I fired up graphedit and ran the graph for watchHDTV. I was able to get CFTO (40-1) on 40-4 with no problems, I had no luck with 39-1 though. So I changed the value from 40-1 to 40-4 in the channel list but it doesn't work even though the signal is strong. Does anyone have any ideas as to why this is happening?
thanks,
rbq"

thanks,
rbq
 
grog said:
Not sure why GraphEdit is able to handle 40-4 and yet WatchHDTV and MMC/DTV do not in your case.
We have PBS here and it includes 9-1,9-2,9-3 and 9-4 so it should not be a failure to scan beyond "x.3" issue.
Since the same filter is used for tuning in all cases I am puzzled as to why one would tune and another would not.
Still in your case this seems to be a PSIP problem.
You may find that 40-x has moved to 9-x in the Toronto area. At least that is what some are reporting.
It may also be of interest that many are playing hit or miss with the 40-1 and working on 40-4 workaround, some HDTV tuners are seeing 40-4 others are not.
http://digitalhomecanada.com/forum/showthread.php?t=27173
http://www.remotecentral.com/hdtv/
Greg

Thanks for your response greg. It only happens with the hdtv wonder. I have a samsung ts160 and it tunes fine on 40-1 and 39-1. 40-1 shows up as 9-1 and 39-1 as 4-1. I suspect that it is something to do with the windows or the actual tuner itself. Thanks for the links I have read most of them though. Someone speculated that it's a frequency problem but I'm not sure that there is a way to change or adjust that in winxp. From what I've read you can adjust that in mce2005 through an xml file.
I rescanned with mmc and I can get audio now but no video. I just fired up the viewastc html file that you wrote about awhile back and I can get 40-4 there as well.
Anyways, thanks for your input and suggestions!
cheers,
rbq
 
rbq: Probably a signal threshold problem. Graphedit won't by itself bother querying the exposed interfaces to determine the signal strength level. ATI MMC probably will though, and I don't know why, but perhaps ATI set the threshold for it not to receive anything unless the signal is above xx%?
 
Back
Top