logo Sign In

Issues with AVI from M2V

Author
Time

Looking for a little guidance. I've used dvd decrypter to rip the video and audio from the NTSC dvd of TPM as per the adigitalman guide. However, when I use virtualdub to create an AVI file the finished product looks like it's interlaced, despite all the settings in virtual dub being set to progressive. Am I missing a step? is there a better program I should be using to convert to AVI? Ideally I want a lossless AVI from the DVD files. Any advice would be much appreciated.

Visit my Webcomic! Nonstop Pop

Author
Time

From memory, in VirtualDub you need to use the option under Video -> Frame Rate called Inverse Telecine (3:2 pulldown removal) or something.

A better solution would be to use AviSynth and DGIndex with the "force film" option.

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time

The latest versions of VirtualDub have moved the inverse telecine to the IVTC filter.

Author
Time

DGIndexManual said:


Force Film ... This option works by ignoring pulldown flags and inserting/removing frames to maintain a constant and sync'ed output stream.

That "inserting/removing frames" bit has always scared me from using Force Film.
I've usually chosen 'Ignore' instead because I don't want any frames removed. Do I?
Why would one want frames removed? Wouldn't it cause herky-jerky playback?
I just don't understand why or when, under what conditions Force Film might decide to remove some frames.
And when/why would frames be inserted? Where would the inserted frames come from? Repeats? Again sounds like a recipe for herky-jerky motion to my pea brain.
Is it even safe to use Force Film?

However, in practice you must take into account the “fuckwit factor”. Just talk to Darth Mallwalker…
-Moth3r

Author
Time

How does one use AVIsynth with DGindex? I've created my avisynth script as per the instructions in adigitalman's guide, but I don't truly understand what to do with that script. Which program do I use? The guide says to check the video in virtualdubmod, what video? The M2V I want to turn into an AVI? or the AVI that i'm supposed to make using that avisynth script?

If I load the video I want to encode into virtualdubmod I don't get an option to use the script to make an AVI, so what's the difference in watching the preview before or after I made the script this program doesn't use? TMPGenc will take the AVIsynth script, but it's going to give me a M2V file. Why would I need an M2V file when I'm trying to turn the M2V file I already have into an AVI? I'm thoroughly confused.

Step 3 (if needed): Converting 4x3 interlaced video to 16x9 anamorphic video.
Gordian Knot installs several utilities with AVISynth that help you perform some basic video conversion functions. Essentially we will take the M2V/MPV files you have fixed, create a script based on their basic info for AVISynth, modify that script, generate and uncompressed AVI of the manipulation, then re-encode back to M2V. It's a tedious process, but one well worth it.

* Under the Gordian Knot suite of additional apps, launch DGIndex.
* Open the M2V file. Open only one at a time if you're doing multiple videos.
* Save this D2V project with a unique name.
* Launch Gordian Knot and open the .D2V file you just created
* This will launch a second window, with the video actually in it.
* Click "Save & Encode." This will open another window.
* Just click "Save" in this window. No need to encode yet. This will create an AVS file (just a text script). Give it a unique name. I usually choose the same name as the D2V file and the M2V file to keep them grouped together.
* Open the AVS file in notepad or other text editor of choice.
* Note that the "#" character is used to comment (i.e. render inactive) a particular line.
* If the video is telecined (if it shows scan lines for 2 out of every 5 frames) we need to do an inverse telecine. Uncomment the line: LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll") and uncomment the line Telecide(order=1,guide=1).Decimate() by removing the # character at the start of each of those lines.
* Assuming you're editing NTSC and not PAL:
* Change the cropping command to read: crop(0,60,720,360). This will remove 60 pixels from the top and from the bottom. (PAL should be (0,38,720,404)
* Change the resizing command to read: LanczosResize(720,480). This will stretch the image to anamorphic proportions.
* Uncomment the line: Undot()
* Save the file

* Under the Gordian Knot suite of additional apps, launch VirtualDubMod and preview the video to make sure it looks right.
* Launch TMPGEnc
* Start a project with the setting DVD NTSC 16:9 (or PAL if appropriate).
* In the next window drag your AVS Script into the video source.
* Click next until you get to the Bitrate setting window.
* Make sure the bitrate setting has the average video bitrate setting at 8000. This is the maximum number allowed and will ensure the best possible video quality.
* Click Next and name the output file. The default name may conflict with the original source. Be certain that it doesn't so you don't have to rip from scratch if something goes wrong. I suggest renaming the source file, since most of your work is based off the "fix" file.
* You can check to run the job in batch if you have multiple files.
* Set the conversion to run, go run a marathon and read War and Peace. Take a vacation. Solve world hunger. After all of that, your new M2V files should be ready.

Visit my Webcomic! Nonstop Pop

Author
Time

After you launch VirtualDub (or VirtualDubMod) then you'll open your script:

http://img9.imageshack.us/img9/2299/opendialog.png

Choose your *.avs script name here, not your *.m2v file.

However, in practice you must take into account the “fuckwit factor”. Just talk to Darth Mallwalker…
-Moth3r

Author
Time
 (Edited)

Darth Mallwalker said:

 

That "inserting/removing frames" bit has always scared me from using Force Film.
I've usually chosen 'Ignore' instead because I don't want any frames removed. Do I?
Why would one want frames removed? Wouldn't it cause herky-jerky playback?
I just don't understand why or when, under what conditions Force Film might decide to remove some frames.
And when/why would frames be inserted? Where would the inserted frames come from? Repeats? Again sounds like a recipe for herky-jerky motion to my pea brain.
Is it even safe to use Force Film?

 

Using forced film is fine if your material reads as over 95% film in DGIndex, which it should do if you dealing with an NTSC movie.  Movies start life as 24fps, and this is, by and large, how they are stored on the DVD.  Pulldown flags instruct the player to turn this 24fps (actually 23.976) into the 30fps (actually 29.97) required by all but the most modern TVs for playback.  Removing the flags restores leaves the original 24fps in place and does not create jerky motion because when you re-encode after editing your encoder adds the pulldown flags back (assuming you choose the correct settings).

Sometimes material is stored on the DVD with the pulldown already in place.  If there is enough of this material on the DVD, then forced film might leave blended frames because it removed the pulldown incorrectly.  In this case you choose "Honor Pulldown Flags" and write an Avisynth to restore the original 24fps (inverse telecine) another way.

 The "Ignore Pulldown Flags" option is meant for power users as a testing mode.  It is a mistake to select it if you don't really know what you are doing. 

In short, use Forced Film unless you encounter a problem.  If you do encounter a problem, use "Honor Pulldown Flags" and inverse telecine in Avisynth.

Author
Time

*sigh* Well, I tried opening my .avs file (modified as per adigitalman's instructions) in virtualdub (and virtualdubmod and virtualdub64 and virtualdub mpeg2) and I get a big nothing.

Can anyone just give me some step by step instructions to follow to get a progressive anamorphic lossless AVI from my M2V file?

Visit my Webcomic! Nonstop Pop

Author
Time

Do you receive an error message from Virtualdub?  What does it say?  Post your avs script.

Author
Time
 (Edited)

ADM's guide does work, and why not just use the latest regular VirtualDub, it works just fine, and I have Windows 7 Pro 64, you must be doing something wrong or missing a step, I learned editing with his guide and I can confirm that it will work.

You need to install this

http://neuron2.net/dgmpgdec/dgmpgdec.html

and as Moth3r stated, you set to "force film", don't listen to Darth Mallcrawler, it does and will work just fine, this is how we all do it, this will give you your .d2v file and then you are good to go.

Author
Time

Chewtobacca:

When I try to load the .avs file I get the following warning:

Couldn't locate decompressor for format 'YV12' (unknown).

Virtualdub requires a Video for Windows (VFW) compatible codec to decompress video. DirectShow codecs. such as those used by Windows Media Player. are not suitable. Only "Direct stream copy" is available for this video.

Here's my .avs script:

# Created with Gordian Knot
#
# http://gknot.doom9.org

#  PLUGINS
LoadPlugin("C:\PROGRA~2\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\SimpleResize.dll")

#  SOURCE
mpeg2source("G:\PHANTOM_MENACE\VIDEO_TS\gathering storm.d2v")

#  TRIM
#trim(startframe,endframe)

#  IVTC
Telecide(order=1,guide=1).Decimate()
#  or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)

#  DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)

#  DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
#  or maybe
#DGBob(order=1,mode=0)

#  DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()

#  CROPPING
crop(0,60,720,360)

#  SUBTITLES
#VobSub("FileName")

#  RESIZING
LanczosResize(720,480)

#  DENOISING: choose one combination (or none)
Undot()

#  1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)

#  2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)

#  3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)

#  BORDERS
#AddBorders(left,top,right,bottom)

#  COMPRESSIBILITY CHECK
#  !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)

#  FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)

 

Dark_Jedi:

I've used the latest version of virtualdub as well as the older one that comes with the GordianKnot suite. I'm also using Windows 7 pro 64. When I try to open the D2V file I get from the DGindex I downloaded from your link, GordianKnot gives me an error saying that it's not a valid D2V file.

 

 

Visit my Webcomic! Nonstop Pop

Author
Time

Make sure you put the DGDecode.dll in that package in your avisynth plugins folder, that script has alot you don't even need, it should be alot simpler.

Author
Time

Thanks everybody for your replies.
As luck would have it, I've found just the answer I was looking for straight from the horse's mouth
Yeah, I just called Donald Graft a horse :)

Now after reading his replies (#10 & #12), I do understand the differences between them. And yes, both methods do have Cons as well as Pros.
It's funny though, I never would've classified myself a 'power user' as Chew calls it; nevertheless, I'll say with certainty that 'Ignore' is correct for what I'm doin'

Make an informed choice

However, in practice you must take into account the “fuckwit factor”. Just talk to Darth Mallwalker…
-Moth3r

Author
Time
 (Edited)

Darth Mallwalker said:It's funny though, I never would've classified myself a 'power user' as Chew calls it; nevertheless, I'll say with certainty that 'Ignore' is correct for what I'm doin'

Make an informed choice

What is that last sentence meant to imply?  That I am not informed?  I didn't come up the term "power user".  Donald Graft uses it in the manual for DGIndex.

From the manual:

Ignore Pulldown Flags - The pulldown flags are ignored. This allows one to obtain the raw encoded MPEG pictures, with no repeated fields. However, because repeated fields intended for display are ignored and not displayed, the resulting frame rate may differ from the source frame rate. It may even vary throughout the clip, due to irregular patterns of pulldown flags. If the pulldown is irregular, use of this option will cause the audio-video sync to change at different parts of the clip, and most likely sync will not be acceptable. This option is mostly intended for power users, who would use it as a diagnostic aid for inspecting the encoded MPEG pictures. Although this option ignores the flags, they are still stored in the D2V file although DGDecode will also ignore them.

If you know what you are doing, then that is of course fair enough, but it is not recommended that most users, especially beginners, set the Field Operation to Ignore Pulldown Flags.  If the advice has changed, Donald Graft should update his manual.

EDIT:  I don't think it has changed though.  The thread you linked to was a different situation to the one being dealt with here.  In that thread, the OP started with pure 24fps material that he had pulled down with DGPulldown.  In this case, there would be a regular 3:2 pulldown running through the video, so Ignore Pulldown Flags + Assumefps would not result in a problem.  In this thread, the OP has an NTSC DVD and cannot assume that the pulldown is uniform throughout the movie.  There might well be a certain amount of hard telecined material present.  I still maintain that selecting Ignore Pulldown Flags is a mistake in this situation.

Pagz said:

Chewtobacca:

When I try to load the .avs file I get the following warning:

Couldn't locate decompressor for format 'YV12' (unknown).

Virtualdub requires a Video for Windows (VFW) compatible codec to decompress video. DirectShow codecs. such as those used by Windows Media Player. are not suitable. Only "Direct stream copy" is available for this video.

Try installing XviD.

Author
Time
 (Edited)

Darth Mallwalker said:

Thanks everybody for your replies.
As luck would have it, I've found just the answer I was looking for straight from the horse's mouth
Yeah, I just called Donald Graft a horse :)

Now after reading his replies (#10 & #12), I do understand the differences between them. And yes, both methods do have Cons as well as Pros.
It's funny though, I never would've classified myself a 'power user' as Chew calls it; nevertheless, I'll say with certainty that 'Ignore' is correct for what I'm doin'

Make an informed choice

Wow...of all the people on this site to ignore, I never would have thought Chew would be the one.  He's been nothing but helpful and polite everywhere I've seen him post.

*stumped*

EDIT: I may have misunderstood...have I?

Author
Time

Alright, so I've followed the advice everyone has been kind enough to give me (And I really do appreciate it guys!) but alas things still aren't coming up Millhouse. So, time to start from scratch and document everything step by step. This way you can see where I'm going wrong. When it comes to being thick, I'm a genius ;)

Step 1: Get elements.

Pffft, no problem! I'm all over this. DVD Decrypter is open, now I need the DVD. Time for a quick trip to my Star Wars shelf.

Ahh, there she is, nestled between Solo and Greedo.

Get in there you furry oaf. I don't care what you smell.

There it is. Time to switch the mode to IFO.

Aww yeah. Now to find the video I want. There it is, now to grab the elements I want under the PGC.

I imagine it's angle 1, since selecting the PGC itself makes it impossible to enable stream processing. Speaking of which...

There we go, stream processing enabled and the streams that I want are checked off. Video set to demux, and...

Audio set to demux as well.

And away we go!

Tadaa!

WINNER!

Wait a second...

wtf...

and another wtf...

and a third wtf... (followed by identical fourth, fifth and sixth wtf's)

*sigh*

Screw it, fingers crossed it's just the program being an ass and hasn't buggered up the output.

Hey womble, what's up?

What's that? You want to fix my timecode errors? How sweet of you.

Here you go, bon appetite.

Hmmm, this may take a little while.

Hans up Solo (You see what I did there?)

No disintegrations.

What's that little B? You want me to handle this one? Alright.

Time to put captain Solo in the cargo hold.

I always order my solo on the rocks. Oh look, Womble is done. Thanks womble.

Hey DGIndex, what's happenin'?

Feel like making a D2V project file from my M2V file?

Here you go, enjoy!

Oh man, this is going to take a while too, isn't it.

Bored.

Bored, bored, bored.

Interesting...

Yeah, just as I always suspected...

Kirk vs Picard! A battle for the ages!

PicAAAAAAAAAAAAARD!

Wait, you're filming this! NO!

None of my Star Wars brethren must know my terrible secret shame!

Huzzah, it's done! Let's head on over to Gordian Knot

Hey Gordian K, how about we open up this sweet new D2V project of mine?

Here she is, let's do this.

What?

WHAT?

No!

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!

 

Visit my Webcomic! Nonstop Pop

Author
Time

When I rip with Decrypter I always do movie and audio separately not together, looks like you are demuxing together, try 1 at a time, I believe ADM says 1 at a time as well, it has been a while.

Author
Time

He mentions doing each file separately for the womble timecode fix, but the way I read his instructions seemed to suggest ripping from the dvd was fine both together. Regardless I'll give it a shot one at a time.

Visit my Webcomic! Nonstop Pop

Author
Time

Well, that seems to have done the trick, I hope. I suppose we'll wait and see how the AVI file turns out. Fingers crossed!

Visit my Webcomic! Nonstop Pop

Author
Time

So, my AVI is done. It appears to be tall and squished, like an anamorphic picture on a 4:3 monitor. Is it supposed to look like that? Further, it feels a little herky jerky, quite noticable during the crawl and during pans. Could that be because of the squished picture? or possibly from the forced film in DGIndex? Or something else I'm not even thinking of.

 

Here's my avs script this time around:

# Created with Gordian Knot
#
# http://gknot.doom9.org

#  PLUGINS
LoadPlugin("C:\PROGRA~2\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("C:\PROGRA~2\GORDIA~1\AviSynthPlugins\SimpleResize.dll")

#  SOURCE
mpeg2source("G:\PHANTOM_MENACE\VIDEO_TS\the gathering storm.d2v")

#  TRIM
#trim(startframe,endframe)

#  IVTC
Telecide(order=1,guide=1).Decimate()
#  or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)

#  DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)

#  DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
#  or maybe
#DGBob(order=1,mode=0)

#  DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()

#  CROPPING
crop(0,60,720,360)

#  SUBTITLES
#VobSub("FileName")

#  RESIZING
LanczosResize(720,480)

#  DENOISING: choose one combination (or none)
Undot()

#  1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)

#  2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)

#  3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)

#  BORDERS
#AddBorders(left,top,right,bottom)

#  COMPRESSIBILITY CHECK
#  !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)

#  FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)

Visit my Webcomic! Nonstop Pop

Author
Time
 (Edited)

Ditch the Gordian Knot script, it's causing all your problems.

The reason why your motion is jerky is that you are using "force film" in DGIndex, then performing IVTC in the script. You only need one or the other, not both.

The reason your aspect ratio is wrong is because you are cropping the black bars (GK is designed for Xvid encoding), but then upsizing what's left to DVD resolution. You don't need to do any cropping or resizing if you're going from DVD to DVD.

(Also, regarding the error you mentioned in post 11 - VirtualDub has been able to decompress YV12 since about 2004, it no longer uses the Xvid codec for this. Are you sure you got this error with the latest release?)

Guidelines for post content and general behaviour: read announcement here

Max. allowable image sizes in signatures: reminder here

Author
Time

Moth3r said:(Also, regarding the error you mentioned in post 11 - VirtualDub has been able to decompress YV12 since about 2004, it no longer uses the Xvid codec for this. Are you sure you got this error with the latest release?)

Yeah, I guess that might be because he mentioned using Virtualdub MPEG-2 at one point.  To be honest, I didn't have time to read the script beyond the error message.  (I didn't realize the new Virtualdub doesn't need XviD.  I still use the old Virtualdudmod because it handles interlaced YV12 properly and it does everything I need.)

Author
Time

Perhaps you should start a television show called Nerd Den EXTREME....

Stunning pictorial exposition of many moments of my life (using different applications and not usually wearing a mask).

Author
Time

Moth3r said:

Ditch the Gordian Knot script, it's causing all your problems.

The reason why your motion is jerky is that you are using "force film" in DGIndex, then performing IVTC in the script. You only need one or the other, not both.

The reason your aspect ratio is wrong is because you are cropping the black bars (GK is designed for Xvid encoding), but then upsizing what's left to DVD resolution. You don't need to do any cropping or resizing if you're going from DVD to DVD.

(Also, regarding the error you mentioned in post 11 - VirtualDub has been able to decompress YV12 since about 2004, it no longer uses the Xvid codec for this. Are you sure you got this error with the latest release?)

 

Okay, so I made a new script in GK and didn't alter anything. When I try to open my .avs script in VirtualDub (64 bit, version 1.9.11) I get the following error: AVI Import Filter error: (Unknown) (80040154)

If I try opening the script in VirtualDubMod (based on version 1.5.10) which came with GK, the video gets super tiny and super pixelated.

When you say to Ditch the GK script do you mean I should ditch GK entirely and get my AVS script in some other fashion? or just to drop the altered script I had made and just take a straight avs script from GK?

 

Visit my Webcomic! Nonstop Pop