Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st October 2021, 23:15   #181  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
Are there exist any built-in or plugin way of direct samples sequence setting (in 4:4:4 and sub-sampled interleaved or planar format) from text-line (or array) defined arguments to function ?
Something like
Code:
Line(pix_fmt="YUV422P10",Y="64,64,940,940",U="512,512",V="512,512")
return clip 4*1 size (with some default fps and frame num) of the requested pix_fmt and with defined samples values ? Or may be script function ?

Last edited by DTL; 1st October 2021 at 23:19.
DTL is offline   Reply With Quote
Old 1st October 2021, 23:31   #182  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by DTL View Post
Are there exist any built-in or plugin way of direct samples sequence setting (in 4:4:4 and sub-sampled interleaved or planar format) from text-line (or array) defined arguments to function ?
Something like
Code:
Line(pix_fmt="YUV422P10",Y="64,64,940,940",U="512,512",V="512,512")
return clip 4*1 size (with some default fps and frame num) of the requested pix_fmt and with defined samples values ? Or may be script function ?
One way is BlankClip and Expr

eg.
Code:
BlankClip(length=300, fps=24, width=4, height=1, pixel_type="YUV444P10")
Expr("64","512","512") 
KillAudio()
poisondeathray is offline   Reply With Quote
Old 1st October 2021, 23:40   #183  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
You can use Expr:

Code:
Blankclip(width = 4, height = 1, pixel_type="YUV422P10").Expr("
sx 0 == 64
sx 1 == 64
sx 2 == 940
940 ? ? ?
","
sx 0 == 512
512 ?
","
sx 0 == 512
512 ?
")
The "sx" lines are acting like C "case" statements, with the final line being the last/default value.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 2nd October 2021, 05:08   #184  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
My example was short for simplicity. I mean setting exact sequencies of samples values of longer length. For typical transient description I need to set about 8..10 Y values and 4..5 UV values. And for sustained borders I can use simple AddBorders.
For long non-fully scripting way I have a set of external simple program to wrtie UYVY set of samples and RawSource plugin. But it long way. So may be ask to add simple Debug-group function close to BlankClip but with extended color param (like array of values instead of one colour).
So currently no way to set/get samples values at given (x,y) coordinate of framebuffer ?
The hackway with StackHorizontal(BlankClip(width=2,height=1,color=2_UYVY_samples),second_blankclip_with second 2 UYVY) may not work with 10bit ? And not short form for defining string of 10 Y and 5+5 UV samples.

If even use Expr() for 4:2:2 2*1 size clips (for further hor stacking) - how to set 2 different Y values of first and second Y samples ?

Last edited by DTL; 2nd October 2021 at 05:25.
DTL is offline   Reply With Quote
Old 2nd October 2021, 05:25   #185  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by DTL View Post
So currently no way to set/get samples values at given (x,y) coordinate of framebuffer ?

Reading sample value at x,y is easier with vapoursynth editor, because it supports different pixel formats, bitdepths . You mouse over any location and it reads off x,y coordindate and corresponding Y,Cb,Cr or R,G,B value , 8,10,12,16bit, float. AVSPmod is good, but unfortunately only reads 8bit values. Even if you're not familiar with vapoursynth, you can load most avs scripts into vapoursynth and use vsedit to "see" the proper pixel values

Not sure of a good way of setting pixel values at x,y . Maybe overlay as a workaround method

Quote:
The hackway with StackHorizontal(BlankClip(width=2,height=1,color=2_UYVY_samples),second_blankclip_with second 2 UYVY) may not work with 10bit ? And not short form for defining string of 10 Y and 5+5 UV samples.

"UYVY" fourcc is 8bit422, so it does not work with 10bit per channel

If you meant U, V in v210 or p210 (10bit 422 interleaved, and planar), then it will work
poisondeathray is offline   Reply With Quote
Old 2nd October 2021, 05:32   #186  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by DTL View Post
If even use Expr() for 4:2:2 2*1 size clips (for further hor stacking) - how to set 2 different Y values of first and second Y samples ?
Untested, but maybe perform your manipulations with grayscale planes of Y, U, V and then combineplanes . StackHorizontal for 2 Y samples
poisondeathray is offline   Reply With Quote
Old 2nd October 2021, 06:20   #187  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
Same question - how to set sequence of (exact and different) Y-only samples to 'grey' plane. And 10bit greatly wanted for HDR like PQ transfer.
Possibly without 'stacking' of 1*1 samples Y10 or Y16 clips. That is too long. No way with 'arrays' of new avisynth versions available ?
Can array be argument of user function ?
Can enviroment return number of members in array so may be loop of BlankClip(width=1,height=1,pix_fmt="Y10") and StackHorizontal possible to fill the line of samples of grey-plane from simple provided sequence of numbers ?

Last edited by DTL; 2nd October 2021 at 06:29.
DTL is offline   Reply With Quote
Old 2nd October 2021, 13:36   #188  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
Quote:
If even use Expr() for 4:2:2 2*1 size clips (for further hor stacking) - how to set 2 different Y values of first and second Y samples ?
See my post just before yours.

Alternatively: perhaps there is an image source filter which will read Netpbm files.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 2nd October 2021, 14:23   #189  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
"See my post just before yours."

Oh - thank you - it really works for required 10x1 4:2:2 clip like
Code:
plY=Blankclip(width = 10, height = 1, pixel_type="Y10").Expr("sx 0 == 509 sx 1 == 509 sx 2 == 509 sx 3 == 509 sx 4 == 509 sx 5 = 498 sx 6 = 446 sx 7 == 361 sx 8 == 292 276 ? ? ? ? ? ? ? ? ?")
plU=Blankclip(width = 5, height = 1, pixel_type="Y10").Expr("sx 0 == 270 sx 1 == 263 sx 2 == 330 sx 3 == 761 754 ? ? ? ?")
plV=Blankclip(width = 5, height = 1, pixel_type="Y10").Expr("sx 0 == 203 sx 1 == 224 sx 2 == 271 sx 3 == 832 821 ? ? ? ?")
CombinePlanes(plY, plU, plV, "YUV", "YYY", pixel_type="YUV422P10")
And another question - are there ways to define >8bit YUV colour for AddBorders() ? Or only create separate 2x1 clip with same way and point-resize to required size and StackHorizontal ?
DTL is offline   Reply With Quote
Old 6th December 2021, 13:04   #190  |  Link
GAP
Registered User
 
Join Date: Sep 2020
Posts: 135
How do you merge files together in AVIsynth? And with programs like AVSPMod or MeGUI?
GAP is offline   Reply With Quote
Old 6th December 2021, 13:22   #191  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by GAP View Post
How do you merge files together in AVIsynth? And with programs like AVSPMod or MeGUI?
a=YourPreferedSourcePlugin("D:\yourvideo1.mkv")
b=YourPreferedSourcePlugin("D:\yourvideo2.mkv")
a++b

Btw, this is wrong thread to ask questions about Avisynth:
Quote:
Originally Posted by Wilbert View Post
Do NOT use this thread for discussion of specific Avisynth problems you may have. Post those in a separate thread. This thread is for suggesting new FAQs and discussing existing ones.
VoodooFX is offline   Reply With Quote
Old 7th December 2021, 06:01   #192  |  Link
GAP
Registered User
 
Join Date: Sep 2020
Posts: 135
Oh sorry about that.
GAP is offline   Reply With Quote
Old 7th December 2021, 08:33   #193  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
@VoodooFX is right, you use append, so you set your file to a variable, your other file to another variable and then you append them together with ++.
Now, here's the catch: they must be exactly the same, namely they must be with the same resolution, framerate, color sampling, bit depth and if they have audio, that should be the same too, like, you cannot append a clip with audio to another which doesn't have it.
Of course, as a user and encoder writing a script, it's your duty to make sure those match, hence performing conversions.
FranceBB is offline   Reply With Quote
Old 6th May 2022, 17:01   #194  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
This thread is about wiki:

Quote:
Originally Posted by Wilbert View Post
Do NOT use this thread for discussion of specific Avisynth problems you may have. Post those in a separate thread. This thread is for suggesting new FAQs and discussing existing ones.
VoodooFX is offline   Reply With Quote
Old 22nd September 2022, 04:21   #195  |  Link
GAP
Registered User
 
Join Date: Sep 2020
Posts: 135
How do you update AVISynth and/or AVISynth +? How to you know when you need to update it?
GAP is offline   Reply With Quote
Old 22nd September 2022, 04:57   #196  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by GAP View Post
How do you update AVISynth and/or AVISynth +? How to you know when you need to update it?
Latest ver here:
https://gitlab.com/uvz/AviSynthPlus-Builds
kedautinh12 is offline   Reply With Quote
Old 3rd October 2022, 16:24   #197  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Just FYI, I raised an issue here https://github.com/AviSynth/AviSynthPlus/issues/302 'cause apparently WAVSource() cannot index files larger than 4 GB and that affected my supply chain...
FranceBB is offline   Reply With Quote
Old 14th October 2022, 10:27   #198  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
I have trouble on my Windows 11 machine with the default plugin folders of Avisynth+. It seems they don't get recognized and the plugins stored in
"C:\Program Files (x86)\AviSynth+\plugins64+" f.e. do not get auto-loaded. How can I fix that? Re-install of Avisynth+ did not help.
Right now I have to import all my filters manually from that folder which is a little annoying.
LeXXuz is offline   Reply With Quote
Old 14th October 2022, 10:30   #199  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by LeXXuz View Post
I have trouble on my Windows 11 machine with the default plugin folders of Avisynth+. It seems they don't get recognized and the plugins stored in
"C:\Program Files (x86)\AviSynth+\plugins64+" f.e. do not get auto-loaded. How can I fix that? Re-install of Avisynth+ did not help.
Right now I have to import all my filters manually from that folder which is a little annoying.
Strange, my Windows is win 11 too and didn't got that problem
kedautinh12 is offline   Reply With Quote
Old 14th October 2022, 11:23   #200  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Mine didn't get that problem either. They were loaded automatically just fine, as they should.
Could it be some permission issues about the Program Files folder? Or perhaps Windows Defender blocking it? Dunno. It works on my end, I cannot reproduce it.
FranceBB is offline   Reply With Quote
Reply

Tags
avisynth, faq

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.