This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Avisynth script in Hybrid
#1
Hello,

I try to open my basic avisynth script, but each time Hybrid (last version) shuts down.
I try to open the script with the main box in which we open input video file.

Is that correct ? is there an other way to do it ?

Here's my test script:

SetFilterMTMode ("QTGMC",4)

ffms2("U:\Media a traiter\DVinput.avi", atrack=1)
AssumeBFF()
QTGMC(preset="placebo", EdiThreads=6)
Prefetch(10)

Thanks in advance

Chrisbati
Reply
#2
Quote:Is that correct ? is there an other way to do it ?
Yup, that won't work.
a. you need to explicitly load the plugins (Hybrid uses a standalone Avisynth++ versions)
b. you might have to add 'return last' at the end since Hybrid does not add it automatically and otherwise your script does not return anything.

Cu Selur
Reply
#3
(11.04.2021, 17:48)Selur Wrote:
Quote:Is that correct ? is there an other way to do it ?
Yup, that won't work.
a. you need to explicitly load the plugins (Hybrid uses a standalone Avisynth++ versions)
b. you might have to add 'return last' at the end since Hybrid does not add it automatically and otherwise your script does not return anything.

Cu Selur

Thanks for your answer.
Sorry but i'm total beginner, what do you mean by explicitly load the plugins? Which ones and how to load them?

Thx in advance

Chrisbati
Reply
#4
As a side note:
To me to makes no sense to me to load this script in Hybrid since:
a. audio handling in Hybrid is probably better
b. the script without the audio can be generated through Hybrid

Quote:Sorry but i'm total beginner
Are you sure you want to use Hybrid then?
It's not intended for total beginners.
Other tools which might be easier to use that support Avisynth are MeGui and StaxRip.
There are quite a few more guides&co out there for those, so I would recommend to not use Hybrid but one of those two instead to getting started.

Quote:what do you mean by explicitly load the plugins?
On how to load plugins read: http://avisynth.nl/index.php/Plugins

You might also want to read: http://avisynth.nl/index.php/Getting_started

In your script you use:
1. through ffms2: FFMS2.avsi which calls FFVideoSource, FFAudioSource which are part of ffms2.dll
2. for QTGMC(preset="placebo", EdiThreads=6) you need tons of filters and a few scripts.
your script should probably look like this:
# clear automatically loaded scripts&filters to avoid conflicts
ClearAutoloadDirs()
# set default MT mode
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)

# load plugins (paths need to be adjusted to your system and whether 32bit or 64bit Avisynth is used!)
LoadCPlugin("I:\Hybrid\32bit\avisynthPlugins\ffms2.dll") # needed by FFMS2, it provides FFVideoSource and FFAudioSource which are used in FFMS2.avsi what offers ffms2(...)
LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\RgTools.dll") # needed for QTGMC with preset placebo
LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\masktools2.dll") # needed for QTGMC with preset placebo
LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\mvtools2.dll") # needed for QTGMC with preset placebo
LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\neo-fft3d.dll") # needed for QTGMC with preset placebo
LoadPlugin("I:\Hybrid\32bit\v\nnedi3.dll") # needed for QTGMC with preset placebo

# load scripts  (paths need to be adjusted to your system and whether 32bit or 64bit Avisynth is used!)
Import("I:\Hybrid\32bit\avisynthPlugins\FFMS2.avsi") # needed to call ffms2(...)
Import("I:\Hybrid\32bit\avisynthPlugins\QTGMC.avsi") # needed to call QTGMC
Import("I:\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi") # needed for QTGMC

# load the source
ffms2("U:\Media a traiter\DVinput.avi", atrack=1)
# force a specifc scan order
AssumeBFF()
# force a specific MT mode for QTGMC
SetFilterMTMode ("QTGMC",4)
# force specific QTGMC options
QTGMC(preset="placebo", EdiThreads=6)
# configure MT threads
Prefetch(10)
# return result of script
return last
Also make sure to configure Hybrid (Config->Internals->Avisynth) to either 32bit or 64bit depending whether your script uses 32bit or 64bit Avisynth and to use Avisynth ("Filtering->Support" needs to be set to 'Avisynth').


Cu Selur
Reply
#5
Thank you very much for all the explanation.

The reason why i Want to use my script is that I can't get the same qtgmc result with only hybrid.
I tried but the result is not the same.
And my script is really basic, i just call qtgmc with placebo preset.

When i call qtgmc without my script and only with hybrid, the result look smoother and overall it stays at 25 FPS while with my script and with only placebo preset the result is 50fps.

With hybrid, i use avisynth and only set placebo as preset in the telecine/deinterlace tab. But result seems smoother and frame rate stays at 25 FPS.

How Can I get the same result with hybrid ?

Thanks in advance

Chrisbati
Reply
#6
[quote]How Can I get the same result with hybrid ?[//quote]
  • Start Hyrid
  • Set Filtering->Support to Avisynth
  • Load Source
  • Enable Filtering->(De-)Interlace/Telecine->QTGMC Avisynth->Preset to Pladebo
  • Enable Filtering->(De-)Interlace/Telecine->QTGMC Avisynth->Bob
if your scan type isn't detected properly (since the source isn't properly flagged), adjust it using 'Overwrite input scan type'.

Cu Selur
Reply
#7
(12.04.2021, 07:12)Selur Wrote:
Quote:How Can I get the same result with hybrid ?[//quote]
  • Start Hyrid
  • Set Filtering->Support to Avisynth
  • Load Source
  • Enable Filtering->(De-)Interlace/Telecine->QTGMC Avisynth->Preset to Pladebo
  • Enable Filtering->(De-)Interlace/Telecine->QTGMC Avisynth->Bob
if your scan type isn't detected properly (since the source isn't properly flagged), adjust it using 'Overwrite input scan type'.

Cu Selur

Great !

Still on issue, the display aspect ratio is 4/3, it has to be 5/4 as I'm in PAL (720*576).
With my script I have 5/4, but with Hybrid, 4/3.

Result with my script:

Quote:Video
ID                                      : 0
Format                                  : YUV
Codec ID                                : YV12
Codec ID/Info                            : ATI YVU12 4:2:0 Planar
Duration                                : 9 s 640 ms
Bit rate                                : 249 Mb/s
Width                                    : 720 pixels
Height                                  : 576 pixels
Display aspect ratio                    : 5:4
Frame rate                              : 50.000 FPS
Color space                              : YUV
Chroma subsampling                      : 4:2:0
Compression mode                        : Lossless
Bits/(Pixel*Frame)                      : 12.000
Stream size                              : 286 MiB (99%)

Result with Hybrid:

Quote:Vidéo
ID                                      : 0
Format                                  : FFV1
Format version                          : Version 1
Codec ID                                : FFV1
Duration                                : 9s 640 ms
Bit rate                                : 85,3 Mb/s
Width                                    : 720 pixels
Height                                  : 576 pixels
Display aspect ratio                    : 4/3
Frame rate                              : 50,000 Im/s
Color space                              : YUV
Chroma subsampling                      : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressif
Compression mode                        : Sans perte
Bits/(Pixel*Frame)                      : 4.113
Stream size                              : 98,0 Mio (98%)
coder_type                              : Golomb Rice


How can I have the correct aspect ratio ?

Thanks in advance

Kind regards,

Chrisbati
Reply
#8
Hybrid takes the PAR (= pixel aspect ratio) that is signaled from the input and passed it through to the output.
If your input isn't properly flagged you can set the PAR under "Crop/Resize->Base->Pixel Aspect Ratio (PAR)->Input PAR".
If you don't know the correlation between PAR and DAR (= display aspect ratio) read: https://en.wikipedia.org/wiki/Pixel_aspect_ratio

You normally also can change the PAR by remuxing (Audio&Video set to Passthrough) and setting "Muxing->Overwrite->Pixel aspect ratio".

Cu Selur

Ps.: I hope you know what you are doing since 5/4 is a rather uncommon display aspect ratio,...
Reply
#9
(12.04.2021, 19:47)Selur Wrote: Ps.: I hope you know what you are doing since 5/4 is a rather uncommon display aspect ratio,...

You make me doubt, but I'm pretty sure pal DV is 720*576 so 5/4, no ?
Reply
#10
Quote: but I'm pretty sure pal DV is 720*576 so 5/4, no ?
Afaik DV normally as a 4x3 display aspect ratio, a 0.9:1 pixel aspect ratio, and a storage aspect ratio of 720 x 480 (NTSC) or 720 x 576 (PAL).

-> MediaInfos detail view (mediainfo --full "..." ; no clue how it's called nowadays in the gui) should display the pixel aspect ration etc. if you analys the dv file with it.

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)