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 > Video Encoding > (Auto) Gordian Knot

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th June 2009, 23:51   #1  |  Link
fearofmimes
Registered User
 
Join Date: Jul 2005
Posts: 21
Weird XVID encoding issue with AutoGK

I've used AutoGK with very few problems over the years, but I've come across one video that has stumped me. When I try to do a straight XVID encoding without any special Ctrl+F9 options, the generated video comes out jerky and the audio goes out of synch (it seems like the video is coming out slower than the audio). When I watch it in the preview everything looks fine initially although the total length of the video is calculated as 3 hours (compared with actual running time of 126 minutes). When I jump around with the preview slider I have a 50/50 chance of getting the audio, subs, and video out of synch. When I move the slider past the 2:06:00 mark in the preview, I get audio but the video is frozen at the point where the video was before I moved the slider.

As you can tell, I'm having a difficult time grasping or describing the problem. I'm wondering if what I'm describing suggests the nature of the problem to someone.

The log for the preview is shown below:

[6/25/2009 4:50:45 PM] AutoGK 2.55
[6/25/2009 4:50:45 PM] OS: WinXP (5.1.2600).2
[6/25/2009 4:50:45 PM] Job started.
[6/25/2009 4:50:45 PM] Indexing input for preview.
[6/25/2009 4:52:57 PM] Processing file: C:\Encode\Title 1\VTS_01_1.VOB
[6/25/2009 4:52:57 PM] Processing file: C:\Encode\Title 1\VTS_01_2.VOB
[6/25/2009 4:52:57 PM] Processing file: C:\Encode\Title 1\VTS_01_3.VOB
[6/25/2009 4:52:57 PM] Processing file: C:\Encode\Title 1\VTS_01_4.VOB
[6/25/2009 4:52:57 PM] Processing file: C:\Encode\Title 1\VTS_01_5.VOB
[6/25/2009 4:52:57 PM] Processing file: C:\Encode\Title 1\VTS_01_6.VOB
[6/25/2009 4:52:57 PM] Source resolution: 720x480
[6/25/2009 4:52:57 PM] Found NTSC source.
[6/25/2009 4:52:57 PM] Source aspect ratio: 16:9
[6/25/2009 4:52:58 PM] Output will contain 231239 frames
[6/25/2009 4:52:58 PM] Preparing subtitles for preview.
[6/25/2009 4:54:34 PM] Job finished. Total time: 3 minutes 48 seconds

I figure this is a good opportunity for me to learn a little more about what is going on behind the scenes with encoding.
fearofmimes is offline   Reply With Quote
Old 26th June 2009, 22:44   #2  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,396
Do you have the log for the entire video? The preview log isn't much good. Also, maybe you can upload somewhere a small 10 second piece of the source - a piece that shows movement - so we can see what you're talking about.

Just based the frame count, it's showing a video a little over 2hours long. My guess is that a player is giving an incorrect length. What length does it show when you open the AVI in VDubMod and go File->File Information?
manono is offline   Reply With Quote
Old 27th June 2009, 04:13   #3  |  Link
fearofmimes
Registered User
 
Join Date: Jul 2005
Posts: 21
What's a good way to extract and post a clip from the source?

Here's the log for the encode (without forcing IVTC or interlacing):

[6/25/2009 5:52:06 PM] AutoGK 2.55
[6/25/2009 5:52:06 PM] OS: WinXP (5.1.2600).2
[6/25/2009 5:52:06 PM] Job started.
[6/25/2009 5:52:06 PM] Input file: C:\Encode\Title 1\VTS_01_0.IFO
[6/25/2009 5:52:06 PM] Output file: C:\Encode\Title 1.avi
[6/25/2009 5:52:06 PM] Output codec: XviD
[6/25/2009 5:52:06 PM] Audio 1: Espanol AC3 6ch
[6/25/2009 5:52:06 PM] Subtitles 1: English wide
[6/25/2009 5:52:06 PM] Format: AVI
[6/25/2009 5:52:06 PM] Target quality: 75%
[6/25/2009 5:52:06 PM] Audio 1 settings: Original
[6/25/2009 5:52:06 PM] Standalone support enabled: MTK/Sigma
[6/25/2009 5:52:06 PM] Started encoding.
[6/25/2009 5:52:06 PM] Demuxing and indexing.
[6/25/2009 5:54:04 PM] Processing file: C:\Encode\Title 1\VTS_01_1.VOB
[6/25/2009 5:54:04 PM] Processing file: C:\Encode\Title 1\VTS_01_2.VOB
[6/25/2009 5:54:04 PM] Processing file: C:\Encode\Title 1\VTS_01_3.VOB
[6/25/2009 5:54:04 PM] Processing file: C:\Encode\Title 1\VTS_01_4.VOB
[6/25/2009 5:54:04 PM] Processing file: C:\Encode\Title 1\VTS_01_5.VOB
[6/25/2009 5:54:04 PM] Processing file: C:\Encode\Title 1\VTS_01_6.VOB
[6/25/2009 5:54:04 PM] Source resolution: 720x480
[6/25/2009 5:54:04 PM] Found NTSC source.
[6/25/2009 5:54:04 PM] Source aspect ratio: 16:9
[6/25/2009 5:54:04 PM] Analyzing source.
[6/25/2009 5:58:59 PM] Source is considered to be hybrid (mostly NTSC).
[6/25/2009 5:58:59 PM] Looking for optimal hybrid thresholds.
[6/25/2009 5:59:19 PM] Found threshold of: 0.01
[6/25/2009 5:59:19 PM] Output will contain 231239 frames
[6/25/2009 5:59:19 PM] Preparing subtitles.
[6/25/2009 6:01:08 PM] Running single pass encoding.
[6/25/2009 9:09:26 PM] Duration was: 3 hours 8 minutes 18 seconds
[6/25/2009 9:09:26 PM] Speed was: 20.47 fps.
[6/25/2009 9:09:26 PM] Job finished. Total time: 3 hours 17 minutes 19 seconds

I tried to force IVTC and deinterlacing and the results did not improve. It's like the video is coming out in slow motion but the audio appears fine.

Last edited by Guest; 27th June 2009 at 04:17. Reason: rule 12
fearofmimes is offline   Reply With Quote
Old 27th June 2009, 08:14   #4  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,396
Quote:
Originally Posted by fearofmimes View Post
What's a good way to extract and post a clip from the source?
Open a VOB in DGIndex and use the [ and ] buttons to isolate a small section. Then File->Save Project and Demux Video. If the resulting M2V is the right length and shows steady movement, upload it to a 3rd party file hosting site - one such as MediaFire - and post the link here.

There are lots of sources that neither AutoGK nor any other all-in-one app can handle properly. I'm thinking especially of field blended videos usually created by converting from PAL to NTSC or vice-versa. There's a chance you might have one of those. If so, your choice is either to live with it or learn to do some AviSynth scripting and manual encoding.

You're not getting the video length from this are you:
Quote:
[6/25/2009 9:09:26 PM] Duration was: 3 hours 8 minutes 18 seconds
because that just shows how long it took to encode it.
manono is offline   Reply With Quote
Old 27th June 2009, 18:48   #5  |  Link
setarip_old
Registered User
 
setarip_old's Avatar
 
Join Date: Aug 2005
Posts: 16,270
@fearofmimes

Hi!

There's always the possibility that, depending on the DVD's protection scheme, your rip may be less than perfect.

What is the Title and Region number of your DVD?
setarip_old is offline   Reply With Quote
Old 27th June 2009, 19:58   #6  |  Link
fearofmimes
Registered User
 
Join Date: Jul 2005
Posts: 21
Okay. Here is the link for the m2v file that I uploaded: http://www.mediafire.com/?sharekey=3...4e75f6e8ebb871

My original reckoning of the encoded video length came from the AutoGK preview. I just looked again at the most recently encoded file (with IVTC forced) and it had the right total length. But the audio is not in synch and I can't tell yet if it is early or late. I can fix the audio if I need to once I get the video straightened out. I'm not afraid of scripting, but I probably need some pointers on how it is all supposed to fit together.

I'm confident that the rip is good. It is a US region DVD that plays fine for me.
fearofmimes is offline   Reply With Quote
Old 27th June 2009, 20:48   #7  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
What is the title of the DVD?
Guest is offline   Reply With Quote
Old 27th June 2009, 21:36   #8  |  Link
fearofmimes
Registered User
 
Join Date: Jul 2005
Posts: 21
Japon
fearofmimes is offline   Reply With Quote
Old 27th June 2009, 22:40   #9  |  Link
CWR03
Custom User Title
 
CWR03's Avatar
 
Join Date: Mar 2005
Posts: 3,737
Quote:
Originally Posted by fearofmimes
I'm confident that the rip is good. It is a US region DVD that plays fine for me.
How exactly did you rip the DVD? DVD Decrypter may appear to rip a disk with no problems or errors, but if it contains a certain copy advanced protection scheme you will get repeated scenes (possibly your "jerky playback") and/or will introduce severe audio delay issues.
CWR03 is offline   Reply With Quote
Old 28th June 2009, 00:49   #10  |  Link
setarip_old
Registered User
 
setarip_old's Avatar
 
Join Date: Aug 2005
Posts: 16,270
@fearofmimes

1) I doubt that this 2004 DVD release contains any "special" or newer copy protection schemes. However, I've personally never heard of "Tartan Video". I mention this because it's quite possible that a "non-mainstream" studio could possibly produce poorly mastered DVDs.

2) What is the default language of the DVD?

3) Is your original DVD new or used?

4) Does your hard drive rip of the entire DVD or movie-only playback properly on your PC?
setarip_old is offline   Reply With Quote
Old 28th June 2009, 01:23   #11  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,396
Quote:
Originally Posted by setarip_old View Post
However, I've personally never heard of "Tartan Video".
Then you should get out more, and watch movies other than Hollywood's latest and greatest. Tartan was famous for getting the rights to really good films, mostly Asian ones (which this isn't), and then ruining them. Fortunately, they went bankrupt about a year ago and their film catalog has been acquired by someone else. Some of their releases are decent; most are not. This is one of the 'not'. It was filmed in 16mm, so it'll never look very good even if a proper master was prepared. But it wasn't. They used some PAL master and converted it to NTSC by field blending. Neither AutoGK nor any other all-in-one app can do anything with it other than just deinterlacing it.

The best bet is to encode it manually using an unblender such as the RePAL filter:

Yadif(Mode=1,Order=1)#or your favorite 'smart bobber'
RePAL()

Last edited by manono; 28th June 2009 at 03:16.
manono is offline   Reply With Quote
Old 28th June 2009, 14:54   #12  |  Link
fearofmimes
Registered User
 
Join Date: Jul 2005
Posts: 21
Thanks. It's amazing that this type of problem is not more common.
fearofmimes is offline   Reply With Quote
Old 29th June 2009, 23:00   #13  |  Link
setarip_old
Registered User
 
setarip_old's Avatar
 
Join Date: Aug 2005
Posts: 16,270
@fearofmimes

Perhaps you'd be good enough to answer my previously asked questions, to wit:

1) What is the default language of the DVD?

2) Is your original DVD new or used?

3) Does your hard drive rip of the entire DVD or movie-only playback properly on your PC?

P.S. Thanks to moderator "manono" for confirming my speculation that "Tartan" may have produced a poor quality disc...

Last edited by setarip_old; 30th June 2009 at 09:41. Reason: typo
setarip_old is offline   Reply With Quote
Old 9th July 2009, 19:28   #14  |  Link
fearofmimes
Registered User
 
Join Date: Jul 2005
Posts: 21
1. Default language is Spanish.

2. DVD is used.

3. The hard drive rip plays back perfectly.

This has become an exercise for me to learn more about encoding since I've watched the movie already from disc (it wasn't very good, but it wasn't bad).

I'm wondering if someone could suggest a good path for encoding with the suggested repal filter. I have downloaded repal.dll and placed in the AVIsynth plugins directory. Is there any way to tweak the AVS file that is generated with AutoGK to use repal? Or do I have to encode in some other way?

Last edited by Guest; 9th July 2009 at 20:04.
fearofmimes is offline   Reply With Quote
Old 9th July 2009, 21:12   #15  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,396
Quote:
Originally Posted by fearofmimes View Post
Or do I have to encode in some other way?
Quote:
Originally Posted by manono View Post
The best bet is to encode it manually
Here's an example of a full script:

LoadPlugin("C:\Path\To\DGDecode.dll")
LoadCPlugin("C:\Path\To\Yadif.dll")
LoadPlugin("C:\Path\To\RePAL.dll")
MPEG2Source("C:\Path\To\Movie.d2v")
Yadif(Mode=1,Order=1)
RePAL()

Note that Yadif is being loaded as a 'C' Plugin. Adjust for your names and paths. Make the D2V in DGIndex using 'Honor Pulldown Flags' as the Field Operation. Also do the crop and resize. One example might be:

Crop(6,78,-6,-78)
LanczosResize(640,240)

Convert the audio to MP3 if you like. You can use Gordian Knot as a front end for the encoding, or do the entire thing manually, using VDubMod. It''s just not that hard.
manono is offline   Reply With Quote
Old 10th July 2009, 18:11   #16  |  Link
fearofmimes
Registered User
 
Join Date: Jul 2005
Posts: 21
I managed to get an AVS produced by MeGUI that used Yadif to deinterlace and I added the repal stuff. The resulting encode looked great! Wow. I've learned quite a lot.
fearofmimes is offline   Reply With Quote
Old 15th July 2009, 17:05   #17  |  Link
fearofmimes
Registered User
 
Join Date: Jul 2005
Posts: 21
I finally figured out what was causing the strange preview behavior and the apparent lack of synchronization between audio and video. It appears the audio that is demuxed from the DVD is screwed up. That is what caused the AutoGK preview to appear to make the encoded video more than 3 hours long with blank video at the end. Once I finally got some clean encodes with MeGUI, I found that the resulting muxed AVI had the same problems I was observing in the AutoGK preview window. Regardless of the size of the video I was muxing with the AC3 audio (I thought at first that the muxer might have had a problem with file sizes >2GB), I found that everything was fine for the first 1 hour and 16 minutes or so and then after that it was like the video sped up to something like twice the speed and lost synchronization with the audio. The resulting muxed AVI was reported to be over 3 hours long with blank video at the end, just like with the the AutoGK preview. The raw video that was used for input to the muxer was normal speed all the way through, so it was definitely the audio that screwed things up.

Last edited by fearofmimes; 15th July 2009 at 17:06. Reason: Fixed some grammar and clarified a point.
fearofmimes 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 18:15.


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