TmpgEnc Plus w avs script = black screen output?

Discussion in 'Video - Software discussion' started by csaag, Jun 24, 2004.

  1. csaag

    csaag Member

    Joined:
    May 12, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    11
    I've been running TmpgEnc Plus 2.521 fine converting AVI's to mpeg2 with just the built-in noise filter.
    I tried to use an AviSynth script (v2.54 or .55) for the 1st time. I used the same Tmpg settings I've always used (2 pass vbr, 7000 avg bitrate, motion search est, ES video stream output )

    My input was a 22GB avi file of a 45 minute VHS capture in 720x480 using IuVcr (with Huffy). The avi plays fine.

    I used the following script:

    LoadPlugin("C:progra~CaptureextraConvolution3d.dll")
    avisource("D:VidCaptureandrew_play.avi")
    crop(8,4,-8,-4)
    SeparateFields()
    odd=SelectOdd.Convolution3D (0, 32, 128, 16, 64,10,0)
    evn=SelectEven.Convolution3D (0, 32, 128, 16,64,10,0)
    Interleave(evn,odd)
    Weave()
    DoubleWeave.SelectOdd()
    AddBorders(8,4,8,4)
    ConvertToRGB(interlaced=true)

    TmpgEnc Plus ran for about 90 minutes. The avs script was my input file. After 90 minutes, the m2v output was a black screen. Last night I started another conversion the way I've been doing it (w/o the avs script). Tmpg reported about 16 hours of encoding time, which seems about right based on past experience.

    So is there a problem with TmpgEnc Plus 2.5 using Avisynth scripts or did I do something wrong?
     
  2. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    I use AviSynth a lot, but never use TMPGEnc, so I'm hardly an expert on this, but this is from the AviSynth FAQ. Since you apparently already have HuffYUV isntalled, and are already using ConvertToRGB24 in your script, I didn't bother including those.

    - Install VFAPI plugin for TMPGEnc

    - Disable the direct show filters within TMPGEnc and turn
    off the VirtualDub proxy before frameserving.

    - Install the ReadAVS plugin for TMPGEnc

    If you want to just test your script, the best way is to open it in VirtualDub. I'd probably try that first.
     
  3. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    Well I see a Bunch of Useless stuff in your Script,
    Why do you need to use 4 different De-Interlaceing Methods???
    Here try this Script It should work Much better and Do basicly the same thing and there is no need for Cropping or Adding of Boarders cuz you allready Captured to the Correct resolution but if you need to crop something off then add it to the script:


    LoadPlugin("C:\PROGRA~1\undot.dll")
    LoadPlugin("C:\PROGRA~1\dgbob.dll")
    LoadPlugin("C:\PROGRA~1\Convolution3d.dll")
    avisource("D:VidCaptureandrew_play.avi")
    ConvertToYV12()
    DGBob(order=1,Mode=0)
    Undot()
    Convolution3d("movielq")
    Sharpen(0.85)

    This Script will De-Interlace to a True Progressive Image and Clean up most all of the Noise and Sharpen any Blurring from the Noise Filters ,Just make sure you have these Plugins installed and edit the Script accordingly...And if you have Problems with Getting Tmpgenc to load AVS files then go into the Vfapi Plugins and Disable the "Direct show File reader"...
    Also it shouldn"t take 16 hours to encode a 45 minute clip, It takes me about 2 hours useing Tmpgenc on 2 Pass mode and about 45 minutes when doing 2 pass mode with CCE...This script should also be Much faster than the one you were useing...

    Let me know how it turns out....Cheers
     
  4. csaag

    csaag Member

    Joined:
    May 12, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    11
    I was following a guide. Part of my problems were that I missed a 'ConverttoYUY2' line. The black screen disappeared when I added that & I got my video. I had a lot of ghosting images, but I missed a section in the guide that said to delete the 'DoubleWeave' line when using top field video (like Huffy gives). I did capture in YUY2 so I would think I shouldn't do a convert to YV12.

    My captures from my camcorder always have some video noise at the bottom of the picture so I do want to crop those out.

    I ended up figuring out for myself about the priorities. I prev had problems when I couldn't read in .avi files unless the DirectShow line was top priority.

    BTW since this is a VHS capture that I want to burn on a DVD to play on my TV, would I then want to not bother with de-interlace (sorry, didn't mention that in my orig post)? As I said, I was following a guide and I honestly can't speak for what these filters actually do.

    The 16 hour encode example that I mentioned used no avs script but was using the built-in noise filter in TmpgEnc. So maybe that is why the time was so long.
    When I got my avs script working last night & didn't use the noise filter, the encoding time was 8.5 hours.
     
  5. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    Well the first thing I noticed looking through your original script a little closer is that the Convolution3D version is an older one. This is based on the name, because the one for AviSynth 2.54 is called Convolution3DYV12.DLL.

    The reason Minion put the ConvertToYV12 in is because that's the colorspace AviSynth 2.54 works in natively. Not everything requires it, but it's the right way to do things. I'm assuming the ConvertToYUY2 in the version you were following was before Convolution3D since the version your script references is an older one that works in YUY2. Using the one I mentioned will eliminate the need for the conversion to YUY2 colorspace.

    I'd recommend Undot like Minion used because for it's pretty much the least destructive denoiser you can use. You can add the Undot line after SeparateFields() in your original script, and eliminate the DoubleWeave line. You also don't need to add borders to the sides if you crop 8 from each side because 704x480 is DVD compliant (I'm assuming DVD is the final format because of the resolution). Since TMPGEnc is supposed to be able to handle YV12 there's no reason for the ConvertToRGB unless it won't work any other way.

    The script I'd recommend would look like this:

    avisource("D:VidCaptureandrew_play.avi")
    ConvertToYV12()
    crop(8,4,-8,-4)
    SeparateFields()
    Undot()
    odd=SelectOdd.Convolution3d("movielq")
    evn=SelectEven.Convolution3d("movielq")
    Interleave(evn,odd)
    Weave()
    AddBorders(0,4,0,4)

    I took out the LoadPlugin lines because if you put the DLLs you need to use in C:\Program Files\AviSynth 2.5\plugins\ you shouldn't need to use those lines. For this script you need Convolution3DYV12.dll and Undot.dll. You could also use Minion's Sharpen line after each Convolution3D line like this:

    odd=SelectOdd.Convolution3d("movielq").Sharpen(0.85)
    evn=SelectEven.Convolution3d("movielq").Sharpen(0.85)


    If you need either of the plugins I used in this script, let me know and I'll email them to you. I don't think Avisynth.org is up right now. It got hacked by some Brazilian hacker group the other day and I don't think they have it up again yet.

    Minion,
    If there's anything I got wrong here, feel free to correct me.
     
  6. csaag

    csaag Member

    Joined:
    May 12, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    11
    Thanks for the info.
    I found the conv3d for YV12, but there were a few sharpen filters (msharpen etc) & I wasn't sure whatwas the difference. So if you could email the sharpen filter to my yahoo address (csaagp) .
    Thanks for the help
     
  7. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    Hi, The Regular Sharpen Function doesn"t need a seperate filter cuz it is built into the AVISynth.DLL,..
    So you just use :
    Sharpen(-1.13)
    to
    Sharpen(1.13) (I think thats it)

    Cheers
     
  8. csaag

    csaag Member

    Joined:
    May 12, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    11
    odd...

    The script for the YUY2 colorspace loads into TmpgEnc Plus 2.5:

    LoadPlugin
    ("C:\Progra~\Capture\extra\Convolution3d.dll")
    avisource("D:\VidCapture\x.avi")
    ConvertToYUY2( )
    crop(0,8,0,0)
    SeparateFields()
    odd=SelectOdd.Convolution3D (0, 32, 128, 16, 64, 10,0)
    evn=SelectEven.Convolution3D (0, 32, 128, 16, 64,10,0)
    Interleave(evn,odd)
    Weave()
    AddBorders(0,8,0,0)
    ConvertToRGB( )


    The script for the YV12 one gives me an 'unsupported or file not found' error. It can't be priorities as the 1st one loads. I did download Conv3dyv12 & Undot filters.

    LoadPlugin
    ("C:\Progra~1\Capture\extra\Convolution3DYV12.dll")
    LoadPlugin("C:\Progra~1\Capture\extra\UnDot.dll")
    avisource("D:\VidCapture\x.avi")
    ConvertToYV12( )
    crop(0,8,0,0)
    SeparateFields()
    UnDot()
    odd=SelectOdd.Convolution3D (0, 32, 128, 16, 64, 10, 0)
    evn=SelectEven.Convolution3D (0, 32, 128, 16, 64, 10,0)
    Interleave(evn,odd)
    Weave()
    AddBorders(0,8,0,0)
     
  9. csaag

    csaag Member

    Joined:
    May 12, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    11
    I had to add a ConvertToRGB and then it worked.
    Now it's time to experiment with some small clips.
    Thanks guys for all the help
     
  10. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    No problem. I always like to see people start using AviSynth. It has an undeserved reputation for being difficult. Once you've gotten your first script to work it's all (or mostly) downhill from there. If you have any more questions don't hesitate to ask.
     

Share This Page