Hello, I'm trying to process an old, poor quality, music video from the sixties .
It's H.264 video and aac audio in an MKV. The video is 450*360, so I'm cropping by 2 to make
it divisible by 4, and acceptable to the cnr2 chroma noise reduction.
The problem is, this script, as is, causes the video to tear severely to the top right, and bottom left.
If I just have directshowsource and converttoyuy2(), virtualdub doesn't open it, but gives a message saying the
size must be divisible by 4.
Here's my simple script:
directShowSource("J:\media 1\old_video.mkv",fps=29.97)
ConvertToYUY2()
Crop(2,0,-0,-0)
cnr2()
On a side note, if I drag the MKV to virtualdub (it has the directshow input plugin) it opens just fine.
I guess I could process it that way, but I would like to find out what is going wrong in Avisynth.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 14 of 14
Thread
-
-
Is it interlaced? If so, I think you have to process it differently when cropping: ConvertToYUY2(interlaced=true) , and cropping has to be done in 4's for interlaced YV12
-
Hello, no it's not interlaced. Here's a couple of images showing the
successful open of the MKV directly in Virtualdub, and the script
open showing the tearing:
-
If you take out the crop, does it tear?
This looks more like it could be a decoder issue, what directshow decoder are you using? ffdshow, coreavc? etc...
If it's a problem with your directshow decoder, instead of DirectShowSource(), you could try FFMpegSource() or FFVideoSource() ; or try switching decoders e.g. ffdshow or divx 7 -
Try this (tweak as needed):
Code:DirectShowSource("J:\media 1\old_video.mkv",fps=29.97) AddBorders(1,0,1,0) Crop(2,0,-2,-0)
-
The Directshow (divx? xvid?) decoder isn't handling the 450 pixel wide (mod2) image correctly (some decoders require mod4, some mod2). Try using AviSource() instead of DirectShowSource(). Or a different DirectShow decoder.
-
Thanks for the tips.
I haven't tried out Midzuki's tip yet, but I booted up a 2nd XP I have on
the same box. In this 2nd system, ffdshow is active, while in the 1st
coreavc is handling the H.264.
The problem does not occur on the 2nd system.
Regarding poisondeathrays suggestion "If you take out the crop, does it tear? " Virtualdub will not accept the script - It complains about the width not being divisible by 4 -
Although this may be an Avisynth message being relayed by Virtualdub ? -
Originally Posted by davexnet
-
-
directShowSource("J:\media 1\old_video.mkv",fps=29.97).Crop(2,0,-0,-0)
ConvertToYUY2()
cnr2() -
poisondeathray - yes! The problem is solved,
but there's an academic discussion going on now.
I tried out jagabo's suggestion above - it open's fine in Virtualdub,
but the image is distorted, as described in the first post. I tried avisource instead of directshowsource,
but it wouldn't open the MKV file.
As poisondeathray reminds us, using ffdshow instead of coreavc
resolves the problem.
Opening the source file in Vdub directly also works fine.
Is this a bug in Coreavc ? -
What version of coreavc are you using? Is it the pro version? If this is a replicable "bug" , consider sending the sample in . When opening the file directly in vdub , it uses the VFW system, not directshow. If you have ffdshow installed or x264vfw, that is probably what is being used to decode in vdub.
I suggested this earlier, but another avisynth source filter option for h.264 in .mkv is FFMpegSource or FFVideoSource (the latter is the newer version), both are based on libavcodec for decoding and frame accurate (unlike DirectShowSource)
For the academic discussion, is it vdub/avisynth combo that is causing the issue with mod4, or can you use something like AvsP?
Also are you sure of the clip frame dimensions? There could be aspect ratio signalling in the h.264 stream if encoded anamorphcially, or display aspect ratio signalling in the mkv container. You could use avinaptic for more information
EDIT: yes I played around with samples resized and it seems it's an avisynth limitation - I get the same error message for a YV12 source regardless of previewing in vdub, mpc or avsp -
Many codecs don't encode or decode properly with mod2 frame sizes. Mod2 should be avoided.
Similar Threads
-
Certain d2v file causing problems with MeGUI Avisynth Script Creator.
By Simcut in forum Newbie / General discussionsReplies: 5Last Post: 30th Jul 2012, 16:57 -
Horizontal Tearing
By Tripledrop in forum Software PlayingReplies: 0Last Post: 16th Mar 2011, 12:57 -
Authoring while tearing out hair
By GimpGuy2000 in forum Authoring (DVD)Replies: 3Last Post: 7th May 2008, 01:58 -
Frame tearing with PC playback
By Twist in forum Media Center PC / MediaCentersReplies: 6Last Post: 26th Feb 2008, 10:46 -
Vegas Event Pan/Crop Tool Causing More Distortion to My Project
By hip_school_preppie in forum EditingReplies: 4Last Post: 30th Aug 2007, 21:08