Page 1 of 2
Example of Custom Avisynth script
Posted: Wed Nov 18, 2015 4:38 pm
by Rubikean
Could anyone share an example of an avisynth script?
This is more for learning than anything in particular. Below is the script i have been playing with (unsuccessfully).
SCRIPT:
Code: Select all
# Variables:
#
# m_clip = The last returned AviSynth media
#
# Do NOT change any of the following variables!!!
# _ffas_video = <original video>
# _ffas_audio = <original audio>
# _ffas_height = <source height>
# _ffas_width = <source width>
# _m_clip_a_channels = <total channels>
# _ffas_work_fdr = Working folder for the workflow
#
AssumeFPS(59.94, 1)
hd2sd("m_clip", Interlaced=true, OutputFieldRate=29.97, OutputColorSpace=”YV12″)
# The following MUST be the last line of your script
Return m_clip
Re: Example of Custom Avisynth script
Posted: Wed Nov 18, 2015 5:15 pm
by admin
First, you must add the "A/V Media"-decoder prior to your "Custom AviSynth scrip" preset. Then make these changes marked with an underscore:
m_clip = AssumeFPS(m_clip, 59.94, 1)
m_clip = hd2sd(m_clip, Interlaced=true, OutputFieldRate=29.97, OutputColorSpace=”YV12″)
# The following MUST be the last line of your script
Return m_clip
Remember that "m_clip" is always your source variable in AviSynth so if you want to do something with the incomming media, it is represented in the "m_clip" variable. The reason is that the "A/V Media"-decoder return the incomming media in the "m_clip" variable. The "Custom AviSynth script" just continues where "A/V Media" ended. Was that clear ?
-steipal
Re: Example of Custom Avisynth script
Posted: Wed Nov 18, 2015 5:34 pm
by Rubikean
Perfectly! Now let see if I can do something useful!
Thanks, Steipal.
Re: Example of Custom Avisynth script
Posted: Wed Nov 18, 2015 10:09 pm
by Rubikean
Aparently, I am still missing something. I keep getting this error-
[avisynth @ 031bf560] unexpected character "�"
(C:\\20151116101339\20151118-170449-162-9ABB675A\~iodpqfd.avs, line 16, column 80)
C:\\20151116101339\20151118-170449-162-9ABB675A\~iodpqfd.avs: Unknown error occurred
,Frames,0)
Workflow is Watchfolder->Av Media (Full Decode)->Custom AviSynth Script->Custom FFMPEG->Output Folder.
This occurs even with the default Custom AviSynth script unmodified. What am I missing?
-Chris
Re: Example of Custom Avisynth script
Posted: Tue Nov 24, 2015 7:22 pm
by admin
I'm sorry Rubikean, I did'nt see this reply until now
When this error occurs, can you please send me the zipped contents of the work folder (like "C:\20151116101339\20151118-170449-162-9ABB675A") to
post@ffastrans.com. If you have very large decoded files in there then just leave them out. Does your files have any strange characters in them?
-steipal
Re: Example of Custom Avisynth script
Posted: Tue Jun 07, 2016 10:33 am
by gor
I also tried to use hd2sd script but without success, using this file
HD2SD plugin for AVS and this Custom AviSynth Script:
Code: Select all
LoadPlugin("%s_ffastrans_dir%\Processors\AVS_plugins\hd2sd_sd2hd\ColorMatrix.dll")
LoadPlugin("%s_ffastrans_dir%\Processors\AVS_plugins\hd2sd_sd2hd\FFT3DFilter.dll")
LoadPlugin("%s_ffastrans_dir%\Processors\AVS_plugins\hd2sd_sd2hd\GrapeSmoother.dll")
LoadPlugin("%s_ffastrans_dir%\Processors\AVS_plugins\hd2sd_sd2hd\TDeint.dll")
LoadPlugin("%s_ffastrans_dir%\Processors\AVS_plugins\hd2sd_sd2hd\VScope.dll")
m_clip = hd2sd(m_clip)
# The following MUST be the last line of your script
Return m_clip
The hd2sd.avsi file is in "%s_ffastrans_dir%\Processors\AVS_plugins\"
What's wrong?
Re: Example of Custom Avisynth script
Posted: Tue Jun 07, 2016 3:32 pm
by admin
To use the hd2sd.avsi file you need to add the following line to your custom script:
Import("%s_ffastrans_dir%\Processors\AVS_plugins\hd2sd.avsi")
-steipal
Re: Example of Custom Avisynth script
Posted: Wed Jun 08, 2016 7:19 am
by gor
Thank you!
Unfortunately the function didn't succeed - it contain too many plugins (maybe some of them incompatible with actual Avisynth version) or wrong color profile input.
I give up!
I'm trying to find a better interlace scaler... The actual one (include in FFASTrans - Resize) create a poor image, same quality like this code too:
Code: Select all
m_clip = AssumeTFF(m_clip)
m_clip = SeparateFields(m_clip)
m_clip = BiCubicResize(m_clip, 720,288)
m_clip = Weave(m_clip)
Return m_clip
Gabi
Re: Example of Custom Avisynth script
Posted: Wed Jun 08, 2016 8:03 am
by admin
Yes, I am aware of the poor quality of the inbuilt resize node and I have plans to revise it. What encoders are you using for this workflow?
-steipal
Re: Example of Custom Avisynth script
Posted: Wed Jun 08, 2016 8:53 am
by gor
I'm just testing - Stills PNG.