Quantcast DVD2SVCD: Finally Got MA Working in Avi2svcd, with KVCD_LBR.ini, but... - digitalFAQ.com Forums [Archives]
  #1  
07-20-2003, 01:25 PM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
At first, I had problems getting DVD2SVCD working at all. That didn't take long to fix and I was ab;e to get that running by myself. Then, I downloaded Kwag's matrices.ini and KCVD_LBR.ini and got those to work, again with little trouble.

I wanted to try the MA (motion adaptive) script that I had been reading about, and pasted a copy onto the end of my KVCD_LBR.ini, which is the settings file I load after starting up DVD2SVCD. AFter getting the proper plugin dll's and placing them in the proper location, I'm finally able to get an encode going with the MA script, however.....

My first two types of successes (DVD2SVCD, and DVD2SVCD/ with KVCD_LBR.ini) were with DVD backups. When attempting to get up and running with MA, I have been attempting to convert 97 minute DivX 5.03 AVI files to a 1 disc KVCD. I've checked with a program called G-spot, and I have all of the appropriate codecs installed....AviSynth 2.5 is installed....the appropriate dll's for AVS2.5 are in place, and yet when I start to do the TMPEnc video encode, my video is split neatly in 1/2 vertically (a line drawn from top to bottom of the encoding preview separating the two sides). There is a color difference betweem the two sides, and a message that appears at the top (written into the video stream, but obviously not an error causing the encode to stop). It says 'Plane Difference: Only planar images (as YV12) supported! ([ScriptClip]; Line 1'

I'm not sure if the semi colon following the ([ScriptClip] is a semi colon or a period. I snagged a jpeg snapshot from the test encode while I'm letting the whole movie encode to see what it looks like. I've this image to show you what I mean. Any advice to get to the bottom of this much appreciated!


Tom

[/IMG]
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
07-20-2003, 01:59 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Thomas Davie
There is a color difference betweem the two sides, and a message that appears at the top (written into the video stream, but obviously not an error causing the encode to stop). It says 'Plane Difference: Only planar images (as YV12) supported! ([ScriptClip]; Line 1'


It's all my fault my friend ! I forgot I patch DVD2SVCD.exe with an hex editor soon after having installed it.

In fact the program use to add a "ConvertToYUY2()" after the "avisource" line in the avs script it generates. But for the MA script we need to be in YV12.

What you can do it's either :

1/ add a "1=ConvertToYV12()" as the first line of the ini file I already gave to you (change all the numbers of all the other line of course)

OR

2/ Do like I did : open DVD2SVCD.exe with an hex editor, search for the string "ConvertToYUY2", check this line follow an "avisource" command, and Change the string to "#onvertToYUY2".
Reply With Quote
  #3  
07-20-2003, 03:39 PM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
First, I added the line ConvertToYV12() right at the beginning of the script clip you gave me, like this

0-ConvertToYV12()
1=nf=0

Then, the program proceeded and started encoding and no more vertical split screen with odd colours, but there was still an occasioanl error message which poped up almost, it seemed at scene changes or in points of high motion/contrast. It was 'Function: ([TemporalCleaner;1]) undefined (or something pretty close to this. So

I did a bit of checking around, and downloaded a 2.5 compatible dll called TemporalCleaner.dll from WebEnterprises, and placed it in the appropriate plugins directories. Fired up the program, and went through to the TMPGenc and started encoding with no errors. Yay! And wouldn't you know it; this was the only dll that I hadn't downloaded

At this point, it looks as if it is working. I'll keep my fingers crossed that the whole encode goes smoothly, and then finally I can get these episodes off my hard drive. However, with Scene change detected in TMPGEnc 2.513.53.162, it was taking a *long* time, so I deselected that option, and all apears well after restarting. {Edit: It was taking a loooong time even without scene changes selected, so I reselected that option).

Thanks for all your help Phil; if I could buy you a beer (a Jenlain perhaps), I would.

Tom

(working, but slooooow on a P4 @ 2.4 Ghz/ 512mb DDR333 ram, not onverclocked and 128 mb video card)
Reply With Quote
  #4  
07-20-2003, 05:24 PM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
It's going slower than slow I took the dogs for a walk, came back to find that the first TMPGEnc test pass had only proceeded 1:20 in 23:10 real time. SO, I hate to think what is going to happen when it attempts to encode the whole 97 minute AVI file.

There is obviously a problem here.

1) DVD2SVCD encodes to YUY2, but then a line in the script ComvertToYV12() should take care of this. However, what is DVD2SVCD encoding from? The DirectShowfield in G-Spot indicates the video is already in YUY2 format.

2) If I hex edit DVD2SVCD.exe to make it not convert to YUY2, then I get an error when starting TMPGEnc after transcoding the audio.

3) If there was no error from #2, then a simple command of ConvertToYV12() should work, and save me time over #1, which is, from my understanding including an extra unnecessary encoding to YUY2.

Am I missing something really obvious here? I'm pasting my Adaptive Motion Script below. This is currently in use with a non hex edited DVD2SVCD. Enable padding and Detect Scene Change selected on encoder tab. Pad VCD audio selected under advanced settings under the bbMPEG tab. Also under the encoder tab, rate control mode set to Automatic Variable Bitrate (CQ_VBR), Motion Search Estimate: Fast, VBV Buffer Size:40, Ogffset CQ Value: 24, File Prediction Factor: 0.940, Filed Order: Automatic, and GOP settings 1,15,2,1,15.


[AVISYNTH_Adaptative Filter]
0=ConvertToYV12()
1=nf=0
2=GripCrop(^TargetWidth, ^TargetHeight+^BorderTop+^BorderBottom, overscan=^overscan, source_anamorphic=^source_ana, dest_anamorphic=^dest_ana)
3=GripSize(resizer="BiCubicResize")
4=Undot()
5=Asharp(1, 4)
6=STMedianFilter(^S_FilterThreshHold, ^S_EdgeThreshHold, 0, 0 )
7=MergeChroma(blur(^blur_chroma))
8=MergeLuma(blur(^blur_luma))
9=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
10=ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
11=GripBorders()
12=function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
^overscan=1
^source_ana=false
^dest_ana=false
^S_FilterThreshHold=8
^S_EdgeThreshHold=32
^blur_chroma=1.58
^blur_luma=0.1
?=

Tom
Reply With Quote
  #5  
07-20-2003, 05:51 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Thomas Davie
1) DVD2SVCD encodes to YUY2, but then a line in the script ComvertToYV12() should take care of this. However, what is DVD2SVCD encoding from? The DirectShowfield in G-Spot indicates the video is already in YUY2 format.
You put the finger exactly where you had to ! That is why I patched directly the binary : DVD2SCVD adds the convertToYuY2 line even if we are already in YuY2 !
Moreover, to add a "ConvertToYV12" is a workaround, but is a relly bad thing : too much convert screw the video

Quote:
2) If I hex edit DVD2SVCD.exe to make it not convert to YUY2, then I get an error when starting TMPGEnc after transcoding the audio
Which error ? Did you check the avs script genereatd by D2S (it's in the working directory of D2S, or you can see it by doing a "edit as video" into the frameserver tab) ?

Can you give it to me, to see where can be the error ?
Reply With Quote
  #6  
07-20-2003, 06:29 PM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
I re hex edited the DVD2SVCD.exe file so that it wouldn'r force a YUY2 conversion, started it up, loaded my KVCD_LBR.ini file (still with the YV12 conversion in), and am starting te program now. I'll post my generated avs script here, along with the error message.

thanks

Tom
Reply With Quote
  #7  
07-20-2003, 06:41 PM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Only....now it is not crashing, but is still going very slowly (say 23 minutes for a 1 minute clip).

LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg 2dec\MPEG2D~1.DLL")
AVISource("C:\DOWNLO~1\Soilwork\MS3760~1.AVI",Fals e)
#onvertToYUY2()
ConvertToYV12()
nf=0
GripCrop(352, 240+0+0, overscan=1, source_anamorphic=false, dest_anamorphic=false)
GripSize(resizer="BiCubicResize")
Undot()
Asharp(1, 4)
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(1.5)
MergeLuma(blur(0.1))
SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = round(YDifferenceToNext())"+chr(13)+ "nf >= SwitchThreshold ? unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))) : TemporalCleaner(6+nf,11+nf) ")
GripBorders()
function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }

On the 3rd line, you can see that DVD2SVCD is no longer forcing a conversion.

Tom
Reply With Quote
  #8  
07-20-2003, 07:10 PM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
That were proceeded by an AviSource command.


And changed both of them to #onvertToYUY2

Am trying again now.

Doesn't crash.

Still very slow

Tom
Reply With Quote
  #9  
07-21-2003, 07:10 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Yes but you always do a "ConvertToYV12" that is useless.

Remove it from your script.

(note: only Divx5.05 gives output in YV12, if you have Divx3.11 and 4.01 installed of your PC, remove them. They produce a picture in YUY2).

Last XVid codec also produces picture in YV12.
Reply With Quote
  #10  
07-21-2003, 10:06 AM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
Try my guide ... It works with the MA-Script in DVD2SVCD...

DVD2KVCD using DVD2SVCD by Avalon

AVI will work with this too... I think so...
Reply With Quote
  #11  
07-21-2003, 10:16 AM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Yes but you always do a "ConvertToYV12" that is useless.

Remove it from your script.

(note: only Divx5.05 gives output in YV12, if you have Divx3.11 and 4.01 installed of your PC, remove them. They produce a picture in YUY2).

Last XVid codec also produces picture in YV12.
So, I can change both instances in DVD2SVCD.exe of ConvertToYUY2 to #onvertToYUY2, AND remove the ConvertToYV12() from my script. I hadn't thought of that. I guess I was just too close to the issue.

thanks. Will try when I get home.

Tom
Reply With Quote
  #12  
07-21-2003, 06:10 PM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Avalon
Try my guide ... It works with the MA-Script in DVD2SVCD...

DVD2KVCD using DVD2SVCD by Avalon

AVI will work with this too... I think so...
I just tried three times, and I always get this message embedded inside the top of the file that TMPGEnc is encoding

Plane Difference: Only planar images (as YV12) supported! ([ScriptClip], line 1)

The usual; 1/2 of the screen is purple, and half isn't. The AVI file *IS* already YUY2 dormat, and I could certainly add a ConvertToYV12(), but this I assume would add to the processing rime. None of the AVI episodes of MST3K that I have have ever worked with any kind of MA filtering Take off MA, and it converts just fine; put it on and the screen becomes half purple; add a converto command and the conversion time skyrockets.

C'est la vie. I guess I just can't do MA filtering on these AVI's.

thanks

Tom
Reply With Quote
  #13  
07-21-2003, 06:14 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Avalon
Try my guide ... It works with the MA-Script in DVD2SVCD...

DVD2KVCD using DVD2SVCD by Avalon

AVI will work with this too... I think so...
You think bad. Read the thread
Reply With Quote
  #14  
07-21-2003, 07:02 PM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Quote:
Originally Posted by Avalon
Try my guide ... It works with the MA-Script in DVD2SVCD...

DVD2KVCD using DVD2SVCD by Avalon

AVI will work with this too... I think so...
You think bad. Read the thread
I expect it will work okay, but you never know. It's Attila (2001) @ 177 minutes, modified gop structure (1,24,2,1,24), detect scene change, motion search estimate fast, offset CQ value 65, file prediction factor 0.940, CD size 795; set to 352x240

I'll report back in a few hours

Tom
Reply With Quote
  #15  
07-22-2003, 01:53 AM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
My MA Script only works with the filters I packed!!!! You must download them form my side and install it to 'C:\'. Normaly the folders 'Filter20' and 'Filters25' will be created automatically. It will only work with AS 2.5.2. If you still need 2.0.8 for other things download the avisynthswitcher 0.1 edit by me too...
Install it whereever you want. When you want to switch choose Your version and press switch.
How it work: avisynthswitcher overwrites the avisynth.dll in windows system-folder. If you wanth to change the version it will overwrite it again. And so on and so on...
Avisynth is simple only the one dll.
Good luck for You
Reply With Quote
  #16  
07-22-2003, 04:08 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Avalon, once again READ THE THREAD !

DVD2SVCD doesn't work with your templates because it adds a "ConvertToYUY2()" after the "avisource". It's hardcoded and nothing in your delivery handle that problem.

Read my posts and see where it will fail, and how to avoid this before telling again and again that your guide solves every problems. Thanks !
Reply With Quote
  #17  
07-22-2003, 04:11 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Thomas Davie
file prediction factor 0.940
Why so low ? DVD2SVCD always gave me result below the final target size so you can put "1.000" without any problems.

Quote:
CD size 795
Same here : don't worry to put "807" (actual size of a CD80min). I never had problems with this value.
Reply With Quote
  #18  
07-22-2003, 04:30 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Thomas Davie
C'est la vie. I guess I just can't do MA filtering on these AVI's.
NO ! You can do MA tiltering on AVI's. Just have to do what you wrote just before. That is :

Quote:
Originally Posted by Thomas Davie
So, I can change both instances in DVD2SVCD.exe of ConvertToYUY2 to #onvertToYUY2, AND remove the ConvertToYV12() from my script. I hadn't thought of that. I guess I was just too close to the issue.
And if your avi codec does'nt provide to you a decent YV12, put again "ConvertToYV12" in the begining of the script. That's all !

(but is better to have the last version of Xvid and Divx as I told you just before).
Reply With Quote
  #19  
07-22-2003, 06:50 AM
Thomas Davie Thomas Davie is offline
Free Member
 
Join Date: Jul 2003
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Quote:
Originally Posted by Thomas Davie
C'est la vie. I guess I just can't do MA filtering on these AVI's.
NO ! You can do MA tiltering on AVI's. Just have to do what you wrote just before. That is :

Quote:
Originally Posted by Thomas Davie
So, I can change both instances in DVD2SVCD.exe of ConvertToYUY2 to #onvertToYUY2, AND remove the ConvertToYV12() from my script. I hadn't thought of that. I guess I was just too close to the issue.
And if your avi codec does'nt provide to you a decent YV12, put again "ConvertToYV12" in the begining of the script. That's all !

(but is better to have the last version of Xvid and Divx as I told you just before).
I do have the most recent versions of both Xvid and DivX. And I did try that; and for some reason I was getting a conversion (with no error messages) of 1 minute in 23 minutes real time. As I said, something is wrong. I'm puzzled as to whether or not it can be solved simply.

thanks

Tom
Reply With Quote
  #20  
07-22-2003, 07:11 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
23 min / 1 min of movie without ANY "ConvertTo..." lines at all in the script ?

It seams that when you told you took 23 min, you had "ConvertToYV12" in the begining of the script. Check this point !

Can't you do a script BY HAND and see how it works before to think D2S is your problem ?

If you need so much time with a script without any ConvertTo, the problem is in you PC, not in the software.

I encode all my KVCD with D2S at 8 min per min of movie, using the MA script. And I have a little P4 1,3 Ghz.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
IE 7 to finally support tabs Zyphon Computers 6 08-18-2005 05:32 AM
DVD2SVCD: ini files to use KVCD_LBR parameters for DVD2S(K)VCD kwag Video Encoding and Conversion 107 10-12-2003 10:36 AM
DVD2SVCD: WORKING log for D2V mrj03 Video Encoding and Conversion 4 07-24-2003 03:48 AM
DVD2SVCD: need a new kvcd_lbr.ini jorel Video Encoding and Conversion 6 12-21-2002 06:08 PM
DVD2SVCD: Is the Chapter creation working DVD2SVCD Shaq Video Encoding and Conversion 3 12-06-2002 02:46 PM

Thread Tools



 
All times are GMT -5. The time now is 08:06 AM  —  vBulletin Jelsoft Enterprises Ltd