Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > HDTV / DVB / TiVo

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th December 2003, 10:25   #21  |  Link
FreQi
Registered User
 
FreQi's Avatar
 
Join Date: Dec 2001
Posts: 234
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.
FreQi is offline   Reply With Quote
Old 20th December 2003, 16:45   #22  |  Link
jrmann1999
Registered User
 
Join Date: Jan 2003
Posts: 51
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.
jrmann1999 is offline   Reply With Quote
Old 20th December 2003, 18:27   #23  |  Link
FreQi
Registered User
 
FreQi's Avatar
 
Join Date: Dec 2001
Posts: 234
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 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) 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:

Code:
# 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...
FreQi is offline   Reply With Quote
Old 21st December 2003, 05:13   #24  |  Link
Enrico Ng
Registered User
 
Join Date: Feb 2002
Posts: 128
Quote:
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
__________________
Enrico Ng



Enrico Ng is offline   Reply With Quote
Old 22nd December 2003, 07:50   #25  |  Link
FreQi
Registered User
 
FreQi's Avatar
 
Join Date: Dec 2001
Posts: 234
Are you using the latest version of HDTV2Mpeg2 ? Just a few days ago I found version 1.10b 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.
FreQi is offline   Reply With Quote
Old 29th December 2003, 18:09   #26  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Quote:
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
__________________
My video filters (still) at www.trbarry.com.
trbarry is offline   Reply With Quote
Old 6th January 2004, 00:59   #27  |  Link
Enrico Ng
Registered User
 
Join Date: Feb 2002
Posts: 128
Quote:
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?
__________________
Enrico Ng



Enrico Ng is offline   Reply With Quote
Old 6th January 2004, 10:10   #28  |  Link
FreQi
Registered User
 
FreQi's Avatar
 
Join Date: Dec 2001
Posts: 234
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.
FreQi is offline   Reply With Quote
Old 27th January 2004, 16:01   #29  |  Link
bdraw
Registered User
 
Join Date: Jan 2004
Location: Tampa FL
Posts: 13
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.
__________________
Ben
Engadget HD
How good can it be, if it isn't HD?
bdraw is offline   Reply With Quote
Old 27th January 2004, 20:36   #30  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
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
__________________
My video filters (still) at www.trbarry.com.
trbarry is offline   Reply With Quote
Old 27th January 2004, 20:40   #31  |  Link
bdraw
Registered User
 
Join Date: Jan 2004
Location: Tampa FL
Posts: 13
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.
__________________
Ben
Engadget HD
How good can it be, if it isn't HD?
bdraw is offline   Reply With Quote
Old 31st January 2004, 20:57   #32  |  Link
bdraw
Registered User
 
Join Date: Jan 2004
Location: Tampa FL
Posts: 13
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?
__________________
Ben
Engadget HD
How good can it be, if it isn't HD?
bdraw is offline   Reply With Quote
Old 1st February 2004, 22:37   #33  |  Link
FreQi
Registered User
 
FreQi's Avatar
 
Join Date: Dec 2001
Posts: 234
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)?
FreQi is offline   Reply With Quote
Old 1st February 2004, 22:48   #34  |  Link
bdraw
Registered User
 
Join Date: Jan 2004
Location: Tampa FL
Posts: 13
Quote:
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.
__________________
Ben
Engadget HD
How good can it be, if it isn't HD?
bdraw is offline   Reply With Quote
Old 15th June 2004, 23:07   #35  |  Link
NorcoO1
Registered User
 
Join Date: Aug 2002
Posts: 3
WMV9

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.
NorcoO1 is offline   Reply With Quote
Old 16th June 2004, 14:13   #36  |  Link
jrmann1999
Registered User
 
Join Date: Jan 2003
Posts: 51
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.
jrmann1999 is offline   Reply With Quote
Old 16th June 2004, 22:16   #37  |  Link
NorcoO1
Registered User
 
Join Date: Aug 2002
Posts: 3
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.
NorcoO1 is offline   Reply With Quote
Old 2nd July 2004, 20:53   #38  |  Link
jrmann1999
Registered User
 
Join Date: Jan 2003
Posts: 51
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.
jrmann1999 is offline   Reply With Quote
Old 6th July 2004, 20:33   #39  |  Link
crahak
Registered User
 
Join Date: Jan 2003
Posts: 36
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.

Sorry if my explanation sucks... Nothing fancy but it seems most people don't think of it. Hope it helps.
crahak is offline   Reply With Quote
Old 7th July 2004, 04:54   #40  |  Link
FreQi
Registered User
 
FreQi's Avatar
 
Join Date: Dec 2001
Posts: 234
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...)

Code:
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)
}
FreQi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.