DrPhill
4th May 2012, 10:20
I am using HCEnc to covert my avs script to mv2 files.
I have come across an oddity. Here is a reduced test script:
imageWidth = 1280
imageHeight = 960
reference = DirectShowSource("2012-01-04\output.m2v")
video = Trim(reference, 50, 200)
append = DirectShowSource("2012-02-09\output.m2v")
append = AddBorders(append, 10, 4, 0, 0)
#append = Crop(append, 0, 0, -10, -4)
append = BilinearResize(append, imageWidth, imageHeight)
append = Trim (append, 50, 200)
video = Dissolve(video, append, 50)
return video
This works fine (except the images are not aligned properly). If I uncomment the crop command, then the output GTU when the fade completes. By GTU I mean the image is replaced by horizontal coloured banding (corrupt image I guess).
The same script works perfectly well in windows media player.
If I replace either negative parameter to Crop with zero, then the problem goes away.
Two successive calls to Crop, (each with one negative parameter) fails, but if I move one of these calls to before AddBorders everything works fine.
Anybody stumbled across similar?
DrPhill
4th May 2012, 10:47
Even splitting the crop into two commands I get problems with HCEnc.
For MPEG-2 you should use DGIndex/DGDecode (http://neuron2.net/dgmpgdec/dgmpgdec.html).
Nope, still problems running the script in: dgmpgdec148_20060720
No problems in AVSPMod or Windoze Media player.
MY Script:
imageWidth = 1280
imageHeight = 960
reference = DirectShowSource("2012-01-04\output.m2v")
reference = BilinearResize(reference, imageWidth, imageHeight)
video = Trim(reference, 50, 350)
reference = Subtitle(reference, "reference", y=40)
video = Subtitle(video, "2012-01-04", y = 40)
append = DirectShowSource("2012-02-09\output.m2v")
append = Crop(append, 0, 0, -10, 0) # negative
append = AddBorders(append, 10, 4, 0, 0)
append = Crop(append, 0, 0, 0, -4) # negative
append = BilinearResize(append, imageWidth, imageHeight)
append = Subtitle(append, "2012-02-09", y=40)
# merge single frame to check alignment
#return Dissolve(Trim(reference, 1,1), Trim(append, 1,1), 0)
append = Trim (append, 50, 350)
video = Dissolve(video, append, 50)
append = DirectShowSource("2012-02-14\output.m2v")
append = Crop(append, 0, 0, -12, 0) # negative
append = AddBorders(append, 12, 6, 0, 0)
append = Crop(append, 0, 0, 0, -6) # negative
append = BilinearResize(append, imageWidth, imageHeight)
append = Subtitle(append, "2012-02-14", y=40)
# merge single frame to check alignment
#return Dissolve(Trim(reference, 1,1), Trim(append, 1,1), 0)
append = Trim (append, 50, 350)
video = Dissolve(video, append, 100)
append = DirectShowSource("2012-02-19\output.m2v")
append = Crop(append, 0, 0, -8, 0) # negative
append = AddBorders(append, 8, 1, 0, 0)
append = Crop(append, 0, 0, 0, -2) # negative
append = BilinearResize(append, imageWidth, imageHeight)
append = Subtitle(append, "2012-02-19", y=40)
# merge single frame to check alignment
#return Dissolve(Trim(reference, 1,1), Trim(append, 1,1), 0)
append = Trim (append, 50, 350)
video = Dissolve(video, append, 50)
append = DirectShowSource("2012-03-22\output.m2v")
append = AddBorders(append, 0, 2, 2, 0)
append = Crop(append, 2, 0, 0, -2) # negative
append = BilinearResize(append, imageWidth, imageHeight)
append = Subtitle(append, "2012-03-22", y=40)
# merge single frame to check alignment
#return Dissolve(Trim(reference, 1,1), Trim(append, 1,1), 0)
append = Trim (append, 50, 350)
video = Dissolve(video, append, 50)
# This is slightly rotated - may need to discard
append = DirectShowSource("2012-03-28\output.m2v")
append = AddBorders(append, 0, 10, 18, 0)
append = Crop(append, 12, 0, 0, -10) # negative
append = BilinearResize(append, imageWidth, imageHeight)
append = Subtitle(append, "2012-03-28", y=40)
# merge single frame to check alignment
#return Dissolve(Trim(reference, 1,1), Trim(append, 1,1), 0)
append = Trim (append, 50, 350)
video = Dissolve(video, append, 50)
append = DirectShowSource("2012-04-24\output.m2v")
append = AddBorders(append, 0, 0, 10, 0)
append = Crop(append, 10, 0, 0, 0) # negative
append = BilinearResize(append, imageWidth, imageHeight)
append = Subtitle(append, "2012-04-24", y=40)
# merge single frame to check alignment
#return Dissolve(Trim(reference, 1,1), Trim(append, 1,1), 0)
append = Trim (append, 50, 350)
video = Dissolve(video, append, 100)
#append = DirectShowSource("2012-04-24\output.m2v")
#append = AddBorders(append, 0, 0, 10, 18)
#append = Crop(append, 14, 14, 0, 0) # negative
#append = BilinearResize(append, imageWidth, imageHeight)
#append = Subtitle(append, "2012-04-24")
# merge single frame to check alignment
#return Dissolve(Trim(reference, 1,1), Trim(append, 1,1), 0)
#append = Trim (append, 50, 350)
#video = Dissolve(video, append, 100)
return video
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.