![]() |
Open tmgenc, go into "Environnemental Settings" and then "VFAPI plugin".
1/ verify that the line "Avisynth/Virtualdub script reader" is present and checked. 2/ verify that the priority of this line is bigger than all otehr ones. Else raise it (right click on the name -> Higher priority). 3/ let the cursor on the name "Avisynth / virtual...." for 2 seconds and read in the baloon window if there is an error reported and if the path to the file Readavs.dll is correct. |
I already tried the first two on yesterday. Right now I'm at work so I cannot try the third one, I'll do it as soon as I'll be home again in the afternoon. Stay tuned for the forthcoming news :wink:
|
Hi, Phil, I just came home and checked: the path for readavs.dll is right, but tmpeg still fails to open avs scripts :cry: . What can I try now?
|
Add a line "ConvertToRGB24()" at the end of the script and test again with this.
Also try to open the script with virtualdubmod if you have it, to see if the problem is the same or not. |
Quote:
|
Quote:
Reinstall avisynth and / or divx codec (or try xvid insteed of divx). Note: this can be due also to a file in the plugin directory that as nothing to do there : a document, a txt file, or may be an avsi script that is corrupted. |
Quote:
EDIT: As you suggested, there was a corrupted file in the plugins dir. I deleted them all and installed just the dlls needed by the script, and everything works :D. Maybe the stupid-questions-time is finally over |
Quote:
Quote:
|
Ok, I just finished my first encoding with an advanced script, and results seems pretty good to me. I used the half template, with CQ set to 75 and the maximum bitrate raised to 3500. The final file size for a single episode is 344 MB without audio tracks, so the total file size assuming I'll add both ac3 tracks (eng and italian) would be 575, which is a bit larger than needed to put 8 episode in a single dvd-5 disc (dvd-9 are still too expensive, so I shifted my project to 3 dvd-5 for episodes and another one for extras). I'll try lowering the maximum bitrate to 3000, but maybe it'll be enough to convert one of the audio tracks to mp2. BTW I'm not as trained as you are to spot for video artifacts or errors, so I'd like to post some screenshot I took with DGIndex. They're quite large BMP (about an half MB each), should I convert them to jpg with photoshop or is it better to post them "as they are" to prevent photoshop from altering them during the conversion (and this would be the real last stupid question :oops:)?
EDIT: Here are the screenshots. http://www.digitalfaq.com/archives/error.gif http://www.digitalfaq.com/archives/i.../2006/11/2.jpg http://www.digitalfaq.com/archives/error.gif http://www.digitalfaq.com/archives/i.../2006/11/3.jpg |
Hard to speak with low res bmp. But no need to see them : 3000 will be too low for the lost episode : tree leaves are some of the most difficult things for MPEG2 codec. I mean that scenes shot in a forest always use a lot of bitrate. And guess what you have in lost ? :).
I suggest you to let the max at 3500, lower the min to 0, and don't use original 5.1 audio. You should use 2.0 MP2 audio at 128 kbit/s. |
Quote:
|
I'm right now trying small modification in the script and/or in settings (ie, I shifted LRemoveDust and LimitedSharpenFaster line positions to see what's better) with different encodings of the same source, to post a more accurate screenshot comparison. But I'm noticing the encoding is really slow, about 2,20 hrs for 40 mins of video: I remember reading somewhere in this forum (but I can't remember where :cry: ) there's a trick to improve the encoding speed (something like a "useless" script line). Did I misunderstood or such a way to boost speed do exist? I got a 3Ghz P4 (with HT), so I think Tmpeg should work a bit faster
|
The speed you have is not normal, I have quite the same on a 1.3Ghz P4 :).
The line that you are talking about in in the LRemoveDust function : Quote:
|
Quote:
|
Hi Phil, I added that line in the function and started a new encoding, but things didn't get better... The estimated time for the usual 40 min episode at 720x576 is almost 5 hrs :cry:! Is there any other script optimization I can use? I'll post the script as it is now as well as the functions used:
The script Import("C:\Programmi\Avisynth 2.5\plugins\LimitedSharpenFaster.avsi") Import("C:\Programmi\Avisynth 2.5\plugins\LRemoveDust_YV12.avsi") dgdecode_mpeg2source("E:\Lavoro KVCD\lost.d2v", cpu=4, idct=7) BicubicResize(720,576,1./3.,1./3.,2,0,716,572) TDeint(order=1,tryweave=true) LRemoveDust_YV12(17,1) LimitedSharpenFaster() MergeLuma(blur(0.1)) MergeChroma(blur(1.58)) ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ") Letterbox(16,16,16,16) function fmin( int f1, int f2) { return ( f1<f2 ) ? f1 : f2 } ConvertToRGB24() LimitedSharpenFaster function LimitedSharpenFaster( clip clp, \ float "ss_x", float "ss_y", \ int "dest_x", int "dest_y", \ int "Smode" , int "strength", int "radius", \ int "Lmode", bool "wide", int "overshoot", int "undershoot", \ int "soft", int "edgemode", bool "special", \ int "exborder" ) { ox = clp.width oy = clp.height Smode = default( Smode, 3 ) ss_x = (Smode==4) \ ? default( ss_x, 1.25) \ : default( ss_x, 1.5 ) ss_y = (Smode==4) \ ? default( ss_y, 1.25) \ : default( ss_y, 1.5 ) dest_x = default( dest_x, ox ) dest_y = default( dest_y, oy ) strength = (Smode==1) \ ? default( strength, 160 ) \ : default( strength, 100 ) strength = (Smode==2&&strength>100) ? 100 : strength radius = default( radius, 2 ) Lmode = default( Lmode, 1 ) wide = default( wide, false ) overshoot = default( overshoot, 1) undershoot= default( undershoot, overshoot) softdec = default( soft, 0 ) soft = softdec!=-1 ? softdec : sqrt( (((ss_x+ss_y)/2.0-1.0)*100.0) ) * 10 soft = soft>100 ? 100 : soft edgemode = default( edgemode, 0 ) special = default( special, false ) exborder = default( exborder, 0) #radius = round( radius*(ss_x+ss_y)/2) # If it's you, Mug Funky - feel free to activate it again xxs=round(ox*ss_x/8)*8 yys=round(oy*ss_y/8)*8 smx=exborder==0?dest_x:round(dest_x/Exborder/4)*4 smy=exborder==0?dest_y:round(dest_y/Exborder/4)*4 clp.isYV12() ? clp : clp.converttoyv12() ss_x != 1.0 || ss_y != 1.0 ? last.lanczosresize(xxs,yys) : last tmp = last edge = mt_logic( tmp.mt_edge(thY1=0,thY2=255,"8 16 8 0 0 0 -8 -16 -8 4") \ ,tmp.mt_edge(thY1=0,thY2=255,"8 0 -8 16 0 -16 8 0 -8 4") \ ,"max") .mt_lut("x 128 / 0.86 ^ 255 *") #.levels(0,0.86,128,0,255,false) tmpsoft = tmp.removegrain(11,-1) dark_limit1 = tmp.mt_inpand() bright_limit1 = tmp.mt_expand() dark_limit = (wide==false) ? dark_limit1 : dark_limit1 .removegrain(20,-1).mt_inpand() bright_limit = (wide==false) ? bright_limit1 : bright_limit1.removegrain(20,-1).mt_expand() minmaxavg = special==false \ ? mt_average(dark_limit1, bright_limit1) \ : mt_merge(dark_limit,bright_limit,tmp.removegrain(1 1,-1),Y=3,U=-128,V=-128) Str=string(float(strength)/100.0) normsharp = Smode==1 ? unsharpmask(strength,radius,0) \ : Smode==2 ? sharpen(float(strength)/100.0) \ : Smode==3 ? mt_lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +") \ : mt_lutxy(tmp,tmpsoft,"x y == x x x y - abs 16 / 1 2 / ^ 16 * "+Str+ \ " * x y - 2 ^ x y - 2 ^ "+Str+" 100 * 25 / + / * x y - x y - abs / * + ?") OS = string(overshoot) US = string(undershoot) mt_lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?") mt_lutxy( dark_limit, last, yexpr="y x "+US+" - > y x x y - "+US+" - 1 2 / ^ - "+US+" - ?") Lmode==1 ? mt_clamp(normsharp, bright_limit, dark_limit, overshoot, undershoot) : last normal = last zero = mt_clamp(normsharp, bright_limit, dark_limit, 0,0) Lmode==3 ? mt_merge(normal,zero,edge.mt_inflate()) : normal edgemode==0 ? last \ : edgemode==1 ? mt_merge(tmp,last,edge.mt_inflate().mt_inflate().r emovegrain(11,-1),Y=3,U=1,V=1) \ : mt_merge(last,tmp,edge.mt_inflate().mt_inflate().r emovegrain(11,-1),Y=3,U=1,V=1) AMNT = string(soft) AMNT2 = string(100-soft) sharpdiff=mt_makediff(tmp,last) sharpdiff2=mt_lutxy(sharpdiff,sharpdiff.removegrai n(19,-1), \ "x 128 - abs y 128 - abs > y "+AMNT+" * x "+AMNT2+" * + 100 / x ?") soft==0 ? last : mt_makediff(tmp,sharpdiff2) (ss_x != 1.0 || ss_y != 1.0) \ || (dest_x != ox || dest_y != oy) ? lanczosresize(dest_x,dest_y) : last ex=blankclip(last,width=smx,height=smy,color=$FFFF FF).addborders(2,2,2,2).coloryuv(levels="TV->PC") \.blur(1.3).mt_inpand().blur(1.3).bicubicresize(de st_x,dest_y,1.0,.0) tmp = clp.lanczosresize(dest_x,dest_y) clp.isYV12() ? ( exborder==0 ? tmp.mergeluma(last) \ : mt_merge(tmp,last,ex,Y=3,U=1,V=1) ) \ : ( exborder==0 ? tmp.mergeluma(last.converttoyuy2()) \ : tmp.mergeluma( mt_merge(tmp.converttoyv12(),last,ex,Y=3,U=1,V=1) \ .converttoyuy2()) ) (edgemode!= -1) ? last : edge.lanczosresize(dest_x,dest_y).greyscale return last } LRemoveDust_YV12 function LRemoveDust_YV12(clip input, int clmode, int "limit") { input=Crop(input,0,0,-0,-0,true) limit=default(limit,2) clmode=default(clmode,17) repmode = 2 clensed = Clense(input) rep = Repair(clensed, input, mode=repmode) rg = RemoveGrain(rep, mode=clmode) return LimitChange(rg, input, limit, limitU=255) } |
You can ditch TDeint. Lost should be progressive.
|
Quote:
|
It definitely should, TDeint isn't the fastest filter around :wink:
|
Quote:
Beside this, I need 3h per episode on my 1.3 Ghz but I did not use the adaptative script (no line "Scriptclip" in my script). This is the slowest part of the script ! |
Could you upload a small sample of the first disc? It would be interesting to see whether it's just field shifted or if there has been some weird NTSC->PAL conversion done again.
|
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.