Log in

View Full Version : Problem loading AVI into TMPGEnc


clairvo
22nd January 2003, 16:26
I use TMPGEnc to convert from AVI to VCD. This time I need to put in subtitles to burn in and I use an avisynth script to put the subtitles in the black bars. I have done this process before quite a few times and it worked fine. The script would look like this:

LoadPlugin("C:\Archivos de programa\Gabest\VobSub\textsub.vdf")
LoadPlugin("C:\Archivos de programa\GordianKnot\MPEG2DEC.dll")
AVISource("C:\video.avi")
ConvertToYUY2()
BilinearResize(352,196)
AddBorders(0,46,0,46)
TextSub("C:\video.ssa")

But I am having problems with a movie now. When I load the avs file in any player like microdvd player it plays just fine. But when I load it into TMPGEnc the colors are "spread out", something like converting a true-color jpg to a 16 color gif, I hope you get the idea.

I tried to go back to basics to see where was the problem and it turned out to be this line:
AVISource("C:\video.avi")
If I reduce the script to this line it still gives the same problems. I tried OpenDMLSource("C:\video.avi") and AVIFileSource("C:\video.avi") and it doesn't help either.

I installed the latest version of TMPGEnc. Let me stress that loading the avs into any player renders good results but not in TMPGEnc (or the converted mpg file, logically). VirtualDub says that the AVI file was encoded with DivX 5.0.2. I use the divx 5 drivers that came with the Gknot package and update from doom9.org.

If I load the AVI directly into TMPGEnc it loads fine !! but not if I load it through the avs script.

Any help appreciated thanks.

Clairvo

sh0dan
22nd January 2003, 18:02
Download Koepis "DirectX 8.1 fix" at the bottom of the CVS-bin site (see my sig). It contains a modified huffyuv that solves the problem.

clairvo
22nd January 2003, 20:49
Originally posted by sh0dan
Download Koepis "DirectX 8.1 fix" at the bottom of the CVS-bin site (see my sig). It contains a modified huffyuv that solves the problem.

I unzipped and run the exe. I rebooted but it isn't working. Do I need to configure something?

I am using Win98 with directx 8.1(4.08.01.0901) if it is of any help.

Clairvo

sh0dan
23rd January 2003, 08:45
Try to add ConvertToRGB24() at the end of the script.

clairvo
23rd January 2003, 11:15
Originally posted by sh0dan
Try to add ConvertToRGB24() at the end of the script.

That did it!! Thanks

Just for the record in case somebody has a similar problem:

With this script, the video looks WRONG in TMPGEnc:
LoadPlugin("C:\Archivos de programa\Gabest\VobSub\textsub.vdf")
LoadPlugin("C:\Archivos de programa\GordianKnot\MPEG2DEC.dll")
AVISource("C:\video.avi")
ConvertToYUY2()
BilinearResize(352,196)
AddBorders(0,46,0,46)
TextSub("C:\video.ssa")

With this scritp it looks RIGHT:
LoadPlugin("C:\Archivos de programa\Gabest\VobSub\textsub.vdf")
LoadPlugin("C:\Archivos de programa\GordianKnot\MPEG2DEC.dll")
AVISource("C:\video.avi")
ConvertToRGB24()
BilinearResize(352,196)
AddBorders(0,46,0,46)
TextSub("C:\video.ssa")

Changing from ConvertToYUY2() to ConvertToRGB24() solved it. If you don't use either it still looks wrong so it seems that I needed to convert to RGB24 for this particular case.

Thanks a lot.

Clairvo

clairvo
25th January 2003, 11:43
Correction: ConvertToRGB24() needs to be at the VERY end of the script, like sh0dan said, or the subtitles won't appear !!! (I discovered after near 20 hours of wasted enconding :rolleyes: )