PDA

View Full Version : Proper Way of Handling This HD Source


EpheMeroN
9th January 2009, 09:35
New HD source is 1280x720 @ 60fps.

After simply loading the .d2v in a script and calling SelectEven() I noticed that every 5th frame is a dupe of the previous frame.

My goal is to take this, process it via AviSynth, and convert it to dvd.

What would be the proper way of handling these dupe frames in a script?

R3Z
9th January 2009, 10:58
New HD source is 1280x720 @ 60fps.

After simply loading the .d2v in a script and calling SelectEven() I noticed that every 5th frame is a dupe of the previous frame.

My goal is to take this, process it via AviSynth, and convert it to dvd.

What would be the proper way of handling these dupe frames in a script?

I am thinking a decimator, like Tdecimate (from TIVTC package)with defaults will work as they drop 1 frame from every 5.

EpheMeroN
9th January 2009, 23:42
I tried Decimate(cycle=5) from the Decomb package and it worked beautifully!

Only difference w/ TDecimate over Decimate is that you can specify odd dupe patterns yes? So when I have a source as such with the same frame repeating every N frames Decimate will work just fine?

neuron2
10th January 2009, 00:12
Decimate allows specification of overrides also. In fact, it did it first and TDecimate came later. :)

EpheMeroN
10th January 2009, 20:16
Okay. I'm having huge issues keeping a/v sync when re-encoding this HD content to DVD video. I've tried it in HC Encoder and CCE. The first 15 min or so are always in sync and then it goes out of sync no matter what I do. I've tried my script with and without using Decimate. Any ideas? The original HD video is in sync throughout (watched it back on pc via MPC and VLC).

Here's my script and a sample of the original HD content:

LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\DGDecode.dll")
LoadPlugin("C:\Multimedia\Avisynth 2.5\Plugins\Decomb.dll")

MPEG2Source("C:\Users\User1\Desktop\history.d2v")

Crop(8,8,-8,-8)

SelectEven()

#Decimate(cycle=5)

Spline36Resize(704,464)

AddBorders(8,8,8,8)

http://www.mediafire.com/?sharekey=01ce80febb812cacd2db6fb9a8902bda

neuron2
10th January 2009, 20:42
Any commercial breaks in there? Sometimes the audio type changes at commercials and if you don't cut it properly the result is desync.

EpheMeroN
10th January 2009, 21:18
Any commercial breaks in there? Sometimes the audio type changes at commercials and if you don't cut it properly the result is desync.
None. I trimmed out all commercials in VideoReDo and that outputted MPEG plays in sync fine. I don't know what's wrong. I thought my script was the right way to handle the HD video.

neuron2
11th January 2009, 02:08
I see that the sample has frame repeats.

What Field Operation did you set when you made your project?

EpheMeroN
11th January 2009, 20:55
I see that the sample has frame repeats.

What Field Operation did you set when you made your project?
"Honor Pulldown Flags"

EpheMeroN
11th January 2009, 22:00
I ran a test encode last night using WinFF, which uses ffmpeg, and the entire video encoded perfectly in sync.

So that helps us isolate this issue. Something is going wrong either a) in d2v creation, or b) the script itself.

NerdWithNoLife
11th January 2009, 23:20
DGIndex only accounts for one break. That's what the audio delay is: a GOP is missing a keyframe (it probably gave you that error when you imported the footage). Any other commercial cuts or errors in the stream will cause the video to be out of sync.

Run it through ProjectX. Set it to Demux. Then bring the resulting M2V into DGIndex and make the D2V. It will add audio frames to keep sync. I go through this a few times per week.

EpheMeroN
12th January 2009, 08:08
Run it through ProjectX. Set it to Demux. Then bring the resulting M2V into DGIndex and make the D2V. It will add audio frames to keep sync.
Well, I gave that a go. ProjextX shows a ton of errors when demuxing and only produces a 2.17gb file, when the original mpeg is over 6gb.

The encode that came from ffmpeg, although in perfect sync, b0rks badly when demuxed and tried to author in MuxMan. When authored, parts become out of sync again. This video has to be problematic.

I'm going to try to capture a repeat and see if the same thing happens.

NerdWithNoLife
12th January 2009, 14:42
If you get a ton of errors, something is wrong and ProjectX isn't going to help you. But it's normal to get quite a few, depending on how many commercial cuts (but probably less than 100).

It will say things like: Dropping useless B-Frames. This happens when there is a cut in the stream and frames that are based on a missing keyframe are, like it said, useless. Later it will cut audio frames out to keep sync. Big P-[some acronym] difference from last frame. This means ProjectX can tell from the timecode there is a gap (like a missing commercial). For me, it's only cause for concern when the same error is repeated many times and it says: Over 500 errors. Stopped logging.

Then I either play with the settings, or give up. For broadcast capture, I usually don't have to give up, but when processing VOB's ProjectX has been less successful.

Oh, and if all else fails you can process each cut separately with DGIndex (as long as there isn't an error in the stream during the program), or just leave the commercials in. Edit: MPEG2Repair may also help.