dvd2svcd
19th March 2003, 10:19
Before you all jump on me and tell me that the problem is because I use Delphi6, please read it all.
When I use the VFW unit in Delphi and open an avs (avisynth 2.51) looking like this:
LoadPlugin("C:\tmp\MPEG2Dec3.dll")
mpeg2source("C:\tmp\preview.d2v")
BilinearResize(480,576)
Trim(2,2)
ConvertToRGB()
Everything works fine. But if I open an avs looking like this:
LoadPlugin("C:\tmp\MPEG2Dec3.dll")
mpeg2source("C:\tmp\preview.d2v")
BilinearResize(688,544,2,4,718,568)
AddBorders(16,16,16,16)
Trim(2,2)
ConvertToRGB()
It fails. Now, the really strange part is that if I open the avs script that fails in all other programs (like VirtualDUB and Mediaplayer), there's no problems. I know that this looks like I'm doing something wrong so I've made a simple sample which can be downloaded. As you can see from the source in UNIT1.PAS all that is done between the one that fails and working is switching between the good.avs and bad.avs
When I open the bad.avs the VideoInfo struct tells me that there's 240 frames and the width and height 260*56 which tells me that something went wrong. For you that don't have a delphi compiler, I've included the compiled program too, besides the unit1.pas is so simple that it would take maybe 5 minutes to port it to C++. In the attached avs files I use BlankClip() instead of a vob/d2v file.
http://www.dvd2svcd.org/AVSFails.zip
When I use the VFW unit in Delphi and open an avs (avisynth 2.51) looking like this:
LoadPlugin("C:\tmp\MPEG2Dec3.dll")
mpeg2source("C:\tmp\preview.d2v")
BilinearResize(480,576)
Trim(2,2)
ConvertToRGB()
Everything works fine. But if I open an avs looking like this:
LoadPlugin("C:\tmp\MPEG2Dec3.dll")
mpeg2source("C:\tmp\preview.d2v")
BilinearResize(688,544,2,4,718,568)
AddBorders(16,16,16,16)
Trim(2,2)
ConvertToRGB()
It fails. Now, the really strange part is that if I open the avs script that fails in all other programs (like VirtualDUB and Mediaplayer), there's no problems. I know that this looks like I'm doing something wrong so I've made a simple sample which can be downloaded. As you can see from the source in UNIT1.PAS all that is done between the one that fails and working is switching between the good.avs and bad.avs
When I open the bad.avs the VideoInfo struct tells me that there's 240 frames and the width and height 260*56 which tells me that something went wrong. For you that don't have a delphi compiler, I've included the compiled program too, besides the unit1.pas is so simple that it would take maybe 5 minutes to port it to C++. In the attached avs files I use BlankClip() instead of a vob/d2v file.
http://www.dvd2svcd.org/AVSFails.zip