Log in

View Full Version : DTV tools -- .TS -> AVISynth?


Pages : [1] 2 3

FreQi
23rd March 2003, 08:14
Edit: I've written a more current guide later in this thread (link (http://forum.doom9.org/showthread.php?p=976687#post976687))

I finally managed to upgrade my computer, put an antenna on my roof and install my HiPix card. I am currently getting really good signals for ABC, NBC and CBS (strengths exceeding 80) and am able to successfully "record" the transport streams. I've been poking through the forums a bit, but haven't really come up with any straight how-to's for getting a .ts into avisynth so I can make some sexy xvid's. All I know is I need to use some or all of the following:

* HDTV2Mpeg2 v1.07
* DVD2AVI (no idea what version)
* AVISynth 2.5
* MPEG2DEC.DLL (unknown what version)
* Decomb.dll (one that supports avisynth 2.5)

Could some one type up, or point me to, a basic set up guide? I am familiar with doing tv captures, so all I need to know is how to get a .ts into avisynth. I should be able to figure out the deinterlacing and IVTC'ing.

Note: I did find SMC's post on inmatrix (http://www.inmatrix.com/articles/atsc.shtml) but the steps there seem a bit out-dated, particularly since the use of YU12...

trbarry
23rd March 2003, 17:12
FreQi -

I'll be making up a mini-guide that follows how I've been handling it. I'll post it here but it is still only in the planning stages right now.

But I can summarize a 3 step process:

1) Use HDTV2Mpeg2 (v1.09 or v1.10) just to verify which PID numbers you want, that is, which sub-channel you want from your input stream. You don't actually have to save any files here, just write down the 2 numbers. Optionally you can also use this to cut commercials though I prefer to do it later in VirtualDubMod.

2) Use the save-oe HDTV supporting version of DVD2AVI to make a project file, demux the ac3, and also to decide how you will process the file (which VirtualdubMod template). A test binary of the save-oe version is on my site at www.trbarry.com/DVD2AVIT3.zip. Note you still have to set the PID numbers in the DVD2AVI.ini file for HDTV in this version. Also, you usually can't use Force Film on HDTV and will need Decomb(), TomsMoComp(), or YV12InterlacedReduceBy2() later.

Since the PID numbers are almost always one of the pairs <x11,x14>, <x21,x24>, or <x31,x34> I personally just have 3 folders with 3 copies of DVD2AVI and the ini file and then just start the right one. It's a small program.

3) Then (with Avisynth 2.5 and MPEG2DEC3) use VirtualdubMod to open an HDTV template with the Open Using Avisynth function. I'll post some templates (shell Avisynth scripts) for HDTV with my mini-guide. Or just make and use an Avisynth script. I keep the ac3 so I also load the ac3 file into VdubM here, set the audio delay, cut out commercials if needed, set audio to direct stream copy, and encode. You can also edit the script (Tools->Script Editor) at this point to uncomment some extra filters in the template.

I mostly encode with Xvid and find HDTV needs at least a bit rate of about .25 bits per total pixels encoded. I usually reduce the dimensions to either 1280x720 or 960x544, cropped to remove black bars. For 1280x720 @ 30 fps this comes out to about 7 mbps and for only 950x544 @ 24 it's only about 3.1 mbps, though I may use a bit more.

The real limitation tends not to be the space required but the needed CPU to smoothly play Xvid HDTV clips which rises with higher bit rates, resolutions, and frame rates. For this reason I avoid the newer fancier compression options like b-frames, 1/4 pel, and GMC. This is not just because they are experimental and maybe subject to change but because all of them can tend to need a more powerful CPU to play at higher resolutions. So use them with care but be aware a bunch of folks on the Xvid forum will know a lot more about this than I do, so maybe seek advice there.

And for 60 FPS progressive source material (like 720p or 480p) I'll reduce the frame rate using SelectEven(), possibly followed by Decimate(cycle=5) to get either 30 or 24 FPS.

Most of the rest of the stuff you will need can be found in the Avisynth 2.5 (YV12) FAQ (http://forum.doom9.org/showthread.php?s=&threadid=37276). After the DVD2AVI step it's basically just like processing VOB's except with bigger pictures.

To get you started, here is the HDTV_1080_To_Qtr_Res.avst template. This is is a fast simple one that will deinterlace/ivtc most any 1080i stream to a 960x544 output. Just cut and paste it to a file by that name in your Virtualdubmod/template folder, then say Open With Avisynth, choose this template (first!) then choose your .d2v project file as the input file.

#ASYNTHER HDTV_1080_QTR_RES (To 960x544)
[MPEG2Source("%f",cpu=0)]
#crop(8,64,0,-64) # Uncomment to crop if needed
#UnDot() # Uncomment to remove mosquito noise
YV12InterlacedReduceBy2()
#Decimate(cycle=5) # UnComment for movies to get 24 fps
return last

Feel free to ask here again if you have more specific questions on this. My post here was just a brain dump of what I'd been planning.

BTW, kudos & props to the Virtualdubmod & Avisynth teams for making all this a bunch easier than it used to be. :)

- Tom

edit: Since I've got this far I've made this thread sticky until I get a real mini-guide out.

FreQi
24th March 2003, 21:38
Does using DVD2AVIT3 eliminate the need for converting the .TS's into VOBs (or aka mpeg2). That sounds like a nice time saver, but I also read somewehre that it's really easy to make these Transport Stream -> VOBs into DVD's (I have access to a burner). However, that should probably be a totally different thread...

I continued to poke around trying to figure out how to get my d2v into avisynth, and I managed to find out DVD2AVI v1.76 fixed me up. The .d2v file that DVD2AVI 1.77 was making didn't want to open in AVISynth 2.08 (I switched back to 2.0x when I couldn't get 2.5 to work with MPEG2DEC.DLL from Dividee). The problem I ran into was AC3 Audio. I would really like to keep ac3 audio with my encodes, however I do not know how to use avisynth to make my Trim()'s cut the audio as well. Is MarcFD's AC3Source (http://ziquash.chez.tiscali.fr/) what I am looking for? (it's an avs 2.5 filter, so I'll have to switchup to 2.5 and MPEG2DEC3.dll). In the past I have always worked with huffyuv avi's with wav audio. What I know I can do is use DVD2AVI to demux the audio to a 44.1 wav, then use AVISource().AudioDub() and just stick with vbr mp3. But when those 5.1 audio feeds come of the air, I'll really want to know how to keep AC3 (won't I?).

BTW, The reason I want to make avisynth do the video and audio cuts (instead of vdub) is because I bounce between divx 3.11a and xvid, and I want to make sure the material each is encoding is exactly the same. Trying to set the exact same frame cuts in vdub and then in nandub is a waste of time when I can just open the same .avs in the different programs.

trbarry
25th March 2003, 05:54
Yep, you don't need to convert it to a vob first. A few of the DVD2AVI versions just demux and do that on the fly.

And if the only thing you are worrying about is getting the exact same deleted sections then you can just save & load the processing settings in Vdub. I always save them anyway in case something decides to crash or I have to do it over for some other reason.

I keep meaning to learn more about how Avisynth handles 5.1 sound but I've pretty much gotten used to this way now.

- Tom

FreQi
25th March 2003, 08:23
It seems I am unable to use YV12. Here's what brings me to that conclusion (I'll write these out in case other people have any of these symptoms, maybe they suffer from the same problem I am):

* When I use DVD2AVIT3 to open a set of .TS files, I get an error saying "You video card cannot handle YUV display. Conversion will work, but you will not get any display in YUV mode". I click OK and it crashes. Note: The error message does say "You video card..." instead of "Your..." in case you feel like correcting grammar ;]

* Then I tried using AVISynth 2.51 and VirtualDub 1.5.1 to open a script (below) but got the error message "Couldn't locate decompressor for format 'YV12' (unknown)" and it goes on to say I need a Video for Windows (VFW) codec. So I tried installing MarcFD's vble video codec (beta version).zip (http://forum.doom9.org/attachment.php?s=&postid=263985) (linked here (http://forum.doom9.org/showthread.php?s=&threadid=38389&perpage=20&pagenumber=5#post263985)) thinking "well, that's a YV12 codec" but that didn't seem to help.

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ac3source.dll")
MPEG2Source("ss-e12.d2v")
AC3source("ss-e12 AC3 T01 3_2ch 384Kbps DELAY -371ms.ac3")
BicubicResize(512,384,0,0.5, 170,4,940,716)

* I thought the problem might be that I was using VirtualDub 1.5.1, so I installed VirtualDubMod v1.4.13_2 with needed_DLLs_251102 and AviSynthLexer_0_1.zip, but when I first open vdmod, I get the License agreement, acept it and it crashes.

* Lastly, I decided to simply add ConvertToRGB32() to the (above) avisynth script, and VirtualDub 1.5.1 was able to open it just fine.

So I can't seem to work with YV12, and I don't really know why, except it seems to be the video card, or driver. I'm currently using an old nVidia RIVA TNT2 64mb card that I intend to replace in a week or so. Is there anything I should look for in a card to avoid this problem? Or is there something simple I am over looking?

Wilbert
25th March 2003, 17:02
Then I tried using AVISynth 2.51 and VirtualDub 1.5.1 to open a script (below) but got the error message "Couldn't locate decompressor for format 'YV12' (unknown)" and it goes on to say I need a Video for Windows (VFW) codec. So I tried installing MarcFD's vble video codec (beta version).zip (linked here) thinking "well, that's a YV12 codec" but that didn't seem to help.
Install DivX5 or one of the recent builds of Koepi (a stated in the AviSynth v2.5 FAQ).

AC3source("ss-e12 AC3 T01 3_2ch 384Kbps DELAY -371ms.ac3")
I should warn you that this plugin downmixes to a two channel audio. Of course you can also mux the AC3 with VirtualdubMod.

I thought the problem might be that I was using VirtualDub 1.5.1, so I installed VirtualDubMod v1.4.13_2 with needed_DLLs_251102 and AviSynthLexer_0_1.zip, but when I first open vdmod, I get the License agreement, acept it and it crashes.
Empty the plugin dir of AviSynth and try again. If that doesn't help install VirtualDubMod v1.4.13_1.

Lastly, I decided to simply add ConvertToRGB32() to the (above) avisynth script, and VirtualDub 1.5.1 was able to open it just fine.
That's because Virtualdub 1.5.1 can't handle YV12 clips, while VirtualdubMod (in fast recompress mode) can. This is all stated in the AviSynth v2.5 FAQ.

trbarry
25th March 2003, 18:43
* When I use DVD2AVIT3 to open a set of .TS files, I get an error saying "You video card cannot handle YUV display. Conversion will work, but you will not get any display in YUV mode". I click OK and it crashes. Note: The error message does say "You video card..." instead of "Your..." in case you feel like correcting grammar ;]

It's a limitation of your video card but it doesn't really matter if you are using MPEG2DECx. Try the following:

1) Delete your DVD2AVI.ini file.

2) Bring up DVD2AVI but change to RGB. This is ignored by MPEG2DEC3 anyway but affects the preview display. Exit again without opening any files. This will save a new default DVD2AVI.ini file.

3) Put the correct PID's in the DVD2AVI.ini file and try opening your files again.

That message spelling has been there since the beginning but I'll try again to remember to fix it. ;)

- Tom

Entropy512
25th March 2003, 19:13
Originally posted by trbarry
It's a limitation of your video card but it doesn't really matter if you are using MPEG2DECx. Try the following:

1) Delete your DVD2AVI.ini file.

2) Bring up DVD2AVI but change to RGB. This is ignored by MPEG2DEC3 anyway but affects the preview display. Exit again without opening any files. This will save a new default DVD2AVI.ini file.

3) Put the correct PID's in the DVD2AVI.ini file and try opening your files again.

That message spelling has been there since the beginning but I'll try again to remember to fix it. ;)

- Tom
Sometimes a partially corrupted input file can also cause this.

I've received this error message, even though 90% of the time I don't get it, on certain files I will get it 100% of the time. Usually those files are ones that I give up on transcoding eventually. (When decoding from VOBs created with HDTVtoMPEG2, the AC3 audio stops prematurely, when directly importing the transport stream, the decoder will crash at some point in the transcode process, even after using the GraphEdit cleanup trick used in the AVSForum WM9 encoding guides.)

trbarry
26th March 2003, 01:53
I've tried a number of tricks for problem .tp files but usually these days I'll just delete the darn things unless I really want it.

But if HDTV2mpeg runs into any problems at all I recommend not bothering to try the output but instead immediately switch to a different method. It is disheartening to get all the way through encoding and then find the audio is not fixable for some reason.

I've gotten so paranoid about break-ups that I mostly record only in the background and not use the computer for anything else until it's over.

Another useful trick in DVD2AVI is to skip the first minute or so if it's a commercial. Do this by hitting the "[" key at the right location. Some (all) HDTV cards cause a couple more break-ups at the beginning as they start recording.

Back when I was using a Hipix card I often would start the recording a minute early just so I could have something to throw away.

- Tom

Entropy512
26th March 2003, 14:44
Originally posted by trbarry
I've tried a number of tricks for problem .tp files but usually these days I'll just delete the darn things unless I really want it.

But if HDTV2mpeg runs into any problems at all I recommend not bothering to try the output but instead immediately switch to a different method. It is disheartening to get all the way through encoding and then find the audio is not fixable for some reason.

I've gotten so paranoid about break-ups that I mostly record only in the background and not use the computer for anything else until it's over.

Another useful trick in DVD2AVI is to skip the first minute or so if it's a commercial. Do this by hitting the "[" key at the right location. Some (all) HDTV cards cause a couple more break-ups at the beginning as they start recording.

Back when I was using a Hipix card I often would start the recording a minute early just so I could have something to throw away.

- Tom
Thanks for the tips. I typically delete the files after 2-3 failures, but I've been getting more aggressive about it as time goes by and I know more about what almost always works and what never seems to work. :)

In my case, I think one of the only solutions will be a bigger antenna. Something I need to work on anyway. :)

FreQi
27th March 2003, 12:12
It seems my problems with YV12 were fixed by installing a new version of XviD, and the new version of VirtualDubMod. I no longer get any error messages or program crashes, so I've been working on getting this under way for the last couple hours. I have most of a step-by-step done, however I haven't actually encoded anything yet because I kind of got stuck, and it's bed time. But here is what I have done so far (pls forgive spelling and grammar, this was a "quick" write up).


How To get HiPix Transport Streams into VirtualDubMod via AVISynth

Apps used in this guide:
- HiPix DTV-200 v3.5.2 Release Candidate 1 (AVS Forum Version (http://www.midwinter.com/hipix/))
- HDTV2Mpeg2 v1.09 (http://www.avsforum.com/avs-vb/attachment.php?s=&postid=1408610)
- DVD2AVIT3 v1.83 (http://www.trbarry.com/DVD2AVIT3.zip) (modified ver of DVD2AVI v1.76 for Transport Streams)
- AC3Filter v0.66b (http://ac3filter.sourceforge.net)
- Nic's 2003-Mar-16 build of XviD (http://nic.dnsalias.com)
- VirtualDubMod (http://sourceforge.net/projects/virtualdubmod) v1.4.13.2v2 (http://prdownloads.sourceforge.net/virtualdubmod/VirtualDubMod_1_4_13_2v2.zip?download) +vd-dll's (http://prdownloads.sourceforge.net/virtualdubmod/VirtualDubMod_needed_DLLs_from_VirtualDub_1_4_13.zip?download), Lexer 0.1 (http://prdownloads.sourceforge.net/virtualdubmod/AviSynthLexer_0_1.zip?download), DLLs_260303 (http://prdownloads.sourceforge.net/virtualdubmod/VirtualDubMod_needed_DLLs_260303.zip?download), modified AviSynth 2.5.1 (http://prdownloads.sourceforge.net/virtualdubmod/Avisynth-2.5.1-VirtualDubMod.zip?download) (all extracted to the same dir)
- Donald Graft's (http://sauron.mordor.net/dgraft/) Decomb.dll v4.06 beta 6 (http://sauron.mordor.net/dgraft/decomb/decombnew.html)
- AviSynth (http://avisynth.org) v2.5.1 (http://prdownloads.sourceforge.net/avisynth2/AviSynth_251.exe?download)
- MarcFD (http://ziquash.chez.tiscali.fr/)'s MPEG2Dec3 v1.00 (http://ziquash.chez.tiscali.fr/MPEG2Dec3%20v1.00.zip)


Step 1: Record some DTV

- Use the HiPix software from AVS Forum to tune/record some tv

- Take note of the Resolution and Frame Rate it records in. You'll need to know this later on.

- The HiPix is the only card I have, but I believe anything that makes .TS files will work with the rest of this guide as well.


Step 2: Find your PID numbers

- Start HDTV2Mpeg2 and open your recorded .TS files

- Select the Channel you want from the drop down (This really only matters if the source you recorded from multicats content)

- See what the Video PID and Audio PID's are

- Close HDTV2Mpeg2 (do not do any converting)


Step 3: Create a D2V project file and Demux the AC3 audio

- Before you start DVD2AVIT3, make sure your dvd2avi.ini file has the video and audio PID's set to the same thing you found in HDTV2Mpeg2. It should look like one of the following lines:
MPEG2_Transport_PID=11,14
MPEG2_Transport_PID=21,24
MPEG2_Transport_PID=31,34

- Start DVD2AVIT3 and open your .TS files

- Set the following options in the menus (some may be the defaults)
* Video -> Field Operation -> None
* Audio -> Track Number -> Don't process Audio
* Audio -> Channel Format -> Auto Select
* Audio -> Dolby Digital -> Demux All Tracks
* Audio -> MPEG Audio -> Demux

- Save the project file by pressing F4 (File -> Save Project)

- Watch the Statistics Window until it finishes.
Note: If DVD2AVIT3 looses focus, it seems to halt processing


Before you do the next step, make sure you have a version of XviD installed that supports YV12 (I used Nic's from 2003-Mar-16). To hear the AC3 you demuxed, you'll want to install AC3Filter so you can play it in media player. Also make sure you have VirtualDubMod and all the DLL packs/etc to get that working. Make sure you have AVISynth 2.5.1 (or newer) installed with the YV12 version of Decomb.dll and MPEG2Dec3.dll in it's plugin dir. You'll also want to put the following in with VDMod's Templates dir:

----- Begin: hdtv-1280x720-59.940fps.avst -----
#ASYNTHER HDTV 1280x720 59.940fps

# This template will take a source with a res of 1280x720 at a
# frame rate of 59.940fps and perform IVTC to get 23.976fps and
# resize it to 640x352. Other Resize options are below.

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")

[MPEG2Source("%f")]

Telecide()
SelectEven()
Decimate(cycle=5)

# When Source AR is 1.778:1 -- 16:9 Wide-Ssreen
Crop(4,4,-4,-4)
#Resized AR 1.800:1 with 170,240 pixels
#BicubicResize(576,320, 0, 0.5)
#Resized AR 1.818:1 with 225,280 pixels
BicubicResize(640,352, 0, 0.5)

# When Source AR is 2.4:1 (Theatrical/Panavision Wide-Screen)
#Crop(?,?,?,?)
#Resized AR 2.437:1 with 159,744 pixels
#BicubicResize(624,256, 0, 0.5)
#Resized AR 2.350:1 with 174,080 pixels
#BicubicResize(640,272, 0, 0.5)
#Resized AR 2.5:1 with 163,840 pixels
#BicubicResize(640,256, 0, 0.5)

# When Source AR is 1.333:1 -- 4:3 Full-Screen
#Crop(?,?,?,?)
#Resized AR 1.333:1 with 163,840 pixels
#BicubicResize(512,384,0,0.5)
----- End: hdtv-1280x720-59.940fps.avst -----


Step 4: Trim unwanted footage

- Start VirtualDubMod

- File -> Open video file via AviSynth...

- Select the Template that is appropriate for the material you recorded. For me, ABC broadcasts have a resolution of 1280x720 at 59.940fps, so I'd select that template (the one listed above).

- Scroll through the video to see if you like the cropping/resizing.

- Make any changes you may need by using the Script editor (under the Tools menu or just hit Ctrl-E)

- Once you're happy with the Crop/Resize, it's time to add your audio.
* Go to AVI -> Audio -> Interleaving. Under "Audio skew correction" enter the value that is in the name of the AC3 File that DVD2AVIT3 demuxed. It's the number between DELAY and ms.ac3 (ex: for "mwnk AC3 T01 3_2ch 384Kbps DELAY -327ms.ac3" you'd put in -327)
* Go to AVI -> Audio -> AC3 Audio. Select the AC3 file. Also make sure Direct Stream Copy is selected.

- Now use the slider and "Selection Start/End" buttons to delete the frames you do not want (Commercials/etc).

- SAFTEY FIRST: Now Save your processing settings, in case something breaks. Just go to File -> Save Processing Settings


Step 5: Audio Treatment

- There are so many things you can do with the audio, but for now, I'm just going to convert it to a VBR MP3. Possibly a better alternative would be to downsample the AC3 to make the file smaller, but I don't know enough about AC3 yet. Mabe in an updated guide...

- Now save your "edited" audio by going to AVI -> Demux audio...


Right about there is where I got stuck. I have very little know-how when it comes to dealing with AC3 audio at this point. I tried opening up BeSweetGUI but I'm in no condition to try figuring out what all thoe options are right now. I'd like to know how to do a few things at this point:

1) How can I make my AC3 a WAV so I can open in Audacity and amplify/clean it, then encode with RazorLAME.

2) How do I go from AC3 -> Normalized -> VBR MP3 using LAME's --r3mix switch(es)? I admit I haven't looked much, but I didn't see a way to add a profile to BeSweetGUI (so tired...)

3) How can I go from AC3 -> Normalized -> Downsampled AC3?

Anyway, I'm interested in your take on the steps I've taken so far.

jrmann1999
27th March 2003, 15:31
You forgot one important tool.
BeSplitv0.82.zip (http://dspguru.notrace.dk/BeSplitv0.82.zip)
This utility allows you to "fix" the AC3 stream if you have CRC or sync errors.

trbarry
27th March 2003, 16:31
FreQi -

Great write-up.

I can't help you much with the audio since I just keep the ac3 anyway. But in your template, for 720p source I think you can remove the Telecide() line since it probably doesn't do anything for 720p except take time.

- Tom

FreQi
27th March 2003, 21:12
Ak, you're right. I didn't even think about the fact it was progressive scan. I've posted an updated template below. Being new to VDMod templates, is my used of "LoadPlugin" appropriate? I was looking at the sample templates and the plugins seem to be used there, but are not specified. I looked in the VDMod FAQ (http://forum.doom9.org/showthread.php?s=&threadid=44244) and the AVISynthesizer home page (http://tangentsoft.net/video/asynther/) but didn't see anything about it.

----- Begin: hdtv-1280x720p-59.940fps.avst -----
#ASYNTHER HDTV 1280x720p @ 59.940fps
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")

[MPEG2Source("%f")]

SelectEven() # reduce frame rate to ~30fps
Decimate(cycle=5) # reduce framerate to ~24fps

# When Source AR is 1.778:1 -- 16:9 Wide-Ssreen
Crop(4,4,-4,-4) # take 4 pixels of left, top, right, bottom
#Resized AR 1.800:1 with 170,240 pixels
#BicubicResize(576,320, 0, 0.5)
#Resized AR 1.818:1 with 225,280 pixels
BicubicResize(640,352, 0, 0.5)

# When Source AR is 2.4:1 (Theatrical/Panavision Wide-Screen)
#Crop(?,?,?,?)
#Resized AR 2.437:1 with 159,744 pixels
#BicubicResize(624,256, 0, 0.5)
#Resized AR 2.350:1 with 174,080 pixels
#BicubicResize(640,272, 0, 0.5)
#Resized AR 2.5:1 with 163,840 pixels
#BicubicResize(640,256, 0, 0.5)

# When Source AR is 1.333:1 -- 4:3 Full-Screen
#Crop(?,?,?,?)
#Resized AR 1.333:1 with 163,840 pixels
#BicubicResize(512,384,0,0.5)
----- End: hdtv-1280x720-59.940fps.avst -----

I also started writing one for 1920x1080i, but until I actually play with it, I'll keep it to myself to avoid confusion.

There's already a software update to the above guide. It looks like Graft updated Decomb.dll (http://sauron.mordor.net/dgraft/decomb/decombnew.html) last night, so I'm now using 4.06 Beta 7 (http://sauron.mordor.net/dgraft/decomb/decomb406b7.zip).

@trbarry
There's one thing about DVD2AVI that has been bothering me. Maybe you have the tools to do something about it. I noticed that when I open files, the "File List" window is not resizeable. It doesn't even add scroll bars. And when I click ADD I can not select multiple files (like you can with HDTV2Mpeg2). When my files are in 2 sub directories and have names like "[2003-03-22 11.35pm] She Spies.0000.ts" it is impossible to tell what files are being loaded and in what order. The only way around it is to rename the dirs and files. Can this be changed?

trbarry
27th March 2003, 23:23
Being new to VDMod templates, is my used of "LoadPlugin" appropriate? I was looking at the sample templates and the plugins seem to be used there, but are not specified.

You can specify path names for testing but if they are in that default plugin folder they will be found anyway, starting with Avisynth 2.x (?). So as long as you have run the install then you don't need those lines. And that isn't anything specific to Virtualdubmod, it's true for all filters.

There's one thing about DVD2AVI that has been bothering me. Maybe you have the tools to do something about it. I noticed that when I open files, the "File List" window is not resizeable. It doesn't even add scroll bars. And when I click ADD I can not select multiple files (like you can with HDTV2Mpeg2). When my files are in 2 sub directories and have names like "[2003-03-22 11.35pm] She Spies.0000.ts" it is impossible to tell what files are being loaded and in what order. The only way around it is to rename the dirs and files. Can this be changed?

I've been lazy about that, but probably won't fix it that way. The trick is that DVD2AVI (all of them) will get up to 10 sequential file names if you just select one of them. But there is a bug that it doesn't do it properly for files that don't have a 3 letter file type. So I've been renaming mine to "trp". I'll fix that part shortly, along with coming up with a default of mpeg2 & HDTV files.

I don't really consider that DVD2AVI pgm mine and don't work on it much but occasionally someone sends me a fix or something irratates me enough that I go change it. But it's all in Sourceforge (and source in my zip) if anyone wants to have at it. ;)

- Tom

trbarry
30th March 2003, 08:33
See http://forum.doom9.org/showthread.php?s=&threadid=49866

I corrected that spelling error. ;)

Also made the file list box bigger, corrected handling of 2 char file types, and the occasionally huge audio delay.

www.trbarry.com/DVD2AVIT3.zip

- Tom

jrmann1999
1st April 2003, 21:17
I can thank you wholeheartedly. For once I didn't have a -12349812ms audio delay and I muxed within 1 minute of finishing a transcode. Thanks for all your help.

FreQi
2nd April 2003, 08:36
I haven't had much of a chance to play with the new version, but I did get to use it on two encodes, and I have to say it's nice being able to load the .ts files now without renaming all 40 files (although I do still need to rename the directory to fit the full name in the box).

Thank you!

Mikename
25th April 2003, 03:26
to clean the audio I use a command line utility called ac3fix to get rid of the silent errors that seem to seep into all my feeds. Then I just use Headac3he to dump it to a wave, do whatever you want in audacity, then razor lame it to mp3.

eng3
20th December 2003, 10:19
thanks for the guide.
I just started with HDTV so I don't know much.
Everything worked great except for the audio sync. It seemed alittle off when I viewed the .tp file, but after typing in the delay that DVD2AVI told me, it was even more off.

FreQi
20th December 2003, 10:25
You might need to note the value of the audio delay. I remember being confused about the value being negative and I wasn't sure if I should specify the - or not because at the time, the thought of a "positive delay" was just really confusing. Basically, if the AC3 that DVD2AVI gives you says it's -324 ms, then that's what you put in VirtualDub. If it say's it's a 634ms delay, then you use that. I never did finish this guide once I got the audio part down, and I feel horrible about that, but the tools have all been updated since then, so I'd want to completly re-write it with the updated tools...

If you have questions, I might be able to help out, so don't hesitate to ask.

jrmann1999
20th December 2003, 16:45
You might also want to look into ac3delay corrector. Some of the ac3's that vdubmod produces are technically correct(insomuch as the delay was auto-detected) but the ac3 doesn't have the right delay in it's headers. ac3delay corrector fixes that.

FreQi
20th December 2003, 18:27
Personally, I do not like to have an audio delay in my final encodes (meaning I like to have a delay value of 0 in the finished product, be it xvid or dvd compliant mpeg2). I just think it safer and possibly more compatible with different players if there is no delay. So the method I use for the audio treatment eliminates any delay, and I don't know if ac3 delay corrector (http://home.t-online.de/home/520072193568-0001/) would be necessary.

In brief...

After I use DVD2AVI to demux the ac3 and generate a d2v, I use VirtualdubMod and an avs template I wrote to open the d2v. Then I set the audio delay to whatever the delay value is for the ac3, then I select the ac3 file and put it in Direct Stream Copy mode. Then I use the slider and range markers to delete the commercials out, and save my processing settings. I then use VDMod to demux the ac3.

This gives me the audio file for just the portion of video I want, and because the delay has alredy been applied, the effective delay on this newly cut and demuxed ac3 is now 0 (zero). But because AC3 is written in blocks, you can't exactly cut the audio stream in any arbitrary place without cutting a block in half. So this trimmed ac3 you've just demuxed has errors in the audio stream. To fix this, I just open up BeSliced (a GUI for BeSplit (http://dspguru.doom9.net/)) then drag-n-drop the trimed ac3 on it and select "fix". This scans the ac3 and fixes the cuts.

Once you have the fixed ac3, you can decide a couple paths, depending on what your final encode will be for. I ususally pick one of three options.
1: Use BeSweet to encode the AC3 to an MP3. This is usually the case when making an XviD.
2: Leave the AC3 alone. This would be if I was making a particularly large XviD, but typically would be if I am encoding for a DVD.
3: Use AC3Machine to transcode the AC3. I'd only do this if the source AC3 is 5.1, but I know the audio within that is only 2ch stereo (my ABC affiliate broadcasts in 5.1, but anything non-hd on the dTV feed is only stereo, so transcoding to a lower bitrate 2ch AC3 makes sense).

Now that I have the audio cut commercial free, you might be wondering how I get the video to be cut to match. This is the reason I save the vdmod processing settings. What I do is open the .vcf in ultraedit (or notepad) and I copy the AddRange lines to my .avs script, and use a function I wrote to convert these virtualdub Ranges to avisynth Trim()'s. This perfectly matches the cuts in the audio to the cuts in the video. So let's say the .vcf has these Ranges in it:

VirtualDub.subset.AddRange(1269,2708);
VirtualDub.subset.AddRange(15603,33680);
VirtualDub.subset.AddRange(62108,23270);
VirtualDub.subset.AddRange(94955,17768);

I just put that in my avs like this:

AddRange(1269,2708)++AddRange(15603,33680)++AddRange(62108,23270)++AddRange(94955,17768)

The function I wrote is simply named AddRange and looks like this:


# to easily translate VirtualDub's version of "Trim()"
# c = video clip
# s = frame number to start on
# r = number of frames to take after, and including, s (the range)
function AddRange(clip c, int s, int r)
{ return c.Trim(s,s+r-1)
}

Once I have these cuts in my avs, all that's left is to encode the video. If I'm going to make an xvid, I simply set virtualdub to Fast Recompress and the Audio to None and encode it. If I'm making a DVD, I drop the avs into CCE. When it's all done I just mux the audio and video together without setting any delay values because it was applied before doing any cuts (I still use nandub to mux xvid and vbr mp3's).

I think that just about covers it...

eng3
21st December 2003, 05:13
Originally posted by FreQi
You might need to note the value of the audio delay. I remember being confused about the value being negative and I wasn't sure if I should specify the - or not because at the time, the thought of a "positive delay" was just really confusing. Basically, if the AC3 that DVD2AVI gives you says it's -324 ms, then that's what you put in VirtualDub. If it say's it's a 634ms delay, then you use that. I never did finish this guide once I got the audio part down, and I feel horrible about that, but the tools have all been updated since then, so I'd want to completly re-write it with the updated tools...

If you have questions, I might be able to help out, so don't hesitate to ask.

I played around with this and tried the ac3 fix thing, it said it saw some errors
I used beslice to fix it, but the audio was still out of sync.

for me, DVD2AVI says "-421ms"
I tried typing 421ms POSITIVE into virtualdub, and it seems insync now.
I guess I had it backwards.

Everything seems to work well now, though I tried capturing with a different channel today and when I tried opening it in HDTV2MPEG2 and the video and audio pid's were ZERO. I'm assuming my clip was corrupt

FreQi
22nd December 2003, 07:50
Are you using the latest version of HDTV2Mpeg2 ? Just a few days ago I found version 1.10b (http://www.derangedkiwi.net/software/) and it's a bit more rhobust than the v1.09 I was using. I haven't run into a time when the PID's were not 11/14 or 21/24, so you could always just take a stab in the dark and see which ones work for that particular recording.

If I remember right, the newer version of VirtualDubMod actually auto-compensates for the audio delay by reading the name of the audio file you import. Now, I don't know if this just sets the delay for you, or if it uses some behind the scenes voodoo, but I'm affraid I am not qualified to comment on that since I am still using vdmod v1.4.13, and 1.5.10.1 has been out for a couple weeks now. So I am a little behind the times on that software.

trbarry
29th December 2003, 18:09
for me, DVD2AVI says "-421ms"
I tried typing 421ms POSITIVE into virtualdub, and it seems insync now.
I guess I had it backwards.

That's pretty scary. It used to be that you would type in -421 for a delay, including the sign. Has Vdubmod changed?

- Tom

eng3
6th January 2004, 00:59
Originally posted by trbarry
That's pretty scary. It used to be that you would type in -421 for a delay, including the sign. Has Vdubmod changed?

- Tom

Its strange, I don't know which way it should go. Sometimes including the - works, sometimes not including the - works. At least its either one or the other.

Anyways, this dvd2avi/Avisynth/virtualdubmod technique works great.

I also would like to try making a DVD.
Should I just do the same thing (cut out commercials and synch audio), and save it to uncompressed AVI, then use TMPGEnc to re-encode it for DVD?

FreQi
6th January 2004, 10:10
Just feed the .avs to your dvd encoder. If it won't open it, rename the .avs to .avi and it should read it just fine. The only advantage to putting it to an uncompressed avi would be if you're doing multiple passes on your dvd encode (think more than 2). If you're doing 6 passes, an uncompressed avi as a source might get it done quicker than if you have avisynth process the source every time.

bdraw
27th January 2004, 16:01
I am just getting started and I would like to edit the show at the beggining of the process using HDTV2MPEG but on my first attempt the audio gets off sync at one of the edits despite running the ac3 file through both ac3fix and beslice.

Do most of you edit using Virtualdubmod?
If so I know there has to be a link to a site that explains those cryptic buttons on the bottom of Virtualdub better, that I asume are used for editing. I guess I need it spelled out.

I have already read "VirtualDubmod procedures"(http://www.doom9.org/vdubmod-procedures.htm) and am still not clear how I would use virutaldubmod to edit. In the past I have used HDTV2MPEG and Vidomi to edit. I have also used TMPGENC but I hope this is not anything like it, becuase I find that method awkward.

trbarry
27th January 2004, 20:36
I always edit HD commercials with vdmod because of the audio sync problems you mentioned in HDTV2MPEG. Editing involves selecting the start and end of the range with the check buttons and then hitting the delete key to delete the section marked. Since you are now working with uncompressed video there is no need to try to cut on key frames.

Vdubmod seems good at cutting the ac3 in legal places, so there is probably no problem there.

But since editing can be a time consuming process you should "Save Processing Settings" once in awhile (like any ap) since I think MPEG2DEC3 can sometimes crash when using the left arrow key or button to go back on frame at a time, at least with some filter combinations.

There is bubble help over the buttons if you hover the mouse and there are also shortcut keys shown on the edit menu and I think in the help. Clicking on the seek bar with uncompressed data seems to move 50 frames at a time, IIRC.

If you have a range of frames selected when you Save then only that selection is saved/encoded.

More complex questions & answers can be found by searching and/or posting in the Virtualdub forum here.

- Tom

bdraw
27th January 2004, 20:40
Thanks, Tom I was missing the "Delete" key, I kept hitting the mark in and mark out and it would only let me mark one part at a time. Now I know what I was missing.

bdraw
31st January 2004, 20:57
I am still having trouble.

For some reason vdubmod does not recognise that the ac3 stream is the correct legnth. It detects 34mins when it is really 57mins. I have not edited clip. I can open the ac3 file in WMP and elecard the time is detected properly. The sound is fine, there is not dropouts.

I can drag the ac3 file into graphedit and playback is fine.
Threatmatrix.ac3-->AC3 Parser Filter-->Intervideo Audio Decoder-->ReClock

I have tried both ac3fix and beslice to try to check for errors in the ac3 file. There are none reported.

When I mux in the audio using vdubmod it doesn't get passed 0:34:37
Anyone have any idea why vdubmod(1.5.10) would detect the incorrect legnth?

FreQi
1st February 2004, 22:37
What did you do to get this AC3? Did you get it from DVD2AVI? HDTV2Mpeg2? Did you cut any ranges out of the sources you demuxed from? What version(s)?

bdraw
1st February 2004, 22:48
Originally posted by FreQi
What did you do to get this AC3? Did you get it from DVD2AVI? HDTV2Mpeg2? Did you cut any ranges out of the sources you demuxed from? What version(s)?

I cliped the begginning and the end of the clip(using HDTV2MPEG v1.10b), but no splicing anywhere else. I did not use HDTV2MPEG to convert it to .mpg. I opened the transport stream with DVD2AVIT3(v1.83) from Trbarry. Besweet has no problem at all converting the ac3 file to mp3. If I insert the mp3 stream using vdubmod it detects the correct legnth.

NorcoO1
15th June 2004, 23:07
Has anybody else experiment in VdubMod with using WMV9 as the compression? I was messing around with it and wondering what kind of quality xvid offers against WMV9.

jrmann1999
16th June 2004, 14:13
The true hinderance to most people using WMV9 is being restricted(mostly) to windows only machines for playback. Other than that I think it's all "in the eye of the beholder" as to what you like.

Personally I've found that WMV9 is a bit tougher to achieve good quality encodes. Probably only because I'm so used to xvid though.

NorcoO1
16th June 2004, 22:16
I'm having issues with audio and video not being in sync. The only cause of this I can assume is that the clips that have sync issues are the ones that multicast. So CBS has no problems encoding, but NBC gives me out of sync issues. I do all the same settings in VDubMod with both stations, making sure to put the correct delay on and such. Another thing that makes me wonder is when I'm making a project file in DVD2AVI, the timecode shows a negative when I do NBC multicast HD, and its positive when I do CBS shows. Anybody know what the deal is? Thanks.

jrmann1999
2nd July 2004, 20:53
Hopefully someone has told you by now that vdubmod has issues demuxing AC3(the delay values are wrong) so if you interleave and demux assuming that you now have 0 delay, you do..but the headers in the AC3 file don't reflect that so any player that reads them will delay it. There's a tool called AC3 Delay corrector that lets you patch up all the headers to the correct delay, fixed 99% of my problems with audio. My issue now is that vdubmod is 50/50 on importing and recognizing a delay(fixing it itself) or not, no real big deal just more of a pain to have to demux audio twice.

crahak
6th July 2004, 20:33
Just a quick note

It seems like everyone is doing

SelectEven()
Decimate(cycle=5)

But I find it's too choppy, and it looks like most people end up not using the decimate because of that and encoding at 30fps instead of 24. I like to use 24 personally (more bits/(pixel*frame) and less cpu needed to decode, making the use of B frames easier too...)

If you use those 2 lines in that order here's what happens:

take 15 consecutive video frames, which we'll name A to O

Source: ABCDEFGHIJKLMNO
After SelectEven: ACEGIKMO
After Decimate: ACEGKMO

See where it jumps from G to K? instead of dropping only a single frame, where it was decimated, we dropped 3 consecutive frames, which makes it look choppy.

If you Decimate first, then SelectEven after, then the max consecutive frames dropped is 2, which is significantly better. It makes it watcheable at 24fps. :D

Sorry if my explanation sucks... Nothing fancy but it seems most people don't think of it. Hope it helps.

FreQi
7th July 2004, 04:54
You shouldn't really think of SelectEven() as being used to drop frames. In the conext of this "guide" it's really being used to drop one of the fields of the video.

Remeber that with an interlaced source at 29.97 you use SeperateFields() first, which doubles the frame rate and makes each field it's own progressive frame. THEN you'd use SelectEven() to essentially drop the odd fields.

The only time you'd use that method with a source that's already progressive scan is when it's frame rate was already doubled (to 59.940fps). If you frame-by-frame through an hdtv source like that you'll see that almost every two frames are the same and sometimes you'll get a third. This is pretty much the same effect that results from separatefields() on an interlaced hd source, except the aspect ratios are wonky lookin there.

But yes, using Telecide().Decimate() is a better way to inverse telecine a 29.97fps Interlaced HDTV source. It's just slower.

Sometimes a choppy video results on progressive scan sources, and there you don't really have the option to use Telecide(), but I've found that to be rarely the case (thank god). In these rare but infurriating circumstances MultiDecimate has done the trick for me.

Multidecimate took a lot of poking around to figure out, but this is what I used (I've included my other attempts to fix it more or less just as examples of failure really...)


LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MultiDecimate.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\BT709ToBT601.dll")

MPEG2Source("F:\hd.streams\someshow\series-s1e01.d2v")

# correct the slight color error SDTV->HDTV introduces
BT709ToBT601()

# cut commercials
AddRange(12110,7074)++AddRange(28389,26206)++AddRange(66398,40041)++AddRange(117499,2121)
# 75442 (0:20:58.599) <-- frames and length at 59.540fps

#ConvertToYUY2().MultiDecimate(pass=1)
ConvertToYUY2.MultiDecimate(pass=2,quality=2)
# 30176 (0:20:58.592) <-- Multidecimate settings c:120, r:72, t:0.2, l:3.
# Results in smooth playback, synched audio and good runtime

#assumefps(23.976)
# 30907 (0:21:29.069) <-- increases time too much and would desync audio

#changefps(23.976)
# 30177 (0:20:58.622) <-- good time code but drops frames and become jittery again

#convertfps(23.976)
# 30177 (0:20:58.622) <-- introduces a lot of motion blur and blended scene changes

LanczosResize(720,480)

function AddRange(clip c, int s, int r)
{ return c.Trim(s,s+r-1)
}

crahak
7th July 2004, 05:16
I'm not dealing with interlaced video but 720p.
And I'm discarding video frames, not fields...

(no deinterlacing/ivtc of any kind involved)

The framerate is 59.940 but every single frame (usually) is different. If the source is a 23.976fps film movie upscaled and with framerate brought up, yes, it would be the case...

Anyways. I know the explanation sucked... You seem to be using other methods and I'm sure there's even more ways to it, but so far this works and looks great @ 24fps, xvid/unlimited profile & trellis...

The only problem I ever run across is stream erros which un-sync A/V which sucks. Oh well. No miracle cures for that.

FreQi
8th July 2004, 00:55
I was having problems with a/v desync until I started doing a double fix on the trimmed & demuxed AC3. What I mean by that is after I use VDMod to demux the commercial free AC3, I use AC3Fix.exe to "fix" the cut points. After that I run the fixed AC3 through BeSliced which typically fixes another one or two points. I used to just use BeSliced, but it wasn't uncommon for the AC3 to drift a bit. AC3Fix doesn't suffer this but it seems to leave errors in the stream (at least according to BeSliced). I haven't had a problem with sync since.

Lobuz
11th September 2004, 16:25
There's a newer FDecimate() (http://neuron2.net/fdecimate/fdecimate.html) filter which should help to get rid of duplicated frames in one pass.

Regards
Lobuz

FreQi
13th September 2004, 16:01
Oh, good call Lobuz. I didn't know such a thing existed. I'll have to do a couple trials with FDecimate() to get a feel for performance.

On a side note, I've been working sorta half-assed on a tool that I think most people will find very useful for encoding HDTV sources to DVD compatible MPEG2's. I call it "theeo", "The Encode Orchestrator".

It's still in it's infancy, but here's what it does and bit of how it does it:

- Drag 'n Drop HD sources onto theeo
- Pick a template (defines your source type and destination settings)
- Uses a special build DGIndex to make .d2v and .ac3 (big thanks to neuron2 for that)
- Generates an AVISynth script and processing settings for VirtualDubMod
- Opens that AVS in VDMod and waits for you to cut commercials
- You save the processing settings and return to theeo
- theeo then uses your new processing settings to generate a final .avs that excludes the commercials, resizes and IVTC's the video and can be used for encoding

Those last couple steps were finished only last night, so there's a lot of tweaking and changes to be made to the way it works still. I plan on adding the stuff below before I make a release:

- demux the commercial free audio
- double fix the demux'd audio using AC3Fix and BeSplit
- chapter point management based on the Commercial Trim's
- generate a CCE .ecl

And there are a couple more features I want to implement down the road, such as...

- apply pulldown to the .mpv that comes out of CCE, making the .m2v
- multiplex the .m2v and the double fixed .ac3 to make an .mpg

I started working on this several months ago and managed to let it slip away from me, until last night. I figure the new season of TV is starting up (Las Vegas season 2 premieres tonight!) so I've regained some motivation to get this done. However, I am not too opposed to the idea of some collaborative effort on this. If you're interested in working on this with me, send me a PM. It's written in .Net (almost entirely VB.Net), which is something I am pretty new at, so I could even use someone that's just interested in reading over the code to make suggestions / tweaks for me.

Van the man
16th September 2004, 17:21
when I try to load the .wmv file into dvd2avit3 the program just close down and gives me that microsoft error(if you wanna report the error to microsoft).
what am I doing wrong? doesnt the dvd2avi version handle .wmv files?
the .wmv file is from microsofts hdtv samples.

any answers would be great

thanks

FreQi
17th September 2004, 05:56
WMV = Windows Media Video. It might be at HDTV resolutions, but it's not a Transport Stream (.ts) or another flavor of MPEG2, which is what DVD2AVI is used for.

Try VirtualDubMod or something

eb
17th September 2004, 07:14
My way of procesing HDTV .ts streams:

demux in ProjectX to video + audios + subtitles,
from ProjectX all files are synchronised and corrected for dicontinuinities,audios are normalised to 98%

to get final product as .avi or .mkv i am processing video with DVD2AVIT3 {big thanks to trbarry for this}, downscaling to the size where my computer can play it without any problems, as common 720x408interlaced
muxing video+mp2 audios with VirtualDubMod to .avi /yes .avi with mp2 audio/
or if audios are already as AC3 and subtitles are srt or ssa then AVIMux_GUI is used to mux all this to .mkv , playback in VLCPlayer.

to get final as DVD, the resulted files from ProjectX are processed by Nero Express or by ReJig program

and that is all

eb

edited: here my very kind ask to author of AVIMUX_GUI
is it possible that .mp2 audios can be accepted and muxed to .avi like it is done in VirtualDubMod

jrmann1999
8th November 2004, 20:17
eb:

Since you're using projectX first, you might want to try dgindex instead of dvd2avit3. It's a bit more accurate and it's associated dll is faster for avisynth stuff....

rs008f
28th November 2004, 07:43
VirtualdubMod 1.4/1.5 froze when I import the avs script. Below is my script. My MPEG2Dec3.dll is v1.0. The d2v made from dvd2avi 1.76 works fine however but the video and audio are out of synch. Video is shorter than the audio by 2 seconds.
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
Mpeg2Source("j:\abc.d2v")

nnigam
13th December 2004, 19:38
So Many questions, so few answers. I have read posts here, at inmatrix.com and a few other places without getting all the answers. I think a new and updated guides are needed. I am ready to help if anyone has something in the works. What I would like to do is as below

1. Record HDTV, my dvd's, VHS, and camcorder movies to my hard drive using my MYHD card.
2. Cut/Edit Advertisements, re-sequence personal films etc.
3. Save as AVI that can play on any pc
4. Burn to DVD/CD that can play on any dvd player
4. Archive someplace so when I finally get a HD tv, I can watch them there as well.

Questions I have include
1. DVD's have 2/3 hours of video. HDTV2Mpeg2 and other utilities convert 1 hour of HDTV to 8 gigs so that only 30 minutes gets on a DVD. What gives.
2. To convert HDTV to DVD it seems that I have to convert HDTV to AVI and then convert AVI to DVD. Is'nt there a direct process.
3. Cutting commercials using virtualdubmod is very tedious for finding the commercials to cut. Would project X and MPEG2Scnitt help. 1 hour of hdtv still creates files multiple files for a single audio stream. How do you load both. to MPeg2Schnitt.
4. I am still unable to get proper synching in some 720p hd recordings. Just read about different audio rates for advertisement and program. How do you get a sample of the program to put at the beginning to get correct audio sampling.

I have no desire to re-invent the wheel. If someone has a manual in progress, I am ready to offer testing and other tasks.