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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd November 2023, 08:01   #2681  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,239
Quote:
I forbid you to die at least until you will introduce CUDA processing and filtering
+ port a working removedirt to Vapoursynth
(using just specific mods does kind of work, but is just a workaround)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd November 2023, 09:23   #2682  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,027
mvtools 2+ requires additional 10..20+ years of development too.
DTL is offline   Reply With Quote
Old 2nd November 2023, 09:32   #2683  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,308
Quote:
Originally Posted by StainlessS View Post
P,
This is source for RT_TxtQueryLines(), however it counts '\n' [Chr(10) Linefeed, rather than "\n" subtitle string style escape].
Thanks, it's already a comment/uncomment in the code, anyway in SubTitle and Text the string "\n" is valid only if it's not inside a "\\n" sequence (which would print the \n string itself).
pinterf is offline   Reply With Quote
Old 2nd November 2023, 09:44   #2684  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,308
@Selur, probably I'm too old for learning new things such as porting filters to VS, nor have I pressure such as impatient customers who'd like to see that feature ported
And despite my two younger sons are just finishing their IT studies at the technical university, I cannot pass my knowledge, because they know nothing about Avisynth and video filter programming and have other interests.
pinterf is offline   Reply With Quote
Old 2nd November 2023, 11:06   #2685  |  Link
ryrynz
Registered User
 
ryrynz's Avatar
 
Join Date: Mar 2009
Posts: 3,643
I nominate DTL and Tormento.
ryrynz is offline   Reply With Quote
Old 2nd November 2023, 13:56   #2686  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,963
Quote:
Originally Posted by pinterf View Post
SubTitle and Text the string "\n" is valid only if it's not inside a "\\n" sequence (which would print the \n string itself).
Not sure if I was never aware or if forgot about the '\\n' escape of newline in Subtitle.

But on Wiki, it does say that it is so, as here,
Quote:
int lsp =
Line Spacing Parameter; enables multi-line text (where "\n" enters a line break). If lsp is less than zero, inter-line spacing is decreased; if greater, the spacing is increased, relative to Windows' default spacing. By default, multi-line text disabled.
In the unlikely event that you want to output the characters "\n" literally in a multi-line text, you can do this by using "\\n".
And like the others, we hopes that U live forever [what a ghastly thought].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 3rd November 2023 at 16:43.
StainlessS is offline   Reply With Quote
Old 3rd November 2023, 13:15   #2687  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,308
Avisynth+ 3.7.3post test 8 (20231103 - r4021)
Code:
20231103 3.7.3 post 8
---------------------
- New: "Info" new parameter
    bool "cpu" (true)
  If set to false, displaying CPU capabilities is disabled
- Enhancement: "Info" displays partially visible lines as well.
- Address #366 partially
  "Info" new parameters, similar to SubTitle/Text: 
  int "align"  (default 7: top left)
  float "x"    (default 4 for top left, screen center or right otherwise)
  float "y"    (default 0 for top left, screen center or bottom otherwise)
  See https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/info.html
- Fix #368 (https://github.com/AviSynth/AviSynthPlus/issues/368)
  Make proper vertical alignment for multiline text (containing "\n" and parameter "lsp" is defined) 
  in Subtitle and Text when vertical alignment is set to bottom (align=1,2,3) or center (4,5,6).
  See also https://forum.doom9.org/showthread.php?t=185145
  Note 1: The "\n" after the last line does not result in an empty bottom line, so both "Line1" and "Line1\n" are one-line texts.
- Fix: "Text" use "lsp" parameter the same way as in SubTitle: in 1/8 pixel units, not in 1 pixels.
  Historically "lsp" in SubTitle is measured in 1/8 pixels, so "lsp"=8 means 1 pixels.
  "lsp" Line Spacing Parameter sets the additional line space between two lines in 1/8 pixel units.
- Fix: "Text" vertical alignment position would be wrong for multiline strings containing even number of lines.
pinterf is offline   Reply With Quote
Old 5th November 2023, 20:40   #2688  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,308
test8->test9: propShow user experience enhancement. Unreal Engine 5.3 nanite support... eeerrr not Simply you can change color and position of the text.
Avisynth+ 3.7.3post test 9 (20231105 - r4022)
Code:
20231105 3.7.3 post 9
---------------------
- (#366):
  "propShow" add further parameters, like in "Text".
   string "font", int "text_color", int "halo_color", bool "bold", float "x", float "y", int "align"

  full signature: c[size]i[showtype]b[font]s[text_color]i[halo_color]i[bold]b[x]f[y]f[align]i

  font default: "Terminus" (can also be: "info_h")
  bold default: false
  x, y default: depending on the "align"
  align default: 7 (top left)  valid values 1-9 (see your numeric keyboard)
  halo color MSB = FF (e.g. FF000000) -> no outline + semi transparent background
                   FE (e.g. FE000000) -> outline + semi transparent background
                   01 (e.g. 01000000) -> no outline + normal display
                   00 (e.g. 00000000) -> outline + normal display

  propShow(align=1, halo_color=$FF000000)
  propShow(size=6,bold=true, align=3, halo_color=$FE000000)  
  propShow(size=16,bold=true, align=5, halo_color=$00000000)
  propShow(font="info_h", align=9, halo_color=$01000000)
  See https://avisynthplus.readthedocs.io/.../propShow.html
- New: "Info" new parameter
    bool "cpu" (true)
  If set to false, displaying CPU capabilities is disabled
- Enhancement: "Info" displays partially visible lines as well.
- (#366)
  "Info" new parameters, similar to SubTitle/Text: 
  int "align"  (default 7: top left)
  float "x"    (default 4 for top left, screen center or right otherwise)
  float "y"    (default 0 for top left, screen center or bottom otherwise)
  See https://avisynthplus.readthedocs.io/...ters/info.html
- Fix #368 (https://github.com/AviSynth/AviSynthPlus/issues/368)
  Make proper vertical alignment for multiline text (containing "\n" and parameter "lsp" is defined) 
  in Subtitle and Text when vertical alignment is set to bottom (align=1,2,3) or center (4,5,6).
  See also https://forum.doom9.org/showthread.php?t=185145
  Note 1: The "\n" after the last line does not result in an empty bottom line, so both "Line1" and "Line1\n" are one-line texts.
- Fix: "Text" use "lsp" parameter the same way as in SubTitle: in 1/8 pixel units, not in 1 pixels.
  Historically "lsp" in SubTitle is measured in 1/8 pixels, so "lsp"=8 means 1 pixels.
- Fix: "Text" vertical alignment position would be wrong for multiline strings containing even number of lines.
- Fix #365 (https://github.com/AviSynth/AviSynthPlus/issues/365)
  Avisynth 2.5 plugins when NICE_FILTER would crash with "invalid response to CACHE_GETCHILD_AUDIO_MODE".
  Bug appeared since reintroducing audio cache in 3.7.3.
- Fix #370: array size assert error in ConvertToYUY2 when internally ConvertTo422 is called.
  Reason: ConvertToYUV422 has one more parameter (ChromaOutPlacement) than ConvertToYUY2 has
- Issues mentioned in #354 https://github.com/AviSynth/AviSynthPlus/issues/354 
  - Leave _ColorRange frame property as-is, when using matrix names "PC.709" or "PC.601", 
    for example in ConvertToRGB32.
    Formerly _ColorRange property would always set to 0 (full range), even if a limited range 
    clip (e.g. ColorBarsHD) was inputted. Now we act as the specification 
    ( http://avisynth.nl/index.php/Convert ) says: 
    "PC.601 and PC.709 keep the range unchanged, instead of converting between 0-255 RGB 
    and 16-235 YUV, as is the normal practice."
    Now ColorBarsHD().ConvertToRGB32(matrix="PC.601").propShow()
    would display "_ColorRange=1 (limited)", since ColorbarsHD's output is limited as well.
  - Studio RGB (limited) range will now be recognized (through _ColorRange=1) and utilized in 
    conversions from RGB, such as in GreyScale, ConvertToY, ConvertToYUVxxx (latter fixed in test5).
    When input or output would require it, rgb offset of 16 (or scaled equivalents) is used 
    for supporting limited range rgb (similar to Y offset=16 used at limited range YUV conversions)
pinterf is offline   Reply With Quote
Old 16th November 2023, 13:03   #2689  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,133
Avs+ r4029
https://gitlab.com/uvz/AviSynthPlus-Builds
kedautinh12 is offline   Reply With Quote
Old 19th November 2023, 20:56   #2690  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 592
Hello, I am trying to workaround some undesired interpreter behaviour...

Code:
clip1 = myFunc(setting=1)	
clip2 = myFunc(setting=2)
if (something==true){ clip2 } 
else { clip1 }
It seems no matter which way the conditional evaluates, the interpreter always initialises myFunc() twice at lines 1 and 2. I can tell it's doing this because globals are getting initialised twice inside myFunc() and this is not allowing me to manage multiple calls to myFunc().

I can workaround it by going...

Code:
if (something==true){ myFunc(settting=2) }
else { myFunc(setting=1) }
But then I can't use variables to reference clips which is a bit of a downer.

Is there any way to tell Avisynth interpreter to only initialise function calls if they are going to be used at runtime? (during "get frame" or whatever it's called)?

flossy_cake is offline   Reply With Quote
Old 29th November 2023, 00:39   #2691  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,842
Hi guys,
I know that there are lots of things going on for the upcoming version of Avisynth and this is probably gonna be one of the least important things so it can really be at the very bottom of the list, but I'm just gonna write it down here 'cause otherwise I fear we might forget: is anyone gonna add UTF-8 support to DirectShowSource()?

The reason why I'm asking is that this whole thing originated from this discussion here in the AVSPmod mod topic (post 1554) in which we were trying to organize a list on which encoding schemes are supported by the various indexers and we just realized that DirectShowSource() is working with ANSI / Enhanced ANSI (like WinLatin) but it's lacking UTF-8 support.

I'm posting it here only 'cause DirectShowSource() is one of the plugins distributed by default as part of the main Avisynth+ installation so it's almost as if it's part of the core, let's say, and let's be honest, it's also 'cause I had no idea where else to ask xD
FranceBB is offline   Reply With Quote
Old 1st December 2023, 19:06   #2692  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,308
Definitely, this is the right place. . I have started to think there was nothing left to do.
pinterf is offline   Reply With Quote
Old 2nd December 2023, 10:45   #2693  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,503
Quote:
Originally Posted by pinterf View Post
definitely, this is the right place. . I have started to think there was nothing left to do.

cuda….
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 2nd December 2023, 19:01   #2694  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 983
cuda cuda cuda cuda...
__________________
Live and let live
gispos is offline   Reply With Quote
Old 2nd December 2023, 20:41   #2695  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,308
Quote:
Originally Posted by FranceBB View Post
is anyone gonna add UTF-8 support to DirectShowSource()?
Here you are:
Avisynth+ 3.7.3post test 10 (20231202 - r4035)
It works the usual way, add utf8=true.
pinterf is offline   Reply With Quote
Old 2nd December 2023, 20:52   #2696  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,525
Quote:
DG land would love to work with pinterf on this. Other stakeholders should participate as well.
The main effort would be to agree an architecture/API for minimizing CPU<->GPU transfers.
And then when that is in place to enhance internal and 3rd-party filters to support that.
DG demonstrated gains of 300%+ for typical scripts using his CUDASynth framework, but nobody seemed interested.
Maybe Vulkan is a better way to go to avoid nVidia fixation. We need to look into all this.
Yeees ! Thanks, Donald and Ferenc, for all the work !
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 3rd December 2023, 02:27   #2697  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,842
Quote:
Originally Posted by pinterf View Post
Here you are:
Avisynth+ 3.7.3post test 10 (20231202 - r4035)
It works the usual way, add utf8=true.
Works like a charm.
Reliable as ever, Grandmaster Ferenc!



This year, under the Christmas tree, Santa Ferenc brought us presents:

FranceBB is offline   Reply With Quote
Old 3rd December 2023, 19:43   #2698  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,308
Thank you for your kind and unusually visual feedback
pinterf is offline   Reply With Quote
Old 5th December 2023, 07:53   #2699  |  Link
lewyturn
Registered User
 
Join Date: May 2019
Posts: 18
Regarding the issue of "GetChannel" not working after upgrading to version 3.7.3.

After I upgraded to version 3.7.3, "GetChannel" does not work, there is only image but no sound. After I returned to version 3.7.2, the sound returned. Please tell me what I missed.

-----------------------------------------------------------------------------
SetWorkingDir("c:\AviSynth+\plugins64+")


v1 = FFmpegSource2("D:\video\v1.mp4",atrack=-2).TurnRight()
v2 = FFmpegSource2("D:\video\v2.mp4",atrack=-2).TurnRight()
a1=DirectShowSource("D:\video\v1.mp4")
a2=DirectShowSource("D:\video\v2.mp4")


b=BlankClip(length=5307,width=2160,height=1920,fps=29,channels=2,color=$000000)
xpos = 1080
ypos = 0
k=Overlay(b,v1)

video=Overlay(k,v2,x=xpos,y=ypos)

mono1=GetLeftChannel(a1, 1).AmplifydB(7)
mono2=GetChannel(a2, 2).AmplifydB(2)

audio=mergechannels(mono1,mono2)

AudioDub(video,audio)

Last edited by lewyturn; 5th December 2023 at 07:59.
lewyturn is offline   Reply With Quote
Old 5th December 2023, 14:11   #2700  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,963
Add Return a1.Info after line a1=DirectShowSource("D:\video\v1.mp4")
to check for audio.

EDIT: Is this correct ? [error for me]
Code:
mono1=GetLeftChannel(a1, 1).AmplifydB(7)
mono2=GetChannel(a2, 2).AmplifydB(2)
EDIT: GetLeftChannel() does not take a channel number.

Quote:
After I returned to version 3.7.2, the sound returned.
Dont see how that is possible with that same error script.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 5th December 2023 at 14:51.
StainlessS is offline   Reply With Quote
Reply

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 08:23.


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