View Full Version : AvsPmod (Windows_x86) mod


Pages : 1 [2]

poisondeathray
31st December 2021, 20:22
Is there a way to automatically activate preview when switching tabs (when shared timeline has same characteristics) ? Or am I missing an option in the settings somewhere ? I couldn't find it

On these newer versions you have to push f5 on each new tab, if the preview had not been previously generated

eg. on a fresh tab, colorbars() . Right click tab, copy to new tab (So you have colorbars() in tab 1 and tab 2) . If you push f5 on tab 2 (or tab 1), then switch to the other tab, preview will not be activated for that other tab

The old behaviour if one tab preview was activated with f5, switch tabs, the other tab previews would be activated too. Basically, you now have to push an extra f5 key for each tab


I just recently updated and had been using an older avspmod version , I think 2.2.2.6. But the old behaviour was like that for many years, even very old versions

gispos
31st December 2021, 22:09
Is there a way to automatically activate preview when switching tabs (when shared timeline has same characteristics) ? Or am I missing an option in the settings somewhere ? I couldn't find it

On these newer versions you have to push f5 on each new tab, if the preview had not been previously generated

eg. on a fresh tab, colorbars() . Right click tab, copy to new tab (So you have colorbars() in tab 1 and tab 2) . If you push f5 on tab 2 (or tab 1), then switch to the other tab, preview will not be activated for that other tab

The old behaviour if one tab preview was activated with f5, switch tabs, the other tab previews would be activated too. Basically, you now have to push an extra f5 key for each tab


I just recently updated and had been using an older avspmod version , I think 2.2.2.6. But the old behaviour was like that for many years, even very old versions
Have you switched on 'Auto preview' in the tabs context menu?

'Auto preview' in the context menu of the tabs must be switched off.
This causes uninitialized tabs to be skipped or not initialized when a tab is selected with the mouse wheel or the mouse browse buttons.

If program options > Video > 'Enable scroll wheel through similar tabs' checked, then all tabs will be initialized automatically to determine the values.
So be careful with this function, it can overload the PC's memory.
It was in the original version and I thought I had changed that. But it will probably not work otherwise, because this function cannot work without knowing the values of the tabs. Therefore it is deactivated for me and as default.

Disbale tab context menu:
'Auto preview'

Enable program options > Video:
Shared timeline, Only on tabs with the same characteristics, Enable scroll wheel through tabs on the same group

Happy New Year

poisondeathray
31st December 2021, 22:25
Have you switched on 'Auto preview' in the tabs context menu?

'Auto preview' in the context menu of the tabs must be switched off.


Thanks , that's it

StvG
4th January 2022, 04:30
Script:
FFVideoSource(1080p_yuv_8bit)
bilinearresize(width*2, height*2)
#prefetch(2)

When I'm trying the above script with prefetch, AvsPmod freezes.
I'm running the script with AVSMeter and prefetch without issues.
I'm using AVS+ r3593 and the latest AvsPmod with the updated lib from the previous few posts.

Sparktank
4th January 2022, 13:52
Video > 'Resize video window'

Thank you so much for this! I've finally had time to sit down and play. This is a nice Quality of Life feature, thank you again!

gispos
4th January 2022, 14:13
Script:
FFVideoSource(1080p_yuv_8bit)
bilinearresize(width*2, height*2)
#prefetch(2)

When I'm trying the above script with prefetch, AvsPmod freezes.
I'm running the script with AVSMeter and prefetch without issues.
I'm using AVS+ r3593 and the latest AvsPmod with the updated lib from the previous few posts.
I'm using avisynth 3.71 test 22 and there are no problems with that.

Had pointed it out here (https://forum.doom9.org/showthread.php?p=1959543#post1959543), apparently not a single one has tried it. There was no feedback. That's typical again...don't lift a finger.

AvsMeter does not show a frame either, It's not because of AvsPmod.

With the latest avisynth version my own programs that I have been using for years no longer work.
At first I don't do anything. Try version 3.71 test 22

poisondeathray
4th January 2022, 17:01
I'm using avisynth 3.71 test 22 and there are no problems with that.

Had pointed it out here (https://forum.doom9.org/showthread.php?p=1959543#post1959543), apparently not a single one has tried it. There was no feedback. That's typical again...don't lift a finger.

AvsMeter does not show a frame either, It's not because of AvsPmod.

With the latest avisynth version my own programs that I have been using for years no longer work.
At first I don't do anything. Try version 3.71 test 22


I cannot reproduce either of these issues with r3593 x64

avspmod 2.6.9.9 with the updated library

I will test newest avspmod version, and report back if it does not work

poisondeathray
4th January 2022, 17:04
I cannot reproduce either of these issues with r3593 x64

avspmod 2.6.9.9 with the updated library

I will test newest avspmod version, and report back if it does not work

Well what do you know avspmod 2.7.0.2 ( default download) hangs with prefetch... Something between those two releases

Same script, avspmod 2.6.9.9 with the updated lib for 10bit color picker (post 940) works ok for me

Arx1meD
4th January 2022, 17:52
Updated translation into Russian (for version 2.7.0.2) - Download (https://mega.nz/file/wOoGibBQ#IgA6ImMSpASOlctGGXJS-xbOrSnfe8L3EJTpZUIm8WA)

gispos
4th January 2022, 20:42
It's strange:
With Avisynth 3.71 Test 22, all AvsPmod versions works without problems with prefetch.

With Avisynth greater 3.71 Test 22 only AvsPmod versions work less than 2.6.9.7 so all without frame properties.

What has changed with the newer Avisynth versions and the Frame Properties? And why is prefetch affected?

@Arx1meD, thank you

Sparktank
5th January 2022, 13:55
I've actually been experiencing AvsPmod hanging with Prefetch enabled, as well.
Using Avisynth+ 3.7.1 r3584 (x64).

I can't remember which version of Avspmod and Avisynth+ I started noticing this issue, but about the same time Poisondeathray has.

With Prefecth enabled (even with threads=1), it will still hang and at the bottom of the window, it shows me "Initialize clip. Available memory: #### MB".
With Prefecth disabled, that text notice about the initialize goes by so quickly, I can't even read what it says, and the video loads.

gispos
5th January 2022, 14:12
The latest Avishynth still has problems with prefetch (C Interface).

If prefetch in the script is used:
All versions after 3.71 test 22 get stuck if an unfavorable filter prefetch combination is used or no matrix found
or you set with propSet("_Matrix", 1) manually.

No problems with Avisynth 3.71 Test 22 and older versions, all AvsPmod versions then without problems.

Either 'Read matrix from script or source' must be switched off, or an older Avisynth version must be used.
The last working version is the 3.71 test 22

I've checked everything carefully and can't change anything.

Final and test versions behaves differently but it is always related to prefetch:
test 22: the last working version

test 23, 24, 25, 27, 28, 29, 32:
No problems with properties, but problems with filter-prefetch combinations (mostly one filter and prefetch).

3.71 final:
Problems with prefetch if there is no frame properties found or you set the matrix with propSet and prefetch is used.

l00t
5th January 2022, 21:45
Having similar issues with AvsPmod 2.7.0.1 and 2.7.0.2 with AVS+ versions r3584 and r3593 (haven't tested older AvsPmod versions with the new AVS+s). With Prefetch disabled everything works, but Prefetch causes a hang. Fortunately, it only affects AvsPmod, x264 runs just fine with Prefetch enabled.

Arx1meD
6th January 2022, 14:39
Indeed, with Prefetch AvsPmod 2.7.0.2 hangs or works slower. If enable "Accessing AviSynth in threads" and "Use advanced frame thread" in the settings, AvsPmod with Prefetch works better, but sometimes it still hangs. Tried it with different versions of AviSynth, but there was a problem with Prefetch.

LigH
6th January 2022, 18:58
I seem to remember that some applications behaved differently when a Distributor() function was used... no clue if that is similar or a red herring.

gispos
6th January 2022, 19:15
https://forum.doom9.org/showthread.php?p=1960728#post1960728

gispos
6th January 2022, 19:53
Relating to here (https://forum.doom9.org/showthread.php?p=1960728#post1960728)
Waiting time 1 second between get frame and get properties

Test version:
https://www.mediafire.com/file/e8iz3bb9u39sw0c/AvsPmod_v2.7.0.2.test_(Windows_x86-64).zip/file

Dogway
8th January 2022, 19:23
I don't know if latest versions include the following but here are some suggestions I found while using sliders:

- Max stepping in function definition for 'int' sliders is 4 (didn't test with floats though)
- A string type function definition doesn't understand "[blabla]"
- A playing video stops when changing anything in the sliders panel
- A suggestion for a checkbox to disable (comment) a filter
- A suggestion for numerical input from the slider window
- A suggestion for showing tooltips over a slider when hovering after half a second or so (maybe by showing the function definition comments (after ";") )

hello_hello
9th January 2022, 11:47
I was looking at a function for displaying the location in a video today, and realised I could've avoided the checking it was doing before rounding up or down, so after changing it and becoming annoyed that it doesn't always agree with Avisynth's ShowTime (floating point math, plus the latter appears not to round up) I took a GUI survey to see if that's a universal thing. Apparently it's not.

In the process though, I noticed this:

BlankClip()
AssumeFPS(2500001,1000000)
Time in ms at the top, my function in the middle and ShowTime() in yellow at the bottom.

https://i.postimg.cc/Nf3hs6n0/Clipboard01.png

gispos
9th January 2022, 14:35
that it doesn't always agree with Avisynth's ShowTime (floating point math, plus the latter appears not to round up)
Well, if that's what you want and nobody minds getting mathematically incorrect values.

For harmony with avisynth... already changed.;)

hello_hello
9th January 2022, 16:14
I don't follow. Which values are you saying would be mathematically incorrect?
Anyway, I only posted to point out the AvsPmod oddity. Is that what you've already changed?

gispos
10th January 2022, 20:34
I don't follow. Which values are you saying would be mathematically incorrect?
Anyway, I only posted to point out the AvsPmod oddity. Is that what you've already changed?

Did I read something wrong (understood)?
I thought you complain about the different display of AvsPmod frametime to avisynth's frametime.
AvsPmod values are at least mathematically correct. But if it's not common to round float then I'll cut it off too.

StainlessS
10th January 2022, 21:11
From Avs+ thread in devs,
Thank you StainlesSS, I just tried it and it works with no errors.
Does the mt_lut in the first line also have to be changed? (line 309)

GFmask = radius==1 ? input.mt_edge(mode="min/max",thY1=0,thY2=255,u=1,v=1).mt_lut(expr="255 x 1 "+string(range)+" / * 2 ^ /",u=1,v=1).removegrain(19,-1)
\ : mt_luts(input,input,mode="range",pixels=mt_square(radius),expr="y",u=1,v=1).
\ mt_lut(expr="255 x 0 == " + String(range) + " 0 == | 1 x ? x 0 == " + String(range) + " 0 == | 1 " + string(range) + " ? / 2 ^ /",u=1,v=1).removegrain(19,-1)


We've used Real.Finder style,
Does it work if you limit it to epsilon?
range = max(range,0.001)
"255 x 1 " + string(range) + " / * 2 ^ 0.001 max /"
but with a temp variable TmpRange. [Does NOT change original Range var].


### MASK : # Line 309 FIXED:
TmpRange=Max(Range,0.001)
GFmask = radius==1 ? input.mt_edge(mode="min/max",thY1=0,thY2=255,u=1,v=1).mt_lut(expr="255 x " + String(TmpRange) + " / 2 ^ /",u=1,v=1).removegrain(19,-1)
\ : mt_luts(input,input,mode="range",pixels=mt_square(radius),expr="y",u=1,v=1).
\ mt_lut(expr="255 x " + String(TmpRange) + " / 2 ^ /",u=1,v=1).removegrain(19,-1)


Original infix
"255/((x*(1/Range))^2)"
We've used
"255/((x/TmpRange)^2)"

Line 310 rpn looks OK [valid values adapt could have are -1, 1 -> 254 (0 and 255) handled elsewhere in below code]

# LIne 310:
AGmask = adapt==0 ? input.removegrain(19,-1)
\ : adapt==255 ? input.invert().removegrain(19,-1)
\ : input.mt_lut("x "+string(adapt)+" - abs 255 * "+string(adapt)+" 128 - abs 128 + /",u=1,v=1).removegrain(19,-1)


EDIT: further to line 310 [there is an earlier check on valid adapt values]

Assert( ( adapt >= -1 && adapt <= 255 ) ? true : false, chr(10) + "'adapt' have not a correct value! [-1,0...255]" + chr(10))


adapt possible range -1, and 1 -> 254 [adapt=0 and adapt=255 processed elsewhere]
SHORTFORM_INFIX = "(abs(x-adapt)*255) / (abs(adapt-128)+128)"
adapt =64 [seem to be input x coord where Y hits bottom]
https://i.postimg.cc/2j4ngvQk/Brain-Dead-Folly-00.jpg (https://postimages.org/)

hello_hello
11th January 2022, 03:59
Did I read something wrong (understood)?
I thought you complain about the different display of AvsPmod frametime to avisynth's frametime.
AvsPmod values are at least mathematically correct. But if it's not common to round float then I'll cut it off too.

I tried a few different GUIs. MeGUI does it the ShowTime() way. VirtualDub2 rounds to the nearest ms. The direction of the rounding wasn't what I was trying to point out though.
Is this what we're talking about? Depending how you round to whole ms, the result for the screenshot should have been ten minutes, or ten minutes minus 1ms.

00:10:00.000
or
00:09:59.999

AvsPmod is displaying

00:09:60.000

I haven't looked much harder, so at the moment it's the only time I've seen it round up to 60 seconds instead of clocking over to the next minute.

Out of curiosity, if AvsPmod uses float to calculate the time, how is the lack of precision avoided? It's only an issue for very long videos, so it's not something I'd normally see, but after 20 hours or so, calculating the time the way I'm doing it will generally be off by a few ms compared to ShowTime(). AvsPmod stays in sync to within 1ms, which is probably just the rounding.

I'm using this to calculate the time in ms.
float(current_frame) * 1000.0 * FrameRateDenominator() / FrameRateNumerator()

hello_hello
11th January 2022, 07:15
A feature request.

When automatic preview updating is enabled, and you change something in a script in the GUI, the preview is updated when you click on the video, but only if the change is made while the script section "has focus". How to explain....

The easiest example would be to highlight something in a script and cut it with the right click menu, left click on the video to update the preview, then undo the change with the Edit/Undo menu. After undoing the change, clicking on the video doesn't update the preview again.

If you do it this way though.... cut the text, click on the video to update the preview, hide the video, then undo the change with the Edit/Undo menu, the preview automatically updates when you un-hide the video because Edit/Undo was used while the script section "had focus" (I assume).

It might seem like a little annoyance, but out of life-long habit I often right click somewhere in the script area to paste, or undo a change etc, without left clicking first, because that only makes it more likely you'll click in the wrong place rather than at the previous cursor location (assuming right clicking doesn't also select, which in this case would probably be annoying).

-----------------------------------------------------------

Another feature request.

When you change a script with a filter that changes the frame count and refresh the preview it refreshes at the current frame number.
For something like de-interlacing or TIVTC, you need to remember to check the current point in time before you preview the filter so you know where you need to navigate to afterwards, although at least AvsPmod has a right click "copy/paste as time" option, so it usually takes five minutes of previewing before I need to punch something, but why don't GUI's use the time by default when refreshing the preview instead of the frame number (when the frame count changes)?

-----------------------------------------------------------

And lastly....

Is there a way to stop the navigation tooltips in the status bar from hiding the stuff that's already there (frame number and time)? As an incredible idiot I never remember to look at the time in the status bar until I've already hovered the cursor over a navigation button and hidden it with a tooltip. :)

Cheers.

gispos
11th January 2022, 17:39
From Avs+ thread in devs,

We've used Real.Finder style,

but with a temp variable TmpRange. [Does NOT change original Range var].


### MASK : # Line 309 FIXED:
TmpRange=Max(Range,0.001)
GFmask = radius==1 ? input.mt_edge(mode="min/max",thY1=0,thY2=255,u=1,v=1).mt_lut(expr="255 x " + String(TmpRange) + " / 2 ^ /",u=1,v=1).removegrain(19,-1)
\ : mt_luts(input,input,mode="range",pixels=mt_square(radius),expr="y",u=1,v=1).
\ mt_lut(expr="255 x " + String(TmpRange) + " / 2 ^ /",u=1,v=1).removegrain(19,-1)


So this is the final fix and I can do it that way? Thank you!


AvsPmod is displaying

00:09:60.000

You're right, I didn't notice. Now it is displayed just like with showTime

A feature request.

When automatic preview updating is enabled, and you change something in a script in the GUI, the preview is updated when you click on the video, but only if the change is made while the script section "has focus". How to explain....

I'll see if I can change that 'without losing speed'.
If the script has the focus, a variable is set that it is necessary to check the script for changes. And that's not just a str == str.


Another feature request.

When you change a script with a filter that changes the frame count and refresh the preview it refreshes at the current frame number.....

I'll keep it in the back of my mind, and must first see whether it is feasible and whether it does not hinder other functions.


And lastly....

Is there a way to stop the navigation tooltips in the status bar from hiding the stuff that's already there (frame number and time)? As an incredible idiot I never remember to look at the time in the status bar until I've already hovered the cursor over a navigation button and hidden it with a tooltip. :)

Cheers.
Maybe I'll remove the tooltips, I'll have to think about it again. The fidgeting of the tooltips annoys me.

Dogway
11th January 2022, 18:25
I found another issue with sliders, when sliders custom theme is enabled. Sometimes after adjusting a slider with "Disable Refresh" disabled and clicking on the text editor the desktop composition shuts off (explorer.exe restarts or something) and I'm back at default Aero theme and no vsync (desktop composition is what sets windows vsync).

By the way rectangular paste would also be a welcome addition.

gispos
11th January 2022, 20:37
I found another issue with sliders, when sliders custom theme is enabled. Sometimes after adjusting a slider with "Disable Refresh" disabled and clicking on the text editor the desktop composition shuts off (explorer.exe restarts or something) and I'm back at default Aero theme and no vsync (desktop composition is what sets windows vsync).

By the way rectangular paste would also be a welcome addition.
I don't know exactly what you mean.
If 'Disable refresh' is switched off, a video update is made after releasing the slider.
How is it then possible to give focus to the text editor?

And I am also surprised that this should be the case with Win7.
Custom theme just uses different colors for background and text. Otherwise there is no difference.

Edit: use other filters. Maybe a filter that uses the GPU will crash your Aero

Dogway
11th January 2022, 22:57
No GPU filter at all. I made a video to show the issue. Imgur (https://i.imgur.com/fZZNs1j.mp4)
As you see after I click on the text editor the window flashes, that's a desktop composition reset, the second flash towards the end just killed the desktop composition although it's not seen by the video recorder.
Maybe it would be a good idea to separate the video process from the program so if the first crashes or something it doesn't affect avspmod on the whole.

EDIT: This doesn't happen with "Separate Video Preview Window" but now I have a floating window.

gispos
11th January 2022, 23:48
No GPU filter at all. I made a video to show the issue. Imgur (https://i.imgur.com/fZZNs1j.mp4)
As you see after I click on the text editor the window flashes, that's a desktop composition reset, the second flash towards the end just killed the desktop composition although it's not seen by the video recorder.
Maybe it would be a good idea to separate the video process from the program so if the first crashes or something it doesn't affect avspmod on the whole.
Dogway, you have ideas.
Avisynth is loaded in separate threads, which takes a lot of work and nerves. Now I take a pair of scissors and cut AvsPmod in half (video process, script process). It's that simple.

I will test AvsPmod on my Win7, but I assume that your hacked themes are to blame.

Edit: Have you ever tried a preview filter?

Dogway
11th January 2022, 23:59
I don't know I'm not a programmer, but since Firefox did it for their addons I thought it could be achievable. Well I did my duty, report the issue. Thanks for looking into it.

FranceBB
12th January 2022, 11:40
Relating to here (https://forum.doom9.org/showthread.php?p=1960728#post1960728)
Waiting time 1 second between get frame and get properties

Test version:
https://www.mediafire.com/file/e8iz3bb9u39sw0c/AvsPmod_v2.7.0.2.test_(Windows_x86-64).zip/file

With this version, I can't index files any longer.

https://i.imgur.com/hbWuDkI.png

However when I open the same script with VirtualDub, it works:

https://i.imgur.com/4rr1DmN.png


Avisynth 3.7.1 x64 Stable
Windows Server 2019 x64



EDIT: ok, it's a frame properties issue. Adding propClearAll() fixes the problem in AVSPmod:

https://i.imgur.com/vWyahcA.png

The source is an XDCAM-50 file with PCM audio muxed in mxf


General
Complete name : X:\00_INGEST_MAM\UCN12982_GHOST_FRAME.mxf
Format : MXF
Commercial name : XDCAM HD422
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 5.50 GiB
Duration : 14 min 58 s
Overall bit rate : 52.6 Mb/s
Package name : Source Package
Encoded date : 2022-01-12 10:16:12.076
Writing application : Avid Technology, Inc. Avid MediaProcessor Plug-In 1.0.54.10052.1
Writing library : MXF::SDK (4.7.8) on Win64 4.7.8.10137.1

Video
ID : 512
Format : MPEG Video
Commercial name : XDCAM HD422
Format version : Version 2
Format profile : 4:2:2@High
Format settings : CustomMatrix / BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : Variable
Format settings, picture structure : Frame
Format settings, wrapping mode : Frame
Codec ID : 0D01030102046001-0401020201040300
Duration : 14 min 58 s
Bit rate mode : Constant
Bit rate : 50.0 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.965
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
Stream size : 5.23 GiB (95%)
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio #1
ID : 768
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-0402020101000000
Duration : 14 min 58 s
Bit rate mode : Constant
Bit rate : 1 152 kb/s
Channel(s) : 1 channel
Sampling rate : 48.0 kHz
Frame rate : 25.000 FPS (1920 SPF)
Bit depth : 24 bits
Stream size : 123 MiB (2%)
Locked : Yes

Audio #2
ID : 1024
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-0402020101000000
Duration : 14 min 58 s
Bit rate mode : Constant
Bit rate : 1 152 kb/s
Channel(s) : 1 channel
Sampling rate : 48.0 kHz
Frame rate : 25.000 FPS (1920 SPF)
Bit depth : 24 bits
Stream size : 123 MiB (2%)
Locked : Yes

Other #1
ID : 1-Material
Type : Time code
Format : MXF TC
Frame rate : 25.000 FPS
Time code of first frame : 10:00:00:00
Time code settings : Material Package
Time code, striped : Yes
Title : Timecode

Other #2
ID : 0-Source
Type : Time code
Format : MXF TC
Frame rate : 25.000 FPS
Time code of first frame : 10:00:00:00
Time code settings : Source Package
Time code, striped : Yes

Other #3
Type : Time code
Format : SMPTE TC
Muxing mode : SDTI
Frame rate : 25.000 FPS
Time code of first frame : 10:00:00:00

gispos
12th January 2022, 17:16
With this version, I can't index files any longer.

EDIT: ok, it's a frame properties issue. Adding propClearAll() fixes the problem in AVSPmod:

This is just a test version to show that there are problems with Avisynth with prefech and properties.

Ferenc is currently testing. There will probably be a new avisynth version soon.

And I repeat it again (even if nobody seems to read it):
Either switch off 'Read matrix from source or script' or use 3.71 test 22

gispos
12th January 2022, 18:06
I found another issue with sliders, when sliders custom theme is enabled. Sometimes after adjusting a slider with "Disable Refresh" disabled and clicking on the text editor the desktop composition shuts off....

I tested it with Win7. No problem.
With and without 'Disable refresh' I clicked on everything without being able to produce an error.

It has to be your themes energy.

Dogway
12th January 2022, 19:11
I tested it with Win7. No problem.
With and without 'Disable refresh' I clicked on everything without being able to produce an error.

It has to be your themes energy.

Did you test with the sliders custom theme? Because my suspect is it bothers with Aero themes, not my theme, but anyone, for example themes bundled with Win7. I use a bunch a CG programs and never had this issue before since I installed the theme in 2014.

gispos
12th January 2022, 19:25
Did you test with the sliders custom theme? Because my suspect is it bothers with Aero themes, not my theme, but anyone, for example themes bundled with Win7. I use a bunch a CG programs and never had this issue before since I installed the theme in 2014.
Yes I have, it's standard for me.
I had already written it, the custom theme does only change the background and the font color. So it can't be because of that.

Or your theme energy expects the standard background color and comes out of step with a different value.

Edit: Do you even have to use slider window custom themes? Isn't the slider window changed by your theme?

Dogway
12th January 2022, 19:55
It's more contrasty which helps visually. Normally contrast shouldn't be over a ratio of 5.0 for normal use but I make exceptions on critical areas.
Here (https://webaim.org/resources/contrastchecker/)'s a web to compare contrast ratio.

From my personal notes:
WCAG 2.0 level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text, and a contrast ratio of at least 3:1 for graphics and user interface components (such as form input borders). Level AAA requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text.

Large text is defined as 14 point (typically 18.66px) and bold or larger, or 18 point (typically 24px) or larger.

Anyway I won't bother more. I will chime in if I find something new.

gispos
13th January 2022, 20:25
Anyway I won't bother more. I will chime in if I find something new.
If you give me a link and brief instructions, I can test it with Win7 when I have time.

Dogway
14th January 2022, 20:40
I will debug it myself first, I haven't turned off the PC yet so I'm still in primitive Aero theme.

EDIT: It might have been an issue on my side, namely here (https://github.com/Dogway/AutoHotkey-Scripts/blob/c34e6ceca6137e898a408d19ee785c5247073af1/Fix_Windows7.ahk#L93), using a script for Windows. Added AvsPmod to the Exclude list seems to fix it.

gispos
15th January 2022, 17:52
AvsPmod 2.7.0.3 (https://github.com/gispos/AvsPmod/releases)

* Add program options > Misc2 'Show video control button tooptips', show/hide tooltips.
* Add Video > Additional > 'Use previous frame time'
- when refreshing with F5 or Video window focus or mouse middle button:
- if frame count <> previous frame count and frame rate <> previous frame rate
- then the new frame number is generated from the previous frame time.
* Improved error messages: On create display clip more information in case of errors,
- and an attempt is made to use an alternative RGB32 conversion, this is then displayed as an error in a dialog.
- but note: Something is wrong and the displayed result may be wrong.
* Fixed: display filter text was converted to lower case. So eg. propSet("_Matrix") don't work.
* Some glitches with the 'Resize filter' fixed.
* Fixed: the preview was not updated if text was changed in the script and the script did not have the focus.
* New Russian translation file from Doom9 user Arx1meD.


PS: The video file from FranceBB with the wrong values can be opened with it and also shows the error.

Shinkiro
15th January 2022, 18:26
Wow, feature 'Use previous frame time' is really cool, that's a lot more convenient, thank you!

takla
17th January 2022, 05:58
@gispos
All version after 2.6.6.7 hang indefinitely on "waiting for avisynth clip, thread still running" with any prefetch values when I use MVtools2.

Disabling "Access Avisynth in threads" does not have any effect on that.

https://github.com/gispos/AvsPmod/commit/c0836ca4658b484a33b329631183ff3a762a14bd causes this issue.

gispos
17th January 2022, 17:26
AvsPmod 2.7.0.4 (https://github.com/gispos/AvsPmod/releases)

*** The main reason for this release is information ***

Avisynth 3.71 final version has problems with prefetch and frame properties.
AvsPmod also reads the frame properties when creating a clip, so avisynth hangs.
There are two ways to avoid this:
Video > Display > YUV -> RGB > 'Read matrix from source or script' must be disabled.
or
Use Avisynth version 3.72 test 1, the problem was fixed here.
This version is available on Doom9: https://forum.doom9.org/showthread.php?t=181351

* Error message handling improved

FranceBB
17th January 2022, 22:53
Video > Display > YUV -> RGB > 'Read matrix from source or script' must be disabled.
or
Use Avisynth version 3.72 test 1

or
use propClearAll() in every script right after indexing, pretend you're using Avisynth 3.7.0 and live happily ever after, free from the whole frame properties nightmare, like me eheheheh

ErazorTT
18th January 2022, 00:13
Could it be that the current version (2.7.0.4) does not show the values of highbits planarRGB correctly in the status bar? For me it shows only 255 distinct levels.

poisondeathray
18th January 2022, 00:50
Could it be that the current version (2.7.0.4) does not show the values of highbits planarRGB correctly in the status bar? For me it shows only 255 distinct levels.

It's like that with 2.6.9.9, the first version where high bit depth color picker was introduced too

I checked that underlying conversion was ok in avs; exported FFV1 from ffmpeg from the avs script , checked FFV1 with vsedit, the correct values are there

ErazorTT
18th January 2022, 02:01
It appears to me that this happens with all planar formats. I guess the conversion used to get the rgb values is broken whenever the clip is planar.
Oh and it's also vice-versa: Whenever the clip is (non-planar) rgb, the yuv values are constrained to 8bits precision.

PS: In case its not clear: I'm talking about the %RGB and %YUV status bar modifiers that show the rgb or yuv triplets as decimal numbers, these are "rounding" at 8bits precision depending on which one is the result of a planar to packed or packed to planar conversion.

theworm4002
18th January 2022, 03:57
gispos,

A buddy of mine took the Ver.2.7.0.2 (with the library.zip file for x64) setup I had. For some reason when they use it the tabs do not show up (as shown below). They are able to use {Ctrl + Tab} works to change through the tabs, they noted that the file name in the title bar does not change to display the new tabs name. I was wondering if there is an option in the setting I missed that might hide the tabs.

Thanks for your time,
Worm.

https://i.imgur.com/zXLIWTE.png

gispos
18th January 2022, 18:09
gispos,

A buddy of mine took the Ver.2.7.0.2 (with the library.zip file for x64) setup I had. For some reason when they use it the tabs do not show up (as shown below). They are able to use {Ctrl + Tab} works to change through the tabs, they noted that the file name in the title bar does not change to display the new tabs name. I was wondering if there is an option in the setting I missed that might hide the tabs.

Thanks for your time,
Worm.

I don't know what to do with it, why 'your 64bit library' with a different version?
You can't just mix parts together and expect it to work.
Take a new 64bit version, and if problems arise then you can report it here.

Could it be that the current version (2.7.0.4) does not show the values of highbits planarRGB correctly in the status bar? For me it shows only 255 distinct levels.
Give me an example, I don't get 8 bit values.
If there is an asterisk in front of it, it is only calculated, so it is not from avisynth.

https://i.postimg.cc/wTKz8kNw/Planar-RGB-16bit.jpg (https://postimages.org/)

https://i.postimg.cc/Kc3bHW1K/RGB-16bit.jpg (https://postimages.org/)

https://i.postimg.cc/SNWhyz7k/YUV-16-bit.jpg (https://postimages.org/)

ErazorTT
18th January 2022, 19:51
Give me an example, I don't get 8 bit values.
If there is an asterisk in front of it, it is only calculated, so it is not from avisynth.


No, its not that it shows 8bit VALUES, when there is the asterix it does show 16bit values (or whatever bit depth is used) but these are ROUNDED to the 8bit bounderies.

1. So here in the screenshot I loaded a 16bits gray ramp. Moving the mouse from left to right it starts in full black at Y=4096 and RGB=0,0,0 which is fine:
https://i.postimg.cc/MGZQv3wK/4096.png

2. When the mouse is moved further to the right the Y value increases continuously through all numbers until here where its Y=4199, however look at RGB these are still at 0,0,0:
https://i.postimg.cc/MGsjR0Z0/4199.png

3. Now moving just a little bit further to the right where Y=4214 the RGB value jumps to 257:
https://i.postimg.cc/SsJYGXjB/4214.png

The RGB values should have continuously risen, just like the Y value. But they are remaining at 0 until they jump to 257. So while 16bits values are shown, these are rounded to the 255 existing values between 0 and 65535 which are all multiples of 257: 0, 257, 514, 771,...
So everything that is going to be shown there is going to be an multiple of 257.

poisondeathray
18th January 2022, 20:05
If it helps explain the issue ErazorTT is describing , here is a 1024x720 , 0-1023 Y' gradient . AVC 10bit 422 . Each x coordinate is the Y' value. So at xpos 200, YUV=200,512,512. Ok so far.

Converting to 10bit Planar RGB full range in/out, you'd expect the same as RGB values . eg @ xpos 300 should be RGB 300,300,300

So the avspmod picker right to left reads RGB 1023,1019, 1015 in bars, instead of individual 1023,1022,1021,1020 that you would expected. ie the converted values for the color picker have an 8bit step somewhere


LSmashVideoSource("x264_10bit422_gradient.mp4")
z_ConvertFormat(pixel_type="RGBP10", resample_filter="point", colorspace_op="709:709:709:f=>rgb:709:709:f")

I upload both, including the FFV1 export convert ("zconv_ffv1.mkv") , which looks ok in vsedit, so the actual values are ok, it's just the color picker in avspmod

https://www.mediafire.com/file/84315w09dx93hci/10bit_grad+zconv_rgbp10_ffv1.rar/file

gispos
18th January 2022, 21:18
I have to pass. which is what I use to calculate.
Suggestions for change welcome.

R,G,B = rgb.Get() # display rgb 24 bit


depth = script.AVI.bits_per_component - 8
# 10 to 16 bits
if depth > 0 and depth <= 8:
R = int((257.0/256) * (R << depth))
G = int((257.0/256) * (G << depth))
B = int((257.0/256) * (B << depth))
hexcolor = '$%04x,%04x,%04x' % (R,G,B)
Y = int(0.257*R + 0.504*G + 0.098*B + ((257.0/256) * (16 << depth)))
U = int(-0.148*R - 0.291*G + 0.439*B + ((257.0/256) * (128 << depth)))
V = int(0.439*R - 0.368*G - 0.071*B + ((257.0/256) * (128 << depth)))
else: # 8bit, on 32bit is 8bit RGB from display used
hexcolor = '$%02x%02x%02x' % (R,G,B)
Y = int(0.257*R + 0.504*G + 0.098*B + 16)
U = int(-0.148*R - 0.291*G + 0.439*B + 128)
V = int(0.439*R - 0.368*G - 0.071*B + 128)

ErazorTT
18th January 2022, 21:57
R,G,B = rgb.Get() # display rgb 24 bit


As it appears this returns 8 bit values independently of the actual bit depth. That is the bottleneck.

gispos
18th January 2022, 21:59
As it appears this returns 8 bit values independently of the actual bit depth. That is the bottleneck.
But that's all I have.

gispos
18th January 2022, 22:01
Another suggestion. Simply do not show the calculated values anymore. And the world is right again. ;)
I don't need any frame properties or pixel values.;)

ErazorTT
18th January 2022, 22:05
But that's all I have.

And how do you get the non-asterix one correctly?
I mean apparently you are able to get the correct value when the image is an RGB image. Because then the rgb values have no asterix, and are correct... I don't understand how that can be.

PS: I also see this in your code:
avsRGB = script.AVI.GetPixelRGB(x, y)

PPS: This seems to get also high bits values, I am correct? So why don't you use this instead of using dc.GetPixel(x, y)? So why do you get the rgb values with these two different ways two times?

PPPS: Why don't you just calculate the asterix values like that:


# Get color from AviSynth
if not self.bit_depth and (self.snapShotIdx < 1): # disable avisynth if snapshot visible
try:
avsYUV = script.AVI.GetPixelYUV(x, y)
if avsYUV != (-1,-1,-1):
Y,U,V = avsYUV
R,G,B = calcRGB(Y,U,V,depth)
cY = cH = ''
if script.AVI.bits_per_component == 8:
hexcolor = '$%02x%02x%02x' % (Y,U,V)
elif script.AVI.bits_per_component <= 16:
hexcolor = '$%04x,%04x,%04x' % (Y,U,V) # comma separated is more visible
else: # 32 bit
hexcolor = '%.5f,%.5f,%.5f' % (Y,U,V) # no reason for 32 bit float in hex

elif script.AVI.IsRGB32:
avsRGBA = script.AVI.GetPixelRGBA(x, y)
if avsRGBA != (-1,-1,-1,-1):
R,G,B,A = avsRGBA
Y,U,V = calcYUV(R,G,B,depth)
hexcolor = '$%02x%02x%02x%02x' % (R,G,B,A)
cR = cH = ''

else:
avsRGB = script.AVI.GetPixelRGB(x, y)
if avsRGB != (-1,-1,-1):
R,G,B = avsRGB
Y,U,V = calcYUV(R,G,B,depth)
if script.AVI.bits_per_component == 8:
hexcolor = '$%02x%02x%02x' % (R,G,B)
cH = ''
elif script.AVI.bits_per_component <= 16:
hexcolor = '$%04x,%04x,%04x' % (R,G,B)
cH = ''
cR = ''

gispos
18th January 2022, 22:43
@ErazorTT, if it is possible to calculate the RGB value from the YUV value?
As already written, it doesn't really interest me and that's why I didn't bother with it. :)

Where can I find examples of this?

ErazorTT
18th January 2022, 23:30
These are the conversions in full precision from wikipedia:

BT.601 RGB->YUV:
https://i.postimg.cc/x1P3qbwY/BT601-RGB2-YUV.png

BT.601 YUV->RGB:
https://i.postimg.cc/WzJdZQtg/BT601-YUV2-RGB.png

PS: What we call YUV is actually a misnomer, and we all should be saying YCbCr whenever we say YUV. But since that's quite a mouthfull nobody says that and everybody just calls it YUV. Thats why you see in these formulas Cb and Cr instead of U and V.

ErazorTT
18th January 2022, 23:57
But now I'll also need the BT.709 conversion... Perhaps its actually really better to just remove this calculation at all and only show the values returned by avisynth.
For yuv clips you show the yuv triplet and for rgb clips you show the rgb triplet.

ErazorTT
19th January 2022, 00:01
if I'm already posting here, perhaps I could also make an implementation request: Could you please add BT.2020 to the list of possible colorspaces for YUV->RGB?

I mean, could it be added here as a third option:
https://i.postimg.cc/0NFMNkyP/yuv2rgb.png

That would be really very much of interest for me.

poisondeathray
19th January 2022, 02:01
But now I'll also need the BT.709 conversion... Perhaps its actually really better to just remove this calculation at all and only show the values returned by avisynth.
For yuv clips you show the yuv triplet and for rgb clips you show the rgb triplet.

But what if the source filter returns RGBP10 ?

e.g. the test clip in the archive above "zconv_ffv1.mkv"

LWLibavVideoSource(""zconv_ffv1.mkv") returns RGBP10 (as reported by info() ) and the color picker RGB value has * asterisk, and values are quantized

ErazorTT
19th January 2022, 10:53
But what if the source filter returns RGBP10 ?

e.g. the test clip in the archive above "zconv_ffv1.mkv"

LWLibavVideoSource(""zconv_ffv1.mkv") returns RGBP10 (as reported by info() ) and the color picker RGB value has * asterisk, and values are quantized

Oh yes, that is true. So the solution would be to always take the same source that is currently used for the hex value, but to also show it in decimal. So I would suggest to remove the %RGB and %YUV modifiers and add a %DEC modifier, that shows exactly the same what %HEX is showing but in decimal representation.

I think this would already help a lot, since I very much doubt that anybody uses the HEX representation for high bit depths. And actually I also missed the decimal representation for 8bits as well.

PS: So that would be my suggested implementation (new stuff in bold):


# Get color from display
rgb = dc.GetPixel(x, y)
R,G,B = rgb.Get()
A = 0
cR = cY = cH = '*'

depth = script.AVI.bits_per_component - 8
# 10 to 16 bits
if depth > 0 and depth <= 8:
R = int((257.0/256) * (R << depth))
G = int((257.0/256) * (G << depth))
B = int((257.0/256) * (B << depth))
hexcolor = '$%04x,%04x,%04x' % (R,G,B)
Y = int(0.257*R + 0.504*G + 0.098*B + ((257.0/256) * (16 << depth))) #(16 << depth))
U = int(-0.148*R - 0.291*G + 0.439*B + ((257.0/256) * (128 << depth))) #(128 << depth))
V = int(0.439*R - 0.368*G - 0.071*B + ((257.0/256) * (128 << depth))) #(128 << depth))
else: # 8bit, on 32bit is 8bit RGB from display used
hexcolor = '$%02x%02x%02x' % (R,G,B)
Y = int(0.257*R + 0.504*G + 0.098*B + 16)
U = int(-0.148*R - 0.291*G + 0.439*B + 128)
V = int(0.439*R - 0.368*G - 0.071*B + 128)

if 'flipvertical' in self.flip:
y = script.AVI.DisplayHeight - 1 - y
if 'fliphorizontal' in self.flip:
x = script.AVI.DisplayWidth - 1 - x
# Get color from AviSynth
if not self.bit_depth and (self.snapShotIdx < 1): # disable avisynth if snapshot visible
try:
avsYUV = script.AVI.GetPixelYUV(x, y)
if avsYUV != (-1,-1,-1):
Y,U,V = avsYUV
cY = cH = ''
deccolor = '%i,%i,%i' % (Y,U,V)
if script.AVI.bits_per_component == 8:
hexcolor = '$%02x%02x%02x' % (Y,U,V)
elif script.AVI.bits_per_component <= 16:
hexcolor = '$%04x,%04x,%04x' % (Y,U,V) # comma separated is more visible
else: # 32 bit
hexcolor = '%.5f,%.5f,%.5f' % (Y,U,V) # no reason for 32 bit float in hex

elif script.AVI.IsRGB32:
avsRGBA = script.AVI.GetPixelRGBA(x, y)
if avsRGBA != (-1,-1,-1,-1):
R,G,B,A = avsRGBA
deccolor = '%i,%i,%i,%i' % (R,G,B,A)
hexcolor = '$%02x%02x%02x%02x' % (R,G,B,A)
cR = cH = ''
else:
avsRGB = script.AVI.GetPixelRGB(x, y)
if avsRGB != (-1,-1,-1):
R,G,B = avsRGB
deccolor = '%i,%i,%i' % (R,G,B)
if script.AVI.bits_per_component == 8:
hexcolor = '$%02x%02x%02x' % (R,G,B)
cH = ''
elif script.AVI.bits_per_component <= 16:
hexcolor = '$%04x,%04x,%04x' % (R,G,B)
cH = ''
cR = ''
except:
pass

if not string_:
return (x, y), hexcolor.upper()[1:], (R, G, B), (R, G, B, A), (Y, U, V)
xystring = '%s=(%i,%i)' % (_('pos'),x,y)
hexstring = '%s=%s' % (_(cH+'hex'),hexcolor.upper())
decstring = '%s=%s' % (_(cR+'dec'),deccolor)
return xystring, hexstring, decstring

PPS: no that is not the solution, because %HEX is already not working correctly for planarRGB. That would be the solution if planarRGB was being processed by the shown code. But somehow planarRGB does not go through this shown code. What prevents planarRGB to enter this code path?

PPPS: What does this line do (very first on my code snippet):
if not self.bit_depth and (self.snapShotIdx < 1): # disable avisynth if snapshot visible <-- what is this supposed to mean?
Is this why planarRGB is not processed by the rest of code?

PPPPS: And what is this code in the beginning of my code snipped actualy good for in contrast to the rest of code? Isn't this redundant?

# Get color from display
rgb = dc.GetPixel(x, y)
R,G,B = rgb.Get()
A = 0
cR = cY = cH = '*'

depth = script.AVI.bits_per_component - 8
# 10 to 16 bits
if depth > 0 and depth <= 8:
R = int((257.0/256) * (R << depth))
G = int((257.0/256) * (G << depth))
B = int((257.0/256) * (B << depth))
hexcolor = '$%04x,%04x,%04x' % (R,G,B)
Y = int(0.257*R + 0.504*G + 0.098*B + ((257.0/256) * (16 << depth))) #(16 << depth))
U = int(-0.148*R - 0.291*G + 0.439*B + ((257.0/256) * (128 << depth))) #(128 << depth))
V = int(0.439*R - 0.368*G - 0.071*B + ((257.0/256) * (128 << depth))) #(128 << depth))
else: # 8bit, on 32bit is 8bit RGB from display used
hexcolor = '$%02x%02x%02x' % (R,G,B)
Y = int(0.257*R + 0.504*G + 0.098*B + 16)
U = int(-0.148*R - 0.291*G + 0.439*B + 128)
V = int(0.439*R - 0.368*G - 0.071*B + 128)
We know that dc.GetPixel(x, y) returns only 8 bits, so planarRGB is apparently somehow using this code but then does not enter the rest of the code. Why is this code actually needed at all? Why can't this be removed and anything just goes through the rest of the code which would then use the proper avisynth functions (script.AVI.GetPixelRGB, script.AVI.GetPixelRGBA and script.AVI.GetPixelYUV) which do return high bits correctly?

:confused:

PPPPPS: So my question is, why can't this just be the whole implementation of the function GetPixelInfo:

def GetPixelInfo(self, event, string_=False):
if self.splitView:
return '' if string_ else (0, 0), None, None, None, None

videoWindow = self.videoWindow

# GPo 2020, if call without mouse event then check if mouse in videoWindow
if event:
xpos, ypos = event.GetPosition()
else:
xpos, ypos = videoWindow.ScreenToClient(wx.GetMousePosition())
# if not in client then return, speed up
if not self.videoWindow.GetClientRect().Inside((xpos, ypos)):
return '' if string_ else (0, 0), None, None, None, None

script = self.currentScript
if script.AVI is None:
return '' if string_ else (0, 0), None, None, None, None # if not AVI so return false
w, h = script.AVI.DisplayWidth, script.AVI.DisplayHeight
dc = wx.ClientDC(videoWindow)
dc.SetDeviceOrigin(self.xo, self.yo)
try: # DoPrepareDC causes NameError in wx2.9.1 and fixed in wx2.9.2
videoWindow.DoPrepareDC(dc)
except:
videoWindow.PrepareDC(dc)
zoomfactor = self.zoomfactor
if zoomfactor != 1:
dc.SetUserScale(zoomfactor, zoomfactor)

x = dc.DeviceToLogicalX(xpos)
y = dc.DeviceToLogicalY(ypos)

xposScrolled, yposScrolled = self.videoWindow.CalcUnscrolledPosition(xpos,ypos)
if 0 <= x < w and 0 <= y < h and xposScrolled>=self.xo and yposScrolled>=self.yo:
if 'flipvertical' in self.flip:
y = script.AVI.DisplayHeight - 1 - y
if 'fliphorizontal' in self.flip:
x = script.AVI.DisplayWidth - 1 - x

hexcolor = ""
decolor = ""

# Get color from AviSynth
try:
avsYUV = script.AVI.GetPixelYUV(x, y)
if avsYUV != (-1,-1,-1):
Y,U,V = avsYUV
deccolor = '%i,%i,%i' % (Y,U,V)
if script.AVI.bits_per_component == 8:
hexcolor = '$%02x%02x%02x' % (Y,U,V)
elif script.AVI.bits_per_component <= 16:
hexcolor = '$%04x,%04x,%04x' % (Y,U,V) # comma separated is more visible
else: # 32 bit
hexcolor = '%.5f,%.5f,%.5f' % (Y,U,V) # no reason for 32 bit float in hex

elif script.AVI.IsRGB32:
avsRGBA = script.AVI.GetPixelRGBA(x, y)
if avsRGBA != (-1,-1,-1,-1):
R,G,B,A = avsRGBA
deccolor = '%i,%i,%i,%i' % (R,G,B,A)
hexcolor = '$%02x%02x%02x%02x' % (R,G,B,A)
else:
avsRGB = script.AVI.GetPixelRGB(x, y)
if avsRGB != (-1,-1,-1):
R,G,B = avsRGB
deccolor = '%i,%i,%i' % (R,G,B)
if script.AVI.bits_per_component == 8:
hexcolor = '$%02x%02x%02x' % (R,G,B)
elif script.AVI.bits_per_component <= 16:
hexcolor = '$%04x,%04x,%04x' % (R,G,B)
except:
pass

if not string_:
return (x, y), hexcolor.upper()[1:], (R, G, B), (R, G, B, A), (Y, U, V)
xystring = '%s=(%i,%i)' % (_('pos'),x,y)
hexstring = '%s=%s' % (_('hex'),hexcolor.upper())
decstring = '%s=%s' % (_('dec'),deccolor)
return xystring, hexstring, decstring
else:
if not 0 <= x < w:
x = 0 if x < 0 else w - 1
if not 0 <= y < h:
y = 0 if y < 0 else h - 1
if 'flipvertical' in self.flip:
y = script.AVI.DisplayHeight - 1 - y
if 'fliphorizontal' in self.flip:
x = script.AVI.DisplayWidth - 1 - x
xystring = '%s=(%i,%i)' % (_('pos'),x,y)
return xystring if string_ else (x, y), None, None, None, None

gispos
19th January 2022, 17:32
ErazorTT, nice and slowly, one after the other.

It's partly old code and partly newer, that RGB and YUY are calculated first is correct. Had tried it the other way, but that didn't help the flow of the function. The few calculations make no difference because some of these calculations are used.

There are two problems, the first is the calculation of pixel values to another color format larger than 8 bit.
I think what you posted (Wiki) is the same as what is already used in AvsPmod YUV > RGB 8bit or RGB > YUV 8bit.
Whether this is calculated from the display RGB or from the avisynth YUV value, it will probably always only be an approximate value.

I think there are two options :
Display these approximate values with a * or, for my sake, a ~ and just to know that this is only an approximate value.
Or show only the avisynth values and show the calculates value only with * when 8bit.

Or a third possibility: there is a function with which it can be calculated exactly.

Which brings us to the second problem.
Of course, a function is also needed to calculate the avisynth values.
I got it for RGB (using Ferenc Template for YUV). But not for Planar RGB. I have no idea how the bytes are arranged.
So if the lower function is expanded with Planar RGB, that would be OK.

PS: I don't know what you want to achieve with the variable 'deccolor', but it is superfluous.
RGB, YUV is returned in the first return.

def GetPixelRGB(self, x, y, BGR=True):
if self.IsRGB:
# if a resize filter used in the preview filter. CRASH if not check here
if self.DisplayWidth != self.Width or self.DisplayHeight != self.Height:
return (-1,-1,-1)
bytes = self.vi.bytes_from_pixels(1)

#if self.IsRGB64 or self.IsRGB48:
if self.bits_per_component == 16:
#x = x * 8 64bit
#x = x * 6 48bit
if BGR:
indexB = (x * bytes) + (self.Height - 1 - y) * self.pitch # same for 48, 64 bit
bufferB = [self.ptrY[indexB], self.ptrY[indexB+1]]
valB = struct.unpack('=H', bytearray(bufferB))[0]
bufferG = [self.ptrY[indexB+2], self.ptrY[indexB+3]]
valG = struct.unpack('=H', bytearray(bufferG))[0]
bufferR = [self.ptrY[indexB+4], self.ptrY[indexB+5]]
valR = struct.unpack('=H', bytearray(bufferR))[0]
return (valR, valG, valB)
else:
indexR = (x * bytes) + y * self.pitch
bufferR = [self.ptrY[indexR], self.ptrY[indexR+1]]
valR = struct.unpack('=H', bytearray(bufferR))[0]
bufferG = [self.ptrY[indexR+2], self.ptrY[indexR+3]]
valG = struct.unpack('=H', bytearray(bufferG))[0]
bufferB = [self.ptrY[indexR+4], self.ptrY[indexR+5]]
valB = struct.unpack('=H', bytearray(bufferB))[0]
return (valR, valG, valB)

if self.bits_per_component > 8:
return (-1,-1,-1)
# 8bit
if BGR:
indexB = (x * bytes) + (self.Height - 1 - y) * self.pitch
indexG = indexB + 1
indexR = indexB + 2
else:
indexR = (x * bytes) + y * self.pitch
indexG = indexR + 1
indexB = indexR + 2
return (self.ptrY[indexR], self.ptrY[indexG], self.ptrY[indexB])
else:
return (-1,-1,-1)

StvG
19th January 2022, 17:56
I got it for RGB (using Ferenc Template for YUV). But not for Planar RGB. I have no idea how the bytes are arranged.

A func for planar rgb based on this yuv func (https://forum.doom9.org/showthread.php?p=1956468#post1956468) should be something like:
def GetPixelPlanarRGB(self, x, y):
x = x * self.component_size

index = x + y * self.pitch

return (self.ptrR[index], self.ptrG[index], self.ptrB[index])

gispos
19th January 2022, 20:44
A func for planar rgb based on this yuv func (https://forum.doom9.org/showthread.php?p=1956468#post1956468) should be something like:
def GetPixelPlanarRGB(self, x, y):
x = x * self.component_size

index = x + y * self.pitch

return (self.ptrR[index], self.ptrG[index], self.ptrB[index])
I already thought that it was similar to YUV Planar, but there is no self.ptrR, how is that supposed to be calculated.
Must use self.WidthSubsampling and, and. I can play around there for a long time.

StvG
19th January 2022, 21:44
I already thought that it was similar to YUV Planar, but there is no self.ptrR, how is that supposed to be calculated.
Must use self.WidthSubsampling and, and. I can play around there for a long time.

I didn't look at other stuff than that pinterf's post but the way you get self.ptrY should be applied for R/G/B.
self.Width/HeightSubsampling - RGB doesn't have subsampled planes.

gispos
19th January 2022, 22:28
I didn't look at other stuff than that pinterf's post but the way you get self.ptrY should be applied for R/G/B.
self.Width/HeightSubsampling - RGB doesn't have subsampled planes.
I'm not sure (but close) please try Planar RGB pixel values.
In the AvsPmod\lib directory, swap the library.zip with the one in the archive

if self.IsPlanar:
x = x * self.component_size
indexY = x + y * self.pitch
indexU = indexV = x + y * self.pitchUV
bufferY = [self.ptrY[indexY], self.ptrY[indexY + 1]]
valY = struct.unpack('=H', bytearray(bufferY))[0]
bufferU = [self.ptrU[indexU], self.ptrU[indexU + 1]]
valU = struct.unpack('=H', bytearray(bufferU))[0]
bufferV = [self.ptrV[indexV], self.ptrV[indexV + 1]]
valV = struct.unpack('=H', bytearray(bufferV))[0]
return (valY, valU, valV)


https://www.mediafire.com/file/w6ryfp5fg2al47w/AvsPmod_library_x64_test.7z/file

gispos
19th January 2022, 23:33
Gray values were correct, but the color values were reversed.
Now I get the same color values with RGB64 and Planar RGB 16bit (sometimes -+ 1) but that's probably due to Planar RGB itself.

https://www.mediafire.com/file/s3bszcivwco5uzr/AvsPmod_library_x64_test2.7z/file

StvG
20th January 2022, 00:52
Gray values were correct, but the color values were reversed.
Now I get the same color values with RGB64 and Planar RGB 16bit (sometimes -+ 1) but that's probably due to Planar RGB itself.

https://www.mediafire.com/file/s3bszcivwco5uzr/AvsPmod_library_x64_test2.7z/file

The values of PlanarRGB and PackedRGB should be the same. Where are you get different values?

The values of the alpha plane are displayed only when the clip is RGB32. ConvertToRGB64/ConvertToPlanarRGBA does strip the value. z_ConvertFormat(pixel_type="yuva420p8") displays *rgb(x, x, x) values. Tested with the clip from this post (https://forum.doom9.org/showthread.php?p=1828655#post1828655).

gispos
20th January 2022, 19:44
The values of PlanarRGB and PackedRGB should be the same. Where are you get different values?

The values of the alpha plane are displayed only when the clip is RGB32. ConvertToRGB64/ConvertToPlanarRGBA does strip the value. z_ConvertFormat(pixel_type="yuva420p8") displays *rgb(x, x, x) values. Tested with the clip from this post (https://forum.doom9.org/showthread.php?p=1828655#post1828655).
The test also only referred to 10 to 16 bits.
8 bit seems to be correct now, but with 16 bit I always have differences to RGB64.
I give up, can't get it.

if self.IsPlanar:
indexG = x * self.component_size + y * self.pitch
indexB = indexR = x * self.component_size + y * self.pitchUV
#indexB = indexR = indexG
#x = x * self.component_size
#indexB = indexG = indexR = x + y * self.pitch
if self.bits_per_component == 8:
return (self.ptrV[indexG], self.ptrY[indexG], self.ptrU[indexG])
if self.bits_per_component <= 16:
bufferG = [self.ptrY[indexG], self.ptrY[indexG + 1]]
valG = struct.unpack('=H', bytearray(bufferG))[0]
bufferB = [self.ptrU[indexB], self.ptrU[indexB + 1]]
valB = struct.unpack('=H', bytearray(bufferB))[0]
bufferR = [self.ptrV[indexR], self.ptrV[indexR + 1]]
valR = struct.unpack('=H', bytearray(bufferR))[0]
return (valR, valG, valB)
else:
#32 bit
return (-1, -1, -1)

StvG
22nd January 2022, 10:45
@gispos, I uploaded here (https://files.catbox.moe/fwy2km.patch) a patch that should be applied to the latest AvsPmod commit on github (eb0f0611888bbb49d7a807cadada097a020f9852). I changed GetPixelRGB/GetPixelRGBA - rgb48/rgb64/planarrgbx/planarrgbax formats should be read correctly now. Also I made some changes so the values of those formats to be displayed.
Only yuva formats/values are left but it should be easy to add them.

Edit:
Change 'self.ptrY = self.src_frame.get_read_ptr()' to 'self.ptrY = self.src_frame.get_read_ptr(AVS_PLANAR_R) if seff.IsRGB and self.IsPlanar else self.src_frame.get_read_ptr()'

gispos
22nd January 2022, 11:25
@gispos, I uploaded here (https://files.catbox.moe/fwy2km.patch) a patch that should be applied to the latest AvsPmod commit on github (eb0f0611888bbb49d7a807cadada097a020f9852). I changed GetPixelRGB/GetPixelRGBA - rgb48/rgb64/planarrgbx/planarrgbax formats should be read correctly now. Also I made some changes so the values of those formats to be displayed.
Only yuva formats/values are left but it should be easy to add them.

Edit:
Change 'self.ptrY = self.src_frame.get_read_ptr()' to 'self.ptrY = self.src_frame.get_read_ptr(AVS_PLANAR_R) if seff.IsRGB and self.IsPlanar else self.src_frame.get_read_ptr()'
Thanks for that.
I managed Planar RGB myself yesterday.
This had me totally confused and I always got different pixel values.
https://forum.doom9.org/showthread.php?p=1961859#post1961859

I also rewrote the GetPixelInfo function, so I don't know if your changes fit.
I once opened the linked patch file with the editor, I can't see much in it. I'll have to check it out on github first.
Edit: Had opened the patch with Notepad++ and I saw almost nothing, now I see more. :)

My new function for RGB

def GetPixelRGB(self, x, y, BGR=True):
if self.IsRGB:
# if a resize filter used in the preview filter. CRASH if not check here
if self.DisplayWidth != self.Width or self.DisplayHeight != self.Height:
return (-1,-1,-1)
if self.IsPlanar:
x = x * self.component_size
index = x + y * self.pitch
if self.bits_per_component == 8:
return (self.ptrV[index], self.ptrY[index], self.ptrU[index])
if self.bits_per_component <= 16:
bufferG = [self.ptrY[index], self.ptrY[index + 1]]
valG = struct.unpack('=H', bytearray(bufferG))[0]
bufferB = [self.ptrU[index], self.ptrU[index + 1]]
valB = struct.unpack('=H', bytearray(bufferB))[0]
bufferR = [self.ptrV[index], self.ptrV[index + 1]]
valR = struct.unpack('=H', bytearray(bufferR))[0]
return (valR, valG, valB)
else: #32bit
#float # =f: float (4 bytes), native byte order
bufferG = [self.ptrY[index], self.ptrY[index + 1], self.ptrY[index + 2], self.ptrY[index + 3]]
valG = struct.unpack('=f', bytearray(bufferG))[0]
bufferB = [self.ptrU[index], self.ptrU[index + 1], self.ptrU[index + 2], self.ptrU[index + 3]]
valB = struct.unpack('=f', bytearray(bufferB))[0]
bufferR = [self.ptrV[index], self.ptrV[index + 1], self.ptrV[index + 2], self.ptrV[index + 3]]
valR = struct.unpack('=f', bytearray(bufferR))[0]
return (valR, valG, valB)

bytes = self.vi.bytes_from_pixels(1)
if self.bits_per_component == 16:
#x = x * 8 64bit
#x = x * 6 48bit
if BGR:
indexB = (x * bytes) + (self.Height - 1 - y) * self.pitch # same for 48, 64 bit
bufferB = [self.ptrY[indexB], self.ptrY[indexB+1]]
valB = struct.unpack('=H', bytearray(bufferB))[0]
bufferG = [self.ptrY[indexB+2], self.ptrY[indexB+3]]
valG = struct.unpack('=H', bytearray(bufferG))[0]
bufferR = [self.ptrY[indexB+4], self.ptrY[indexB+5]]
valR = struct.unpack('=H', bytearray(bufferR))[0]
return (valR, valG, valB)
else:
indexR = (x * bytes) + y * self.pitch
bufferR = [self.ptrY[indexR], self.ptrY[indexR+1]]
valR = struct.unpack('=H', bytearray(bufferR))[0]
bufferG = [self.ptrY[indexR+2], self.ptrY[indexR+3]]
valG = struct.unpack('=H', bytearray(bufferG))[0]
bufferB = [self.ptrY[indexR+4], self.ptrY[indexR+5]]
valB = struct.unpack('=H', bytearray(bufferB))[0]
return (valR, valG, valB)

if self.bits_per_component > 8:
return (-1,-1,-1)
# 8bit
if BGR:
indexB = (x * bytes) + (self.Height - 1 - y) * self.pitch
indexG = indexB + 1
indexR = indexB + 2
else:
indexR = (x * bytes) + y * self.pitch
indexG = indexR + 1
indexB = indexR + 2
return (self.ptrY[indexR], self.ptrY[indexG], self.ptrY[indexB])
else:
return (-1,-1,-1)

gispos
22nd January 2022, 11:43
Edit:
Change 'self.ptrY = self.src_frame.get_read_ptr()' to 'self.ptrY = self.src_frame.get_read_ptr(AVS_PLANAR_R) if seff.IsRGB and self.IsPlanar else self.src_frame.get_read_ptr()'
Almost overlooked. I changed it. Thank you!

StvG
23rd January 2022, 06:51
This had me totally confused and I always got different pixel values.
https://forum.doom9.org/showthread.php?p=1961859#post1961859

The results from these conversions are different (as it's already said in the other thread). You can easily check with:ColorBarsHD(width=1280, height=720, pixel_type="YV24")
a=ConvertToRGB64()
ConvertBits(16)
ConvertToRGB64()
Compare(a)

Almost overlooked. I changed it. Thank you!

I hope you fixed the typos in this edit. The correct line is 'self.ptrY = self.src_frame.get_read_ptr(avisynth.avs.AVS_PLANAR_R) if self.IsRGB and self.IsPlanar else self.src_frame.get_read_ptr()'.

gispos
23rd January 2022, 11:17
AvsPmod 2.7.0.6 (https://github.com/gispos/AvsPmod/releases)

* Pixel values of all color formats can now be displayed. (a big 'thank you' to StvG for the active help)
* Changed the display of the calculated pixel values in the status bar.
- the not readable values now only calculated from 8bit. If the source is 8bit,
- an asterisk is displayed in front of the value as usual, otherwise 8bit_ is put in front.
- if you want to show the alpha channel you must set %CLR for the status bar value modifiers.
* fixed some errors on closing tabs

@StvG, your templates (coding) really helped me a lot, I was able to see in which direction it had to go.:thanks:
I haven't changed the read_ptr plane, I read the planes according to the order 'GBR'. As a result, I have fewer assignments when reading the frame.
There are still some stumbling blocks:
If you don't know that IsYUV doesn't recognize YUVA and vice versa, or the subsampling is not set because only IsYUV is used...
In any case, I learned a lot about avisynth color formats that I hadn't been interested in before. ;)

Now I hope everything fits, otherwise I'll crawl under the bed.

StainlessS
23rd January 2022, 11:30
Maybe some of below of interest

Function X_HasAlpha(clip c) { c IsAvsPlus ? HasAlpha : IsRGB32 }
Function X_HasChroma(clip c) { c IsRGB ? False : IsAvsPlus ? !IsY : !IsAvs26||!IsY8 }
Function X_IsYV411(clip c) { c IsAvs26 ? IsYV411 : False }
Function X_IsY(clip c) { c IsAvsPlus ? IsY : IsAvs26 ? IsY8 : False } # True=Single Plane : (!IsRGB)=True = Any type with Y, YUY2/YUVA/Y8 etc. BEWARE Y8_Clip.IsYUV returns True
Function X_Is420(clip c) { c IsAvsPlus ? Is420 : IsYV12 }
Function X_Is422(clip c) { c IsAvsPlus ? Is422 : False } # YUY2_Clip.Is422=False [ie not Planar]
Function X_Is444(clip c) { c IsAvsPlus ? Is444 : IsAvs26 ? IsYV24 : False }
Function X_IsRGB48(clip c) { c IsAvsPlus ? IsRGB48 : False }
Function X_IsRGB64(clip c) { c IsAvsPlus ? IsRGB64 : False }
Function X_IsRGBA(clip c) { c IsRGB && X_HasAlpha }
Function X_NumComponents(clip c) { c IsAvsPlus ? NumComponents : IsAvs26&&IsY8 ? 1 : IsRGB32 ?4 : 3 } # Num of channels
Function X_Bpc(clip c) { c IsAvsPlus ? BitsPerComponent : 8 } # Bits per channel, 32 = Float
Function X_ComponentMax(clip c) { c bpc=X_Bpc Return (bpc==32) ? 1.0 : IsAvsPlus ? BitLShift(1,bpc) - 1 : 255} # Max possible component value for colorspace
Function X_ComponentFullScale(clip c) { c bpc=X_Bpc Return (bpc==32) ? 255/256.0 : IsAvsPlus ? BitLShift(255,bpc-8) : 255} # Bit shifted value for colorspace
Function X_ComponentTvBlack(clip c) { c bpc=X_Bpc Return (bpc==32) ? 16/256.0 : IsAvsPlus ? BitLShift( 16,bpc-8) : 16} # TV Black level for colorspace
Function X_ComponentTvWhite(clip c) { c bpc=X_Bpc Return (bpc==32) ? 235/256.0 : IsAvsPlus ? BitLShift(235,bpc-8) : 235} # TV White level for colorspace
Function X_PixelType(clip c) { c IsAvs26 ? PixelType : IsYV12?"YV12":IsYUY2?"YUY2":IsRGB32?"RGB32":"RGB24" } # Eg "RGB32" or "YUV420P10"
Function X_YMod(clip c) { c IsAvsPlus ? (NumComponents==1||IsRGB?1:Height/ExtractU.Height):(IsYV12 ?2:1) } # Y Min crop multiple for Progressive
Function X_XMod(clip c) { c IsAvsPlus ? (NumComponents==1||IsRGB?1:Width/ExtractU.Width):IsAvs26?(IsYV411?4:IsYUY2||IsYV16||IsYV12?2:1):(IsRGB?1:2)} # X Min crop multiple
Function X_CsXMod(Val CSP) { (CSP.IsClip)?CSP:(CSP.IsString)?Blankclip(Length=1,Width=16,height=16,Pixel_type=CSP):Assert(False,"X_CsXMod: CSP Clip or Pixel_Type string ONLY") Return X_XMod }
Function X_CsYMod(Val CSP) { (CSP.IsClip)?CSP:(CSP.IsString)?Blankclip(Length=1,Width=16,height=16,Pixel_type=CSP):Assert(False,"X_CsYMod: CSP Clip or Pixel_Type string ONLY") Return X_YMod }


EDIT: Real.Finder probably has his own version of above stuff.

gispos
23rd January 2022, 12:54
Thanks StainlessS, but the whole thing refers to the program code level.
I'll take a look anyway!

StvG
23rd January 2022, 21:16
AvsPmod 2.7.0.6 (https://github.com/gispos/AvsPmod/releases)
...
There are still some stumbling blocks:
If you don't know that IsYUV doesn't recognize YUVA and vice versa, or the subsampling is not set because only IsYUV is used...

Thanks for the new version.

IsRGB covers all variants of RGB (packed, planar, w/ or w/o alpha, any bit depth...). 'not IsRGB' can be used for the all variants of YUV (Y/YUV/YUVA).

Dogway
25th January 2022, 18:18
@gispos: I still get the flashes and DWM reset, I tested closing related background processes like my AHK script FixWin7 and 7+ TaskBar Tweaker, so they are not the problem. It happens even without the sliders, just simply double clicking on the text editor (ie. to highlight a word). The only other thing I have in background is ClassicShell. I will test by disabling a few options in AvsPmod (like refresh preview automatically, hide video scroll bars...), so if it doesn't happen again I know they are the culprits.

gispos
25th January 2022, 19:18
@Dogway,
There are two types of sliders:
1.) the automatically created
2.) the self-created

There are different functions for each type of slider.
What sliders are you using? 1 or 2 ?

What happens when you use a preview filter?
/**avsp_filter
ex_contrast(cont=0.00, pivot=127.5, sat=1.00)
**/

Another test :
Use a preview filter and turn it on.
Then do everything else the same as before.
So change a filter that is not set as a preview filter.
crash still present?

Dogway
25th January 2022, 20:04
Out of dispair I moved to v2.7.0.6, lucky for me function definitions are still there and all options were read nicely.

It also happened in this last version, with a single double click on the text editor (video preview wasn't even open). I think it might have to do with hide scrollbars option, I have also disabled AltDrag for AvsPmod for testing just in case.

I use both types of sliders, but when I use sliders it's always because I have manually defined a function definition. In any case I don't think the problem is there, I disabled the sliders modern theme and the issue persisted so I'm still debugging (each time after a reboot).

What's the difference between a preview filter and a display filter? Also what is the Make Snapshot on the bottom of the slider panel?

gispos
25th January 2022, 22:14
What's the difference between a preview filter and a display filter? Also what is the Make Snapshot on the bottom of the slider panel?
Preview filter is excellent for use with the sliders.
Go to Help > 'Preview filter readme'

Make snapshot:
Dogway you disappoint me. As the name indicates...
It's also available under Video > 'Snapshot', I will not help you there, I'm sure you'll figure it out yourself. :)
There is also a context menu for the 'Snapshot' in the slider window.

And there is an automatic snapshot 'Snapshot 2' maybe just click on 'Show Snapshot 2' after a filter change.

Dogway
26th January 2022, 15:42
Ah "history snapshots" haha, yes I know, I thought it was taking images or something, the name is a bit ambiguous but anyway I'm not a native speaker. And preview filters is similar in concept but with grouped filters (like layer/filter folders in Photoshop). Originally I simply was using a different tab with synced timeline for these cases.

I couldn't make the snapshots work though. I go to Video -> Snapshot -> Take snapshot 1, change the script (refresh), take snapshot 2, then "Make 1 Show 1" does nothing. I tried to disable the option in the sliders Exclusion list, but it won't hide.

I didn't want to report until I was using the latest version but I have some issues with the video zoom.
If I wheel scroll zoom out to 0.80x, if I press '+' to zoom in, it will go directly to 2.00x.
If I zoom out with '-' until max (0.25x), then zoom in with mouse wheel, '-' won't work anymore.
Looks like mouse wheel zoom and keyboard zoom are not unified.

gispos
26th January 2022, 17:56
And preview filters...Originally I simply was using a different tab with synced timeline for these cases.

That is not the same. You can't use 'heavy filters' in the beginning and then have an almost real time display with light filters.

I couldn't make the snapshots work though.

Snapshots work fine. No automatic snapshot is created with preview filters.
The text for the snapshot is displayed at the top left. For me everything works as it should.


I didn't want to report until I was using the latest version but I have some issues with the video zoom.
If I wheel scroll zoom out to 0.80x, if I press '+' to zoom in, it will go directly to 2.00x.
If I zoom out with '-' until max (0.25x), then zoom in with mouse wheel, '-' won't work anymore.
Looks like mouse wheel zoom and keyboard zoom are not unified.
I look into it. But the fact that there are jumps between mouse zoom and keyboard zoom has always been the case and isn't that bad.

gispos
26th January 2022, 18:05
https://forum.doom9.org/showthread.php?p=1962375#post1962375
@wonkey_monkey,

Back then I couldn't do anything with the sliders, they were disabled for me.
To answer your question:
The clip is recreated every time, it would be an immense effort (up to impossible) and also difficult to handle to disassemble the script and treat each filter individually.
That would then only work up to the filter that is changed, because all subsequent filters are dependent on this filter.

This is also the reason why the sliders were unusable for me, the clip had to be rebuilt every time a filter parameter was changed.

Then I added the check box 'disable Refresh' and the 'Preview Filter', now I love the sliders.
With 'disable Refresh', several parameters of several filters can be changed at the same time and then a convenient refresh can be brought about with a mouse click in the video window.

And the Preview filter allows you to only rebuild the filters that are in the 'Preview Filter' section of the script. ( /**avsp_filter .. **/ )
This enables, for example, an almost real-time display of SmoothLevels histogram curves.

There are two things in AvsPmod that are my favorites.
Preview filters and Snapshots. And if one does not know these functions and therefore does not use them, I'm sorry.
Snapshots are self-explanatory and there is a readme for the preview filters.

VoodooFX
26th January 2022, 23:58
There are two things in AvsPmod that are my favorites.
Preview filters and Snapshots. And if one does not know these functions and therefore does not use them, I'm sorry.
Purpose of them eludes me, Snapshot looks like copy/paste replacement, and Preview filters... I've no idea why I would need filters for the preview.

gispos
27th January 2022, 19:02
Purpose of them eludes me, Snapshot looks like copy/paste replacement,
Completely wrong.


and Preview filters... I've no idea why I would need filters for the preview.
What is a preview? A preview of the end result.
At the latest with these words one should become thoughtful.

And the Preview filter allows you to only rebuild the filters that are in the 'Preview Filter' section of the script. ( /**avsp_filter .. **/ )
This enables, for example, an almost real-time display of SmoothLevels histogram curves.


Who is interested.

Small video for Snapshot.
Initially, automatic Snapshot is turned on, so I don't even need to manually create a snapshot.
https://www.mediafire.com/file/zlympvk51fe6dcr/Snapshot.mkv/file

Small video about preview filter.
Note that there are two 'heavy filters' at the beginning of the script.
https://www.mediafire.com/file/xwuu6zacycblpfa/PreviewFilter.mkv/file

VoodooFX
27th January 2022, 23:31
Thanks for videos.
Snapshot - I just copy/paste script into a new tab[s], so "my snapshots" are tabs.
Preview filters - If I get it right it's to do side by side comparison, no? I prefer a switching comparison over side by side.

GAP
28th January 2022, 06:29
I have this warning from the 64 bit version of AVSPMod. Did I do something wrong?

videoh
28th January 2022, 12:54
Just tell us the warning instead of attaching it. Attachments can languish for some time.

gispos
28th January 2022, 17:43
Will probably be a naming warning for a plugin.
I'll say it upfront.;)
I will not change anything, the developers at that time were not stupid (quite the opposite). The whole thing is somewhat complicated and I don't feel like dealing with it. It all works without any problems if you stick to this small requirement that no spaces or strange characters are used and e.g. a hyphen is replaced by an underscore.


Thanks for videos.
Snapshot - I just copy/paste script into a new tab[s], so "my snapshots" are tabs.
Preview filters - If I get it right it's to do side by side comparison, no? I prefer a switching comparison over side by side.
I'm really speechless.

What are you asking me? you needed 4 times more words than to write /**avsp_filter in the script.
Video and words didn't help, you're a resistant and you're too lazy? to test that yourself.
I'm finishing this.

GAP
28th January 2022, 20:54
Just tell us the warning instead of attaching it. Attachments can languish for some time.

Okay. Here is what happen when I use the x64 version of AVSPMod.

Warning

HDRCore-x64.dll
HDRMatrix-x64.dll
HDRNoise-x64.dll
HDRSharp-x64.dll
neo-fft3d.dll

Above plugin names contain certian undesirable symbols.
Rename them to only use alphanumeric or underscores,
or make sure to use them them in short name only.

gispos
28th January 2022, 23:46
Okay. Here is what happen when I use the x64 version of AVSPMod.

Warning

HDRCore-x64.dll
HDRMatrix-x64.dll
HDRNoise-x64.dll
HDRSharp-x64.dll
neo-fft3d.dll

Above plugin names contain certian undesirable symbols.
Rename them to only use alphanumeric or underscores,
or make sure to use them them in short name only.


See my post before. Either rename the plugins:

HDRCore_x64.dll
HDRMatrix_x64.dll
HDRNoise_x64.dll
HDRSharp_x64.dll
neo_fft3d.dll

or turn off the warnings Program options > Misc > 'Show warning for bad plugin naming at startup' with the risk that some functions are not recognized and there are no AvsPmod advanced help functions.
I would rename them.

StvG
29th January 2022, 12:09
@gispos, indexA should be moved here (https://github.com/gispos/AvsPmod/blob/GPo/pyavs.py#L851) (the alpha plane has the same dimensions as luma) otherwise for YUVA 422/420 alpha plane values are wrong.

gispos
29th January 2022, 12:54
If I zoom out with '-' until max (0.25x), then zoom in with mouse wheel, '-' won't work anymore.
Looks like mouse wheel zoom and keyboard zoom are not unified.
I just synced the mouse zoom with the keyboard zoom, but I can't induce the error with zoom 0.25
I can always zoom with the mouse, even if 0.25 was selected with the keyboard. And I can't find anything in the code either.

Sorry, but if at least one other person doesn't report the same error, I'll stop troubleshooting for now.

@gispos, indexA should be moved here (https://github.com/gispos/AvsPmod/blob/GPo/pyavs.py#L851) (the alpha plane has the same dimensions as luma) otherwise for YUVA 422/420 alpha plane values are wrong.
Damned. :o
So it should be right then? For all bit depths?

indexY = indexA = x * self.component_size + y * self.pitch
x = x >> self.WidthSubsampling
y = y >> self.HeightSubsampling
indexU = indexV = x * self.component_size + y * self.pitchUV

Thank's

StvG
29th January 2022, 15:10
It's correct for all bit depths.

gispos
29th January 2022, 16:43
It also happened in this last version, with a single double click on the text editor (video preview wasn't even open). I think it might have to do with hide scrollbars option

Is the problem caused by the hidden scrollbar?


I couldn't make the snapshots work though. I go to Video -> Snapshot -> Take snapshot 1, change the script (refresh), take snapshot 2, then "Make 1 Show 1" does nothing. I tried to disable the option in the sliders Exclusion list, but it won't hide.

Again for the snapshots.
If 'Auto take snaphot 2' is on, you don't need to do anything.
Put a shortcut on 'Show/hide snapshot 2' and press this shortcut after a refresh has been done (filter changes in the script).
Now you can use this shortcut to switch back and forth between the current and the previous result.

Snapshots are more efficient (no double tabs = double memory)
They are more convenient and faster and when it's automatically active you can't forget it either.

If the preview filters are used and only changes in a preview filter selection occurs, then no automatic snapshot will be made.
I don't know why you always want to delete everything. This is not a filter and the snapshots stay where they are. ;)

It's correct for all bit depths.
Ok. Thanks

ADN003
30th January 2022, 10:26
Hi, I do x264 encoding using both the x86 and x64 versions.

I've been about 5 years and this last year I don't know what it's due to,

when making captures with avspmod to compare source VS encode, either with the x86 or x64 version,

the Bframes type B, even if they are the same frame number, come out moved, as if they were a different frame.

I don't know if I have something misconfigured but it happens to me in all the new encodings, the ones I have from a year ago didn't give me this problem.

I attached some screenshots please to see if you can help me.

Thanks

https://i.ibb.co/9yGcxFz/1.png (https://ibb.co/GCFnZKB)
https://i.ibb.co/fC5FdRH/2.png (https://ibb.co/gDp9Z1J)
https://i.ibb.co/TvF2x0h/3.png (https://ibb.co/1vwQtX2)
https://i.ibb.co/g4md6WL/4.png (https://ibb.co/dmjt7pw)

a greeting

gispos
30th January 2022, 10:44
Hi, I do x264 encoding using both the x86 and x64 versions.

I've been about 5 years and this last year I don't know what it's due to,

when making captures with avspmod to compare source VS encode, either with the x86 or x64 version,

the Bframes type B, even if they are the same frame number, come out moved, as if they were a different frame.

I don't know if I have something misconfigured but it happens to me in all the new encodings, the ones I have from a year ago didn't give me this problem.

I attached some screenshots please to see if you can help me.

Thanks

a greeting
For this you have to post the script with which you encode and the script with which you open the encoded video again in AvsPmod.

For me, these are two different frames that probably have the same frame number through an deinterlace.
But there are a lot of people here in the forum who understand it more.

This shouldn't have anything to do with AvsPmod, it won't look any different in VirtualDub2, for example.

What's on my mind right now :)
It's actually quite clear. You encode the video and all frames and the GOP change. The previous B frame 100 can theoretically now also be a P frame with the frame number 100.

gispos
30th January 2022, 11:31
AvsPmod 2.7.0.7 (https://github.com/gispos/AvsPmod/releases)

* Keyboard zoom +- synchronized with mouse zoom (no more big jumps)
* Fixed YUVA, displayed alpha pixel values where not correct (again thanks to StvG)

ADN003
30th January 2022, 16:02
For this you have to post the script with which you encode and the script with which you open the encoded video again in AvsPmod.

For me, these are two different frames that probably have the same frame number through an deinterlace.
But there are a lot of people here in the forum who understand it more.

This shouldn't have anything to do with AvsPmod, it won't look any different in VirtualDub2, for example.

What's on my mind right now :)
It's actually quite clear. You encode the video and all frames and the GOP change. The previous B frame 100 can theoretically now also be a P frame with the frame number 100.

If it is clear that encoding a frame P you can pass B,

but it is that I have always encoded with x264 and never or almost with any movie it happened to me

Now it happens to all of them.

Using the screenshots of Avspmod x86 or x64.

attached avspmod script of this movie.

but I repeat it happens to me with all

FFVideoSource("G:\DESENTIERRO\El desentierro (2018) [BDRemux AVC 1080p ES DTS-HD MA 5.1 Subs].mkv_1eng.mkv")
Crop(16, 146, -16, -146)
Spline36Resize(1280,536,0,0,0,-0) # Spline36 (Neutral)
#SelectRangeEvery(1000,50)

G:\DESENTIERRO\x264 source.avs --crf 15.8000 --level 4.1 --preset veryslow --deblock -3:-3 --subme 10 --aq-sensitivity 10 --me umh --bframes 10 --qpmax 69 --ipratio 1.30 --pbratio 1.20 --psy-rd 1.05 --aq-mode 3 --aq-strength 0.95 --qcomp 0.65 --merange 24 --vbv-bufsize 78125 --vbv-maxrate 62500 --no-fast-pskip --no-mbtree --no-dct-decimate --colormatrix "bt709" --output "720.mkv" - 2> 720.log

ADN003
30th January 2022, 16:04
If it is clear that encoding a frame P you can pass B,

but it is that I have always encoded with x264 and never or almost with any movie it happened to me

Now it happens to all of them.

Using the screenshots of Avspmod x86 or x64.

attached avspmod script of this movie.

but I repeat it happens to me with all

FFVideoSource("G:\DESENTIERRO\El desentierro (2018) [BDRemux AVC 1080p ES DTS-HD MA 5.1 Subs].mkv_1eng.mkv")
Crop(16, 146, -16, -146)
Spline36Resize(1280,536,0,0,0,-0) # Spline36 (Neutral)
#SelectRangeEvery(1000,50)

G:\DESENTIERRO\x264 source.avs --crf 15.8000 --level 4.1 --preset veryslow --deblock -3:-3 --subme 10 --aq-sensitivity 10 --me umh --bframes 10 --qpmax 69 --ipratio 1.30 --pbratio 1.20 --psy-rd 1.05 --aq-mode 3 --aq-strength 0.95 --qcomp 0.65 --merange 24 --vbv-bufsize 78125 --vbv-maxrate 62500 --no-fast-pskip --no-mbtree --no-dct-decimate --colormatrix "bt709" --output "720.mkv" - 2> 720.log

gispos
30th January 2022, 16:36
If it is clear that encoding a frame P you can pass B,

but it is that I have always encoded with x264 and never or almost with any movie it happened to me

Now it happens to all of them.

Using the screenshots of Avspmod x86 or x64.

attached avspmod script of this movie.

but I repeat it happens to me with all

FFVideoSource("G:\DESENTIERRO\El desentierro (2018) [BDRemux AVC 1080p ES DTS-HD MA 5.1 Subs].mkv_1eng.mkv")
Crop(16, 146, -16, -146)
Spline36Resize(1280,536,0,0,0,-0) # Spline36 (Neutral)
#SelectRangeEvery(1000,50)

G:\DESENTIERRO\x264 source.avs --crf 15.8000 --level 4.1 --preset veryslow --deblock -3:-3 --subme 10 --aq-sensitivity 10 --me umh --bframes 10 --qpmax 69 --ipratio 1.30 --pbratio 1.20 --psy-rd 1.05 --aq-mode 3 --aq-strength 0.95 --qcomp 0.65 --merange 24 --vbv-bufsize 78125 --vbv-maxrate 62500 --no-fast-pskip --no-mbtree --no-dct-decimate --colormatrix "bt709" --output "720.mkv" - 2> 720.log

With AvsPmod you only create the avs script for encoding. What the encoder does with it is another matter entirely.

FFVideoSource has been changed a lot lately, and is actually known for not being frame accurate.
Also x264 is definitely not the same version you used before. Then you may have also replaced plugins with newer versions.

If you open the scripts e.g. with VirtualDub and there are differences to AvsPmod, then we can continue talking.

Try a different VideoSource

SourceFile = "your source"
video=LWLibavVideoSource(SourceFile, cache=False)
audio=LWLibavAudioSource(SourceFile, cache=False)
audioDub(video, audio)

ADN003
30th January 2022, 17:29
if it says that ffvideosource is currently faulty.

What command can I use instead?

thanks for your help

gispos
30th January 2022, 17:48
if it says that ffvideosource is currently faulty.

What command can I use instead?

thanks for your help
I've had good experiences with it, it's actually the only video source filter I use.:)
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases
Read the source filter parameters. If you open the video more often then set cache=True


SourceFile = "your source"
video=LWLibavVideoSource(SourceFile, cache=False)
audio=LWLibavAudioSource(SourceFile, cache=False)
audioDub(video, audio)


Edit: But I didn't claim that FFVideoSource was the error, it was just a list of the reasons I knew

ADN003
30th January 2022, 18:46
when i open avspmod 2.5.1 x86
I get this error,

It will have nothing to do with the errors in the captures.

Although I have tried other versions of Avspmod x64 and it also does the same thing when capturing

https://ibb.co/9rsQMnm

gispos
30th January 2022, 20:07
when i open avspmod 2.5.1 x86
I get this error,

It will have nothing to do with the errors in the captures.

Although I have tried other versions of Avspmod x64 and it also does the same thing when capturing

https://ibb.co/9rsQMnm
Take a look around to see what version is the current one. Please take some initiative.

Dogway
2nd February 2022, 20:38
Hi gispos I tested latest version and is wonderful with the unified Zoom system, thanks a lot!
By the way I tested all things that could be tested for the GUI flashes but couldn't find a culprit. What I did was to disable desktop composition in the exe properties and now it's fine. Probably there might be something in the code that makes the GUI refresh in a bad manner as I also saw the flashes in your tutorials.

Also in the tutorials I saw that the video updated while you were holding the sliders, for me the video only updates when I release the slider. Is there some option for this?
Also is there an option to make the frameprops window to not be floating?
Finally I tested the Display filter but now whenever I get a script error, the error message gets overridden by a Display filter error.

Thanks for your help!

gispos
2nd February 2022, 22:27
Hi gispos I tested latest version and is wonderful with the unified Zoom system, thanks a lot!
By the way I tested all things that could be tested for the GUI flashes but couldn't find a culprit. What I did was to disable desktop composition in the exe properties and now it's fine. Probably there might be something in the code that makes the GUI refresh in a bad manner as I also saw the flashes in your tutorials.
Yes, I noticed the flashes in the video, but I only see them in the video. Live so without desktop recording there are no such 'dropouts'
Python is hard to persuade about some things.
When the clip is updated, in some places in the code, there is a call to quasi-freeze the current state.
And only after everything is there to display, the video window will be updated. If you don't freeze it, the whole thing doesn't look nice because the view is updated bit by bit.

I'm glad that it still works for you with your windows theme.


Also is there an option to make the frameprops window to not be floating?
This is problematic, don't know where to dock this. To be honest, I don't want to invest time in it. for now. sorry.


Finally I tested the Display filter but now whenever I get a script error, the error message gets overridden by a Display filter error.

I have to see if I can separate it, when creating the different filters (DisplayFilter, ResizeFilter, PreviewFilter ) a possible error has to be caught, and that's global.


Also in the tutorials I saw that the video updated while you were holding the sliders, for me the video only updates when I release the slider. Is there some option for this?

Honestly! I am disappointed. is my english that bad? Is it really that difficult?

Last time:
There is a readme for the 'Preview Filter'!
I repeat this for the third time in words and there is a video about it.

Check out the video 'Preview Filter' again. It's best to watch it several times. :)
How many times have I mentioned the word 'Preview Filter' and /**avsp_filter.

The 'Preview Filter' enables an almost real-time display of the filters used in it. So you see a change in the slider almost in real time. And that is only possible with the preview filters.

I think the whole thing was over a year ago when I programmed it and I was proud of it. And I think there's a good reason too. This enables a different way of working with Avisynth. Colors, sharpness and other quick filters can be changed with instant view. Even if heavy filters are outside of the Preview Filter section.

Dogway
2nd February 2022, 22:49
Thanks for the reply, so actually "Preview Filters" has a point now. Yes marketing != developing, two different stories. I'm cleaning all my 90 tabs so I can start new things and make full use of AvsPmod. Thanks for the help.

gispos
3rd February 2022, 00:11
Sorry if I wrote too briskly, but it can drive you crazy if you explain it over and over again and also make a video about it and it is still not noticed.

gispos
4th February 2022, 21:09
Finally I tested the Display filter but now whenever I get a script error, the error message gets overridden by a Display filter error.

Display filter error message fixed. If there is an avisynth error message, it is now also displayed.

x64 only. Simply replace the library.zip in the AvsPmod\lib directory with the one in the archive.
https://www.mediafire.com/file/613mfvj1wt6ciiz/AvsPmod_library_2.7.0.7_x64_df_error_fix.7z/file

Dogway
4th February 2022, 21:34
Interesting, it always displays "Display or Resize filter error: clip must be planar" but if I copy the error from the Edit menu it shows the correct error log.

gispos
5th February 2022, 09:52
Interesting, it always displays "Display or Resize filter error: clip must be planar" but if I copy the error from the Edit menu it shows the correct error log.
Give me the filter text I can test it.
I tested it with sharpen(4.0) and got the correct error message

What is the difference between the copied error message? Please post the differences.

https://i.postimg.cc/sXv4WFkh/error.jpg (https://postimages.org/)

gispos
5th February 2022, 13:38
Interesting, it always displays "Display or Resize filter error: clip must be planar" but if I copy the error from the Edit menu it shows the correct error log.
I took a closer look at it again.
What you copy is still on the Windows clipboard (it's old).
If you have an error before setting the display filter and you copy this error to the clipboard, it remains on the clipboard until it is overwritten by another program or a new error.

In the case of a display or resize filter error, nothing that can be copied is cached (nothing is copied to the clipboard).
It is only displayed visually in the video window.

gispos
5th February 2022, 14:10
I have added another error source (clip),
and I changed the behavior for "Copy error to clipboard". Now a message is displayed when copying to clipboard is not possible.

elif not error_message:
wx.MessageBox(_('There is no error that can be copied to the clipboard.'), 'Information')
elif wx.TheClipboard.IsOpened():
wx.MessageBox(_('Can not copy to the clipboard.'), 'Clipboard error')


https://www.mediafire.com/file/gjai3dqu4z2ywfz/AvsPmod_2.7.0.7_x64_library_df_fix2.7z/file

Dogway
5th February 2022, 17:52
Thanks it worked! Looks like "Display or Resize filter error:" is always shown, that deceived me because I thought it actually was a display or resizer filter error.

By the way I was thinking on where to dock the frameprops window and I thought on a left panel, just like slider panel on the right. Although they could also go into the slider panel at the very beginning or last after "Snapshots".

gispos
5th February 2022, 19:10
By the way I was thinking on where to dock the frameprops window and I thought on a left panel, just like slider panel on the right. Although they could also go into the slider panel at the very beginning or last after "Snapshots".
I had already thought of that at the very beginning. But there are some of things that speak against it.

1.) The slider window is already quite busy and has problems with too many components it has to arrange.
2.) Not everyone wants to automatically create the sliders and use the window. 'As was the case with me at the beginning'
3.) An option of window selection is out of the question, here is speed before ease of use.

Biggest reason:
The whole thing has to be fast and easy.

I don't know what bothers you about it?
For me, it is placed in the lower left corner and quickly shown or hidden by a shortcut (P).
The whole thing works great so I don't feel like changing anything.

Dogway
5th February 2022, 19:24
Not that I care as much as bother you but I thought why is it floating? Looked out of place.
As for the docking in with the sliders it's as annoying as reaching Snapshots, I have everything there folded and filtered so my slider panel is clean, if anyone cares here's my list (not finished):

Expr removegrain repair RequestLinear AssumeFPS ColorBars ColorBarsHD ex_lut ex_lutxy ex_lutxyz ex_lutxyza ConvertBits MSuper MAnalyse MRecalculate MDegrain1 MDegrain2 MDegrain3 MDegrain4 MDegrain5 MDegrain6 MDegrainN blankclip DGHDRtoSDR ShowRed ShowGreen ShowBlue ColorYUV RGBAdjust merge

I have a 42 inch monitor so having a related floating window means keeping my head and eyes busy, also the font of frameprops isn't sensible to the DPI settings so it's very small.

gispos
5th February 2022, 22:18
Dogway you exaggerate.
Snapshots are always useful when there are filters in the script. I think there will be no program in the good wide world that you will be happy with.;)

I will not change anything in the snapshots.

And to the property window:
Because for this the window class of AvsPmod must be changed (MDIParentFrame, MDIFrame). Which then could cause unforeseeable problems. Therefore NO.
Be glad that I include the window when minimizing and maximizing.... otherwise you would explode. :D

The window is always displayed at the position where it was closed, and also the size is kept.
And under Font and Colors you can set the background and the font.

Dogway
5th February 2022, 22:23
You misread me, I meant because Snapshots are at the bottom they present the same problem as if you put frameprops just below. Just an idea.
I will try editing font size, thanks for your continuous support!

gispos
6th February 2022, 13:43
You misread me, I meant because Snapshots are at the bottom they present the same problem as if you put frameprops just below. Just an idea.

And you think there is no difference?
Snapshots are 2 text components that make simple requests to the Slider window and are easy to integrate.
The slider window has a partition for the slider and other small components that is limited in width.
The slider window must be refreshed with every clip refresh, all components must be read and created or inserted again.

The slider window is not designed for this with its layout for several small components and the automatic arrangement of the components.
These are facts.

gispos
6th February 2022, 20:11
Prototype, it will still take some time before it is ready.
Deleted. Many problems.

Dogway
6th February 2022, 20:14
Thank you! optional is fine as it suits everyone. Can it be at bottom so it's not jumping depending on fprop entries.

gispos
10th February 2022, 17:13
https://i.postimg.cc/pLY9VfxS/Properties.jpg (https://postimages.org/)

For those who prefer to display the frame properties in the slider window, I have a test version.

Under Program Options Misc 2 there are settings for this. Default is a separate window.
In the context menu of the property text field you can set the height if it is in the slider window.

As usual, swap the library.zip in the AvsPmod\lib directory with the one in the archive.
https://www.mediafire.com/file/tx5s5ayiodwsx06/AvsPmod_x64_library_property_test.7z/file

gispos
13th February 2022, 09:26
AvsPmod 2.7.0.8 (https://github.com/gispos/AvsPmod/releases)

* Frame properties can now be displayed in the slider window. Program options > Misc 2 > 'Show frame properties*'
- the height can be changed in the context menu of the property text field.
- double click in the property text field to increase the height by 50%
- Note: If the property window is visible, the properties are read for each frame (Even with closed slider window).
- If you want to save some CPU time you should close the property window when the properties are not needed.
- During playback no properties are read.
* On Display or Resize filter error, avisynths error message is now shown is it available.
* Some minor fixes
* I mention the "preview filters" that have become an essential part of AvsPmod.
- Near real time display of filter changes. Help > 'Preview Filter example'
-
** Avisynth 3.71 final version has problems with prefetch and frame properties. **
AvsPmod also reads the frame properties when creating a clip, so avisynth hangs.
There are two ways to avoid this:
Video > Display > YUV -> RGB > 'Read from source or script' must be disabled.
or
Use Avisynth version 3.72 test 3, the problem was fixed here.
This version is available on Doom9: https://forum.doom9.org/showthread.php?t=181351

Raizo
13th February 2022, 11:52
amazing gispos, tnx for your hard work!

real.finder
18th February 2022, 02:32
hi gispos, any idea why avspmod act like this https://forum.doom9.org/showthread.php?p=1964181#post1964181 ?

btw, there are some changes made by vdcrim up to 2019 https://github.com/gispos/AvsPmod/compare/GPo...AvsPmod:master

gispos
18th February 2022, 18:00
hi gispos, any idea why avspmod act like this https://forum.doom9.org/showthread.php?p=1964181#post1964181 ?

We've had this topic before, Bernardd had the same problem.
https://forum.doom9.org/showthread.php?p=1944873#post1944873

AvsPmod makes 3 pings after a clip refresh, nothing can be done about that.
With the preview filter this can be reduced to 2 pings and you can easily turn writeFile on and off with a hotkey.
https://forum.doom9.org/showthread.php?p=1944961#post1944961

BlankClip(length=10, width=640, height=480, pixel_type="RGB32", fps=24.0, fps_denominator=1, audio_rate=44100, channels=1, sample_type="16bit", color=$000000)
u =1
colon = " "

/**avsp_filter
WriteFile("E:\Temp\try.txt", "current_frame", "colon", string(u))
**/
return last


I had written a macro that removed all triple and double frames and created a new file.
https://forum.doom9.org/showthread.php?p=1945169#post1945169

I had modified a macro from vdcrim so that a new file is created.
Bernardd was satisfied with it, just test it.

GPo mod, @2021 fast and dirty, last change: 17.06.2021
Generate a ConditionalReader file from WriteFile file read the input and:
delete two '0' pings and reduce three '0' pings to one

https://forum.doom9.org/showthread.php?p=1945256#post1945256

I still found this.

#-------------------------------------------------------------------------------
# Name: RemovePing.py
# Purpose: For WriteFile log files
# Reduces consecutive identical numbers (frames) to 1 or 0 if found == badNumber
# new file is written in the same dir with the prefix 'new_'
#
# Author: GPo
#
# Created: 15.06.2021, update 16.06.2021
# Copyright: (c) GPo 2021
# Licence: <free>
#-------------------------------------------------------------------------------
import os
# run macro in new thread

badNumber = '0'
onlyNumbers = False

filename = avsp.GetFilename(title='Open WriteFile log', filefilter=_('Text files') +
' (*.txt)|*.txt|' + _('All files') + ' (*.*)|*.*', default='')
if not filename:
return
if os.path.getsize(filename) > 1024 * 500:
avsp.MsgBox('File size to big')
return

fDir, fName = os.path.split(filename)

with open(filename, mode='rb') as f:
txt = f.read()
f.close()
lines = txt.split('\n')
newTxt = ''
L = len(lines)
x = 0

try:
while x < L:
nr = lines[x].split(' ')[0]
if nr.isdigit():
if nr != badNumber:
newTxt += lines[x] + '\n'
x += 1
while x < L and lines[x].startswith(nr):
x += 1
elif not onlyNumbers:
newTxt += lines[x] + '\n'
x += 1
else:
x += 1
except:
avsp.MsgBox('Unknown error')
return

saveName = os.path.join(fDir, 'new_' + fName)
try:
with open( saveName, 'wb') as f:
f.write(newTxt)
f.close()
except IOErroras as err:
raise


And the formatted macro

# -*- coding: utf-8 -*-
"""
Generate a ConditionalReader file from the video bookmarks

This macro takes the list of the current video bookmarks and generates a
new text file to be used with ConditionalReader. Each frame can represent a
single frame or the start or end of a range of frames. If the 'interpolation'
option is selected (only valid for int and float), 'Value' must consist in
two space-separated values.

If a bookmark have a title, it can be used as its value instead of the one
introduced in the prompt dialog. For ranges of frames, the value can be put
in the title of either the start or end frame. When using interpolation the
two values can be introduced both in the same bookmark or separately.

More info on ConditionalReader:
http://avisynth.nl/index.php/ConditionalReader


Written by vdcrim
Original macro idea by Bernardd

GPo mod, @2021 fast and dirty
Generate a ConditionalReader file from WriteFile file
read the input and:
delete two '0' pings and reduce three '0' pings to one

"""

# PREFERENCES

default_type = 'Bool'
default_default = ''
default_value = ''
default_bm_meaning = 'Single frames'
default_insert_path = True


# ------------------------------------------------------------------------------


# Run in thread
import sys
import os.path

filename = avsp.GetFilename(title='Open WriteFile log', filefilter=_('Text files') +
' (*.txt)|*.txt|' + _('All files') + ' (*.*)|*.*', default='')
if not filename:
return
if os.path.getsize(filename) > 1024 * 500:
avsp.MsgBox('File size to big')
return

fDir, fName = os.path.split(filename)
# set the default filename
default_filename = os.path.join(fDir, 'new_' + fName)

with open(filename, mode='rb') as f:
txt = f.read()
f.close()

lines = txt.strip().split('\n')
bmlist = []
c = 0
for line in lines:
line = line.strip()
if not line:
continue
if line.startswith('0'):
c += 1
if c > 2: # change here the threshold
nr = line.split(' ')
if len(nr) == 2:
bmlist.append((nr[0], nr[1]))
else:
bmlist.append((line, ''))
c = 0
else:
nr = line.split(' ')
if len(nr) == 2:
bmlist.append((nr[0], nr[1]))
else:
bmlist.append((line, ''))
c = 0

if not bmlist:
avsp.MsgBox(_('There is not Valus'), _('Error'))
return

# Prompt for options
if not default_filename:
default_filename = os.path.splitext(avsp.GetScriptFilename(propose='general'))[0]

txt_filter = (_('Text files') + ' (*.txt)|*.txt|' + _('All files') + '|*.*')
while True:
options = avsp.GetTextEntry(
title=_('ConditionalReader file from WriteFile file'),
message=[[_('Type'), _('Default'), _('Value')],
_('ConditionalReader file'),
_('Insert the ConditionalReader file path at the current '
'cursor position')
],
default=[[(_('Bool'), _('Int'), _('Float'), _('String'), default_type),
(_('True'), _('False'), default_default),
(_('True'), _('False'), default_value)],
(default_filename, txt_filter), default_insert_path
],
types=[['list_read_only', 'list_writable', 'list_writable'], 'file_save', 'check'], width=415)
if not options:
return
typ, default, value, filename, insert_path = options
if not filename:
avsp.MsgBox(_('An output path is needed'), _('Error'))
else: break

(default_typ, default_default, default_value,
default_filename, default_insert_path) = options

# Write the ConditionalReader file
value_default = value.strip()
text = ['Type {0}\n'.format(typ)]
if default: text.append(u'Default {0}\n'.format(default.strip()))

for frame, title in bmlist:
text.append(u'{0} {1}\n'.format(frame,
title.strip() if title else value_default))


text = [line.encode(sys.getfilesystemencoding()) for line in text]
with open(filename, 'w') as file:
file.writelines(text)
if insert_path:
avsp.InsertText(u'"{0}"'.format(filename), pos=None)




Both macros
https://www.mediafire.com/file/wbwjjawq8qjyh3y/ConditionalReader+file+from+WriteFile.7z/file

If you're happy with it (if it's any good) then I'll add the macros.
I didn't do that at the time because I thought it was just a problem for a specific user.

Wrong, I see that both macros are already included. So all the writing I did was superfluous. Think first, then steer.
One macro is called 'RemovePing.py' and the other 'ConditionalReader file from WriteFile.py'

real.finder
18th February 2022, 20:50
AvsPmod makes 3 pings after a clip refresh, nothing can be done about that.

maybe to fix it "Run analysis pass" can do something like release video memory in this case? if x264 can do it https://forum.doom9.org/showthread.php?p=1964189#post1964189 then I think AvsPmod also can

gispos
18th February 2022, 21:35
I have not made the effort for nothing to create a macro for it and to change another!

This is about initializing the clip, and AvsPmod needs 3 pings for that. Some variables must be assigned and that does not go in one go.

I feel again completely overread, the same topic as with the 'Preview Filters'. No one really reads what is written.

With preview filter AvsPmod needs as many pings as VDub, namely 2, so VDub is also faulty?
And I'm surprised that AvsPmod doesn't need an extra ping, namely for the matrix that is read at startup.

No way around, change 'WriteFile' file yourself or test a macro.

real.finder
18th February 2022, 23:34
With preview filter AvsPmod needs as many pings as VDub, namely 2, so VDub is also faulty?
And I'm surprised that AvsPmod doesn't need an extra ping, namely for the matrix that is read at startup.

yes, VDub is also faulty

change 'WriteFile' file yourself
CTelecine and CTelecine2 part of CTools.dll so I cant, it's up to Ceppo to do c++ changes

edit: I think I get what you mean, which is remove the first 3 lines manually, same as Ceppo said already

edit 2: RemovePing seems remove many false positive in CTelecine2.txt, I think "ConditionalReader file from WriteFile" cant be used since it for "WriteFile" also it will make it like VDub which is also faulty

gispos
19th February 2022, 13:12
@real.finder, post an example of WriteFile, maybe I can change something in 'RemovePing'

But first test 'badNumber'.
By default badNumber is set to '0', this means that all consecutive frame numbers 0 removed.
Set 'badNumber' to '-1' then successive equal frame numbers '0' are only reduced to 1.

If onlyNumbers=True then lines that do not start with a number (integer) will not be written to the new file.


#-------------------------------------------------------------------------------
# Name: RemovePing.py
# Purpose: For WriteFile log files
# Reduces consecutive identical numbers (frames) to 1 or 0 if found == badNumber

#-------------------------------------------------------------------------------
import os
# run macro in new thread

badNumber = '0' # change it to '-1'
onlyNumbers = False


In my opinion, the error is due to a non-existent option of the plugins. "After initializing, don't write the same frame multiple times"
It would be easy to integrate this option into the plugins!

Programs that display frames or need to initialize other variables when creating the clip must call get_frame multiple times at the beginning.
For example, if the matrix is read, get_frame must be called first. And with each call the plugin writes the frame number.

Programs have no other choice... the plugin does!

real.finder
19th February 2022, 19:22
post an example of WriteFile

you mean example of log? there are this https://forum.doom9.org/showthread.php?p=1964181#post1964181 already

Set 'badNumber' to '-1' then successive equal frame numbers '0' are only reduced to 1.

this make it worst :) you can test it with this long log https://forum.doom9.org/showthread.php?p=1963814#post1963814 and see

In my opinion, the error is due to a non-existent option of the plugins. "After initializing, don't write the same frame multiple times"
It would be easy to integrate this option into the plugins!

Programs that display frames or need to initialize other variables when creating the clip must call get_frame multiple times at the beginning.
For example, if the matrix is read, get_frame must be called first. And with each call the plugin writes the frame number.

Programs have no other choice... the plugin does!

Agreed, but what if the plugin writer is not a programmer (https://forum.doom9.org/showpost.php?p=1963693&postcount=1)?

also aside from fixing the plugin don't you think that it will be nice if at least only "Run analysis pass" in avspmod can do it? since that what "Run analysis pass" is made for, since there are script cases like Bernardd case

also isn't "Run analysis pass" kinda independent since this bug https://forum.doom9.org/showthread.php?p=1939250&highlight=analysis+pass#post1939250 fixed? so I assume adding another fix to it possible

gispos
20th February 2022, 10:52
also isn't "Run analysis pass" kinda independent since this bug https://forum.doom9.org/showthread.php?p=1939250&highlight=analysis+pass#post1939250 fixed? so I assume adding another fix to it possible

https://forum.doom9.org/showthread.php?p=1964311#post1964311

real.finder
20th February 2022, 20:27
ConvertToRGB should not be needed in "Run analysis pass", so that why x264 method has no problem also it kinda faster

gispos
21st February 2022, 16:52
ConvertToRGB should not be needed in "Run analysis pass", so that why x264 method has no problem also it kinda faster
What makes you think that? Of course nothing is converted.

x264 method? You open the exact same script with x264 and use the exact same WriteFile function?
if not, you are comparing apples and oranges.

real.finder
21st February 2022, 17:33
x264 method? You open the exact same script with x264 and use the exact same WriteFile function?
if not, you are comparing apples and oranges.

yes it's exact same script, also I did try avsr (https://forum.doom9.org/showthread.php?t=173259) and it's fine too

https://xfl.jp/xyDTpH

gispos
21st February 2022, 21:08
yes it's exact same script, also I did try avsr (https://forum.doom9.org/showthread.php?t=173259) and it's fine too

https://xfl.jp/xyDTpH
You didn't understand the problem.
AvsPmod only calls a frame once, but avisynth calls frame 0 internally for various function calls (without which AvsPmod does not work). I can't prevent that!

AvsPmod needs other things than just a clip and frame.
Then please use these other tools for such things.

gispos
21st February 2022, 22:31
Test with 20002 frames.
I don't see much difference in the time required. x264 is slower, is understandable, must also encode (Then test that with a real video!).

But you write faster... just short of the truth. ;)

avsr = 11.848, fps 1688
AvsPmod = display is rounded to 12 (11,88), fps 1683
x264 = rounded to 14 (14.14), fps 1414

https://i.postimg.cc/yDkGdR7v/Avs-Pmod-time.jpg (https://postimg.cc/yDkGdR7v)

https://i.postimg.cc/BjkV1v6s/avsr-time.jpg (https://postimg.cc/BjkV1v6s)

https://i.postimg.cc/d7CSRKkC/x264-time.jpg (https://postimg.cc/d7CSRKkC)

real.finder
21st February 2022, 22:59
in this case yes it slower but when I did test it before (https://forum.doom9.org/showpost.php?p=1964192&postcount=21) I felt it was faster, maybe because the script was not simple as this one, I didn't compare accurately anyway

gispos
21st February 2022, 23:51
Do it right or not at all! Just for fun another run with AvsPmod
11,849, fps 1688

and with avsr
11.875, fps 1684

If I now subtract the 3 extra frames AvsPmod has to write...:)

I have pointed out the mistake that Avisynth makes, I will do nothing more.

real.finder
22nd February 2022, 00:51
Do it right or not at all! Just for fun another run with AvsPmod
11,849, fps 1688

and with avsr
11.875, fps 1684

If I now subtract the 3 extra frames AvsPmod has to write...:)

I have pointed out the mistake that Avisynth makes, I will do nothing more.

this small different is normal I think, that mean both are the same speed

anyway, my point is to make "Run analysis pass" act as avsr since that what "Run analysis pass" should do, I don't know how avspmod work but I think "Run analysis pass" can use maybe "release video memory" before start if it not do that already, also you said "AvsPmod needs other things than just a clip and frame." but why "Run analysis pass" need more than "a clip and frame"?

StvG
22nd February 2022, 07:30
@real.finder, you can try rt_xx functions - https://github.com/AviSynth/AviSynthPlus/issues/210#issuecomment-797979637

real.finder
22nd February 2022, 12:37
@real.finder, you can try rt_xx functions - https://github.com/AviSynth/AviSynthPlus/issues/210#issuecomment-797979637

I did test with ctools.dll so that has no relation

gispos
22nd February 2022, 19:54
I did test with ctools.dll so that has no relation
What do you have against avsr? Was written specifically for this is small and just as fast.

I had written it before:
Run analysis pass uses the same clip, no new clip is created. And that is good! I use this function from time to time and do not want a new clip to be created.
1.) this takes time if you use real videos and also filters to it.
2.) My clips need several GB in memory. Well, my memory is usually fully utilized.

I will not change the current 'Run analysis pass'...

But, I admit defeat.
Am just testing, will first be a macro. First tests are good.
Later possibly a separate 'Run analysis pass' as memü entry.
:)

real.finder
22nd February 2022, 20:07
What do you have against avsr?
Nothing. I just want avspmod to do all things. So maybe adding "Run analysis pass with avsr" option to use it (from the tools folder) or something in this case

gispos
23rd February 2022, 20:01
'Run analysis pass' modified:
The current script is released, then a completely new avisynth environment is created and frame reading is started.
After reading or in case of abort everything is released.
Since a new clip class was created for this purpose, no 'extra avisynth frames' are triggered.

The old 'Run analysis pass' has also been changed and is now called 'Run FPS analysis'
From the dialog there is no difference but from the behavior. The current clip is used and nothing is released.
And 'extra avisynth frames' are triggered.

There is also a macro:
#################################################################################
## GPo 2022, AvsPmod macro 'Run analysis pass.py'
## Like menu 'Run analysis pass' but in a separate thread.
## Therefore you can continue working with AvsPmod on another tab (script).
## But it is a bit slower than 'Run analysis pass' from the AvsPmod tools menu.
#################################################################################

@real.finder please test this, best both (macro and from the menu)
https://www.mediafire.com/file/r9qp43l6ys1ihom/AvsPmod_x64_anaysis_pass_test_library.7z/file

As before, swap library.zip with the one in the archive and copy the macro 'Run analysis pass.py' to the macros folder.

real.finder
23rd February 2022, 20:37
thanks, both seems work fine

and what about adding these https://github.com/gispos/AvsPmod/compare/GPo...AvsPmod:master ?

gispos
23rd February 2022, 22:03
thanks, both seems work fine

and what about adding these https://github.com/gispos/AvsPmod/compare/GPo...AvsPmod:master ?

# code update by vdcrim 2019 ( Yes, thats better;) )
avs.library = avs.avs_load_library_w()
if avs.library == ffi.NULL:
raise OSError(*ffi.getwinerror())


#~if not self.avisynth_p:
# vdcrim 2019 update
# Parse avsi files for user script functions
# This info is already provided by AviSynth+
if not self.avisynth_p and self.options['pluginsdir']:

I have taken over two things, see above.
The rest has already been changed by me or is no longer current because the code has changed.

Belated thanks to vdcrim! If you discover errors:o or see improvements in the code... let me know.

gispos
25th February 2022, 18:28
AvsPmod 2.7.0.9 (https://github.com/gispos/AvsPmod/releases)

* 'Run analysis pass' changed, no 'extra avisynth frames' are triggered.
* Added 'Run FPS analysis', similar to 'Run analysis pass' but no extra clip is created and nothing is released.
* Fixed resize filter on copy tab
* Fixed ? CLI Encoder, win OS cannot find encode.bat (x264 doesn't start)
- if you only update the AvsPmod files you have to delete the file 'encoder_gui.pyo' under AvsPmod\tools
- and replace 'encoder_gui.py' with the new one.
* New macro 'Run analysis pass', explanations are in the macro.


Fixed ? CLI encoder. @real.finder you had I think that also once reported (x264), with me it works now.

real.finder
25th February 2022, 18:35
AvsPmod 2.7.0.9 (https://github.com/gispos/AvsPmod/releases)

* 'Run analysis pass' changed, no 'extra avisynth frames' are triggered.
* Added 'Run FPS analysis', similar to 'Run analysis pass' but no extra clip is created and nothing is released.
* Fixed resize filter on copy tab
* Fixed ? CLI Encoder, win OS cannot find encode.bat (x264 doesn't start)
- if you only update the AvsPmod files you have to delete the file 'encoder_gui.pyo' under AvsPmod\tools
- and replace 'encoder_gui.py' with the new one.
* New macro 'Run analysis pass', explanations are in the macro.


Fixed ? CLI encoder. @real.finder you had I think that also once reported (x264), with me it works now.

thanks for the update, you mean https://forum.doom9.org/showthread.php?p=1955319&highlight=x264#post1955319 ?

edit: yes it work now with that name, thanks again

Dogway
26th February 2022, 20:18
gispos, is there a way for AvsPmod to automatically set display TV or PC range based on frameprops? I checked "Read from source or script" but doesn't change that automatically.
There's the misc2 tab, but there's no automatic option, just "auto tv" (my setting) or "auto pc".

By the way, my tests with the DWM reset issue by disabling it in the exe Compatibility settings didn't work at all. What did it was to disable Calltips, in case you want to have a look at that.

gispos
27th February 2022, 10:15
gispos, is there a way for AvsPmod to automatically set display TV or PC range based on frameprops? I checked "Read from source or script" but doesn't change that automatically.
There's the misc2 tab, but there's no automatic option, just "auto tv" (my setting) or "auto pc".

By the way, my tests with the DWM reset issue by disabling it in the exe Compatibility settings didn't work at all. What did it was to disable Calltips, in case you want to have a look at that.
Under Options Misc 2 only the matrix is set that gets a new script as default.

As soon as a matrix is found, 'TV' is used for the found matrix.
As I read, matrix 709 and 601 refer to a limited range.

'Calltips'... this is a window that is included in the component of the editor, there is no access to the basic code. I can have a look if I notice something in the AvsPmod own code.

At the moment I will not change anything in AvsPmod, the development environment needs a vacation.
---------

There is still an update, who needs it.

* Fixed: on start up, matrix menus doesn't display the correct defaults if only one tab loaded.

https://www.mediafire.com/file/sfgivbyu6qdo5mf/AvsPmod_2.7.0.9_x64_library_matrix_startup_fix.7z/file

Ceppo
3rd March 2022, 10:36
I get this error when I try to access the encoder by cli

File "C:\Users\Ceppo\Documents\avisynth\AvsPmod\tools\encoder_gui.py", line 315, in SetDefaultValues
self.SetValidControls()
File "C:\Users\Ceppo\Documents\avisynth\AvsPmod\tools\encoder_gui.py", line 469, in SetValidControls
raw_commandline = self.presets[self.ctrlDict['preset'].GetStringSelection()]
KeyError: u''

I tried, replacing the tools folder but it didn't work.
How do I use a new downloaded one without losing my user settings, like font etc?

gispos
4th March 2022, 18:59
I get this error when I try to access the encoder by cli

File "C:\Users\Ceppo\Documents\avisynth\AvsPmod\tools\encoder_gui.py", line 315, in SetDefaultValues
self.SetValidControls()
File "C:\Users\Ceppo\Documents\avisynth\AvsPmod\tools\encoder_gui.py", line 469, in SetValidControls
raw_commandline = self.presets[self.ctrlDict['preset'].GetStringSelection()]
KeyError: u''

I tried, replacing the tools folder but it didn't work.
Just tested it with a fresh AvsPmod and could not find any problems with x264 as well as ffmpeg.
What preset are you using?
https://i.postimg.cc/9QQvxSMP/encode.jpg (https://postimages.org/)


How do I use a new downloaded one without losing my user settings, like font etc?
That's how I do it:
1.) Open the archive, open the AvsPmod folder in the archive
2.) Open with Windows Explorer the AvsPmod folder on the hard disk
3.) In the AvsPmod folder on the hard disk, delete the folders (lib, src, translations)
4.) Mark all files in the archive and the folders (lib, src, translations)
5.) Drag the selection to the AvsPmod folder on the hard disk and confirm 'Replace all'.
6.) Done
Sometimes other actions are necessary, but I always write that in the changelog. As well as with the encoder_gui

The other option:
Unpack everything into a new directory and copy options.dat from the old to the new directory.
If you need the old sessions everything ending with .ses must also be copied into the new directory. This also includes the folder 'SessionBackups'.

The options.dat is the most important file for your settings. I make a copy of it from time to time.

There are still:
filterdb.dat, where data for the sliders are stored. If you have made manual changes to it, of course you should not overwrite them.
This only applies if you have changed the file yourself with an editor. If you have only entered new functions and sliders in AvsPmod, these will be saved in options.dat.

pfilter.dat, in which the Preview Filters are stored. Video > Preview filter > 'Save Preview filters'.

Ceppo
4th March 2022, 21:53
Just tested it with a fresh AvsPmod and could not find any problems with x264 as well as ffmpeg.
What preset are you using?
The problem was that the window in your picture didn't show at all (because of the error).


That's how I do it:
1.) Open the archive, open the AvsPmod folder in the archive
2.) Open with Windows Explorer the AvsPmod folder on the hard disk
3.) In the AvsPmod folder on the hard disk, delete the folders (lib, src, translations)
4.) Mark all files in the archive and the folders (lib, src, translations)
5.) Drag the selection to the AvsPmod folder on the hard disk and confirm 'Replace all'.
6.) Done
Sometimes other actions are necessary, but I always write that in the changelog. As well as with the encoder_gui

The other option:
Unpack everything into a new directory and copy options.dat from the old to the new directory.
If you need the old sessions everything ending with .ses must also be copied into the new directory. This also includes the folder 'SessionBackups'.

The options.dat is the most important file for your settings. I make a copy of it from time to time.

There are still:
filterdb.dat, where data for the sliders are stored. If you have made manual changes to it, of course you should not overwrite them.
This only applies if you have changed the file yourself with an editor. If you have only entered new functions and sliders in AvsPmod, these will be saved in options.dat.

pfilter.dat, in which the Preview Filters are stored. Video > Preview filter > 'Save Preview filters'.

That fixed it. Thanks a lot for your time.

Dogway
9th March 2022, 18:05
gispos I have some wishlists for better working with sliders, maybe I'm missing something so correct me if I'm wrong:

- Since sliders don't allow keyboard inputs, sometimes I set a value in the text editor and F5. But this disables the current preview filter.
- Would be great to allow mouse wheel for sliders to have more granular control.
- Would it be possible to decouple "Refresh Preview Automatically" to sliders autoupdate? When I'm not using sliders typically I don't want video to update unless I F5.
- I fixed the stepping of 4 by using multiple of 4 bounds on the function definition. But fractional steppings don't seem to work properly, for example 0.05 works as if I set 0.01.

gispos
9th March 2022, 22:33
- Since sliders don't allow keyboard inputs, sometimes I set a value in the text editor and F5. But this disables the current preview filter.
- Would be great to allow mouse wheel for sliders to have more granular control.
On the slider button press left mouse button, then use mouse wheel. This works for Win10, Win7?
Furthermore, by pressing CTRL the immediate update can be turned off and the slider can be quickly set to another position.
And on the top right 'Disable refresh' is also an option. Keyboard input is therefore almost superfluous.


- Would it be possible to decouple "Refresh Preview Automatically" to sliders autoupdate? When I'm not using sliders typically I don't want video to update unless I F5.
I don't understand now what you mean exactly, but there are settings under the options for this:
Do not create sliders (User Sliders), No automatic refresh, only with F5 (Video)

Dogway
10th March 2022, 10:18
The wheel doesn't work at least for Win7, I don't know if it depends on a setting in options as I disabled all wheel options there.
Keyboard input is superfluous? if I need to change something, like commenting a line I need to update with F5 and then the current preview filter disappears.
Besides sliders still don't support arrays, or strings with non-alphanumeric characters.

Those update options are mutually exclusive with sliders.

gispos
10th March 2022, 17:51
The wheel doesn't work at least for Win7, I don't know if it depends on a setting in options as I disabled all wheel options there.
Keyboard input is superfluous? if I need to change something, like commenting a line I need to update with F5 and then the current preview filter disappears.
Besides sliders still don't support arrays, or strings with non-alphanumeric characters.

Those update options are mutually exclusive with sliders.
'Keyboard input is superfluous?' Of course, the sliders were meant.

I have been working on AvsPmod for over 3 years, and there is still a lot of code that I have never seen, and just as much code that I currently know as much as you do.
I didn't write AvsPmod, I'm just fiddling around in it a bit.

Whether arrays with sliders ever work?... no idea I don't know the code for it, haven't searched for it yet.
Many things are interwoven, a small change in a function sometimes has an impact in places you have not even thought of.

Be happy about the things that are available.

Ceppo
10th March 2022, 18:03
I was wondering, is possible to choose a resize for the preview? I don't like point resize. (I mean when I set the zoom to 50% or 200%)

Dogway
10th March 2022, 18:10
'Keyboard input is superfluous?' Of course, the sliders were meant.

I have been working on AvsPmod for over 3 years, and there is still a lot of code that I have never seen, and just as much code that I currently know as much as you do.
I didn't write AvsPmod, I'm just fiddling around in it a bit.

Whether arrays with sliders ever work?... no idea I don't know the code for it, haven't searched for it yet.
Many things are interwoven, a small change in a function sometimes has an impact in places you have not even thought of.

Be happy about the things that are available.

You sound super annoyed every time I try to give you some feedback, I will note it down.

gispos
10th March 2022, 18:11
I was wondering, is possible to choose a resize for the preview? I don't like point resize. (I mean when I set the zoom to 50% or 200%)
There is 'Antialiasing' in the zoom menu, but it is deactivated in playback (too slow).
Under options 'Misc 2' there is another option for a resize filter 'Show resample zoom menu'. Read under Help 'Resample filter readme'.

gispos
10th March 2022, 18:42
You sound super annoyed every time I try to give you some feedback, I will note it down.
Then I have expressed myself incorrectly.
For example, the preview filter, I had written that it must be deactivated when the clip changes. In your next posting it does not sound like feedback but like an accusation.
I just wanted you to understand that most of the things you want are difficult or I don't know if it's feasible because I don't know the code.

I had already written that I will not make any big changes at the moment.
Sorry if I had worded it wrong.

Ceppo
10th March 2022, 19:19
There is 'Antialiasing' in the zoom menu, but it is deactivated in playback (too slow).
Under options 'Misc 2' there is another option for a resize filter 'Show resample zoom menu'. Read under Help 'Resample filter readme'.
I can't find the "Misc 2" under options. So, if I want always spline36resize I can't set the "Show resample zoom menu". I'm sure I'm doing it wrong, but where!?
https://i.ibb.co/ZhXDzLc/pic.jpg
I read the help file 9001 times and I can't figure out the double click thing to enable it. :(

EDIT:
I FOUND IT UNDER PROGRAM SETTINGS! I'M A FOOL.

gispos
11th March 2022, 19:01
EDIT:
I FOUND IT UNDER PROGRAM SETTINGS! I'M A FOOL.
Was also my mistake, thought if I specify Misc 2 it will be understandable. 'Program Settings' is soo long :)

Bernardd
13th March 2022, 11:35
Hi Gispos.
Thousand thanks for you AvsPmod contribution.
For a Avisynth untechnician user, like me, AvsPmod is fabulous.
Thanks.

Emulgator
13th March 2022, 12:10
gispos, I want to join in saying "thank you" for your continued effort to improve AvsPmod on so many ends.
It offers so much now that I am happily using it on daily basis hardly using all there is under the hood.

Thank you as many times as i have used AvsPmod, thousands of times since 2.5.1 when vdcrim left off.
...and may the nagging ones come to bow deeper.

gispos
2nd April 2022, 19:21
AvsPmod 2.7.1.0 (https://github.com/gispos/AvsPmod/releases)

* Update filterdb.dat, the new filterdb.dat is only usable from AvsPmod 2.7.10 (some things added)
- update some internal avisynth filters to avs+ versions (you must override the old filterdb.dat with the new one).
- also added as hints filters with different parameters e.g. AssumeFPS and comment hints e.g. Overlay.
- calltip displays pixel types now in short format e.g. ColorBars.
* Now the resize filter can also be used with the mouse wheel by pressing Shift and the left mouse button.
- so: without shift normal zoom, with shift resample zoom ( when activated under Program Settings -> Misc 2)
- this also applies to the 2x zoom function (press left mouse button and click right).
* Fixed: on start up, matrix menus doesn't display the correct defaults if only one tab loaded.
* Fixed: flicker on first displaying the video windwow or different video dimensions.


Update filterdb.dat, the new filterdb.dat is only usable from AvsPmod 2.7.1.0 (some things added)

Update internal avisynth filters to avs+ versions.
Also added as hints filters with different parameters e.g AssumeFPS and comment hints e.g Overlay
Calltip pixel types is now shown in short format e.g. ColorBars.
Updated filters:

Overlay, Levels, Tweak, RGBAdjust, Limiter, Layer, ShowAlpha, ShowRed, ShowGreen, ShowBlue, AssumeFPS, ChangeFPS, ConvertFPS,
Histogram, Greyscale, Grayscale, ColorYUV, ColorBars, ColorBarsHD, BlankClip, Blackness, AviSource, AviFileSource, OpenDMLSource,
WAVSource, DirectShowSource, SegmentedDirectShowSource, SegmentedAVISource, Loop, ImageReader, ImageSource, ImageSourceAnim, MergeRGB

Added:
MCDegrainSharp, SharpenComplex2, UnsharpMask_avsi

Added Dogway filters:
WhitePoint, GamutWarning, HSVxHSV, BoxMask, LumaMask, ex_vibrance, ex_blend, ex_contrast, ex_levels

I cannot add filters from SharpenersPack, several filters have the same names as the original versions but have different parameters.
I will not overwrite any original version in the filterdb.dat.

Special see code below:
ex_Highlighter, ex_HighlighterMod, ex_HighlightLimiter, ex_HighlightLimiterMod


Highlighter, HighlightLimiter (ex, mod) versions

# Functions to lighten dark areas (Highlighter) or darken areas that are too bright (HighlightLimiter)
# Use a preview filter for the settings. Better alternatives are welcome.

### normal Versions

function HighlightLimiter(clip v, float "gblur", bool "gradient", int "threshold", bool "twopass", int "amount", int "method")
{
gradient = default (gradient,true) #True uses the gaussian blur to such an extent so as to create an effect similar to a gradient mask being applied to every area that exceeds our threshold.
gblur = (gradient==true) ? default (gblur,100) : default (gblur,5.0) #The strength of the gaussian blur to apply.
threshold = default (threshold, 160) #The lower the value, the more sensitive the filter will be.
twopass = default (twopass, false) #Two passes means the area in question gets darkened twice.
amount = default (amount, 20) #The amount of brightness to be reduced, only applied to method=2
method = default (method, 0) #0,1 Method 0 is multiply, the classic HDR-way. Any other method set triggers a brightness/gamma approach.

amount = (amount>0) ? -amount : amount

darken=v.Tweak(sat=0).mt_lut("x "+string(threshold)+" < 0 x ?")
blurred= (gradient==true) ? darken.gaussianblur(gblur).gaussianblur(gblur+100).gaussianblur(gblur+200) : darken.gaussianblur(gblur)
multiply = (method==0) ? mt_lut(v,"x x * 255 /") : v.Tweak(bright=amount)
multiply = (method==0) ? eval("""
(twopass==true) ? mt_lutxy(multiply,v,"x y * 255 /") : multiply""") : eval("""
(twopass==true) ? multiply.SmoothLevels(gamma=0.9, Lmode=2) : multiply""")

return mt_merge(v,multiply,blurred)
}

function HighlightLimiterMod(clip clp, Int "threshold", Int "dark", Int "rad", int "mode", float "gamma1_2"){
threshold=default(threshold, 160)
dark=default(dark, 255)
rad=default(rad, 64)
mode=default(mode, 0) # 0,1,2
gamma1_2=default(gamma1_2, 0.6) # for mode 1,2

darken=clp.Tweak(sat=0).mt_lut("x "+string(threshold)+" < 0 x ?")
blurred=darken.bicubicresize(round(clp.width()/rad/4)*4, round(clp.height()/rad/4)*4).bicubicresize(clp.width(),clp.height(),1,0)
multiply = (mode==0) ? mt_lut(clp,"x x * " + string(dark) + " /") : (mode==1) ? SmoothLevels(clp, gamma=gamma1_2) : mt_lut(clp,"x x * " + string(dark) + " /").SmoothLevels(gamma=gamma1_2)
mt_merge(clp,multiply,blurred)
}

function Highlighter(clip v, float "gblur", bool "gradient", int "threshold", bool "twopass", int "amount", int "method")
{
gradient = default (gradient,true)
gblur = (gradient==true) ? default (gblur,100) : default (gblur,5.0)
threshold = default (threshold,100) #The lower the value, the more sensitive the filter will be.
twopass = default (twopass,false)
amount = default (amount,10)
method = default (method, 1) #0,1,2

amount = (amount<0) ? abs(amount) : amount

lighten=v.Tweak(sat=0).mt_lut("x "+string(threshold)+" > 0 x ?")
blurred= (gradient==true) ? lighten.gaussianblur(gblur).gaussianblur(gblur+100).gaussianblur(gblur+200) : lighten.gaussianblur(gblur)
photoshop_overlay = (method==1) ? mt_lutxy(v,blurred.invert(),"x 127.5 > y 255 x - 127.5 / * x 255 x - - + y x 127.5 / * ? ") : \
(method==2) ? mt_lutxy(v,blurred.invert(),"255 255 x - 255 y - * 255 / -") : v.Tweak(bright=amount)
photoshop_overlay = (twopass==true) ? photoshop_overlay.SmoothLevels(gamma=2.0, Lmode=2) : photoshop_overlay
return mt_merge(v,photoshop_overlay,blurred)
}

function HighlighterMod(clip v, int "rad", int "threshold", bool "twopass", int "amount", int "method"){
rad = default(rad, 48)
threshold = default (threshold,100) #The lower the value, the more sensitive the filter will be.
twopass = default (twopass,false)
amount = default (amount,20)
method = default (method, 1) #0,1,2

m = min(v.Width(),v.Height())
rad = round(m/rad/4) < 1 ? max(round(m/4.0),16): min(rad, m/2)

amount = (amount<0) ? abs(amount) : amount

lighten=v.Tweak(sat=0).mt_lut("x "+string(threshold)+" > 0 x ?")
blurred= lighten.bicubicresize(round(v.width()/rad/4)*4, round(v.height()/rad/4)*4).bicubicresize(v.width(),v.height(),1,0)
photoshop_overlay = (method==1) ? mt_lutxy(v,blurred.invert(),"x 127.5 > y 255 x - 127.5 / * x 255 x - - + y x 127.5 / * ? ") : \
(method==2) ? mt_lutxy(v,blurred.invert(),"255 255 x - 255 y - * 255 / -") : v.Tweak(bright=amount)
photoshop_overlay = (twopass==true) ? photoshop_overlay.SmoothLevels(gamma=2.0, Lmode=2) : photoshop_overlay
return mt_merge(v,photoshop_overlay,blurred)
}

##################
## ex Versions ##
##################

function ex_Highlighter(clip v, float "gblur", bool "gradient", int "threshold", bool "twopass", int "amount", int "method", bool "tv_range") {

bi = BitsPerComponent(v)
fs = default(tv_range, True)

grad = Default (gradient,true)
gblur = Default (gblur, grad ? 100 : 5)
thres = Default (threshold,100) #The lower the value, the more sensitive the filter will be.
twopass = Default (twopass,false)
amount = Default (amount,10)
method = Default (method, 1) # 0, 1 or 2

amount = ex_bs(abs(amount), 8, bi, true)
thres = ex_bs(thres, 8, bi, true)

lighten = v.ex_lut(Format("x {thres} > 0 x ?"), UV=128)
blurred = grad ? lighten.ex_gaussianblur(0.073*gblur+17.78,UV=1) : \
lighten.ex_gaussianblur(0.064*gblur+ 3.75,UV=1)

photoshop_overlay = (method==1) ? ex_lutxy(v,blurred,"x range_half > range_max y - Y@ range_max x - X@ range_half / * range_max + Y x range_half / * ? ", fulls=!fs) : \
(method==2) ? ex_lutxy(v,blurred,"range_max range_max x - y * range_max / -",fulls=!fs) : v.ex_lut(Format("x {amount} + ")+(fs?"ymax min":""), fulls=!fs)

photoshop_overlay = twopass ? photoshop_overlay.ex_contrast(-0.8,1,167,tv_range=fs) : photoshop_overlay
return mt_merge(v,photoshop_overlay,blurred)
}

function ex_HighlighterMod(clip v, int "rad", int "threshold", bool "twopass", int "amount", int "method", bool "tv_range") {

bi = BitsPerComponent(v)
fs = default(tv_range, True)
rad = default(rad, 48)

thres = Default (threshold,100) #The lower the value, the more sensitive the filter will be.
twopass = Default (twopass,false)
amount = Default (amount,10)
method = Default (method, 1) # 0, 1 or 2

amount = ex_bs(abs(amount), 8, bi, true)
thres = ex_bs(thres, 8, bi, true)

lighten = v.ex_lut(Format("x {thres} > 0 x ?"), UV=128)
blurred = lighten.bicubicresize(round(v.width()/rad/4)*4, round(v.height()/rad/4)*4).bicubicresize(v.width(),v.height(),1,0)

photoshop_overlay = (method==1) ? ex_lutxy(v,blurred,"x range_half > range_max y - Y@ range_max x - X@ range_half / * range_max + Y x range_half / * ? ", fulls=!fs) : \
(method==2) ? ex_lutxy(v,blurred,"range_max range_max x - y * range_max / -",fulls=!fs) : v.ex_lut(Format("x {amount} + ")+(fs?"ymax min":""), fulls=!fs)

photoshop_overlay = twopass ? photoshop_overlay.ex_contrast(-0.8,1,167,tv_range=fs) : photoshop_overlay
return mt_merge(v,photoshop_overlay,blurred)
}

function ex_HighlightLimiter(clip v, float "gblur", bool "gradient", int "threshold", bool "twopass", int "amount", int "method") {

bi = BitsPerComponent(v)
fs = propNumElements (v,"_ColorRange") > 0 ? \
propGetInt (v,"_ColorRange") == 0 : false

grad = Default (gradient,true)
gblur = Default (gblur, grad ? 100 : 5)
thres = Default (threshold,160) #The lower the value, the more sensitive the filter will be.
twopass = Default (twopass,false)
amount = Default (amount,20)
method = Default (method, 0) # 0 or 1

amount = ex_bs(abs(amount), 8, bi, true)

darken = v.ex_binarize(thres,hi=-1)
blurred = grad ? darken.ex_gaussianblur(0.073*gblur+17.78,UV=1) : \
darken.ex_gaussianblur(0.064*gblur+ 3.75,UV=1)

multiply = (method==0) ? v.ex_lut("x dup * range_max /", fulls=fs) : v.ex_lut(Format("x {amount} + ")+(!fs?"ymax min":""), fulls=fs)
multiply = !twopass ? multiply : \
(method==0) ? multiply.ex_lutxy(v,"x y * range_max /", fulls=fs) : \
multiply.ex_contrast(0.15, 1, 163, tv_range=!fs)
return mt_merge(v,multiply,blurred)
}

function ex_HighlightLimiterMod(clip v, int "threshold", int "dark", float "rad",int "mode", float "gamma1_2") {

w = Width (v)
h = Height(v)
bi = BitsPerComponent(v)
fs = propNumElements (v,"_ColorRange") > 0 ? \
propGetInt (v,"_ColorRange") == 0 : false

thres = Default (threshold,160)
dark = Default (dark, 255)
rad = Default (rad, 64)
mode = Default (mode, 0) # 0,1,2
gamma1_2= Default (gamma1_2, 0.6) # for mode 1,2

m = min(w,h)
dark = ex_bs(dark, 8, bi, true)
rad = round(m/rad/4) < 1 ? max(round(m/4.0),16) : rad

darken = v.ex_binarize(thres,hi=-1)
blurred = darken.ex_GaussianBlur(rad*0.83825-0.0631,pad=true,UV=1)

multiply = (mode==0) ? v.ex_lut(Format("x dup * {dark} /"), fulls=fs) : \
(mode==1) ? v.ex_levels(gamma=gamma1_2,tv_range=!fs) : \
v.ex_lut(Format("x dup * {dark} /"), fulls=fs).ex_levels(gamma=gamma1_2,tv_range=!fs)

return mt_merge(v,multiply,blurred)
}


Please report errors or same filters with different parameters I have over seen. Thanks.

OrangeColaJuice
27th April 2022, 12:07
Can you get the Resize Calculator to show the million pixels next to the resolution? (eg. 1280x720 0.74) It's a really really helpful number when you are restrained to specific file-sizes and duration on some forums/image boards.
Thank you.

Dogway
27th April 2022, 12:32
Oh didn't notice, thanks for adding some of my filters, I had pending adding them all/most to the filterdb.dat, but I delayed until refined. I've been updating them with "[]" to accept optional args so any call triggers the sliders.

gispos
28th April 2022, 18:39
AvsPmod 2.7.1.1 (https://github.com/gispos/AvsPmod/releases)

* When normal zoom and resample zoom are used together, the status bar shows it separately e.g. (1.25 x r0.8x)
* If there were tabs in a group, XY and Zoom were saved for the group,
- this was bad when in a group there were videos with different dimensions.
- now the values are saved for each tab regardless of the group.
* Fixed: If the trim or crop editor was showing and an attempt was made to switch tabs,
- the bookmarks were deleted from the timeline after the warning message (tab cannot be change).
* Fixed script min text lines if tab multiline enabled and tabs row count > 1.
* Fixed flickering when zooming with the mouse wheel.
* Some small other changes.



Can you get the Resize Calculator to show the million pixels next to the resolution? (eg. 1280x720 0.74) It's a really really helpful number when you are restrained to specific file-sizes and duration on some forums/image boards.
Thank you.
You want the multiplied value of width and height to be displayed? at 1280 x 720 so 921600

Oh didn't notice, thanks for adding some of my filters, I had pending adding them all/most to the filterdb.dat, but I delayed until refined. I've been updating them with "[]" to accept optional args so any call triggers the sliders.
Well, and if you would give your versions proper names, I could also add more (to me meaningful) filters.

I still find it a disaster that you use the names of existing filters but partly also with other parameters.
Honestly, this borders on monopolism;), I will not change any existing original filter in the filterdb.dat.

This is not meant badly, I'm just honest.

Dogway
28th April 2022, 18:56
This is like accusing pinterf of monopolism. Everyone and their mom have been doing the same for years and there seemed to be no problem. I took "abandon-ware" and gave it some polish, now *.mp4 guy's sharpeners can actually be used for the first time and even fiddled with feisty2's sharpeners.

I will upload a custom filterdb.dat with my definitions anyway.

gispos
28th April 2022, 19:24
This is like accusing pinterf of monopolism. Everyone and their mom have been doing the same for years and there seemed to be no problem. I took "abandon-ware" and gave it some polish, now *.mp4 guy's sharpeners can actually be used for the first time and even fiddled with feisty2's sharpeners.

I will upload a custom filterdb.dat with my definitions anyway.
There is a difference. I am still free to decide what version I use! With your named Iritation this does not go... eat or die.
Some of your filters bring advantages with some the quality does not quite reach the original or at least brings other results.

It would be desirable that you can choose the filters at your own discretion, this is not possible with your naming because all other filters are overwritten as soon as I load a pack from you.

I have now expressed my point of view on this for the last time. I just can not understand it.

Dogway
28th April 2022, 20:23
I have no problem on what you decide since by inspecting the filterdb.dat I observed you are still referencing ancient versions (didn't check all though).

It just suprises me you still complain when recently I renamed a few of them yet you got no words for real.finder scripts with same function names; SMDegrain (when it was so), AnimeIVTC, Deblock_QED_MT2, LSFmod, QTGMC, GradFun2DBmod, MCBob... to name a few. It's not a critic to real.finder, you are still using function definitions from filter versions of 2006 (https://forum.doom9.org/showpost.php?p=916967&postcount=13)!!

real.finder
28th April 2022, 20:38
I have no problem on what you decide since by inspecting the filterdb.dat I observed you are still referencing ancient versions (didn't check all though).

It just suprises me you still complain when recently I renamed a few of them yet you got no words for real.finder scripts with same function names; SMDegrain (when it was so), AnimeIVTC, Deblock_QED_MT2, LSFmod, QTGMC, GradFun2DBmod, MCBob... to name a few. It's not a critic to real.finder, you are still using function definitions from filter versions of 2006 (https://forum.doom9.org/showpost.php?p=916967&postcount=13)!!

do I need to rename too? since my changes didn't change the old functions behavior or default settings

edit: btw, gispos, for d2v files, you need to replace mpeg2source with d2vsource (https://github.com/Asd-g/MPEG2DecPlus#usage)

Dogway
28th April 2022, 21:20
No, don't rename please. I was simply arguing that adding an extra argument is no reason to complain for same function name.
For example if I don't want to use certain filters for some reason (like clearing some of the function calltips) I just remove or comment the function in question as I did for Zs_RF_Shared.
You can always use [] in function definition for the extra arguments, it will work both ways for those using the MCBob from 2006 or those using your version.

gispos
29th April 2022, 14:01
In the previous version I have already updated all (?) internal avisynth filters to the + versions.

And I had already written it in another thread that I will not remove filters from the filterdb.dat, because I am probably the wrong person for it. I would probably also remove filters that are still in use but I do not know them.


edit: btw, gispos, for d2v files, you need to replace mpeg2source with d2vsource (https://github.com/Asd-g/MPEG2DecPlus#usage)
I have added D2VSource_D2VSource, and this can be removed?
DGDecode_MPEG2Source, DGDecode_BlindPP, DGDecode_Deblock, DGDecode_LumaYV12

@Dogway [] this is not a solution for everything.
This [parameter] is not written into the script when selecting the filter. [] is meant for filters with too many parameters, to hide parameters that are normally not needed and still allow the manual insertion of the parameter in the script.

And it is not about outdated filters, the problem is filters that you have included in your pack (and do not provide comparable results).
Does not matter now, it is too stupid for me that filters are overwritten in the background, so I copied the filters and functions I like from your pack into a script and renamed the filters. Is now eaten for me.

OrangeColaJuice
29th April 2022, 18:43
You want the multiplied value of width and height to be displayed? at 1280 x 720 so 921600

Yes that would be nice.
lol noticed that I had the wrong number in my first post.

real.finder
29th April 2022, 20:41
I have added D2VSource_D2VSource, and this can be removed?
DGDecode_MPEG2Source, DGDecode_BlindPP, DGDecode_Deblock, DGDecode_LumaYV12

Drag and drop d2v file still give MPEG2Source("x:\xx\xxx.d2v", cpu=0)

gispos
30th April 2022, 10:25
Drag and drop d2v file still give MPEG2Source("x:\xx\xxx.d2v", cpu=0)
I meant the filterdb.dat.
For drag and drop or cmd you have to change the file type based templates. Options > Extension templates...

d2v
https://i.postimg.cc/tg2dPFbx/d2v.jpg (https://postimages.org/)
mkv
https://i.postimg.cc/43JbmBDG/mkv.jpg (https://postimages.org/)

I use D2V very rarely, so it is almost empty:)

D2VSource(***, idct=-1, showQ=false, info=0, upConv=0, i420=false)

My mkv template

SourceFile = ScriptDir() + [***]
SourceFile = Exist(SourceFile) ? SourceFile : ***
video=LWLibavVideoSource(SourceFile, indexingpr=false, cache=false)
audio=LWLibavAudioSource(SourceFile, cache=false)
audioDub(video, audio)

#QTGMC(Preset="fast", Sharpness=1.0, InputType=0, FPSDivisor=2, ShowSettings=False)
#SelectEven()

#MCTemporalDenoise(settings="low", sigma=4, strength=100, tovershoot=1, GPU=false)
#prefetch(4)

#Spline36Resize(1920, 1080)
#SuperResXBR(Passes=1, Soft=0.0, XbrSharp=1.0, fWidth=1920, fHeight=1080)

#Sharpen(0.40, MMX=True)
#NonlinUSM(z=3, str=2.0, rad=0.6) #sharpen
#NonlinUSM(z=1.0, pow=1.2, str=0.2, rad=120.0) #contrast
#NonlinUSM(z=3, pow=1.2, str=0.25, rad=6) #sharp+
#UnsharpMask(strength=60, radius=3, threshold=8)
#unsharp(strength=0.6, varY=2.5)
#TUnSharp(strength=80, thresholdL=6, thresholdU=40, radius=2, type=0, map=0, lim=2, gui=false)
#BicubicSharp(str=0.5, edges=0.5, r=2.0, g=2.2, wg=5.0, bl=0.0, mode=1)
#SharpenComplex2(str0=2.0, str1=1.125, k0="3 14 3", k1="1 1 1", edgethr=0.2, debug=false)

#prefetch(4)


Edit: Of course you have to delete the line with Mpeg2Source
Edit2: I have changed the default template for d2v to D2VSource(***)

gispos
30th April 2022, 13:25
Yes that would be nice.
lol noticed that I had the wrong number in my first post.

Quit AvsPmod.
Go to the directory 'AvsPmod\tools' and delete 'resize_calc.py' and 'resize_calc.pyo'.
Unpack the 'resize_calc.py' contained in the archive into the tools directory.

Note:
A left click on the pixel count value copies the value to the clipboard.
So the value can be easily copied into a calculator.

https://www.mediafire.com/file/zdzz5qdlhturdsu/resize_calc.7z/file

VoodooFX
30th April 2022, 14:32
Would it be possible to add option to copy color hex value from the right click menu?

gispos
30th April 2022, 19:18
Would it be possible to add option to copy color hex value from the right click menu?
See version 2.7.1.2 below

gispos
30th April 2022, 21:55
CopyPixelinfo.py, a few more things changed (v5)
See version 2.7.1.2 below

VoodooFX
2nd May 2022, 13:45
Another thing bothering me: To remove a bookmark you need to repeat "Add/Remove Bookmark" procedure twice [in right click menu].

CopyPixelinfo.py, a few more things changed (v4)
https://www.mediafire.com/file/vgpyjqukkk39h9u/CopyPixelinfo.7z/file


Thanks. Will it be included in next version?

My defaults suggestion:
multi = False
writeToScrap = False
includeXY = False
And a bell enabled.

EDIT:
Wait 10-20 seconds.
And dollar sign at front $FFFFFF

gispos
2nd May 2022, 19:58
Another thing bothering me: To remove a bookmark you need to repeat "Add/Remove Bookmark" procedure twice [in right click menu].
Works perfectly for me.
You must have already selected the bookmark with the video slider to remove it.
The frame number in the text field must be displayed in red.

But adding and removing is easier with a right click on the video slider!
Or just remove it with a middle mouse click on the bookmark's icon.

Thanks. Will it be included in next version?
Yes

OrangeColaJuice
3rd May 2022, 22:02
Unpack the 'resize_calc.py' ...
https://www.mediafire.com/file/zdzz5qdlhturdsu/resize_calc.7z/file

Thanks, this little thing has made me so productive these days.

VoodooFX
3rd May 2022, 23:00
Works perfectly for me.
You must have already selected the bookmark with the video slider to remove it.
The frame number in the text field must be displayed in red.
It's in red, I use detached preview window. Tested again:

Click "Add/Remove bookmark" > Click "Add/Remove bookmark": it removes mark from MW, it's still visible there in PW, but it's not 'selectable' now, disappears if I switch tabs.


Click "Add/Remove bookmark" > Click "Add/Remove bookmark" [disappears only from MW] > Click "Add/Remove bookmark" [disappears from PW too, doesn't appear on MW].

PW - Preview window
MW - Main window

gispos
4th May 2022, 18:41
It's in red, I use detached preview window. Tested again:

Click "Add/Remove bookmark" > Click "Add/Remove bookmark": it removes mark from MW, it's still visible there in PW, but it's not 'selectable' now, disappears if I switch tabs.


Click "Add/Remove bookmark" > Click "Add/Remove bookmark" [disappears only from MW] > Click "Add/Remove bookmark" [disappears from PW too, doesn't appear on MW].

PW - Preview window
MW - Main window
Got it. The behavior is only available with separate video window.
Will be fixed soon.

gispos
7th May 2022, 10:24
AvsPmod 2.7.1.2 (https://github.com/gispos/AvsPmod/releases)

* If tabs multiline style and tabs row count > 1: If you double-click on the video window, the tabs are hidden.
- same as pressing Ctrl on double clicking the video window.
* New macro CopyPixelinfo.py: Open the macro with a text editor for explanation and settings.
* Fix: flickering when zooming with the keyboard and 'Resize video window' is selected.
- note: option 'Resize video window' only works with keyboard zoom or if the video height changed.
* Improved: separate video window and 'Resize filter' behavior.
* Fix: if use separate video window enabled, deleting bookmarks doesn't work properly.
* Fix: separate video window saves now its size and position on exit.
* Fixed some glitches with the separate video window, but I do not recommend using it.
* For the file extensions based templates there is a new modifier ><. readme_d2v_based_template.txt


New macro CopyPixelinfo, in the macro folder

# GPo 2022, AvsPmod macro CopyPixelinfo.py v5
#####
# If simple=False:
# If multi=True then the macro waits 'timeout' (5 to 60) seconds for a mouse click, if there is no further click the result is output.
# Hereby several values (clicks) can be output at once.
#
# If multi=False then the macro waits 'timeout' (5 to 60) seconds for a mouse click and then outputs the result.
# The timeout can be canceled by hidden the video window (useful if multi=True).
#
# If simple=True:
# Then it only works with shortcut (Pixelinfo depends on the mouse position)
# No mouse click is waited for, the pixel value under the mouse pointer is copied immediately
#
# If includeXY=False then only the color values are copied (raw)
# Valid values: 'xy', 'hex', 'rgb', 'rgba', 'yuv', 'yuva'
#
# If you don't want to write in the scrap window, set writeToScrap to False
# This is just a template change it to your liking. For more read macros_readme.txt
#####

##### user settings
# set one of the value: 'xy, hex', 'rgb', 'rgba', 'yuv', 'yuva'
colorval = 'hex'
# prefix e.g. for hex '$'
prefix = ''
# wait for multible clicks
multi = False
# timeout for waiting for a mouse click, valide range 5 to 60 seconds
# Note: You can cancel the waiting time by hidden the video window (useful if multi=True)
timeout = 10
# if simple then it only works with shortcut
simple = False
# write to scrap window
writeToScrap = True
# includes also the position
includeXY = True
# draws a line to each clicked point, only if multi True and not simple
drawLines = False
# give an acoustic signal when done
signal = True
##### end user settings

s = ''
self = avsp.GetWindow()
colors = ('xy', 'hex', 'rgb', 'rgba', 'yuv', 'yuva')
try:
idx = colors.index(colorval)
except ValueError:
avsp.MsgBox('Invalid input value', 'CopyPixelinfo')
return

def GetValues(info):
if idx == 0:
return 'pos%s\n' % str(info)
try:
if includeXY:
return 'pos%s, %s: %s\n' % (str(info[0]), colorval, prefix + str(info[1]))
return prefix + str(info[1]).replace('(', '').replace(')', '') + '\n'
except:
return 'Error\n'

if simple:
info = self.GetPixelInfo(None)
s = GetValues((info[0], info[idx])) if idx > 0 else GetValues(info[0])
else:
if multi:
lines = avsp.GetPixelInfo(color=colorval, wait=True, lines=drawLines, waitTimeout=timeout)
if lines:
for info in lines:
s += GetValues(info)
else:
s = GetValues(avsp.GetPixelInfo(color=colorval, wait=False, lines=False, waitTimeout=timeout))

if s.strip():
if writeToScrap:
avsp.WriteToScrap(s, pos=-1)
self.SetClipboardText(s.strip())
if signal:
from wx import _misc
_misc.Bell()


@VoodooFX, my suggestion:
Set 'simple' to true and use a keyboard shortcut for the macro.

VoodooFX
8th May 2022, 17:28
AvsPmod 2.7.1.2 (https://github.com/gispos/AvsPmod/releases)

It fixed a deleting bookmark bug, but new bug appeared:

x=BlankClip(width=400, height=100)
Stackvertical(x,x,x)

Preview the script above > delete one x > refresh preview: the bottom portion of previous preview doesn't disappear [separate preview window].

gispos
8th May 2022, 19:51
It fixed a deleting bookmark bug, but new bug appeared:

x=BlankClip(width=400, height=100)
Stackvertical(x,x,x)

Preview the script above > delete one x > refresh preview: the bottom portion of previous preview doesn't disappear [separate preview window].
Try this fix. Exchange the AvsPmod\library.zip with the one in the archive.
https://www.mediafire.com/file/wuz9q2mhk8cnh11/AvsPmod_2.7.1.2_fix.7z/file

Edit:
The fix corrects the error when zooming.
If fill or fit is set as zoom, you may not see any difference with BlankClip. Use ColorBar or set the zoom to 100%.

VoodooFX
8th May 2022, 22:06
Try this fix. Exchange the AvsPmod\library.zip with the one in the archive.
https://www.mediafire.com/file/wuz9q2mhk8cnh11/AvsPmod_2.7.1.2_fix.7z/file
It fixed the issue. :thanks:

gispos
9th May 2022, 19:50
AvsPmod 2.7.1.3 (https://github.com/gispos/AvsPmod/releases)

bugfix separate video window (show and zoom)

VoodooFX
10th May 2022, 14:18
New macro CopyPixelinfo
Sry to bother you again, but I forgot one feature, an option to force color value in RGB [when script is actually in YV12 for example]. Can it be done?

gispos
10th May 2022, 17:02
Sry to bother you again, but I forgot one feature, an option to force color value in RGB [when script is actually in YV12 for example]. Can it be done?

hex is always calculated from the avisynth color space.
all non avisynth color spaces are read or calculated from the display rgb 8bit.

So if the clip is YV12 or YV24 or YUV444P16, the value returned as RGB is the value from display (8bit)

Clip YUV444P16:
yuv = pos(220, 127), yuv: (32778, 38967, 14400) # from avisynth
hex = pos(197, 133), hex: 800A,9837,3840 # from avisynth value.
rgb = pos(208, 94), rgb: (16, 179, 179) # from 8bit display rgb

VoodooFX
10th May 2022, 18:17
I meant hex color value of the avisynth's RGB color space.

To skip necessity to add ConvertToRGB24(matrix="") to a script.

gispos
10th May 2022, 19:13
I meant hex color value of the avisynth's RGB color space.

To skip necessity to add ConvertToRGB24(matrix="") to a script.
Hex is always displayed from avisynth color space. If hex is to be displayed for rgb the clip must be converted

gispos
22nd May 2022, 15:53
Removed, update user sliders was broken in 2.7.1.4

gispos
24th May 2022, 17:09
AvspMod 2.7.1.5 (https://github.com/gispos/AvsPmod/releases)

* New Fullscreen mode: Press Ctrl when double clicking the video window or use menu Video > 'Fullscreen'. (double click or Esc resets).
- if you press Ctrl on double clicking, the preview changes beetwen program Fullscreen and preview Fullsize mode.
- note: if Fullscreen mode changed and the preview was not visible, the zoom resample filter turns off.
* Separate video window: Again some glitches fixed.
* DPI scaling for tabs and video controls can now also be reduced (maximum -20%, but not less than 100%)
* The default width of the slider window at program start (for a new tab) can be saved in the context menu of the slider window.
* New menu: Options > 'Multiline tab style' you can change it on the fly.
* Video > 'Resize video window' has been moved to Video > 'Additional', you must create a new shortcut for it.
* 'Toggle preview placement' revised, splitter for preview and editor should work better now.
* Option move or resize the program automatically has been removed without replacement. Not compatible with the Resample Filter.
* Some other changes.

Danette
25th May 2022, 15:24
Feature request:

Provide a preference setting that allows the user to specify that the crop values, resulting from use of the "Auto-crop" in "Crop editor", be automatically rounded up to Mod 2.

StvG
25th May 2022, 17:55
AvspMod 2.7.1.5 (https://github.com/gispos/AvsPmod/releases)

Thanks for the update.

When I have few opened tabs with unsaved scripts and I close the program, there is pop up "Save changes before closing" for every tab (with unsaved changes). The time for closing the program is much longer for the latest version compared to the previous version. It seems the latest version evaluate every tab before showing the pop up "Save changes before closing".

gispos
27th May 2022, 23:54
Thanks for the update.

When I have few opened tabs with unsaved scripts and I close the program, there is pop up "Save changes before closing" for every tab (with unsaved changes). The time for closing the program is much longer for the latest version compared to the previous version. It seems the latest version evaluate every tab before showing the pop up "Save changes before closing".
You're right, had meant well and wanted to show the video so that one recognizes it better... but had not thought that then all scripts are initialized. Had not noticed it because I almost have 'Auto preview' enabled (then not initialized scripts are skipped).

donnje
28th May 2022, 03:39
When I open AvspMod I have this error, how to fix?
I have W10 X64

Error parsing plugin string at position 0:

Error parsing Func plugin parameters: unknown character 'n'
Error parsing ConditionalSelect plugin parameters: unknown character 'n'
Error parsing ConditionalSelect plugin parameters: unknown character 'n'
Error parsing ConditionalFilter plugin parameters: unknown character 'n'
Error parsing ConditionalFilter plugin parameters: unknown character 'n'
Error parsing ConditionalFilter plugin parameters: unknown character 'n'
Error parsing ScriptClip plugin parameters: unknown character 'n'
Error parsing ScriptClip plugin parameters: unknown character 'n'
Error parsing WriteFile plugin parameters: unknown character 'n'
Error parsing WriteFile plugin parameters: + without preceeding argument
Error parsing WriteFileIf plugin parameters: unknown character 'n'
Error parsing WriteFileIf plugin parameters: + without preceeding argument
Error parsing WriteFileStart plugin parameters: unknown character 'n'
Error parsing WriteFileStart plugin parameters: + without preceeding argument
Error parsing WriteFileEnd plugin parameters: unknown character 'n'
Error parsing WriteFileEnd plugin parameters: + without preceeding argument
Error parsing WriteFile plugin parameters: unknown character 'n'
Error parsing WriteFile plugin parameters: + without preceeding argument
Error parsing WriteFileIf plugin parameters: unknown character 'n'
Error parsing WriteFileIf plugin parameters: + without preceeding argument
Error parsing WriteFileStart plugin parameters: unknown character 'n'
Error parsing WriteFileStart plugin parameters: + without preceeding argument
Error parsing WriteFileEnd plugin parameters: unknown character 'n'
Error parsing WriteFileEnd plugin parameters: + without preceeding argument
Error parsing propSetInt plugin parameters: unknown character 'n'
Error parsing propSetFloat plugin parameters: unknown character 'n'
Error parsing propSetString plugin parameters: unknown character 'n'
Error parsing propSetArray plugin parameters: unknown character 'n'
Error parsing propSetClip plugin parameters: unknown character 'n'
Error parsing OnCPU plugin parameters: unknown character 'n'
Error parsing OnCUDA plugin parameters: unknown character 'n'
Error parsing OnCPU plugin parameters: unknown character 'n'
Error parsing OnCUDA plugin parameters: unknown character 'n'

gispos
28th May 2022, 17:19
AvsPmod 2.7.1.6 (https://github.com/gispos/AvsPmod/releases)

If you use DPI zooming in windows, then please read the changelog.

* DPI scaling revised:
- the calculation basis is now the pixel size (previously point size). The font sizes now match the set system zoom.
- if you have adjusted the DPI scaling differently, you may have to do this again. The font size can now be larger.
- now all extra values can be adjusted from -20% to 100% and DPI scaling manually from -20 to 200%.
- the DPI scaling for the tabs can now be more fine adjust. 10% makes a differenze.
- with a 27 inch QHD monitor and 100% system zoom try +10% for the tabs if your eyes are a bit older..;)
* For Fullsize/Fullscreen mode the visibility of the tabs can be set (Program Options > Video > 'Fullscreen/Fullsize mode').
* Added to Crop-Editor autocrop mod 2 and mod 4 (negative calculation, (crop less)).
* Added new menus (tab context, file menu) 'Reload all scripts'
* Display option 'Resize video window' revised.
* When a script has been changed and the program is closed, a dialog appears asking whether the changes should be saved.
- in this dialog it is now possible to accept the decision for all scripts if Ctrl is pressed (this can be read in the dialog).
* Fixed: When closing the program all changed scripts are initialized. Sorry.
* Some other improvements...Hopefully. xD


@StvG, I had the problem that when closing sometimes too often the dialog appeared when I did not want to save. Now the problem is fixed.

* When a script has been changed and the program is closed, a dialog appears asking whether the changes should be saved.
- in this dialog it is now possible to accept the decision for all scripts if Ctrl is pressed (this can be read in the dialog).



When I open AvspMod I have this error, how to fix?
Error parsing plugin string at position 0:
Error parsing Func plugin parameters: unknown character 'n'
'
You don't seem to be using my version.
The error due to character 'n' (function) occurs with older versions that do not yet know an identifier for 'function'.

donnje
29th May 2022, 10:19
I have installed AvsPmod 2.7.1.6 GPo version and I have this error how to fix?
Thanks

https://i.postimg.cc/W3Vn8VTq/Screen-Shott1056.jpg

https://i.postimg.cc/5tB56rL4/Screen-Shott1057.jpg

gispos
29th May 2022, 10:48
I have installed AvsPmod 2.7.1.6 GPo version and I have this error how to fix?
Thanks

https://i.postimg.cc/W3Vn8VTq/Screen-Shott1056.jpg

https://i.postimg.cc/5tB56rL4/Screen-Shott1057.jpg
I think you did not install Avisynth properly, did you use the Avisynth installer?
https://www.videohelp.com/software/AviSynth-Plus
or
https://github.com/AviSynth/AviSynthPlus/releases

donnje
29th May 2022, 11:19
I think you did not install Avisynth properly, did you use the Avisynth installer?
https://www.videohelp.com/software/AviSynth-Plus
or
https://github.com/AviSynth/AviSynthPlus/releases

i solved it by installing it
thanks

gispos
29th May 2022, 12:52
AvsPmod 2.7.1.7 (https://github.com/gispos/AvsPmod/releases)

** If you use DPI zoom in windows read the changelog of version 2.7.1.6 **
* Fixed flickering when zooming with the mouse wheel.

:)

donnje
29th May 2022, 13:10
I use the last version 2.7.1.7 or 2.7.1.6 and with this script I have this error

https://i.postimg.cc/tJ3zjrbf/Screen-Shott1069.jpg

if I use th old version 2.5.1 but i have these errors on opening https://forum.doom9.org/showpost.php?p=1969584&postcount=1206
How I fix it?
Just I changed in options -> extension template DirectShowSource (***) in DSS2

kedautinh12
29th May 2022, 13:54
I use the last version 2.7.1.7 or 2.7.1.6 and with this script I have this error

https://i.postimg.cc/tJ3zjrbf/Screen-Shott1069.jpg

if I use th old version 2.5.1 but i have these errors on opening https://forum.doom9.org/showpost.php?p=1969584&postcount=1206
How I fix it?
Just I changed in options -> extension template DirectShowSource (***) in DSS2

I think you lack direct show source 2 plugin
http://avisynth.nl/index.php/DSS2mod

donnje
29th May 2022, 14:46
I think you lack direct show source 2 plugin
http://avisynth.nl/index.php/DSS2mod

I have put del plugin intro C:\Program Files (x86)\AviSynth+\plugins64+
and it work but now I see only video

Thanks a lot it work
Can I put it indiscriminately in one of these two folders?

C:\Program Files (x86)\AviSynth+\plugins64
C:\Program Files (x86)\AviSynth+\plugins64+

gispos
29th May 2022, 15:05
I have put del plugin intro C:\Program Files (x86)\AviSynth+\plugins64+
and it work but now I see only video

Thanks a lot it work
Can I put it indiscriminately in one of these two folders?

C:\Program Files (x86)\AviSynth+\plugins64
C:\Program Files (x86)\AviSynth+\plugins64+
AvsPmod shows only video without audio playback.

Open the program options and see what is entered under Paths > 'Plugins directory 64 bit' (plugins64 or plugins64+) this is your current plugin directory. There you have to put your dll's.

kedautinh12
29th May 2022, 15:20
I have put del plugin intro C:\Program Files (x86)\AviSynth+\plugins64+
and it work but now I see only video

Thanks a lot it work
Can I put it indiscriminately in one of these two folders?

C:\Program Files (x86)\AviSynth+\plugins64
C:\Program Files (x86)\AviSynth+\plugins64+

just put only in plugin64+ if you use dss2 x64 ver, in plugin+ if you use dss2 x86 ver

StainlessS
29th May 2022, 19:40
Isn't DSS2/DSS2Mod video only source filter ? [I dont really use it],
can use eg LSmashAudioSource for mp4 container (or some other audio source).

http://avisynth.nl/index.php/DSS2mod

EDIT: And Stackhorizontal() will use audio from 1st clip.

EDIT: UNTESTED

a = DSS2("C:\Test Mux\ITA.mp4")
aaud = LSmashAudioSource("C:\Test Mux\ITA.mp4")
a = audiodub(a,aaud)

b = DSS2("C:\Test Mux\SPA.mp4")
baud = LSmashAudioSource("C:\Test Mux\SPA.mp4")
b = audiodub(b,baud)

#b = blackmanresize(b,736,414).Assumefps(25) # This will likely produce out of sync audio

# Maybe this better [UNTESTED]
b = blackmanresize(b,736,414)
b = Assumefps(b,25,sync_audio=true) # Maintain audio sync [but will produce non standard audiorate]
b = ResampleAudio(b,a.AudioRate) # Make same AudioRate as clip a [otherwise StackHorizontal may fail].

stackhorizontal(a,b)


EDIT: I'm gone now, re-installing OS.

gispos
29th May 2022, 22:14
EDIT: I'm gone now, re-installing OS.
Why ?

StainlessS
30th May 2022, 04:37
Why?
Because my OS is a bit messed up (unrelated to avisynth). [and 'gone' meaning "I'm busy".]

EDIT: I just mean't that if there were problems with the script I posted, I would likely not be around to reply.

StvG
31st May 2022, 03:45
AvsPmod 2.7.1.7 (https://github.com/gispos/AvsPmod/releases)

Thanks.

Sonic3R
10th June 2022, 15:34
I have installed AviSynth+ and the plugins

I have script like

FFVideoSource("S:\aaauhd.mkv")
FFInfo(framenum=true,frametype=true,cfrtime=false,vfrtime=false,SAR=false,cropping=false,colorrange=false,colorspace=false,version=false)

And I get error:
https://i.postimg.cc/hthJWrPQ/image.png

How to solve ?

I'd mention that file exists in specified location.

StainlessS
11th June 2022, 13:51
Post you FULL script.
Also, what is "New File", (without double quotes), it should be double quoted script name with drive and path and ".avs" extension.

EDIT: And how are you trying to open the script (player or VDub2 or AvsPMod).
And what version Avs/Avs+.

EDIT: Arh!, its an AvsPMod thread so I assume that U R opening in AvsPMod.
So, "New File" is probably AvsPMod related temp file.
But, still want full script and AVS/AVS+ version.

gispos
12th June 2022, 13:18
AvsPmode 2.7.1.8 Milestone Edition (https://github.com/gispos/AvsPmod/releases) :)

* New function Video > 'Split Clip on/off' (please read Help -> 'SplitClip readme')
- the 'Split Clip' splits the main clip into 2 clips, and allows you to switch between
- a fast preview (without filters) and a normal preview (create a shortcut key for quick switching).
-
* Editor new: Changing numbers or true/false with the mouse wheel (Help -> 'Number wheel readme').
- select an area containing numbers, press Ctrl or Shift or both and use the mouse wheel. Ctrl = 1, Shift = 5, Both = 10
- the first number group found is changed (maximum search depth for the first digit are 20 characters).
- Recommended*: select the numbers or true/false with a double-click, no pressing of Ctrl or Shift is required. Numbers are then changed by 1
- if the selection is made by double-click: 1.) The 'Preview filter' is updated immediately. 2.) The function must be deactivated by a single click.
- true/false can now be changed either with (left down and right click) or (with the mouse wheel).
-
* New entry in tabs context menu 'Sort by name' sorts the tabs in alphabetical order.
* Program options > Misc 2 > 'Mouse wheel scroll rate in editor (0 disabled)' can now be changed without restarting the program.
* 'Reload all tabs' now first asks if the operation should be executed and the number of reloaded tabs is displayed in the status bar.
* Rare bug fixed: when many sliders are created, the preview may be broken (python memory problem).
* Fixed: When multi-line tab style and the number of tab lines was greater than 1, a drag & drop operation could be performed when switching a tab.




...EDIT: Arh!, its an AvsPMod thread so I assume that U R opening in AvsPMod.
So, "New File" is probably AvsPMod related temp file.

'New File' is the tab name if the file has not yet been saved.
Apparently it has worked with the new install of the OS, you are online again. :)

StainlessS
12th June 2022, 15:08
Nope, OS re-install not yet done [app connected with SDR (Software Defined Radio) got scrambled and dont work now without clean install],
Instead been messin' with various Linux distros, Kali{Penetration testing}, DragonOS{SDR specific}, Fedora WorkStation, Fedora Cinnamon Spin, LMDE,
Android x86. Not got around to re-install yet.

Nice new version of AvsPMod, I just downed them both. Tanks :)

VoodooFX
12th June 2022, 16:33
* Editor new: Changing numbers or true/false with the mouse wheel

Nice!. The Dream (https://forum.doom9.org/showthread.php?p=1933075#post1933075) came true.

gispos
18th June 2022, 15:54
AvsPmod 2.7.1.9 Onestone Edition (https://github.com/gispos/AvsPmod/releases)

* Editor: Change numbers with the mouse wheel revised (see Version 2.7.1.8).
- negative values and floating point numbers are now possible.
- if only the decimal part of a float number is selected: the last digit's are changed: (number is 2.25) default = 2.26, Shift = 2.30, Both = 2.35
- If you enable the function by a double-click on a number:
--- you can change the decimal part rate (normal/fast) by a middle mouse click (the status bar gives feedback).
--- the fast decimal part rate is: default = .1, Ctrl = .2, Shift = .5 also (2.35, 2.45, 2.75)
--- you can also change the numbers using the 'left' and 'right' keyboard keys
* Program options > Misc 2 > 'Mouse wheel scroll rate in editor (0 disabled)' if you have it enabled you can double the rate by pressing Ctrl
* Function Split Clip revised:
- if no further filter was used after /**avsp_split**/ at least 'last' had to be written into the script otherwise no split clip was created.
- this is now done automatically if no other filter is found.

StainlessS
18th June 2022, 16:15
Cheers G.P.

gispos
19th June 2022, 10:30
AvsPmod 2.7.2.0 Onestone Edition Pro (https://github.com/gispos/AvsPmod/releases) ;)

* Fixed: 'Number wheel' loses the fokus of the number in a 'Preview filter' area.
* Fixed some other small glitches.
* 'Number wheel' etc. Please read the changelog as of version 2.7.1.8
* All good things are 3, so the last special edition this year? :)


Unfortunately, it is usually so that I work after the upload of the new version with it and I notice only then various inconsistencies.
I should get into the habit to work with it first before I upload it... but in between I get the desire to change something again... so never an upload is made.:)
-----------------------

Hello StainlessS,
I had re-read the thread of mine a few weeks ago with the 'PC Monitor' question. Sorry I had completely lost sight of the thread.
To your question, I have purchased this one:
https://www.lg.com/de/monitore/lg-27gn88a-b

The only thing that bothers me about the monitor is that the minimum height to the bottom edge of the monitor are 15 centimeters. 10 would be better for me.

StainlessS
19th June 2022, 11:17
Monitor bottom, minimum height above desk is 0 cm for me, ie I (just tried it) can actually touch desk with bottom of 2nd 19" monitor.
Have not tried with 28" (but have no reason to think that cannot do the same - I got stuff underneath 28", and dont wanna move it).
(would though prefer to be able to raise the monitor higher than I currently can, I kinda like vertical center to be eye level,
although manufacturers tend to recommend top edge at eye level (maybe to avoid bright window/lightbulb reflections).
The 28" VESA mount is high on back of monitor, so making it go low is no problem, making it go high is more the problem for me.

EDIT: I eventually ended up with 4 of the monitor arms mentioned in your Hardware forum thread, with 2nd 19" monitor for both
no1 and no2 machines. Wish I'de tried these monitor arms years ago, they're great.
[EDIT: Also, I think those monitor arms are supposed to be for 24" -> 32" (or thereabouts), but work fine with 19" if you play with screw adjustments].

gispos
19th June 2022, 12:38
I also prefer the vertical center at eye level (maybe a little higher), but I usually lounge in my chair and also prefer a deeper chair.
Let's see if I change the arm itself and install a stainless steel piece so that I can put it lower.

StainlessS
19th June 2022, 15:21
lounge in my chair and also prefer a deeper chair.

I knew you were a very chilled out dude, HeHe,
sounds like you need one of them there Accubitum / Lectus type thingies, so as to emulate the old Roman emperors.
https://i.postimg.cc/sv8cRsmQ/Lectus.jpg (https://postimg.cc/sv8cRsmQ)
[I always thought you had a touch of Caligula about you :) ]

mastrboy
11th July 2022, 18:50
[QUOTE=gispos;1970540]AvsPmod 2.7.2.0 Onestone Edition Pro (https://github.com/gispos/AvsPmod/releases) ;)

* Fixed: 'Number wheel' loses the fokus of the number in a 'Preview filter' area.
* Fixed some other small glitches.
* 'Number wheel' etc. Please read the changelog as of version 2.7.1.8
* All good things are 3, so the last special edition this year? :)


How do I completely disable that "Number Wheel"? It affects my left/right arrow keys on the keyboard when selecting a number by mouse doubleclick.
Rather than go left/right, it increments/decrements the number selected.

If that's not possible, can you share "2.7.1.7" again? The github release page for that version only has the source code: https://github.com/gispos/AvsPmod/releases/tag/2.7.1.7
I currently reverted to AvsPmod 2.7.1.3 since that's the last available compiled version without this issue...

Edit: Where can I find older compiled versions? I'm trying to track down which version introduced the bug I'm experiencing here: https://forum.doom9.org/showpost.php?p=1971620&postcount=353
Edit2: videohelp archives old versions: https://www.videohelp.com/software/AvsP/old-versions

gispos
12th July 2022, 16:03
How do I completely disable that "Number Wheel"?...

Can't be turned off at the moment, will be possible in the next version.
Here is a link to the last version without 'Number Wheel'.

https://www.mediafire.com/file/d6emp1d4b3t9t6b/AvsPmod_v2.7.1.7_(Windows_x86-64).zip/file

mastrboy
12th July 2022, 18:43
Can't be turned off at the moment, will be possible in the next version.
Here is a link to the last version without 'Number Wheel'.

https://www.mediafire.com/file/d6emp1d4b3t9t6b/AvsPmod_v2.7.1.7_(Windows_x86-64).zip/file

Thank you.

I also managed to track down the versions with a different bug I'm experiencing regarding 601/709 colorspace decoding.

I'll attempt to summarize it:
Versions 2.6.8.0-2.7.2.0 has a bug with displaying Rec601 correctly (When doing 709->601 conversion)
Versions 2.6.6.9-2.6.7.9 has a bug with displaying Rec709 correctly
Last "good" version for displaying correct colors: 2.6.6.7

2.6.8.0-2.7.2.0, seems to convert rec601 -> 709 in the preview
2.6.6.9-2.6.79, seems to apply 601->709 conversion on 709 content.

I used the following script snippets to identify the issue on the different versions:
# rec601 test
avspmod = "2.6.6.9"
ColorBarsHD()
fmtc_matrix (mats="709", matd="601")
fmtc_bitdepth (bits=8)
propShow(size=24).Subtitle("avspmod version: " + avspmod,y=120)

# rec709 test
avspmod = "2.6.6.9"
ColorBarsHD()
propShow(size=24).Subtitle("avspmod version: " + avspmod,y=120)


Uploaded to a image compare site to show the issue: https://imgsli.com/MTE2Mzk4/

(also if anyone else is looking for old versions, i found them here: https://www.videohelp.com/software/AvsP/old-versions)

gispos
13th July 2022, 17:01
Thank you.

I also managed to track down the versions with a different bug I'm experiencing regarding 601/709 colorspace decoding.

I'll attempt to summarize it:
Versions 2.6.8.0-2.7.2.0 has a bug with displaying Rec601 correctly (When doing 709->601 conversion)
Versions 2.6.6.9-2.6.7.9 has a bug with displaying Rec709 correctly
Last "good" version for displaying correct colors: 2.6.6.7

2.6.8.0-2.7.2.0, seems to convert rec601 -> 709 in the preview
2.6.6.9-2.6.79, seems to apply 601->709 conversion on 709 content.

I used the following script snippets to identify the issue on the different versions:
# rec601 test
avspmod = "2.6.6.9"
ColorBarsHD()
fmtc_matrix (mats="709", matd="601")
fmtc_bitdepth (bits=8)
propShow(size=24).Subtitle("avspmod version: " + avspmod,y=120)

# rec709 test
avspmod = "2.6.6.9"
ColorBarsHD()
propShow(size=24).Subtitle("avspmod version: " + avspmod,y=120)


Uploaded to a image compare site to show the issue: https://imgsli.com/MTE2Mzk4/

(also if anyone else is looking for old versions, i found them here: https://www.videohelp.com/software/AvsP/old-versions)

AvsPmod 2.6.6.7 has no matrix reading and always uses a fixed value for display conversion. (except resolution dependent)

If you turn off the matrix reading, the newer versions behave like the old version.

Turn off: Video > Display > YUV -> RGB > 'Read from source or script'
Set Resolution based ( default for older versions ) or set a fixed value.
What is displayed in the status bar is the matrix used for conversion. The flag %DYR must be entered under the status bar configuration.

More option when read matrix is turned on:
'Reset matrix if not found' always reads the matrix again, if this is deactivated the matrix is read only at the first initialization of the script.
This was my wish and has the background not to change the matrix constantly if a filter does not pass the frame properties.

With 'Current matrix to script' the current matrix is written to the script and preferred when read Matrix is switched on.

--------------------------
Version 2.6.6.9 [2021-03-27] GPo
--------------------------
....
* Display YUV -> RGB conversion (Resolution-based, BT,709, BT.601) now script related.
- conversion coefficient can be read from the source (frame properties). Or from the script when it was previously manually stored in the script.
- an asterisk * is preceded when the matrix has not read from the source ( *Rec601 )
- under Program Options > Configure Statusbar, there is a new value %DYR to display the used matrix in the status bar.

PoeBear
16th July 2022, 01:05
Curious, are there any plans for HDR10 output? Or is that even possible with the project's current form?

I just started working with HDR10 sources, and I've been using DGHDRtoSDR to compare my source and test multiple encodes inside AvsPmod, but its tonemapping is slightly different each time you refresh the script, so I can never get an accurate representation if the colors are good match between the source and my tests

I don't even have an HDR monitor yet, so it's not something I'm requesting/need/could even use, just curious since it seems my SDR projects are dwindling/shrinking in numbers over time

The flag %DYR must be entered under the status bar configuration.

This has been great for sanity checks on legacy/MPEG-2 based projects, it's an instant add on a fresh install. There's so little information already in the bottom corner, I think it would make for a good default option

gispos
17th July 2022, 09:16
AvsPmod 2.7.2.1 (https://github.com/gispos/AvsPmod/releases) (a lot of news and improvements)

* Added slider window checkbox 'Preview filter', enables/disables the last used 'Preview filter' or P-Filter 1 if no last used index found.
* 'Preview filter' is now restored if a filter outside the 'Preview filter' area changed.
* 'Preview filter' is also restored when enabling/disabling the 'Split Clip'.
* 'Preview filter' for the 'Split Clip' is also possible.
-
* 'Split Clip' is fully integrated (pixel values, video information, etc.). Help > 'Split Clip readme'
* Added menu Video > Additional > 'Restore split clip if enabled' (default off).
- restores the 'Split Clip' if was active before refreshing the script.
* If you want, you can set the color of the 'Split Clip' for the timeline in the context menu of the frame numbers text field.
-
* Added function jump to I frame, the frame properties must of course allow this.
- search depth max. 350 frames, Esc breaks, Statusbar gives information, use 'Split Clip' or disable all filters for faster finding.
- use menu Video > Navigate > 'Next I frame' or 'Previous I frame' or
- if frame property window visible and mouse is over the properties (Win10) or focused, with mouse browse buttons you can jump:
-- with Ctrl to next or previous I frame
-- with Shift to next or previous selection marker
-- with Alt to next or previous titled bookmark
-- without key to any next or previous marker (selection, bookmark)
-
* 'Number wheel' can be enabled or disabled under Edit > Enable 'Number wheel'.
* 'Number wheel', change the fast decimal part rate with middle mouse click works now only if a number selected, if no number is selected
- the 'Number wheel' function will be disabled. This improves the unintentional switching when the middle click should actually activate the preview.
- I'm not entirely happy with it, either the switch normal/fast will be removed or I'll think of something better.
-
* Added program options > Mis 2 > 'Show memory information in thread progress dialog' (default True).
- displays the available system memory in the thread progress dialog (5 seconds after the dialog appears).
* Added program options > Mis 2 > 'Show shortcuts in context menus*' Shows or hides the shortcuts in the video and script context menus.
-
* When 'Accessing Avisynth in Threads' is used, the program no longer gets the "No response" status when a clip is reinitialized.
- the video image is fully preserved while waiting for the clip (Not when waiting for a frame or no image visible).
- it's a bit beta, you can disable it under Options > 'Draw the frame during clip refresh (Beta)', please report problems!
* Avisynth error messages on creating a clip corrected. It was always shown (Make sure avisynth is installed...).
* Some other changes.


Curious, are there any plans for HDR10 output? Or is that even possible with the project's current form?

It is not possible with the project's current form.

gispos
22nd July 2022, 17:02
AvsPmod 2.7.2.2 (https://github.com/gispos/AvsPmod/releases)

* Thread progress dialog can now be hidden. Program Options > Misc 2 > 'Hide thread progress dialog (Press Ctrl to show)'
- hides only the progress dialog if the video window visible on creating or refreshing a clip.
- if you press Ctrl for 0.5 to 2 seconds (depends on the thread state), the dialog is shown.
* Fixed "Preview Filter" showed error message if no filter was present in preview filter area (e.g. all filters disabled with toggle tags)
* Option > 'Draw the frame during clip refresh (Beta)' removed, function has been revised and is now always active. Please report problems!
- see 2.7.2.1 > When 'Accessing Avisynth in Threads' is used...
* Some other changes

gispos
24th July 2022, 10:08
AvsPmod 2.7.2.3 (https://github.com/gispos/AvsPmod/releases)

* Bugfix: If the 'Resample filter' was used and a 'Preview filter' was set there was an error message.

FranceBB
24th July 2022, 11:47
Thanks for the new version, as always, gispos. :)
I may not be replying every day, but I do use AVSPmod (mod) every day. :)


I just started working with HDR10 sources, and I've been using DGHDRtoSDR to compare my source and test multiple encodes inside AvsPmod, but its tonemapping is slightly different each time you refresh the script, so I can never get an accurate representation if the colors are good match between the source and my tests

By definition, tonemapping is adaptive. Use a static LUT to compare results so that you won't have differences between one take and the other. https://forum.doom9.org/showthread.php?t=176091

p.s I think it would be nice in the display monitor of AVSPmod to have the ability to load LUTs so that the user can just right-click and choose display mode and whatever LUT he wants so that the result is displayed after applying such a LUT. :)

videoFred
24th July 2022, 15:13
I have a problem Gispos:

In AvsPmod 2.6.8.8 I can set 'user sliders' to 'type string(filename)'
Then I see my sliders on the video screen.

But in the latest version, this is not working any more.
I can not make my sliders visible any more, no matter what I try.

But thank you any way for all your hard work! :)

Fred.

gispos
24th July 2022, 15:55
I have a problem Gispos:

In AvsPmod 2.6.8.8 I can set 'user sliders' to 'type string(filename)'
Then I see my sliders on the video screen.

But in the latest version, this is not working any more.
I can not make my sliders visible any more, no matter what I try.

But thank you any way for all your hard work! :)

Fred.
Help me out here, I don't know what this is about.
About self-created sliders? Post best an example code or write more exactly what you enter whereh.

gispos
24th July 2022, 16:53
I may not be replying every day, but I do use AVSPmod (mod) every day. :)
:)


p.s I think it would be nice in the display monitor of AVSPmod to have the ability to load LUTs so that the user can just right-click and choose display mode and whatever LUT he wants so that the result is displayed after applying such a LUT. :)
I think there are already ways to do this. 'Snippets' and 'Display filter'

With the snippets such a code snipsel can be inserted fast.
With the 'Display filter' you can quickly switch the Lut on and off or load another Lut. Both have their advantages and disadvantages.

Snippet
https://i.postimg.cc/yxn0GQ9N/Screenshot-1.jpg (https://postimages.org/)

Display filter
https://i.postimg.cc/59m5j0GM/Screenshot-2.jpg (https://postimages.org/)

https://i.postimg.cc/DyyrGhk4/Screenshot-3.jpg (https://postimages.org/)

https://i.postimg.cc/bNCQH5pC/Screenshot-4.jpg (https://postimages.org/)

FranceBB
24th July 2022, 18:38
uhhhhhhh that's amazing!
Now I know exactly what I'm gonna do tomorrow! :D
Ehehehehehe

videoFred
25th July 2022, 11:43
Help me out here, I don't know what this is about.
About self-created sliders? Post best an example code or write more exactly what you enter whereh.

It's about self-created sliders, separators and "toggle' checkboxes.
I can not make them visible any more in AvsPmod 2.7.2.3. I only see 'Avisource' and 'Snapshot'

The code below works fine in AvsPmod 2.6.8.8.
As you see, I create variables with the sliders and I use these variables later in the script.

[<separator="TRIM PARAMETERS SOURCE">]

trim_begin0 = [<"trim begin%2000", 0, 50000, 0>] # fast trimming 2000 frames
trim_begin1 = [<"trim begin%1000", 0, 50000, 0>] # fast trimming 1000 frames
trim_begin2 = [<"trim begin %100", 0, 1000, 0>] # fast trimming 100 frames
trim_begin3 = [<"fine trim begin", 0, 100, 0>] # fine trimming next 100 frames, frame by frame

trim_start = trim_begin0 + trim_begin1 + trim_begin2 + trim_begin3

trim_end1 = [<"trim end%1000", 0, 40000, 0>] # trim end 1000 frames
trim_end2 = [<"trim end%100", 0, 1000, 0>] # trim end 100 frames
trim_end3= [<"fine trim end", 0, 100, 0>] # fine trim end frame by frame

trim_stop = trim_end1 + trim_end2 + trim_end3

frame_begin = trim_start

[<separator>]

gispos
25th July 2022, 14:27
It's about self-created sliders, separators and "toggle' checkboxes.
I can not make them visible any more in AvsPmod 2.7.2.3. I only see 'Avisource' and 'Snapshot'

Tested it with a fresh version (new options.dat) and with my own version. See pictures.
Also tried to find out if there is a setting that prevents your sliders from showing. But did not find anything.

Have you tried it yourself with a freshly unpacked version?
If it works then it can only be caused by a faulty options.dat file and you have to delete it. Sorry! Sorry!
I think that I am not completely innocent, had with older versions and some new options problems to save them.

Another thing that comes to my mind is that you may not have overwritten all the required files during an update.

The best thing to do is to unzip the latest version into a folder and test it.
Then copy your old options.dat into this folder and try it again. If it doesn't work anymore you have to delete it.

Please let me know!
Interesting way to use the user slider.:)

https://i.postimg.cc/WbX8kQNx/Slider-3.jpg (https://postimages.org/)

https://i.postimg.cc/8P1ws1Sh/Slider-4.jpg (https://postimages.org/)

videoFred
25th July 2022, 14:48
Have you tried it yourself with a freshly unpacked version?

Yes I did.


The best thing to do is to unzip the latest version into a folder and test it.

Yes, this is what I did


Then copy your old options.dat into this folder and try it again. If it doesn't work anymore you have to delete it.

I have done that and it still wont work, but it's not a big deal for me because 2.6.8.8 works perfect for me


Interesting way to use the user slider.:)


Yes, I do this with all my parameters for all my fillters. Works great!

Thank you for your effort!

Fred.

gispos
25th July 2022, 15:16
So version 2.6.8.8 works and the latest one does not.

This is very strange, because your slider code works for me with the latest version.
Where is the error :confused:

Can someone else please test the sliders code from the Fred? Thanks.

Fjord
25th July 2022, 15:44
Fred's slider code works here (in a new script with only "Return Colorbars()" added). (although now I need to play with the new dpi options to make them larger.)
ver. 2.7.2.3 x64 - all files copied in on top of previous working version 2.7.2.1, using FreeFileSync.

Bernardd
25th July 2022, 15:59
Fred's sliders work on my w10 computer with AvsPmod 2.7.2.3 x64.

videoFred
25th July 2022, 20:35
Thank you all for testing my slider code:thanks:

I have only tested AvsPmod 2.7.2.3 x32.
But I see you are all using x64.

Tomorrow I will test x64.

Fred.

Bernardd
26th July 2022, 10:00
I have tested today.
Fred's sliders work on my w10 computer with AvsPmod 2.7.2.3 x32.

videoFred
26th July 2022, 10:51
OK, This time I have just loaded the slider code -not the full script- in AvsPmod 2.7.2.3 x32, just like Bernardd did.

It worked! :)

Then, I loaded the full script and -to my surprise- this time it worked too!

Some setting must be changed by loading the slider code, right?
Perhaps the *.dat file?

Thank you all for testing!

Fred.

videoFred
26th July 2022, 13:58
I have tried to repeat the problem.

I have used a new fresh download of AvsPmod 2.7.2.3 x32.
The problem was there again.

Then, I have loaded the slider code (just added 'Avisource' at the end of the slider code off cource)

Problem solved!

Strange: when I used the slider code generated by AvsPmod yesterday (with the ### AvsP marked script ###) it did not work.

I had to load the 'clean' slider code like I posted here, the fresh AvsPmod created a new ### AvsP marked script ### and then it works.

Fred.

gispos
26th July 2022, 23:24
...
Strange: when I used the slider code generated by AvsPmod yesterday (with the ### AvsP marked script ###) it did not work.

I had to load the 'clean' slider code like I posted here, the fresh AvsPmod created a new ### AvsP marked script ### and then it works.

Fred.
So change does nothing in any file, only in the avs file the flag for the 'Marked' script is written and the script with the sliders in the 'Marked' area stored and then read from this area when opened.

For this, however, the option must also be set. Make sure that this option is also switched on.
Program Options > Save/Load > 'Save or read avs scripts with AvsPmod markings'

If you find out anything else that might be the problem then please let me know.

https://i.postimg.cc/zGXVmG1J/Avs-P-marked.jpg (https://postimages.org/)

videoFred
27th July 2022, 11:21
Hi Gispos,

I have just discovered this myself. (I'm a little ashamed)
Yes, this is the solution!

Perhaps it would be a good idea to set this on as default?

many greetings,
Fred.

gispos
27th July 2022, 12:37
Hi Gispos,

I have just discovered this myself. (I'm a little ashamed)
Yes, this is the solution!

Perhaps it would be a good idea to set this on as default?

many greetings,
Fred.
I am not a friend of this option, I don't like that the script what I see is a "fake", "disguise", "not the real thing".

Some time ago I wanted to remove this option completely, but then I kept it and integrated a comparison of the original and the 'marked' copy.
So if you change the script with another program, and then open it again with AvsPmod, AvsPmod should recognize that "Original is not equal to Marked script" and a warning should appear.
And when saving 'Marked scripts', a signal tone also sounds as a hint.

So the option is turned off by default so that new users do not use this function at all (get in the habit of using this function).

PS:
Take a look at the 'Preview filter' with automatically generated sliders. You can also create your own sliders for the automatically generated sliders.
If you have any questions then get in touch.

StainlessS
27th July 2022, 13:16
I am not a friend of this option
The word is "deprecated", [Express strong disapproval of; deplore].
Signals intent to possibly remove feature, at some point in future.

gispos
27th July 2022, 13:55
The word is "deprecated", [Express strong disapproval of; deplore].
Signals intent to possibly remove feature, at some point in future.
Then the word fits like a glove.:D

@Fred
In the next version there will be a warning when saving the script and 'User sliders' is found but the option to save is not enabled.

gispos
31st July 2022, 14:00
AvsPmod 2.7.2.4 (https://github.com/gispos/AvsPmod/releases)

* New option for the thread progress dialog. Program Options > Misc 2 > 'Thread progress dialog behave'.
- option 1 is chosen as default so that there are no surprises for users who do not read the changelog. So choose your option yourself.
- 3 options available (default 1, option 1 is also used if the preview window not visible):
-- Show progress (that's the old), program can be minimized with the windows system button 'Minimize', but the program can get the "no response" status.
-- Show progress (Shift hide/show the program), windows system buttons are disabled, the program cannot get a "no response" status.
-- Hide progress (Ctrl to show progress, Shift hide/show the program), windows system buttons disabled, the program cannot get a "no response" status.
-- Note* if option 2 or 3 selected:
--- if you want to minimize AvsPmod during a longer clip loading process, press Shift for 0.5 to 2 seconds do minimize or show AvsPmod.
--- if you hide it with Shift, the progress dialog is shown. If you minimize the program and shows it again during the loading process,
--- the slider window is not redrawn and is invisible (I don't know if I can fix this).
-
* Added the option "I" frame to the context menu of the forward/backward jump buttons.
* DPI scaling options revised, removed not useful options and added 'slider window' and created an extra dialog.
* When saving the script, a dialog is displayed if "user sliders" are found but the option to save/read the "marked" script is not enabled.
* Fixed: If the 'Resample Filter' was used during video playback and was changed, the playback speed then slowed down.
* Fixed: Slider window 'radio buttons' looks now nicer if OS DPI scaling used.
* Fixed: No new sliders were created when the clip refresh was triggered by clicking in the video window.
* Note: The 'Preview Filter' will only update if it is turned on, otherwise the shortcut for turning it off or on or
- the 'Preview Filter' checkbox must be used.
* In the Options Dialog some options moved to another tab e.g. 'Min. Text lines when video preview visible' to tab 'Text'
* Some other changes

gispos
1st August 2022, 14:55
AvsPmod 2.7.2.5 (https://github.com/gispos/AvsPmod/releases) :)

* OptionsDialog saves/restores the last page index.
* Slider window radio buttons look better again when no system zoom is used.
* Bugfix: If thread progress dialog option 2 or 3 was selected the mouse pointer was not reset when clicking into the video window.
* Some other changes

FranceBB
9th August 2022, 12:47
Hi Gispos, a quick question: why is AVSPmod intellisense complaining about "if" and "else" by highlighting them in red when they actually work?

https://i.imgur.com/bsChzSO.png

gispos
9th August 2022, 20:49
Hi Gispos, a quick question: why is AVSPmod intellisense complaining about "if" and "else" by highlighting them in red when they actually work?

Huuh, took me a while to find this because:
A change in the code led to no success, and brought me to despair;), until I found a line that overwrites the own keyword variable.

So open the filterdb.dat and change the line under [KEYWORDS] to:
return global function last true false try catch if else

PS: I will change this in the next version as well

FranceBB
10th August 2022, 07:57
change the line under [KEYWORDS] to:
return global function last true false try catch if else

Ahhh, gotcha!
It works! :D

https://i.imgur.com/ApDbesw.png

gispos
10th August 2022, 17:39
AvsPmod 2.7.2.6 (https://github.com/gispos/AvsPmod/releases)

* New tool in the 'Tool' menu, Session Info (session_info.pyo), check it.
- if you are updating only the AvsPmod directory, you need to copy from the archive tools\'session_info.pyo' and 'ToolsMenu.py' to
- the AvsPmod tools folder and delete the file AvsPmod > tools > ToolsMenu.pyo
- tool info: all changes made have no effect on the original files, only when the session is saved, the changes are written to the file to be saved.
* Fixed: On closing all tabs or reloading the startup session an error can be displayed.
* Fixed: flickering when the frame was displayed and the thread progress option is 2 or 3 and the frame loading took longer.
* Changed mouse movement in the status bar if left mouse button down and timeline range is set:
- CTRL = unlimited scrolling; SHIFT = unlimited scrolling and sensitivity 25%, i.e. 4 times scrolling rate.
- Summing:
- Statusbar double-click: Timeline goes to the start or end in the limited range (depending on mouse position).
- CTRL + Statusbar double-click: Timeline goes to the start or end in the unlimited range (depending on mouse position).
- SHIFT + Statusbar double-click: Timeline goes to the start or end in the unlimited range*4 (depending on mouse position).
- Statusbar middle mouse button up = timeline goes to current frame position if slider was not clicked before (the video frame was not shown).
- When you hit Enter: If the slider frame number is outside the limited range, the video frame of the current slider frame number is displayed.
* Added the avisynth keywords 'if' and 'else' to filterdb.data for correct syntax highlighting.
* Fixed: Snapshot label was not drawn when zooming without antialiasing.

FranceBB
10th August 2022, 23:54
Nice one, thank you! :)

gispos
13th August 2022, 12:20
AvsPmod 2.7.2.7 (https://github.com/gispos/AvsPmod/releases)

* Fixed: with timeline range set and middle mouse button clicked in the status bar, the current frame number was not updated.
* Fixed problems when opening more than one file with the Open File dialog or Drag & Drop.
* Update tool 'Session Info'

ClubM
20th August 2022, 15:29
Maybe it's a dumb question but is there a option in Avspmod to import / export extension templates and text snippets?
Like the functions database override?
If not, would it be possible to implement it as a new feature?

gispos
21st August 2022, 11:15
AvsPmod 2.7.2.9 (https://github.com/gispos/AvsPmod/releases)

* Thread progress dialog option 2 and 3 revised (hopefully now error free).
* Some other changes


Maybe it's a dumb question but is there a option in Avspmod to import / export extension templates and text snippets?
Like the functions database override?
If not, would it be possible to implement it as a new feature?
In the options.dat all this is stored, if you want to transfer your settings (also the templates) into a new version then you only have to copy the options.dat into the directory of the new version.

Own settings: options.dat
Preview filters: pfilter.dat
Font & colors: backup_style.dat

ClubM
21st August 2022, 19:31
Really that's awesome thx for the info gispos, i wasn't aware you could just copy these files over.
I'm planning on doing a fresh Windows install so this will definitely come in handy.
Also thank you and everyone else for continuing to improve Avspmod.

gispos
28th August 2022, 09:20
AvsPmod 2.7.3.0 (https://github.com/gispos/AvsPmod/releases)

* Display filter can now be changed even if the 'Preview Filter' is enabled.
* Fixed 'Number Wheel' True/False was broken.
* Update 'Session info tool'
* Some other changes


Video example 'Display filter' (https://vimeo.com/743860434)

Video example 'Preview filter' (https://vimeo.com/745543887)

FranceBB
3rd September 2022, 19:30
Very nice.
AVSPmod mod is just getting better and better. :D

VoodooFX
2nd October 2022, 17:45
What setting gets rid of this annoying pop-up?

https://i.imgur.com/2rIzHOE.png

LigH
2nd October 2022, 22:49
What could be the reason for this delay?

Maybe a source filter which needs to write an index file before processing the clip? Or an audio filter which needs to gather statistics to be able to calibrate its factors?

VoodooFX
3rd October 2022, 00:07
What could be the reason for this delay?

Reason is running TWriteAVI plugin.
On my working x86 AvsPmod it doesn't pop-up, downloaded fresh x64 to test plugin there and it pops on every test run, I tried to toggle lots of settings and can't find what turns it off.

StainlessS
3rd October 2022, 00:37
I'm not aware of anything in TWriteAVI x64 that works different from TWriteAVI x86 and could cause this problem.

VoodooFX
3rd October 2022, 00:43
I think it's AvsPmod's pop-up.

gispos
3rd October 2022, 11:30
What setting gets rid of this annoying pop-up?

https://i.imgur.com/2rIzHOE.png
My goodness!
It's been like this for um... a few years.

AvsPmod initializes the clip in its own thread, the same when initializing the frame.
You can disable thread loading completely (Options > Access in threads) or customize the thread progress dialog. Program options -> Misc 2 (see Version 2.7.2.4)

About the loading in threads, read the readme under 'Help'.
The default delay before the thread dialog appears is 10 seconds. This can also be changed under Misc 2.


--------------------------
Version 2.7.2.4 [2022-07-31] GPo
--------------------------
* New option for the thread progress dialog. Program Options > Misc 2 > 'Thread progress dialog behave'.
- option 1 is chosen as default so that there are no surprises for users who do not read the changelog. So choose your option yourself.
- 3 options available (default 1, option 1 is also used if the preview window not visible):
-- Show progress (that's the old), program can be minimized with the windows system button 'Minimize', but the program can get the "no response" status.
-- Show progress (Shift hide/show the program), windows system buttons are disabled, the program cannot get a "no response" status.
-- Hide progress (Ctrl to show progress, Shift hide/show the program), windows system buttons disabled, the program cannot get a "no response" status.
-- Note* if option 2 or 3 selected:
--- if you want to minimize AvsPmod during a longer clip loading process, press Shift for 0.5 to 2 seconds do minimize or show AvsPmod.
--- if you hide it with Shift, the progress dialog is shown. If you minimize the program and shows it again during the loading process,
--- the slider window is not redrawn and is invisible (I don't know if I can fix this).

VoodooFX
3rd October 2022, 11:46
It's been like this for um... a few years.
I hardly remember what I was doing a month ago. ;)

gispos
3rd October 2022, 13:36
I hardly remember what I was doing a month ago. ;)
:D

For TWriteAvi I would use Video->Tools->Run analysis pass. Then also no annoying pop-up comes, except the progress indicator ;)

isidroco
3rd October 2022, 17:24
Hi gispos, using AvsPmod v2.7.3.0 with AviSynth+ 20220317 v3.7.2; always get an error when Saving (tried both x32 or x64 with same error, under win7x64), same error when exiting if Save is allowed:
Traceback (most recent call last):
File "avsp.pyo", line 10829, in OnMenuFileSaveScript
File "avsp.pyo", line 3835, in wrapper
File "avsp.pyo", line 3826, in Wait
File "avsp.pyo", line 3813, in TimeToRun
File "avsp.pyo", line 19078, in SaveScript
AttributeError: 'module' object has no attribute 'ABORT'

StainlessS
3rd October 2022, 19:34
March 2022, maybe its already been fixed [have you checked ?]

isidroco
3rd October 2022, 23:27
March 2022, maybe its already been fixed [have you checked ?]

Seems latest: https://github.com/AviSynth/AviSynthPlus
And error is when saving, other than thta program is working ok. Using Copy/Paste as a workaround.

StainlessS
4th October 2022, 02:42
OOooops, my mistake, sorry :(
[Dont know why, thought problem was with march AvsPMod]

gispos
4th October 2022, 17:52
Hi gispos, using AvsPmod v2.7.3.0 with AviSynth+ 20220317 v3.7.2; always get an error when Saving (tried both x32 or x64 with same error, under win7x64), same error when exiting if Save is allowed:
Traceback (most recent call last):
File "avsp.pyo", line 10829, in OnMenuFileSaveScript
File "avsp.pyo", line 3835, in wrapper
File "avsp.pyo", line 3826, in Wait
File "avsp.pyo", line 3813, in TimeToRun
File "avsp.pyo", line 19078, in SaveScript
AttributeError: 'module' object has no attribute 'ABORT'

Found the error, still have to figure out how to fix it.

For all until the fix:
Program Options -> Save/Load, turn on 'Save toggle tags within the script' >>> This is important!

The error occurs when there are toggle tags in the script e.g. #>[SmoothLevels=0] and the save option is not enabled.

Preview filter toggle tags

/**avsp_filter
#>
UnsharpMask_avsi(strength=60, radius=3, threshold=8)
#>
**/


PS: Is the term 'toggle tags' correct or would another word be better?

StainlessS
4th October 2022, 19:54
Might I suggest "Toggle Taggle", got a nice ring to it :)

[Toggle tags sounds OK to me]

gispos
4th October 2022, 23:04
Might I suggest "Toggle Taggle", got a nice ring to it :)

I can't find a reasonable translation for this. In german: 'Taggle umschalten'

So it remains with 'toggle taggle' ähh I mean 'tags toggle' or something like that. :D

gispos
8th October 2022, 14:20
AvsPmod 2.7.3.1 (https://github.com/gispos/AvsPmod/releases)

* Added Help > 'Video tutorials & more' on Google Drive.
* Added to Snapshot menu 'Restore to current'
* Update macro 'PreviewEncode.py', an extended version is available under 'Help > 'Video tutorials & more'
* Bugfix: If the script contained 'toggle tags' and the option 'Save toggle tags' was not enabled, this caused an error when saving the script.

VoodooFX
14th October 2022, 21:26
Is there some update checker in AvsPmod? Got a firewall popup that it wants to connect somewhere on port 80.
I don't remember it requesting internet access before...

PS:
There is a typo in "readme_threads.txt", "chrash" instead of crash.

PS2:
Today it happened again, so I took IP: ( avspmod.exe, 192.168.1.192, 4051 -> 13.107.4.50, 80 (http) )
https://ipinfo.io/13.107.4.50
"Microsoft Corporation", WTF?

gispos
16th October 2022, 09:03
Is there some update checker in AvsPmod? Got a firewall popup that it wants to connect somewhere on port 80.
I don't remember it requesting internet access before...

PS:
There is a typo in "readme_threads.txt", "chrash" instead of crash.

PS2:
Today it happened again, so I took IP: ( avspmod.exe, 192.168.1.192, 4051 -> 13.107.4.50, 80 (http) )
https://ipinfo.io/13.107.4.50
"Microsoft Corporation", WTF?
I have wanted to write this for a long time:
AvsPmod does not phone home. This is the function for the 'Single Instance', which works via a local fixed port on the PC.
AvsPmod logs on there and when a new instance is started, it is first checked on this port whether an instance is already logged on.
AvsPmod then sends the parameters to the existing instance via a socket.

You can ignore it calmly and allow it at your firewall.


self.port = 50009 if xSys == 'x64' else 50008
self.instance = wx.SingleInstanceChecker(title+xSys+wx.GetUserId())

self.boolSingleInstance = self.options.setdefault('singleinstance', False)
if self.boolSingleInstance:
if self.instance.IsAnotherRunning():
# Send data to the main instance via socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('localhost', self.port))


PS:
There is a typo in "readme_threads.txt", "chrash" instead of crash.
Nice that someone has read it. Corregated.:)

VoodooFX
16th October 2022, 10:47
I have wanted to write this for a long time:
AvsPmod does not phone home. This is the function for the 'Single Instance', which works via a local fixed port on the PC.
AvsPmod logs on there and when a new instance is started, it is first checked on this port whether an instance is already logged on.
AvsPmod then sends the parameters to the existing instance via a socket.

You can ignore it calmly and allow it at your firewall.


I don't have "Single instance" enabled and I don't run multiple instances.
It happened not at program start, and only two times in hundreds of runs.
My firewall doesn't care about local connections.

Anyway, how that local instance checker translates into connection to Microsoft at 13.107.4.50 IP?

PS:
It happened with v2.7.3.0 x86, I don't remember it happening with the previous versions.
And there was a week or ~two gap between both "happenings".

StainlessS
16th October 2022, 13:05
I believe M$ can and does sometimes impersonate other apps to get internet access,
sometimes it is because your firewall is configgered to prevent access to some M$ process,
may then try to get 'out' via some other process.

Others could probably give better descripton and reason, but above basically correct.

EDIT: Probably AvsPMod accessing some OS function, and OS function takes opportunity
to try access internet under AvsPMod disguise.

EDIT:
I've recently had a few attempts by x265 to access internet [might actually be x265 trying to update] and also
VirtualDub2 too [which might be M$]. {I block both}

EDIT:
I believe M$ can and does sometimes impersonate other apps to get internet access,
Some malware uses same trick.

VoodooFX
16th October 2022, 13:22
I believe M$ can and does sometimes impersonate other apps to get internet access,
sometimes it is because your firewall is configgered to prevent access to some M$ process.
That would be hardcore, do you have any links about that?
Never happened that on other apps or other versions of AvSmod, and I block everything...

I've checked firewall blocking rules, there are dozens of "spy" IPs there, but there is no blocking on "13.107.4.50".

EDIT:
Could something happen at a compiling stage?

StainlessS
16th October 2022, 13:54
do you have any links about that?
Nope, just what I've observed many times.

Not just when blocking IP/domain address, could be when blocking some system process from getting out,
eg Windows Update,
that defo tries real hard to stop you blocking it,
There is a constant tooth and nail battle between windows update and windows update blockers.

VoodooFX
16th October 2022, 15:10
Nope, just what I've observed many times.
Then it's hearsay, I think we all would know if M$ would be doing this kind of virus like behavior.

Anyway, when I got popup I looked at processes and there was only one AvsPmod.exe process running, and firewall indicated that it's coming from the real AvsPmod.exe path.
AvsPmod.exe is same as downloaded from GitHub, MD5 hash: 1a0e814703f48e54d2ae2ea4cc3527e3
And to repeat: This never happened with other apps or other AvsPmod versions.


Offtopic:
tries real hard to stop you blocking it,
There is a constant tooth and nail battle between windows update and windows update blockers.
I never had problems in blocking M$, maybe because I don't use M$ firewall, enable block all mode and it's gone, forever...

gispos
16th October 2022, 17:24
The messages that AvsPmod wants to perform an access to the Internet, I also had only from time to time and also only since I switched to Win10.
I had set AvsPmod as a secure app in my firewall. I just removed it and will monitor the behavior.

More I can not say at the moment.

PS:
Since switching to Win10 and this address. That tells me almost everything.

IP address details
13.107.4.50
Redmond, Washington, United States
AS8068 - Microsoft Corporation

VoodooFX
16th October 2022, 18:12
My OS is Win7, no updates since ~2012-2015...

Can it be related to a compiler used?

iunnius
17th October 2022, 12:54
tlyul,
Create a test file, test.avs containing

Version


Try play it in either virtualDub2, or a media player (NOT VLC), eg MPC-HC or PotPlayer.

Does it work ? [if not then problem is not with AvsPMod].

Also, what version of Avisynth are you trying to use [it may require Microsoft CPP runtimes to be installed (think Error 126 might suggest the missing runtimes are the problem)].

EDIT: Current Avs+ requires cpp runtimes for vs 2015:- https://www.microsoft.com/en-gb/download/details.aspx?id=48145
______________________________
First, Im gratefull to everybody here, of the help I find.

But, sorry, but I must surrender.

I have the same problem; tlyul and many others.

I have been working with the latest Avisynth+ 64 + AvsPmode.
A couple of weeks.
And last wednesday: the 126 error related with avisynth.dll.

I have tried all kind of combination uninstall + other version.
I have been googlin; nothing.
(One problem is that Im not familia with the professional language, very common here)

I was so happy with AvspMod ....!!!
I´m digitizing my old 120m Super8 reels, and doing postprocesing with Avisynth (and of course the help of videoFred. (Very nice help)

And I dont want to try other way.

So, if you have any suggestion to try, wellcome.

iunnius
17th October 2022, 13:53
I think you did not install Avisynth properly, did you use the Avisynth installer?
https://www.videohelp.com/software/AviSynth-Plus
or
https://github.com/AviSynth/AviSynthPlus/releases

______________________________________________________
SOLVED.
I have discovered the gispos suggestion, and I tried this:
https://www.videohelp.com/software/AviSynth-Plus
I thought: this is my final attempt.

And taaaachan: recovered.
PD: Until now, I have been using GitHub.!!!


Thank you very much.

VoodooFX
17th October 2022, 14:04
Those are same files in both links.

gispos
17th October 2022, 17:10
...
Can it be related to a compiler used?
Probably yes, if it's the 32bit version.
I also had to enter only one version of AvsPmod in my firewall, which I think was the 32bit version. Can it now unfortunately no longer say exactly because I removed the entry yesterday.

For the 4GB extension of the 32bit version this tool is used: Microsoft (R) COFF/PE Editor version 9.00.30729.01

I have uploaded 3 versions of the 32bit version here. (https://drive.google.com/drive/folders/1OE9DkMWRNNLBB9HRFFIt7Jl-SYUU0Py_?usp=sharing)
_MS_4GB is the Microsoft edited version (as before)
_PowerTech_4GB is a version edited with a tool from PowerTech
_No_4GB is an unprocessed version, so up to 2GB memory usage

Each AvsPmod.exe has the same size, but the MD5 hash is different. So there are differences between the MS and the PowerTech version.
But I have to say that I don't overrate the whole thing, it would be cheeky on the part of Microsoft, but it wants almost every tool on the Internet.... one more to block.

Edit:
AvsPmod 32bit: local destination port 50008 must be accessible
AvsPmod 64bit local destination port 50009 must be accessible.
This is needed for the 'Single Instance' function, even if it is not used.

So do not block completely.

real.finder
9th November 2022, 14:30
updated x264 with 10bit presets https://www.sendspace.com/file/siiwwg

edit: x264 in ffmpeg too https://www.sendspace.com/file/8vdoam

gispos
9th November 2022, 19:34
Thank you. I will add it.

LigH
9th November 2022, 23:07
updated x264 with 10bit presets

What kind of presets?

gispos
10th November 2022, 15:31
What kind of presets?
Tools > 'Script encoder (CLI)'
For the enoder settings (x264, ffmpeg, xvid) there are templates in the folder 'Tools' (*.presets)

The presets can easily be changed by yourself or more can be added, just open a .presets file with a text editor.
And if you don't need xvid templates, you can rename the 'xvid.presets' to 'xvid.presets~' or delete it.

VoodooFX
10th November 2022, 16:55
As I understand changes at "Script Encoded (CLI)" can't be saved?

gispos
10th November 2022, 17:35
As I understand changes at "Script Encoded (CLI)" can't be saved?
You can change the default parameters for the encoder in the presets (or add/remove). And you can also change the values in the parameter line in the Script encoder (CLI) before you start encoding.

I also prepared something for x265, but I don't know if I finished it.
I had taken care of ffmpeg and did not pursue x265. I think. You would have to try it out by creating an x265.presets file.

PS:
Under Help > 'Video tutorials & more' there is a pre release of AvsPmod x64. There I added an option for the CMD codepage in the 'Script encoder (CLI)', interesting for germans, enter 1252 for german umlauts

color
23rd November 2022, 22:40
Is it possible to change from Directshowsource to something else as default when draging video into a spmod?

poisondeathray
24th November 2022, 00:17
Is it possible to change from Directshowsource to something else as default when draging video into a spmod?

options => extension templates

bbcby
27th December 2022, 15:00
Hello. Misc 2 > DPI Settings - Statusbar, example set to 8 - no effects.

gispos
28th December 2022, 01:20
AvsPmod 2.7.3.2 (https://github.com/gispos/AvsPmod/releases)

* Added: custom color for the preview filter in the slider window ( Options > Font and colors > Advanced 2 ) default on.
* Fixed: Bookmarks count was sometimes not correctly stored in the session file (Session info tool gave wrong information).
* Update 'encoder_gui.py', added a option to set the Cmd Codepage for the batch encoding file e.g. enter 1252 for Latin 1 (deutsche Umlaute).
- If only partially updated: in the AvsPmod\tools directory, encoder_gui.py must be replaced.
* Encoder gui: Doom9 user 'real.finder' added 10bit presets for x264 and ffmpeg.x264
* Updated 'Session info tool' a bit.
* Bugfix: Separate DPI settings for the status bar did not work.
* Some smal changes


Happy New Year to all !

FranceBB
28th December 2022, 23:31
Uhhhh a Christmas Present!
Merry Christmas and Happy New Year, Gispos!! ;)

StainlessS
29th December 2022, 03:17
Yeah, thanks Santa :)

GAP
29th January 2023, 10:42
I have three questions:


How do you add in more presets to AVSPMod?
How do you "replicate" the methods used to upscale vidoes? I am not talking about the actual content but more on how you can analyze the codecs, container, aspect ratio, color, etc.? Just general information like in a AVS script.
Can you stop a video in AVPSMod from going past a certain point? I know in Virtualdub you can stop a video from going past a certain point via the slider and you can set markers on where you want it to stop.

gispos
29th January 2023, 12:09
I have three questions:


How do you add in more presets to AVSPMod?
How do you "replicate" the methods used to upscale vidoes? I am not talking about the actual content but more on how you can analyze the codecs, container, aspect ratio, color, etc.? Just general information like in a AVS script.
Can you stop a video in AVPSMod from going past a certain point? I know in Virtualdub you can stop a video from going past a certain point via the slider and you can set markers on where you want it to stop.


1.) I do not know what presets you mean

2.) I don't understand the question in part one. And to the second part: There is information in the status bar that you can select under the program options. Then there is also the Video Information menu

3.) There are bookmarks and selections. If you have one or more selections and right click on the play button and select 'Play loop' the selections will be played.

If you right click on the slider you can add or remove a bookmark. Selections are created with the trim editor.
Please look at all the videos I have created to AvsPmod. There are also things shown that do not necessarily belong to the topic of the video.

https://vimeo.com/user183482922

GAP
29th January 2023, 18:44
1.) I do not know what presets you mean

2.) I don't understand the question in part one. And to the second part: There is information in the status bar that you can select under the program options. Then there is also the Video Information menu

3.) There are bookmarks and selections. If you have one or more selections and right click on the play button and select 'Play loop' the selections will be played.

If you right click on the slider you can add or remove a bookmark. Selections are created with the trim editor.
Please look at all the videos I have created to AvsPmod. There are also things shown that do not necessarily belong to the topic of the video.

https://vimeo.com/user183482922

For the first question, I meant the AVISynth presets both standard and custom.

For the first half of the second question, I essentially wanted to gain information from the video and see if I can copy the settings from it. Like how did they upscale it or noise reduction for example.

For the third question, is that how you do it? I just need to right click the slider? Where do you find it?

VoodooFX
30th January 2023, 00:14
Can you stop a video in AVPSMod from going past a certain point?

Trim() (http://avisynth.nl/index.php/Trim)

gispos
30th January 2023, 23:02
For the first question, I meant the AVISynth presets both standard and custom.
There is no such thing. You can enter your filters under Options > 'Extension templates' which will be written into the script with this file extension.

For the first half of the second question, I essentially wanted to gain information from the video and see if I can copy the settings from it. Like how did they upscale it or noise reduction for example.

No program can do that, think about it...

For the third question, is that how you do it? I just need to right click the slider? Where do you find it?
To use Avisynth you have to create a script with the right instructions. You should first get the basic knowledge about avisynth. This includes Trim()

GAP
1st February 2023, 11:27
I have some more questions:


How do you add in the Fade in and Fade out to a video?
Can you do transitions like in more traditional editors?
Do you type out what you want to do? Or are there other options that will help achieve the same results like more traditional editors?

gispos
1st February 2023, 21:01
I have some more questions:


How do you add in the Fade in and Fade out to a video?
Can you do transitions like in more traditional editors?
Do you type out what you want to do? Or are there other options that will help achieve the same results like more traditional editors?


Google has found everything.

https://forum.doom9.org/showthread.php?t=174399
http://avisynth.nl/index.php/Transition_(Filter)#Transitions

http://avisynth.nl/index.php/Fade
FadeIn(25)

http://avisynth.nl/index.php/Dissolve
v1 = last.trim(0, 200)
v2 = last.trim(500, 700)
Dissolve(v1, v2, 25)

Or like that, without last
v1 = trim(0, 200)
v2 = trim(500, 700)
v3 = Dissolve(v1, v2, 25)
The result is now stored in v3, so v3 must be returned
return v3

AvsPmod is an Avisynth editor with preview function and useful features.
You have to write scripts yourself, without script nothing works.

gispos
1st February 2023, 21:37
Still in progress, but there is a new video :)
https://vimeo.com/795004734

FranceBB
11th February 2023, 22:07
As always, thank you, Gispos!
You really brought a fresh breeze to this project ever since you picked it up.
It's been a while now since you took the project on your shoulders and your releases have been consistently adding new things (like frame properties) and fixing bugs.
I wouldn't know what else to say other than "thank you" for not letting our favorite IDE die. :D

gispos
12th February 2023, 09:18
Thank you FranceBB for the nice words.

FranceBB
12th February 2023, 14:43
Actually, unfortunately there's a problem with the last version, AvsPmod 2.7.3.4. :(
It looks like it's failing to deallocate and re-allocate memory after you change stuff in the AVS Script.
Essentially you can write stuff, then "compile" to get the preview (botton left), then if you change something else and you hit the preview again:

https://i.imgur.com/sWWMpvN.png

while if you close and open AVSPmod mod again, it works.
The former version was fine, though, so I reverted for now.

gispos
12th February 2023, 16:43
Actually, unfortunately there's a problem with the last version, AvsPmod 2.7.3.4. :(
It looks like it's failing to deallocate and re-allocate memory after you change stuff in the AVS Script.
Essentially you can write stuff, then "compile" to get the preview (botton left), then if you change something else and you hit the preview again:

https://i.imgur.com/sWWMpvN.png

while if you close and open AVSPmod mod again, it works.
The former version was fine, though, so I reverted for now.

I see that you do not use threads.:)
In the section that works without threads I forgot to change the function name. Turn on the threads under options. ;)

But in half an hour there will be a bugfix version.

FranceBB
12th February 2023, 18:57
I see that you do not use threads.:)


It wasn't actually my computer running, but rather one of my colleagues. They called me because of it and I found the "issue". Unfortunately they're not on Doom9, so I was like "Well, looks like I'm gonna be the one to report it" xD.

But yeah, this is probably why I didn't notice it at first in my workstation at work, while they did.

Anyway, thanks for addressing it so quickly with a new bulild. :D

KreuzBlick
13th February 2023, 14:23
Thank you, gispos, for the development of the program.
I use AvsPmod regularly because I edit my videos, including 3d videos, with it.

Now I have a feature request. I would be very happy, if AvsPmod would get a real fullscreen mode. There is already, since version 2.7.1.5, a kind of fullscreen, but there remain parts of the menu and the status bars. Even when using the options since 2.7.1.6, remnants of the outer frame always remain visible.

Of course I could preview my script in Virtualdub2 in fullscreen mode, but then I would have to use an additional program in the development of my scripts. With a true fullscreen mode, I could use only AvsPmod.

I think, there is a good reason for that request. As I said above, I edit a lot of 3D-clips and I would like to be able to judge them in 3D.

Actuel there's a new autostereoscopic display in the Acer Predator Helios 300 with SpacialLabs technology. Using eye tracking, it provides a pristine stereoscopic image that I can view without glasses. This works very well.

This device uses a program running in the background (SpacialLabs Go), that can display any content in stereoscopic 3D at the touch of a button. The requirement is, that the content is displayed in half-side-by-side and in fullscreen mode.

Half side-by-side is generated by the script, that's no problem. The only thing missing is to display in fullscreen. As I said, it would be nice, if this could be done.

gispos
13th February 2023, 20:55
Thank you, gispos, for the development of the program.
I use AvsPmod regularly because I edit my videos, including 3d videos, with it.

Now I have a feature request. I would be very happy, if AvsPmod would get a real fullscreen mode. There is already, since version 2.7.1.5, a kind of fullscreen, but there remain parts of the menu and the status bars. Even when using the options since 2.7.1.6, remnants of the outer frame always remain visible.

Of course I could preview my script in Virtualdub2 in fullscreen mode, but then I would have to use an additional program in the development of my scripts. With a true fullscreen mode, I could use only AvsPmod.

I think, there is a good reason for that request. As I said above, I edit a lot of 3D-clips and I would like to be able to judge them in 3D.

Actuel there's a new autostereoscopic display in the Acer Predator Helios 300 with SpacialLabs technology. Using eye tracking, it provides a pristine stereoscopic image that I can view without glasses. This works very well.

This device uses a program running in the background (SpacialLabs Go), that can display any content in stereoscopic 3D at the touch of a button. The requirement is, that the content is displayed in half-side-by-side and in fullscreen mode.

Half side-by-side is generated by the script, that's no problem. The only thing missing is to display in fullscreen. As I said, it would be nice, if this could be done.

I'll have to take a look at that and think about it. The first thing that comes to mind is the problem with the video slider. I think that would be a big effort. Let's see...

gispos
13th February 2023, 20:58
Found another error when no threads are used.:o

Locate frame has also got an update, the video shows it in moving pictures.:D

AvsPmod 2.7.3.6 (https://github.com/gispos/AvsPmod/releases)

--------------------------
Version 2.7.3.4 - 2.7.3.5 - 2.7.3.6 [2023-02-13] GPo
--------------------------
* Added: Options > 'Use Ultra Fast Clip' you must read the Fast Clip readme (Help > Fast Clip readme).
- here is an example video: https://vimeo.com/user183482922
* Added Video > Tools > 'Locate frame' finds a frame in another clip. Read the Locate frame readme. https://vimeo.com/797835669
* Added alternative Split View functionality (Video > Split View alternate)
- grab the splitter or press CTRL when clicking in the video window to place the splitter at the mouse position.
- Note: this menu is only the options switch, to switch Split View on or off the menu 'Split View' must be used.
- only if Split View is switched off and you hit this menu, then Split View is switched on.
* Added Group > 'Split View freeze frame', freezes the frame of the not selected partner tab.
- offset the SplitView: Freeze frame > navigate to frame > select a group (group is set for both tabs and freeze frame is turned off).
* Statusbar shows information of the active Split View tab: current tab L or R, Frame offset and frozen status.
- e.g. (SV-L -17, frozen R) current Split View tab is the left tab, -17 frames offset to right tab and right tab is frozen.
* Split View now asks if the tab should be copied if the next right tab (video) has different dimensions.
* If you disable Split View on the right partner tab and enable it again, Split View uses the left tab
- if the left tab was the last used partner (previously, the right tab was always taken as a partner).
* Video Window Display Border spacing and Snapshot font size changed from fixed values to DPI resulting values.
* Slider window 'Custom color theme' now default (when the options.dat is missing).
* 'Resize video window' now default (when the options.dat is missing).
* Snapshot: automatically take snapshot 2 on clip refresh now default true (when the options.dat is missing).
* Tab context menu > 'Open directory' the explorer does now select the file.
* Get frame properties a bit faster.
* Fixed Split View: if resize filter turned off with normal zoom (menu or shortcut). Error 'Both videos same size.. blah)
* Rize filter small ratio bug fixed (2 pixels)
* Some other smal changes
* Version 2.7.3.5: Bugfix: There was an error when 'Fast Clip' is enabled but Avisynth loading in threads is disabled.
* Version 2.7.3.6: Bugfix: Same reason as in 2.7.3.5 but a different trigger. Sorry.
-
Reminder 'Resize filter' and normal zoom:
The resize filter is switched on under Program Options > Misc 2 > 'Show resample zoom menu'.
-
Zoom and resize filter change with the mouse wheel:
zoom = Ctrl down or press left mouse button
resize filter = Shift down (mouse button does not have to be pressed)
-
Zoom and resize filter change 1x or 2x zoom:
zoom = press left mouse button and click right mouse button
resize filter = same but Shift must be pressed
-
Resize filter Fill or Fit:
double click on the top or bottom right of the video window (50x50 pixel x DPI).
at the top only the current tab and bottom all tabs.
-
I recommend not to use the antialiasing in the normal zoom and to use the resample filter instead.


Locate frame
https://vimeo.com/797835669

FranceBB
13th February 2023, 22:31
Too fast, I can't keep the pace hahahahahaha
Thanks again, Gispos. :)

StvG
15th February 2023, 08:04
Thanks for the updates.

From 2.7.3.4 (https://github.com/gispos/AvsPmod/commit/963b990bc55d9daa657bf51766674f2bc1e2dea9) when I build AvsPmod and try to run it I get:
Traceback (most recent call last):
File "run.py", line 49, in <module>
File "avsp.pyo", line 29126, in main
File "wx\_core.pyo", line 8622, in __init__
File "wx\_core.pyo", line 8187, in _BootstrapApp
File "avsp.pyo", line 29106, in OnInit
File "avsp.pyo", line 6226, in __init__
File "avsp.pyo", line 7738, in LoadAvisynth
File "pyavs.pyo", line 46, in <module>
ImportError: No module named cfunc

Using python 2.7.18, wxPython 2.9.3 and the other requirements from here (https://github.com/gispos/AvsPmod/blob/GPo/build_instructions_windows_new.txt).

GAP
15th February 2023, 16:09
@gispos

You are right about that. I msunderstood what "replicating" an effect means. It looks like I need to learn how to write scripts. Thanks for the help.

Speaking of scripts, how do find the frame that you want to stop where you can trim the video? Or add in the dissolve command?

gispos
15th February 2023, 17:27
Thanks for the updates.

From 2.7.3.4 (https://github.com/gispos/AvsPmod/commit/963b990bc55d9daa657bf51766674f2bc1e2dea9) when I build AvsPmod and try to run it I get:
Traceback (most recent call last):
File "run.py", line 49, in <module>
File "avsp.pyo", line 29126, in main
File "wx\_core.pyo", line 8622, in __init__
File "wx\_core.pyo", line 8187, in _BootstrapApp
File "avsp.pyo", line 29106, in OnInit
File "avsp.pyo", line 6226, in __init__
File "avsp.pyo", line 7738, in LoadAvisynth
File "pyavs.pyo", line 46, in <module>
ImportError: No module named cfunc

Using python 2.7.18, wxPython 2.9.3 and the other requirements from here (https://github.com/gispos/AvsPmod/blob/GPo/build_instructions_windows_new.txt).
Forgot to update.
Copy the cfunc.pyd from the AvsPmod lib directory into your lib directory.
Private built? You have a beautiful addition? :)

@gispos

You are right about that. I msunderstood what "replicating" an effect means. It looks like I need to learn how to write scripts. Thanks for the help.

Speaking of scripts, how do find the frame that you want to stop where you can trim the video? Or add in the dissolve command?
Come on, ever opened AvsPmod?
At the bottom is the video slider and to the left of it the current frame is displayed.
In AvsPmod you can also work with selections. Watch the video 'Apply Filter' and read the readme.

If you click with the right mouse button on a blue selection a context menu appears, there are also entries to insert various trim commands. All as trim, Add as trim, Timeline to trims, Timeline to clips

StvG
15th February 2023, 19:13
Forgot to update.
Copy the cfunc.pyd from the AvsPmod lib directory into your lib directory.
Private built? You have a beautiful addition? :)

Copying cfunc.pyd from your release doesn't have effect - I have the same error.

I'm just enabling Display filter by default nothing else.
Also using this patch (https://pastebin.com/raw/mFzzwp3C) otherwise there are a lot of warnings at startup.

Edit: Here (https://files.catbox.moe/qlaoss.7z) my build.

gispos
15th February 2023, 22:45
Copying cfunc.pyd from your release doesn't have effect - I have the same error.

I'm just enabling Display filter by default nothing else.
Also using this patch (https://pastebin.com/raw/mFzzwp3C) otherwise there are a lot of warnings at startup.

Edit: Here (https://files.catbox.moe/qlaoss.7z) my build.
Then it is probably due to the missing Cython
pip install Cython

Let me know.

patch? You get errors with my builds? Or does this only affect your builds?
Have not yet compared the patch, what is changed?

StvG
15th February 2023, 23:00
Then it is probably due to the missing Cython
pip install Cython

Let me know.

patch? You get errors with my builds? Or does this only affect your builds?
Have not yet compared the patch, what is changed?

Cython installed (Requirement already satisfied: cython in c:\python27\lib\site-packages (0.29.33)) but still the same error.

The patch is for warnings, not errors. I don't have them with your builds. I don't remember after what 2.7.x python version the warnings appears - https://pastebin.com/L5FHfQWp

It seems you're not using python 2.7.18?

gispos
16th February 2023, 00:29
Cython installed (Requirement already satisfied: cython in c:\python27\lib\site-packages (0.29.33)) but still the same error.

The patch is for warnings, not errors. I don't have them with your builds. I don't remember after what 2.7.x python version the warnings appears - https://pastebin.com/L5FHfQWp

It seems you're not using python 2.7.18?
One more thing, when compiling, the cfunc.pyd must be in the source directory.

No, I do not use the latest version but the version before last.
In the last version has changed a lot, I had no desire. But you have already done the groundwork...;)

StvG
16th February 2023, 03:58
One more thing, when compiling, the cfunc.pyd must be in the source directory.

That does the job. Thanks.

Btw with my build I'm getting at startup Error: Invalid plugin function name "spectrogram". Must be "pluginname_functionname". This commit (https://github.com/gispos/AvsPmod/commit/b90fca25612626eaf4f66d109bf9f8d3904d88c1#diff-96eaaebb18f4131f2cf78f38169c53910d75a0bcad053e21b6860c6926031384R2896) is the reason.
Your build doesn't show such error.

gispos
16th February 2023, 17:22
That does the job. Thanks.

Btw with my build I'm getting at startup Error: Invalid plugin function name "spectrogram". Must be "pluginname_functionname". This commit (https://github.com/gispos/AvsPmod/commit/b90fca25612626eaf4f66d109bf9f8d3904d88c1#diff-96eaaebb18f4131f2cf78f38169c53910d75a0bcad053e21b6860c6926031384R2896) is the reason.
Your build doesn't show such error.

This is due to the wrong entry in filterdb.dat
There are groups there. If the function is in a plugin, it belongs in the group [PLUGINS] with the name of the dll in front and then the name of the function: Spectrogram_Spectrogram

But if it is only a function from an avs file it belongs to the group [USERFUNCTIONS], with the name of the function.

I had taken the commit from GamingPotatoMan first and then cleaned up my filterdb.dat but forgot to update the file on github.

To the entry Spectrogram:
I have removed it, completely superfluous.
The int values I can also set in the script and must not fill me the filterdb.dat with it.

So either remove or correct plugin designation or place correctly.

I also just updated the filterdb.dat on github with mine.
https://github.com/gispos/AvsPmod/blob/GPo/filterdb.dat

kedautinh12
16th February 2023, 17:40
Dogway make some edit about filterdb.dat, bookmark,... Can you update it too? Thanks
https://github.com/Dogway/Avisynth-Scripts/tree/master/Tools/AvsPmod

StvG
16th February 2023, 21:05
This is due to the wrong entry in filterdb.dat
There are groups there. If the function is in a plugin, it belongs in the group [PLUGINS] with the name of the dll in front and then the name of the function: Spectrogram_Spectrogram

But if it is only a function from an avs file it belongs to the group [USERFUNCTIONS], with the name of the function.

I had taken the commit from GamingPotatoMan first and then cleaned up my filterdb.dat but forgot to update the file on github.

To the entry Spectrogram:
I have removed it, completely superfluous.
The int values I can also set in the script and must not fill me the filterdb.dat with it.

So either remove or correct plugin designation or place correctly.

I also just updated the filterdb.dat on github with mine.
https://github.com/gispos/AvsPmod/blob/GPo/filterdb.dat

Thanks.

gispos
16th February 2023, 21:23
Thank you, gispos, for the development of the program.
I use AvsPmod regularly because I edit my videos, including 3d videos, with it.

Now I have a feature request. I would be very happy, if AvsPmod would get a real fullscreen mode. There is already, since version 2.7.1.5, a kind of fullscreen, but there remain parts of the menu and the status bars. Even when using the options since 2.7.1.6, remnants of the outer frame always remain visible.

Of course I could preview my script in Virtualdub2 in fullscreen mode, but then I would have to use an additional program in the development of my scripts. With a true fullscreen mode, I could use only AvsPmod.

I think, there is a good reason for that request. As I said above, I edit a lot of 3D-clips and I would like to be able to judge them in 3D.

Actuel there's a new autostereoscopic display in the Acer Predator Helios 300 with SpacialLabs technology. Using eye tracking, it provides a pristine stereoscopic image that I can view without glasses. This works very well.

This device uses a program running in the background (SpacialLabs Go), that can display any content in stereoscopic 3D at the touch of a button. The requirement is, that the content is displayed in half-side-by-side and in fullscreen mode.

Half side-by-side is generated by the script, that's no problem. The only thing missing is to display in fullscreen. As I said, it would be nice, if this could be done.
It could have been so simple, but the script/video splitter can't be hidden. It's a native windows component and you can't even change the width or color.

Had to create a new fullscreen window.
I can't foresee where problems will arise, because several functions access the size of the client area of the main window and also the positions of the splitters.
So test and report problems.

Fullsize: Press Ctrl and make a double click or use the menu (make shortcut)

Fullscreen: Press Shift and make a double click or use menu Video > Additional > 'Fullscreen' (make a shortcut) or hold shift when clicking on the Fullsize menu

Another double-click switches to the normal view or from Fullscreen to Fullsize. Esc resets all.
Download see below.


I'm just enabling Display filter by default nothing else.


You can enable or disable the display filter at program start under Program Options > Misc2.

https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=share_link

StvG
17th February 2023, 02:15
You can enable or disable the display filter at program start under Program Options > Misc2.

https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=share_link

Thanks.

kedautinh12
17th February 2023, 02:36
new update from Dogway
https://github.com/Dogway/Avisynth-Scripts/tree/master/Tools/AvsPmod

KreuzBlick
17th February 2023, 15:13
Fullscreen: Press Shift and make a double click or use menu Video > Additional > 'Fullscreen' (make a shortcut) or hold shift when clicking on the Fullsize menu


At first sight it is great! It is a huge step forward.
I had not dared to hope that it would happen so quickly.

I will continue to test and watch.

Tausend Dank! (Thanks a million)

KreuzBlick
19th February 2023, 10:59
Thanks for your continued work.

One observation and suggestion:
It is expected that in fullscreen mode the image fills the whole screen. However, whether that is the case depends on the zoom factor. The correct mode should be "Fit inside window". In other cases, the image may be too small or too large.
So my suggestion is to set the zoom mode to "Fit inside window" at the same time when switching to fullscreen. When exiting, the previous zoom mode could be set again. Possibly this behavior could be controlled by an option, but I think this should be the normal behavior. Virtualdub does it the same way.

gispos
19th February 2023, 16:20
Thanks for your continued work.

One observation and suggestion:
It is expected that in fullscreen mode the image fills the whole screen. However, whether that is the case depends on the zoom factor. The correct mode should be "Fit inside window". In other cases, the image may be too small or too large.
So my suggestion is to set the zoom mode to "Fit inside window" at the same time when switching to fullscreen. When exiting, the previous zoom mode could be set again. Possibly this behavior could be controlled by an option, but I think this should be the normal behavior. Virtualdub does it the same way.
I'm still thinking about that, but AvsPmod is not VirtualDub.
There are three types of zoom: Normal, Antialiasing and Resample Zoom.

So this will be an options mess and the old zoom value should be saved.

I don't know what will come or not.

gispos
21st February 2023, 21:05
...Possibly this behavior could be controlled by an option, but I think this should be the normal behavior. Virtualdub does it the same way.
I'm still thinking about that, but AvsPmod is not VirtualDub.

It is much more complex to handle different zoom modes and especially multiple tabs than just switching from normal to fullscreen and back.
In addition, there are also special functions such as the 'Split View' or 'Save pos & zoom on tab change'.

Added Automatic zoom in fullscreen mode.
Program options > Misc2 > 'Fullscreen zoom', None, Normal, Resample, default Normal

Normal zoom:
All resample filters of the tabs are turned off.
If the option 'Save pos & zoom on tab change' is enabled, the saved zoom values of the other tabs will not be overwritten when switching tabs in fullscreen mode.
The prerequisite for this is that the fullscreen mode is ended with the tab with which it was started. Or the tab reset to 100% zoom.
At least that's my plan, whether it works...:rolleyes:

Resample zoom:
If Fullscreen is started and ended with the same tab, the zoom that existed before the fullscreen mode is restored.
If a tab is changed in Fullscreen mode, this tab will retain the resample filter even after Fullscreen mode is ended.

PoeBear
21st February 2023, 23:38
Is there a way to hide the bottom controls and side/top borders when in fullscreen mode? I use fullscreen to compare multiple plugin settings in different tabs, and it helps remove most of the windows that distract from the image itself, but the bottom controls (and sides to an extent) can still be distracting in the darker scenes. Or maybe a way to set darker colors when only in full screen? I like the Solarized dark in non-fullscreen mode

Also FWIW, I use fullscreen in a 2-4x zoom most of time. Fit inside window isn't very useful for me because its fractional scaling, which creates aliasing. Useful for playback checking, but not for when you only want to see how image truly looks

gispos
22nd February 2023, 19:19
Is there a way to hide the bottom controls and side/top borders when in fullscreen mode?
Look at the last Pre-Release. Old Fullscreen mode is now called Fullsize and there is a new Fullscreen mode.
Set the Fullscreen option to None. (changelog and readmeFullscreen)

gispos
5th March 2023, 15:27
AvsPmod 2.7.3.7 (https://github.com/gispos/AvsPmod/releases)

* Added Fullscreen mode, old Fullscreen mode now called Fullsize (you must set new shortcut)
- press Shift on double clicking the video or use menu Video > Additional > 'Fullscreen'
- remainder: Press Ctrl on double clicking the video for Fullsize mode
* Added Program Options > Misc2 > 'Fullscreen zoom' default normal fill, read the readme_FullscreenZoom.txt in the Archive.
- for Resample: the Resample zoom must be enabled, Program Options > Misc2 > 'Show Resample zoom menu'
* Video controls can be shown in Fullscreen mode.
- move the mouse at the very bottom of the screen edge (10 pixels x DPI scalling).
- they are hidden again when you left-click in the video window.
* Added Program options > Misc2 > 'Display filter enabled on startup'
* Numbers Wheel faster option is now disabled at start (otherwise the last decimal digit could not be changed).
- toggle between fast and normal: if active then a middle mouse click. The status bar shows the status.
* When the video is drawn with Resize Filter a small green triangle is visible in the upper left corner.
* Fixed: At the top left of the video window sometimes appeared a small square (10x10 pixel).

gispos
11th March 2023, 18:38
AvsPmod 2.7.3.8 - 2.7.3.9 (https://github.com/gispos/AvsPmod/releases)

* Fix: Fullscreen mode did not work with larger video dimensions.
- some code additions and changes for the Fullscreen mode.
* Big Note:
- If Avisynth is trimmed too much with SetMemoryMax, all AvsPmod filters will take longer.
- The Resample filter normally takes less than 1 second, but if the Avisynth memory is reduced too much, it can take 10 seconds.
* When exiting the Fullscreen mode, the slider window is restored if it was visible before.
* If AvsPmod is terminated, it now looks nicer.
* 2.7.3.9 Fix: The fullscreen window sometimes appeared in normal size when fullscreen was not active.


Big Note:
- If Avisynth is trimmed too much with SetMemoryMax, all AvsPmod filters will take longer.
- The Resample filter normally takes less than 1 second, but if the Avisynth memory is reduced too much, it can take 10 seconds or longer

gispos
19th March 2023, 11:15
AvsPmod 2.7.4.0 (https://github.com/gispos/AvsPmod/releases)

* Fullscreen mode reworked.
* Fullsize\Fullscreen mode now only possible when accessing avisynth in threads enabled. (Options > Access avisynth in threads)
* Added: When fullsize or fullscreen an information dialog appears when a frame is loaded and the loading takes longer than 4 seconds.
- under Program Options > Misc2 > 'Fullscreen\Fullsize progress dialog' you can set the position for this.
* Fix: Resample zoom flickering when zooming with the mouse wheel.
* Some other changes

FranceBB
19th March 2023, 14:54
Thanks for the new version, once again. :)

GAP
26th March 2023, 15:26
Edit: I will make a thread about this.

gispos
26th March 2023, 15:39
AvsPmod 2.7.4.1 (https://github.com/gispos/AvsPmod/releases)

* Added: Options > Font and Colors > 'Video controls', color of video controls can be changed here (Dark theme).
- in fullscreen mode the dark theme is always used.
- please change only limited (a bit lighter or darker or change color slightly), some other values calculated from it.
* Fullsize mode: Upper bar (splitter) is now a bit smaller.

FranceBB
26th March 2023, 16:04
Ah, sweet.
I'm a classic light theme user for historical reason, but given how many people are moving to dark themes in lots of different IDEs, I think they're gonna love having a dark theme in AVSPmod mod too.
Well done as always, Gispos. :)
I'll try it out on Monday at work out of curiosity.

gispos
26th March 2023, 20:58
So as I wrote, only the video controls can be changed. wxPython has native windows components whose color or size cannot be changed.
This includes for example the window splitter's and the tabs.

PoeBear
28th March 2023, 04:19
Loving the new fullscreen mode. Is it possible to add an option (unless I'm missing it) to hide the scrollbars altogether when the video is larger than the display area?

I grab the image with left click to pan around, so the scrollbars are really just the last remnants of the UI that can distract when looking at a darker scene

ErazorTT
28th March 2023, 14:46
Is it like that, that its supposed to look in dark mode?
https://drive.google.com/file/d/13HY-m8T61gREPn1__QiA5xFAXRDWxsc2/view?usp=share_link

gispos
28th March 2023, 16:11
Loving the new fullscreen mode. Is it possible to add an option (unless I'm missing it) to hide the scrollbars altogether when the video is larger than the display area?

This option has been around for a while, and it's not that hard to find.:) Menubar > Options > 'Hide video window scrollbars'
And if you go to the last page under Menubar > Options > 'Fonts and colors...' and check 'Video controls color', it will be darker even in normal mode, see post from ErazorTT

Is it like that, that its supposed to look in dark mode?
https://drive.google.com/file/d/13HY-m8T61gREPn1__QiA5xFAXRDWxsc2/view?usp=share_link
Yes, but with the video open, the borders are narrower and the slider side bar is also darker.
But why this question?

gispos
29th March 2023, 16:43
'Dark theme' I have to take up this topic again.

Apparently some have not read the last changelog properly. ;)

Version 2.7.4.1 [2023-03-25] GPo
--------------------------
* Added: Options > Font and Colors > 'Video controls', color of video controls can be changed here (Dark theme).

Dark Theme clearly refers to the video controls, and the video controls are the slider and the buttons.

Also the tooltips in the color options say two things 'Video controls color' and 'Colorize the video controls and slider side bar'

I think I have written it four times here, there are no themes for wxPython (not even for the latest version) and since wxPython uses native OS components some things cannot be changed, neither color nor size.
This includes the window splitter's, the tabs, the menu bar, the borders, the context menu and so on...

With the status bar only the background can be changed but not the font color. And it also looks pretty 'crappy' when everything is dark at the bottom and light at the top.

I tried to get it darker but at the same time still get a visually appealing look.
It's an option that you don't necessarily have to turn on.

Complaints please to Microsoft, because I can not understand that they complicate the theme so much that sytem files must be hacked to use an application wide theme.

videoFred
3rd April 2023, 13:36
I have a question:

When loading a file with audio in AvsPmod, I have no sound in the video preview.

When switching to external player (in my case Virtualdub2) there is sound.

Is there a solution for this?

Thank you in advance,
Fred.

gispos
3rd April 2023, 20:47
I have a question:

When loading a file with audio in AvsPmod, I have no sound in the video preview.

When switching to external player (in my case Virtualdub2) there is sound.

Is there a solution for this?

Thank you in advance,
Fred.
AvsPmod does not play audio, this was never implemented.
I also have no starting point how this could be realized, had already started an attempt with a python componente which unfortunately failed.:o
So no audio.

An alternative would be someone who knows avisynth audio and writes a DirectSound plugin for avisynth. :)

kedautinh12
3rd April 2023, 23:13
Avisynth+ support audio cache same old avs now

Reel.Deel
3rd April 2023, 23:36
Avisynth+ support audio cache same old avs now

That has nothing to do with why AvsPmod can't play audio.

videoFred
4th April 2023, 10:41
AvsPmod does not play audio, this was never implemented.


I understand.

No big problem because I can check sound with the external player.

Fred.

FranceBB
10th April 2023, 20:04
Same here. I always use AVSPmod mod to code and when I'm ready and everything, I just drag and drop the script to Virtual Dub filtermod to listen to the sound too and check whether it's in sync or not etc.
It is a bit annoying, I should say, but I consider AVSPmod mod as an IDE for coding purposes, so I can sort of live with that.
If one day there will be audio support, even better, but until then, no big deal.
I mean, we've been living without audio in AvsP since 2006, it's 2023 and we're thriving, so I guess we can keep coping without it just fine xD

gispos
29th April 2023, 15:00
The first AvsPmod version with audio playback. Don't expect too much from the 4K playback, but there is a useful function 'Audio scrubbing'. See below.

At the moment (I don't know if this will change) the avisynth audio mixer is used for downmix to stereo (I didn't spend any time on own audio downmix code).
The need for an audio mixer is:
The video output channels can only be directly routed to the device output channels (loudspeakers). But if there are only 2 speakers, no audio can be created.
Or if the device output is fixed to 2 speakers, only 2 of maybe 6 channels will be played back.

The audio mixer can be turned on or off under Video > Play video > 'Downmix audio'.

For faster playback:
There is a new option for the 'Resample Filter', you can enter a function after the avisynth resizer separated by a semicolon.
As default if the options.dat not existing, a Prefetch(1) is used, so Spline36Resize;Prefetch(1)
This gives me 30% more speed when using the 'Resample Filter'.
Spline36Resize;sharpen(0.2).Prefetch(1) is also posible but makes it through the additional filter slower.

I can playback 4K on a QHD monitor with 'Resample Filter;Prefetch(1)' without audio dropouts (max. ~26 fps). Without resample filter it is not possible.
I think with a 4K monitor audio playback with 4K video will not be possible.

Use 'Split Clip' (avsp_split) to temporarily turn off all subsequent filters for non-stuttering audio playback.

Audio scrubbing:
The number of frames to be played can be selected in the context menu of the play button.
There is also the function 'Play scrub', which plays the audio of 36 video frames. Even if 'Audio scrubbing' is switched off.
This function should work well in conjunction with 'Split View' for an audio synchronous check (original vs. encoded).
If 'Split View' is activated, the audio of both clips will be played one after the other. With visual display of the currently used clip.

Preview Filter:
Audio scrubbing and audio mixer are turned off. So only video with 2 channel audio can be played back in the playback.
Or there must be enough device outputs to play all channels. Or you can insert an audio downmix function in the script.

It is the first version with audio, time will tell if and what can or must be changed.

This audio mixers are used.
You can also use your own mixer and add the function to the script, then no downmix will be used in AvsPmod, and the audio will also work with the 'Preview Filter'. Except scrubbing.
But I can already hear the screaming when someone forgets to remove their own audio downmix before encoding. :)

channels >= 8:
'a = ConvertAudioToFloat()'
'flr = Getchannel(a, 1, 2, 3, 4)'
'blr = Getchannel(a, 5, 6)'
'slr = Getchannel(a, 7, 8)'
'sur = MixAudio(blr, slr, 1.0, 1.0)'
'mc = mergechannels(flr, sur)'
'flr = GetChannel(mc, 1, 2)'
'fcc = GetChannel(mc, 3, 3)'
'lrc = MixAudio(flr, fcc, 0.3694, 0.2612)'
'blr = GetChannel(mc, 5, 6)'
'MixAudio(lrc, blr, 1.0, 0.3694)'

channels >= 6:
'flr = GetChannel(1, 2)'
'fcc = GetChannel(3, 3)'
'lrc = MixAudio(flr, fcc, 0.3694, 0.2612)'
'blr = GetChannel(5, 6)'
'MixAudio(lrc, blr, 1.0, 0.3694)'

channels >= 4:
'flr = GetChannel(1, 2)'
'blr = GetChannel(3, 4)'
'MixAudio(flr, blr, 0.5, 0.5)'

channels == 3:
'flr = GetChannel(1, 2)'
'fcc = GetChannel(3, 3)'
'MixAudio(flr, fcc, 0.5858, 0.4142)'

And finally, I have a request:
For me, the 4 channel output does not work with Win10, so I have only stereo available, I can not check whether really all channels are read and directly forwarded to the output.
So if someone has a 6 channel system and hears all 6 channels with the audio mixer turned off, he should let me know so that I no longer have to worry about it.

gispos
6th May 2023, 14:02
AvsPmod 2.7.4.5 (https://github.com/gispos/AvsPmod/releases)

* Added audio playback, for full Info please read the readme_audio.txt
- for faster playback: use 'Split Clip' and put Prefetch after the 'Resample Filter', see below (Options > Resample Filter)
* Added audio scrubbing (audio sound while video frame is scrolling)
* Added to play button context menu:'Play audio', 'Audio scrubbing', 'Audio scrub count'.
* Added to Video > Play video > 'Play audio', 'Play scrub', 'Audio scrubbing', 'Downmix audio' (make a shortcut for 'Play scrub').
* Added to Play button context menu 'Audio volume'. increase/decrease in Decibel.
- Note: There is no level limiter, the audio can get clipping.
* Added Options > 'Prefetch display conversion' (Test it, I have it enabled).
- the function uses Prefetch(2,2) for RGB conversion for the display.
- this speeds up the video frame drawing by about 1 to 30% depending on the color format. So also the playback.
- if this function is switched on, the prefetch for the 'Resample filter' (see below) is superfluous and therefore not used.
* Resample Filter (resample zoom):
- it is now posible do use another function after the resample filter, the function must be writen after the resizer separated by a semicolon.
- example: Spline36Resize;Prefetch(1) or Spline36Resize;sharpen(0.2).Prefetch(1) is also posible.
- use prefetch after the resizer for more playback speed when the 'Resample Filter' is enabled.
* The External Player button has got a context menu in which the function of the button can be selected (External Player, Audio scrub).
- audio scrub will play min 36 video frames or 48 if audio scrub count 48
* Added Menubar > Options > 'Restore fullscreen', when toggle with the middle mouse button.
* Changed color of timeline selection markers for video controls dark theme.
* Improved 'Preview Filter' speed a bit.
* Fixed drawing snapshot if 'Split View alternate' enabled.
* Fixed: rare occurrence when clip frame count is 0 no error handling was done.
* Bugfix: 'Fast Clip' ignored 'Toggle Tags' (Filters could not be switched off with 'Toggle Tags').
* Bugfix: Copy new tab
* Some other changes

VoodooFX
7th May 2023, 15:53
What's with this:

https://i.imgur.com/XyCzFAa.png

Shouldn't the output be mod2 there?

EDIT:
Similar error in MeGUI, so it's not AvsPmod's fault, strange that it doesn't show error in "red letters" aka Avisynth output.
I've posted there: https://forum.doom9.org/showthread.php?p=1986801#post1986801

gispos
7th May 2023, 17:04
What's with this:

https://i.imgur.com/XyCzFAa.png

Shouldn't the output be mod2 there?
Maybe you should change the 91 to 90.

VoodooFX
7th May 2023, 17:19
Maybe you should change the 91 to 90.

No, I don't want it changed.

gispos
7th May 2023, 18:52
No, I don't want it changed.

;) Then complain to the avisynth developers.
Man, this is an avisynth error message, try this with Planar format Spline36Resize(333, 111)

FranceBB
8th May 2023, 12:54
The first AvsPmod version with audio playback

...and just like that, 23 years later, I can stop drag-and-dropping .avs files to VirtualDub.
Thank you, Gispos and farewell VirtualDub, my old friend.


EDIT: Houston, we have a problem.

Works like a charm on Windows 10 Enterprise x64 22H2 and Windows Sever 2019 x64, however on Windows XP Professional x86 it starts playing the audio and then:

https://i.imgur.com/RFMp8kV.png

in particular, with a simple ColorBars(848, 480, pixel_type="YV12") it fails after a few frames

https://i.imgur.com/QfknxCJ.png

Emulgator
9th May 2023, 23:57
gispos, big hugs !
Finally audio preview, what a nice worrking now.

kedautinh12
10th May 2023, 01:03
And downmix too, thanks very much :D

videoFred
10th May 2023, 13:41
...and just like that, 23 years later, I can stop drag-and-dropping .avs files to VirtualDub.
Thank you, Gispos and farewell VirtualDub, my old friend.


I agree:sound option works great!

Thank you Gispos! :thanks:

Fred.

gispos
10th May 2023, 17:28
...
EDIT: Houston, we have a problem.
on Windows XP Professional x86 it starts playing the audio and then:

https://i.imgur.com/RFMp8kV.png
]

Everything could be so beautiful, but no, the FranceBB has to deliver Job's messages. :)

This will be difficult.
1.) Under Win10 64bit there are no problems with the AvsPmod 32bit version for me.
2.) I don't have a 32bit system for testing.

What misleads me is that a few sounds are played and then there is an error. I would expect that no sound is heard or that AvsPmod crashes immediately.

So wrong pointer or audio can not be created = no sound
Buffer size is not correct (too small) = crashes

You need to check a few things.
1.) Does the audio scrubbing work?
In the context menu of the play button set the scrub count to 1.
Set there also Audio scrubbing to on.
And now run the video with the right arrow key. What happens?

2) In the context menu of the 'External Player' button select Audio scrub.
Does the audio play without error message when you click on the button?

FranceBB
12th May 2023, 10:56
You need to check a few things.
1.) Does the audio scrubbing work?
In the context menu of the play button set the scrub count to 1.
Set there also Audio scrubbing to on.
And now run the video with the right arrow key. What happens?


Done:

https://i.imgur.com/26ESQSc.png


it started playing, I could hear the sound just fine, went on for a few seconds, then:

https://i.imgur.com/rzXHveX.png



2) In the context menu of the 'External Player' button select Audio scrub.
Does the audio play without error message when you click on the button?

Uhmmm if this is what you mean, it was already selected:

https://i.imgur.com/1Ibabhb.png


What's interesting is that after making it crash, if I try to do it again then it crashes much faster, after just 1 sec.

Something fishy is going on here... uhmmmmmmm

FranceBB
12th May 2023, 11:04
Another update, if I right click and disable "Play audio" and "Audio scrubbing" from the context menu of the play button and I get rid of the "Play audio", "Audio scrubbing" and "Downmix audio" in the preview menu (right-click), then no audio is played and playback goes on just fine even if I'm indexing the audio etc.
In other words, disabling audio output makes the new version behave just like any other version of AVSPmod mod.

gispos
12th May 2023, 20:53
Another update, if I right click and disable "Play audio" and "Audio scrubbing" from the context menu of the play button and I get rid of the "Play audio", "Audio scrubbing" and "Downmix audio" in the preview menu (right-click), then no audio is played and playback goes on just fine even if I'm indexing the audio etc.
In other words, disabling audio output makes the new version behave just like any other version of AVSPmod mod.

It would be bad if it were not so.
The error comes from the audio, if you turn off the audio everything is as with versions without audio.

'Play audio' is the sound when you playback.
'Audio scrubbing' is the sound when you change the frame.
'Scrub count' determines from how many video frames the sound should be played when scrolling a frame.

'Play scrub' plays at least 36 frames or 48 if scrub count is 48.
You can create a shortcut to this function or use the button to the right of the play button.
This is the 'External Player' button. Under Options this button can be assigned to a program. What you should know as a longtime AvsPmod user.

And this button (the button to the right of the play button) has a context menu, there you can select the function of the button.
If you select 'Audio scrub' the audio will be played when you click on the button even if 'Audio scrubbing' is turned off.

Please re-read and internalize it. :)

Audio scrubbing:
There is also the function 'Play scrub', which plays the audio of 36 video frames. Even if 'Audio scrubbing' is switched off.
This function should work well in conjunction with 'Split View' for an audio synchronous check (original vs. encoded).
If 'Split View' is activated, the audio of both clips will be played one after the other. With visual display of the currently used clip.


Pre-Release 2.7.4.6, I hope that the change can also teach Win32 to sing. :)
https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=share_link

FranceBB
12th May 2023, 22:32
Ok, so I tested the pre-release 2.7.4.6

Audio scrubbing works, in the sense that if I jump back and forth in the timeline or if I move frame by frame I can hear it, no problem at all.
Audio also works if I click on the timeline and long press the right arrow on the keyboard to keep the playback going.
Audio doesn't work IF and only IF I click the play button.

It honestly doesn't make sense, but this video will show everything: https://we.tl/t-wKdCAvscpa

kedautinh12
13th May 2023, 04:59
Wow, first time support 32bit in pre-release

gispos
13th May 2023, 11:52
Ok, so I tested the pre-release 2.7.4.6

Audio scrubbing works, in the sense that if I jump back and forth in the timeline or if I move frame by frame I can hear it, no problem at all.
Audio also works if I click on the timeline and long press the right arrow on the keyboard to keep the playback going.
Audio doesn't work IF and only IF I click the play button.

It honestly doesn't make sense, but this video will show everything: https://we.tl/t-wKdCAvscpa
The whole thing looks pretty jerky too, video is only 720 x 576 yet it jerks. Also, the sound does not sound clean.
Does the sound sound better when you click on the button to the right of the play button? Or is the audio clipping from your recording?

Does it work better for you on Win10?
Have you tried a different audio format or a different video/audio source filter?

I also noticed that the status bar is cut off on the right.
I am at a loss at the moment.

Edit:
What happens if you set the audio scrub count to 36 or 48?
Start the playback at frame 0, so a small frame nr, I don't know (samples * frame) if this will cause problems.
What maximum fps do you get in playback when the audio is turned off?

gispos
13th May 2023, 17:24
Another update, if I right click and disable "Play audio" and "Audio scrubbing" from the context menu of the play button and I get rid of the "Play audio", "Audio scrubbing" and "Downmix audio" in the preview menu (right-click), then no audio is played and playback goes on just fine even if I'm indexing the audio etc.
In other words, disabling audio output makes the new version behave just like any other version of AVSPmod mod.
All variables for the audio are now created in the thread. Test it.
https://drive.google.com/drive/folders/18rt8VtT-efkxmz4g7YWtFcmUlZ2s7E7G?usp=share_link

DTL
18th May 2023, 11:09
From AVS github about drawing frame to display:
"DirectX Display should be very difficult to implement, AvsPmod is very extensive, many functions are based on existing.
This function is used to draw. And as far as I know, the GDI can only process RGB data and is also CPU heavy.

if dc:
hdc = dc.GetHDC()
if size is None:
w = self.DisplayWidth
h = self.DisplayHeight
else:
w, h = size
row_size = self.display_frame.get_row_size()
if self.display_pitch == row_size:
pBits = self.pBits
else:
buf = ctypes.create_string_buffer(self.display_pitch * self.DisplayHeight)
pBits = ctypes.pointer(buf) # GPo new
ctypes.memmove(pBits, self.pBits, self.display_pitch * (self.DisplayHeight - 1) + row_size)

DrawDibDraw(handleDib[0], hdc, offset[0], offset[1], w, h,
self.pInfo, pBits, srcXY[0], srcXY[1], w, h, 0)"
"

1. To make things faster the ctypes.memmove(pBits, self.pBits, self.display_pitch * (self.DisplayHeight - 1) + row_size) operation must be avoided in all cases. So AVS output must provide self.display_pitch == row_size: ? It must be created at AVS plugin/core.

2. You use DrawDibDraw - it is not pure GDI drawing (as may be at Win 3.11 times ?) but VfW from Win2000 and later. Also it is very interconnected to DirectShow API - the Win docs about BITMAPINFOHEADER forward to FourCC and it can be lots of 4:2:0 formats and also 8,10,16 bits.

So may be start from experiments to provide compressed formats to drawing ? There about 6..9 different 4:2:0 formats (including named YV12) in DirectShow so may be you can finally feed AVS output to VfW in its natural comprssed YUV or may be simple 1 pass data shuffling plugin required to convert from AVS YUV byte order into DirectShow supported YUV byte orders.

https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader -
biCompression

For compressed video and YUV formats, this member is a FOURCC code, specified as a DWORD in little-endian order. For example, YUYV video has the FOURCC 'VYUY' or 0x56595559. For more information, see FOURCC Codes.

For compressed video formats and non-RGB video formats (such as YUV), the biCompression member of the BITMAPINFOHEADER structure should be set to the FOURCC code.

https://learn.microsoft.com/en-us/windows/win32/directshow/yuv-video-subtypes

MEDIASUBTYPE_IMC1 IMC1 4:2:0 Planar 8
MEDIASUBTYPE_IMC3 IMC2 4:2:0 Planar 8
MEDIASUBTYPE_IMC2 IMC3 4:2:0 Planar 8
MEDIASUBTYPE_IMC4 IMC4 4:2:0 Planar 8
MEDIASUBTYPE_YV12 YV12 4:2:0 Planar 8
MEDIASUBTYPE_NV12 NV12 4:2:0 Planar 8

MEDIASUBTYPE_I420 I420 4:2:0 Planar 8
MEDIASUBTYPE_IYUV IYUV 4:2:0 Planar 8

I420 consists of a Y plane, followed by a U plane, followed by a V plane.

IYUV is identical to I420.

The GUID name of media subtype and FourCC may be equal at the last 4 letters ?

So try to request some simple YV12 from AVS and set biCompression member of the BITMAPINFOHEADER to some possible 4:2:0 FourCC (and also data size - row size and all other) and look if it can directly draw 4:2:0 ? At least in 8 bits per sample.

gispos
18th May 2023, 11:54
@DTL, the display_pitch and everything else needed is read on frame fetch.
That with vfw I had known, must look at the BITMAPINFOHEADER and FourCC.

Thanks.

Edit: "ctypes.memmove(pBits, self.pBits, self.display_pitch * (self.DisplayHeight - 1) + row_size) operation must be avoided in all cases"
Have only now understood it properly. Yes, I had never done it myself. Had changed this function and removed the mem move. I never saw a difference.
At some point there were problems and I did not know at that time what it was and changed that again. At that time avisynth was the culprit.

I will try again without mem move.

def DrawFrame(self, frame, dc=None, offset=(0,0), size=None, srcXY=(0,0)):
if not self._GetFrame(frame):
return
if dc:
hdc = dc.GetHDC()
if size is None:
w = self.DisplayWidth
h = self.DisplayHeight
else:
w, h = size
DrawDibDraw(handleDib[0], hdc, offset[0], offset[1], w, h,
self.pInfo, self.pBits, srcXY[0], srcXY[1], w, h, 0)
return True


Edit2:
One more question: I don't understand about mod 64, why not at least mod 32, because old videos often have 4:3 (so 1440 x 1080 if you enlarge them).

DTL
18th May 2023, 14:16
"I don't understand about mod 64,"

It may be not limitation at all - I will try to see how non-mod64 is processed with current version. May be if last non-mod64 columns are not processed - simply add +1 pass of 64 columns in next version. It looks new AVS(+?) provide mod64 buffers length for any frame width.

Current AVX2 engine in DecodeYV12toRGB process 64 columns per pass so it was idea that non-mod64 frame widths (with row pitch non-mod64 too) will not be completely processed. Simply adding +1 SIMD pass if row pitch is non-mod64 will overrrun to next row and will cause total buffer overrun after last column (general protection exception). And adding scalar per column processing is not effective in performance. But as I see in Asd-g plugins there is no processing of residuals of non-mod64 width. So need to make same as in the Asd-g plugins.

If design AVX512 version of engine it will process 128 or even 256 columns per pass so it will be required to combine AVX512 loop for >128..256 frame widths + AVX2 for processing last up to 64 columns.

Emulgator
18th May 2023, 15:26
If design AVX512 version of engine it will process 128 or even 256 columns per pass so it will be required to combine AVX512 loop for >128..256 frame widths + AVX2 for processing last up to 64 columns.

Why combine different sets ? Isn't (virtual) padding any plane mod 256 and (virtual) truncating afterwards cheaper ?

DTL
18th May 2023, 18:10
" Isn't (virtual) padding any plane mod 256 and (virtual) truncating afterwards cheaper ?"

CPU operates in physical domain (even with virtual address space). So it AVS must provide mod128 or mod256 each row length in virtual address space for both source and target frames. May be only in AVX512 with masked read and masked write may somehow workaround end-of-rows conditions. But it may be also done with AVX2 ending.

Also I not sure if masked read/write can cross allocated buffer edges without memory protection error (if it also cross OS RAM protected 4 kB page).

As I see current AVS+ core have default rows start address alignment to 64bytes (to be compatible with direct up to AVX512 load/store without pre-processing). And also may be row width is mod64 to be compatible with mod64 columns read/write with single AVX512 dataword of 64 bytes. But to be more effective the SIMD program need to load/store several datawords if possible. So it may be about 4 of 64bytes about good effective for AVX512 version of engine. May be even 8x64 bytes.

Having too much rows padding make RAM usage no effective for small frame sizes (even 16x16 frame need too have 64 or 128 or 256 bytes row size). So it turn AVS builds may be optimized either for SD or for FHD/UHD processing. But not to both at once (as pintef like to keep).

Though current hardware display accelerators typically use large size row padding (may be up to 256 bytes ?) to make more effective DMA transfer. No one in 202x years want to work with too small datasize transfers.

AVX512 also not like to load single 64bytes word (L1D cacheline typical) - the L2 cache line typically also 128 bytes. And DDR RAM also like to have large contigous transfers without bus reversing and/or accepting new commands of address change or other. All PC architecture work faster with large datasets transfers in contigous addressing.

Emulgator
18th May 2023, 22:17
Back to WinXP32ProSP3, just investigating, maybe it helps:
Just went to XP-compatible AviSynth+ 3.7.3.0 32bit (Universal Installer)
Installed MS Visual C++ 2015-2019 on top for AviSynth+.
Now AvsPmod 2.7.4.6, source 200kB.mp4,
Script was just 1 line DirectShowSource only.
Playback without audio crashes sometimes after 17 frames, sometimes plays to the end
On that system was still Visual C++ 2005 msvcrt.dll 7.0.2600.5512 from 2005 there and raised the flag.
Continuing...

Indeed, renaming the old msvcrt.dll to msvcrt.dll.dead solved that.

gispos
19th May 2023, 09:41
Is it the msvcrt90.dll that is in the AvsPmod directory that you renamed? Or one that is on your system?

FranceBB does not give any feedback, does the audio work now on XP with the latest pre-release?

Emulgator
23rd May 2023, 00:07
That one Visual C++ 2005 msvcrt.dll 7.0.2600.5512 from 2005 was in my system32 folder, and I named it dead because I suspected my system.

P.S. I was unsuccessful. That .dll is restored immediately after renaming.
Next crashreport showed the same .dll
Investigating...
LWLibavAudioSource()
FFAudioSource()
both show same behaviour: crash after 10..20 frames.
I may have to uninstall that Visual C++ 2005 or somehow keep it from being called.

P.P.S This was with 32 bit prerelease 6.
I just saw you offered prerelease 10. Will repeat tests.
Ah, prerelease 10 is x64 only. Have only 32bit WinXP here.

kedautinh12
23rd May 2023, 06:19
You can try All in one ver
https://github.com/abbodi1406/vcredist/releases

gispos
23rd May 2023, 19:10
That one Visual C++ 2005 msvcrt.dll 7.0.2600.5512 from 2005 was in my system32 folder, and I named it dead because I suspected my system.

Please try the one kedautinh12 posted, I hope it helps, otherwise contact me again or ask FranceBB who also uses XP.
Also the last pre-release will not change anything, have changed nothing in this regard.


New Pre-Release (x64, x86)
https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=share_link

* Audio creation changed. All variables are now created in the play thread (Win32-XP problems fixed?)
* Video > Display, 3 menu items added.
- 'Prefetch RGB display conversion' and 'Fast YUV420 display conversion' and ' - fast YUV auto reset'
- Prefetch RGB display conversion: uses Prefetch(2,2) for the default (precise) RGB32 conversion.
- Fast YUV420 display conversion: function 'DecodeYUVtoRGB' must exist (DecodeYUVtoRGB.dll) and CPU instructions AVX2 available.
- if DecodeYUVtoRGB used, prefetch is disabled. So both can always be switched on.
- the fast YUV decode will be always disable if: Preview Filter used or on clip refresh the option ' - fast YUV auto reset' enabled.
- if function DecodeYUVtoRGB not found, the function is loaded from AvsPmod dir if the Dll exist.
- Big thanks to DTL and all contributors for this plugin. Also pinterf will improve the precise YV12 to RGB32 conversion. Thanks.
* Bugfix: Split View can get error on insert new tab and the video dimensions mismatch.
* Bugfix of Bugfix: Fullscreen mode, if video dimensions equal to monitor dimensions.
* Improved error handling for some conditions.

Emulgator
23rd May 2023, 22:44
ked, please stop suggesting that. Big damage. See:
https://forum.doom9.org/showthread.php?p=1981206#post1981206
I had followed that abbodi suggestion, it borked, and it was a PITA to get that system back into working state.

This is to trace incompatibilities, help development and hopefully help other users under same race conditions
I will just have to find a way to disable that old .dll for that occasion, maybe take ownership and rename or something like that.
Or prerelase 11 solves that anyhow. Will see in a minute...

By the way, big thanks to gispos and pinterf and all cooperators.
Having AvsPmod incl. audio preview working on XP is maybe a luxury for some of us to have a last resort when everything else fails.
Besides of 3 WinXP32 systems I can happily work on with 3 Win7 and 2 Win10 systems.

P.S. Tested AvsPmod x86 2.7.4.6 Prerelease 11 on the same WinXP32ProSP3.
The following settings work:
Play video -> Play audio unticked, Audio scrubbing ticked: Play works, Scrubbing works.
What stalls:
The moment I tick Play audio and press Play: Stall after like 10 frames, culprit as above.

StvG
24th May 2023, 09:55
/off

ked, please stop suggesting that. Big damage. See:
https://forum.doom9.org/showthread.php?p=1981206#post1981206
I had followed that abbodi suggestion, it borked, and it was a PITA to get that system back into working state.

From the post(s) you're referring to, it seems both you and the other user who is complaining just blindly installed that aio. Why didn't you installed only the wanted vcredist versions (https://github.com/abbodi1406/vcredist#unattended-switches)?

/end off

Emulgator
24th May 2023, 11:32
Thank you for the hint.
What to avoid I could not foresee, and other users fell into the same hole.

In my case expensive Adobe and Sony Production bundles had brought their own versions of that .dll, which turned out to be deleted.

Too late, I could not foresee that abbodis versions would be incompatible
and brick like more than a half of these programs.

Because I had success once with an earlier abbodi once I expected to get the same behaviour:
The installer opened a GUI which had tickboxes,
that gave the chance to compare installed versions and the chance of interaction.

StvG
24th May 2023, 12:21
/off

Thank you for the hint.
What to avoid I could not foresee, and other users fell into the same hole.

In my case expensive Adobe and Sony Production bundles had brought their own versions of that .dll, which turned out to be deleted.

Too late, I could not foresee that abbodis versions would be incompatible
and brick like more than a half of these programs.

Because I had success once with an earlier abbodi once I expected to get the same behaviour:
The installer opened a GUI which had tickboxes,
that gave the chance to compare installed versions and the chance of interaction.

That aio contains only official MS vsredist. They are installed in the right places System32/SysWOW64 (except 2005, 2008).
The good practice suggests that if any app requires a specific dependency to run, it should be placed in the app path and not in the system path by replacing the official provided versions. That aio wouldn't touch files outside System32/SysWOW64.

/end off

gispos
24th May 2023, 17:16
P.S. Tested AvsPmod x86 2.7.4.6 Prerelease 11 on the same WinXP32ProSP3.
The following settings work:
Play video -> Play audio unticked, Audio scrubbing ticked: Play works, Scrubbing works.
What stalls:
The moment I tick Play audio and press Play: Stall after like 10 frames, culprit as above.
There are two x86 audio test versions. Try it.

This is my last try for now, if I have time and ... and find my old XP, I can install it in a VM. But I don't know if it behaves in a VM like a normal install.

https://drive.google.com/drive/folders/18rt8VtT-efkxmz4g7YWtFcmUlZ2s7E7G?usp=drive_link

Edit:
A little tip about audio scrubbing.
If the audio drop outs with the right arrow key, set the scrub count to 3.

Emulgator
24th May 2023, 23:06
Both versions show different behaviour, address_buf is a success.
This was with a 426x238 .mp4 clip 412frames long, 2CH 44,1k 32bpS after FFAudioSource filter decoding

address_buf: Playing with audio preview from the start stalls at frame 11, same culprit.
Go to any frame and press Play: plays 10 frames, 11th frame stall.
But: Pre-scrub just once from start to minimum 50% AND BACK (in my case 212 frames)
and it will play video & audio fine from every position, without stalling.

cast_buf: Playing with audio preview from the start stalls at frame 4, same culprit.
Go to any frame and press Play: plays 3 frames, 4th frame stall.
Pre-Scrubbing won't help here.

Checking back to Prerelease 11: pre-scrubbing won't help there.

That is fine for my corner case. I was already happy with scrubbing audio...
Many thanks for your continued efforts, gispos. Donation how ?

P.S. Later it became instable, pre-scrubbing did not help anymore. Hm.
Well, still better than nothing.

P.P.S. Ah, I was repeatedly reloading a stalled session which started at frame 89.
Now I started clean, moved slider back to frame 0, closed session and reopened:
All was fine now, pre-scrubbing helped.

gispos
25th May 2023, 20:49
Both versions show different behaviour, address_buf is a success.
This was with a 426x238 .mp4 clip 412frames long, 2CH 44,1k 32bpS after FFAudioSource filter decoding
One more try
https://drive.google.com/drive/folders/18rt8VtT-efkxmz4g7YWtFcmUlZ2s7E7G?usp=drive_link

Please answer me the following:
1.) Audio scrubbing (count 1) always works?
2.) Audio scrubbing (count 48) plays the audio of all 48 video frames?
3.) Playback in threads is as fast or faster than without threads (Options > 'Accessing AviSynth in threads' and Video > Play video > 'Playback in threads' off.

How fast is the playback with threads (tell me the dimensions and color formats of the video).

FranceBB
25th May 2023, 22:27
FranceBB does not give any feedback

Yeah, I know, if anyone wonders why, this is why: Img1 (https://cdn.discordapp.com/attachments/666634951193526343/1111404228976574474/Screenshot_20230525-232307.png)


Anyway I'm better now, so tomorrow I'll make further tests, but the behaviour Emulator was seeing with the last version I tested (i.e scrubbing works, right arrow works, but play button with audio crashes after a few frames) is the same I was experiencing. Now that there is a new version, though, I'll repeat the tests too. :)

Emulgator
26th May 2023, 01:18
The .mp4 clip:
test2 was stalling after 4 frames, just as cast_buf.
Lets drop that clip, it was borked anyway.
Maybe worth a hint in docs that some odd clip might require that small effort of pre-scrubbing...
-----------------------
Now to a proper DV-AVI 720x576x25i capture from TV:
test 2 stalled just once after heavy scrubbing and playing.
address_buf was better:
stable, not a single stall, playback possible from any position without pre-scrubbing.

Answers
1: Yes, all 3 version do audio scrub 1 frame
2: Yes, all 3 version do audio scrub 48 frames
3: Depends on script, I guess.
------------------------------
Back to address_buf:
Only FFvideo/FFaudio sourcefilters, no processing.
"Normal speed" This played in realtime, well almost, 22..24fps insead of 25.

Added QTGMC (EdiMode="nnedi2")
Video-> Playback in threads ticked: 5,45fps 70% CPU, audio scrubs framewise as expected.
Video-> Playback in threads unticked : 5,45fps 70% CPU, audio muted.
"Access AviSynth in threads" made no difference.
This was without Prefetch.

Playback Prefetch (2,2) helps speed a bit: 6fps, 75..80% CPU and delivers double scrubbed audio.
Playback Prefetch (4,12) kills AvsPmod, well this is too much anyway for 3GB RAM and a 7600G CPU.

Ah well, I guess I should test playback without processing, but in "Maximum Speed".
Playback in Threads unticked : 96fps, Audio muted
Playback in Threads ticked : 92fps, Audio scrubs/skips as expected
Playback in Threads ticked Audio scrub unticked: 92fps, Audio ffwds as expected
The last combo with QTGMC and Prefetch (2,2) 5.8fps/80%CPU
The last combo with QTGMC, Audio scrub and Prefetch (2,2) the same 5.8fps/80%CPU.

Beautiful, what a luxury !

FranceBB
26th May 2023, 07:55
Ok, so, I tested test2 as well.

Input source 1:

720x576 25i BT601 TFF yv12 8bit planar source with PCM 24bit stereo 48'000Hz audio muxed in mxf

Audio scrubbing with scrub count to 48 works.
Moving back and forth across the content works and I can hear the audio.
Going frame by frame with the arrow works and I can hear the audio.

Playback without the audio works just fine in realtime.
Playback with the audio also works just fine in realtime for SD contents with CPU being used at around 30% (file indexed with ffms2).
I played it with the play button after turning on the "Play audio" and it just... worked, this time.
I watched 5 minutes of content from minute 25 to minute 30 of a 40+ minutes content and it just... worked.
I jumped to minute 38, played it and, again, it worked.

I don't know what you have done, Gispos, but XP is now singing loud and clear. :D
What a great surprise I found after recovering from the fever. :)



EDIT: Arg. Not so fast. When I jumped to 38, it played for 2 minutes to 40:24.159 before showing the error message "the instruction at 0x70869b2b referenced memory at 0x040cc01c. The memory could not be read. Still, this is yet another improvement and a major step forward.

gispos
27th May 2023, 19:16
AvsPmod 2.7.4.6 final (https://github.com/gispos/AvsPmod/releases)

* Play Thread revised:
- under WinXP the frames were played 2-3 frames slower than the intended fps for the video (I hope fixed).
- under Win10 64bit the maximum fps is about 10% higher on my system (FHD no filter).
* Video > Display, 3 menu items added.
- 'Prefetch RGB display conversion' and 'Fast YUV420 display conversion' and ' - fast YUV auto reset'
- Prefetch RGB display conversion: uses Prefetch(2,2) for the default (precise) RGB32 conversion (I recommend to turn it on, default).
- Fast YUV420 display conversion: function 'DecodeYUVtoRGB' must exist (DecodeYUVtoRGB.dll) and CPU instructions AVX2 available.
- if DecodeYUVtoRGB used, prefetch is disabled. So both can always be switched on.
- the fast YUV decode will be always disable if: Preview Filter used or on clip refresh the option ' - fast YUV auto reset' enabled.
- if function DecodeYUVtoRGB not found, the function is loaded from AvsPmod dir if the Dll exist.
* Added CPU AVX2 availability check. If not, fast YUV decoding is disabled. Also disabled on x86 (no x86 DLL).
- Big thanks to DTL and all contributors for this plugin. Also pinterf will improve the precise YUV to RGB32 conversion. Thanks.
* Bugfix: Split View can get error on insert new tab and the video dimensions mismatch.
* Bugfix of Bugfix: Fullscreen mode, if video dimensions equal to monitor dimensions.
* Improved error handling for some conditions.

Hope it runs well under WinXP.
I think the problem with the too low fps is fixed, and I couldn't get any crashes anymore, even with the wildest movements with the slider during playback (but x64).

@Emulgator, 'Audio scrub count' is also not pre-playing but post-playing of the audio and has nothing to do with the playback,
no matter what you set there it doesn't change anything in the audio playback.

@FranceBB, good improvement of health for you and thank you for the feedback.

FranceBB
27th May 2023, 23:40
Thank you Gispos, as always! :D

It still occasionally leads to the error on XP when audio playback is on and I click play, but still.
As far as performances are concerned, definitely an improvement as I was able to play a FULL HD file at 47fps on XP.

gispos
28th May 2023, 18:00
Thank you Gispos, as always! :D

It still occasionally leads to the error on XP when audio playback is on and I click play, but still.
As far as performances are concerned, definitely an improvement as I was able to play a FULL HD file at 47fps on XP.
Too bad that it does not work with WinXP. @Emulgator do you have problems as well?

Uploaded a Pre-Release x86 before, don't think it helps.... but who knows.
It checks the read audio buffer for its size. Maybe a 32bit system is more sensitive.

https://drive.google.com/drive/folders/18rt8VtT-efkxmz4g7YWtFcmUlZ2s7E7G?usp=drive_link

Edit:
I was able to play a FULL HD file at 47fps on XP.
If not already set, then add the option: Video > Display > 'Prefetch RGB display conversion'.

Emulgator
28th May 2023, 20:08
Not yet, I have yet to return to that XP system.
Travelling with 2x Win10Pro64 atm.

FranceBB
29th May 2023, 07:48
Uploaded a Pre-Release x86 before, don't think it helps.... but who knows.
It checks the read audio buffer for its size. Maybe a 32bit system is more sensitive.


Thanks, I just tested it, but it didn't help... :(




If not already set, then add the option: Video > Display > 'Prefetch RGB display conversion'.

49.93fps out of 50p without audio, 49.80fps out of 50p with audio. Close enough, I'd say. :D
Definitely an improvement from 4-5 tests ago when it was nowhere close.


Too bad that it does not work with WinXP.

I really don't understand. Audio scrubbing works like a charm.
Seeking with my right key works like a charm too.
But if and only if I click "Play" it outputs this after a while: https://i.imgur.com/3RJs76C.png

it makes no sense... :(
Any other ideas?

DTL
29th May 2023, 08:15
"Also disabled on x86 (no x86 DLL)."

New fixed build now have also x86_32 .dll - https://forum.doom9.org/showthread.php?p=1987704#post1987704 . Also the errors in conversion to RGB are now decreased. So the fastest AVX2 engine with 16bit immediate processing now produce residual errors close to natural quantization noise of 8bit samples of YUV.

Also it may be useful for PC-monitor (not supporting professional narrow range with superwhites displaying) script output preview add modes for 'unclipped superwhites' monitoring. With new DecodeYUVtoRGB it is with proc-amp setting of gain=69, offset=0. With standard ConvertToRGB32() using PC-matrix you got and raised blacks and degraded contrast and also required additional Levels() tweak for correct RGB decoding - https://forum.doom9.org/showthread.php?p=1987708#post1987708

So with internal AVS core filters the unclipped superwhites monitoring it is something like

*for YUV source*
Levels(0,1,255,16,235) // to workaround RGB decoding witjh PC-matrices
ConvertToRGB32(matrix=PC...) // to keep superwhites in output
Levels(16,1,255, 0,255) // to put black from 16 to zero to keep contrast

Also it was found 'external plugins' with YUV to RGB decoding like avsresize and fmtc provide a bit better precision narrow RGB range at RGB 8bit output (less average error) and not require Levels() pre-hacking (so should run faster at large frame sizes).

StainlessS
29th May 2023, 11:58
Levels(0,1,255,16,235) // to workaround RGB decoding witjh PC-matrices
Is that supposed to be as default Levels(..., coring=True), ?

EDIT: I think that RGB 'narrow range' is sometimes known as "Studio RGB".

EDIT: Hmm, no mention of "Studio RGB" for a few years, then PoisonDeathRay mentions it,
and then a few hours later I again mention it.

PDR says:
There was an old dedicated "studio RGB" function by "trevlac" for avisynth
here:- https://forum.doom9.org/showthread.php?p=1987708#post1987708
I could not remember 'trevlac' as source of that discussion,
thanx PDR.

EDIT: And it seems FranceBB regularly mentions "Studio RGB" as being one of his favourite things.

FranceBB
29th May 2023, 12:11
I think that RGB 'narrow range' is sometimes known as "Studio RGB".

It is and it's honestly one of the things I had to work with in broadcast due to the fact that you can't carry full range signals via SDI cables 'cause you need bits reserved to timecode and other things.

Needless to say, I hate it to the very core 'cause literally the whole world assumes RGB to be Full PC Range and in Studio RGB (which is limited) there are no metadata whatsoever, so the whole infrastructure needs to be aware of it from start to end, otherwise bad things happen.

DTL
29th May 2023, 13:13
"Is that supposed to be as default Levels(..., coring=True), ?"

As I see from wiki - coring is looks like also some old days hacking/workarounding (to make any good working of lots of different plugins and also VirtualDub plugins) and it may also somehow work with old AVS core Convert(). http://avisynth.nl/index.php/Levels . May be even PC-matrix for Convert() was adapted to work only with 'double-narrow' YUV. And it was not put to public documentation.
But newer external plugins (avsresize and fmtc) can process standard YUV narrow into RGB narrow without any additional hacks and with better precision. Also saving from additional full frame RAM scan and additional precision lost on integer processing.

"RGB 'narrow range' is sometimes known as "Studio RGB"."

May be. Also there are many different words for 16..235 nominal range mapping (shifted black from zero and non-clipped nominal white) - limited, narrow, Studio and may be others. The latest EBU documents of end of 201x and 202x use 'narrow' word as I see.

Like https://tech.ebu.ch/news/2020/05/ebu-publishes-adds-fresh-advice-on-video-signals-and-hdr
The first publication, EBU R 103 v3.0 – Video Signal Tolerance in Digital Television Systems, addresses confusion regarding the use of different video ranges. The most important one involves distinguishing between 'full' and 'narrow' range video.

" whole world assumes RGB to be Full PC Range"

It may be in PC world only. May be good for still imaging like photos with sRGB and MS Word. But as some googling shows the endusers market with game consoles already provide limited RGB and also HDMI have metadata signalling about full or limited RGB. Also for HTPC solutions users may sometime output 4:4:4 RGB in limited range to display device. So limited RGB already known in endusers homes too when dealing with motion pictures and gaming. So for avspmod software display interfacing may be implemented all possible modes - narrow/limited RGB, full RGB, zero black partially narrow range for non-clipping superwhites (16..255 to 0..255 mapping).

Not very old PC display adapters can be also switched between full and narrow/limited range in RGB via some digital connection (HDMI/DP) - https://pcmonitors.info/articles/correcting-hdmi-colour-on-nvidia-and-amd-gpus/ . So user may monitor moving pictures most close to professional video monitor without superwhites clipping (if display tuned/calibrated correctly).

One more idea if it still not implemented to solve PC and motion pictures levels and other displaying (spatial scaling):
For pro level NLE the GUI displayed at standard PC monitors and for best moving pictures master monitoring separate special hardware output to 'video' master monitor is used (SDI when possible like Blackmagic simple SDI output adapter or HDMI or even simple other/secondary monitor). For home use it can be simulated with HDMI output to some TV-set or other 'video' type display. So from Windows software it may require separation of 'video' window from main application window so user can move it to expanded desktop area to other (HDMI for example) 'video' display. Or the application may remember its position or try to draw this window at 'other hardware display' - not primary for example. And user can configure that 'video' control display to use narrow/limited RGB (or YUV in future ?) and keep standard PC RGB levels at application GUI primary display.

2 main difference exist between 'PC' display and 'moving pictures' display:
1. PC typically use full RGB levels with zero black and peak white may be nominal white and use max code value and 'moving pictures' display uses narrow/limited levels with raised black (allow some super blacks or undershoots) and non-max code value nominal white (allow some superwhites or data overshoots).
2. PC typically use direct samples to display pixels mapping with no any scale operation (can display pixel art without distortions) and 'moving pictures' display receive spatially encoded/compressed (contigous image) data and use some system scaler to display upsampled image at its pixel screen (can not display pixel art without distortions).

So because 1 and 2 are significantly different display types for digital data input - it is better to have physically 2 separate monitors for application GUI and Windows interface and 'moting pictures' master monitoring.

Also with some software computing the PC display can be used as 'moving pictures' master monitor but levels re-mapping required (black to zero and max superwhites to max display code value) and in best case correct system upscale (at least 2x if possible).

gispos
30th May 2023, 19:03
"Also disabled on x86 (no x86 DLL)."

New fixed build now have also x86_32 .dll - https://forum.doom9.org/showthread.php?p=1987704#post1987704 . Also the errors in conversion to RGB are now decreased. So the fastest AVX2 engine with 16bit immediate processing now produce residual errors close to natural quantization noise of 8bit samples of YUV.

Thanks! will use it in the next version.
Am curious, have not tried it yet. Will report back.


it makes no sense... :(
Any other ideas?
Playback and scrubbing pass the audio data to different routines.

The whole thing runs through PortAudio via a Python wrapper.
There are two ways to write the data, writing is correct, because it is written to the output stream.

Scrubbing uses the direct write to stream method, I put the whole thing in a thread so that the video frame fetch is not blocked.
The direct writing requires more effort, but for me it was easier to implement the code and test the audio in the beginning.

In the playback a callback function from PortAudio or the wrapper is used. PortAudio fetches the provided audio data itself in this routine.
The advantage: I only have to care about reading the audio data and providing it. This also brings speed advantages in the playback, I don't really trust the Python threads, they mostly behave differently than one is used to from other programming languages.

But apparently there are problems with 32bit in this callback routine.

Here I have a version that uses your own thread for audio playback. I am full of hope.
Not tested much but runs under x64.
https://drive.google.com/drive/folders/18rt8VtT-efkxmz4g7YWtFcmUlZ2s7E7G?usp=drive_link

And I also have something to say about the slower fps (Emulgator):
I had changed that in the last version, don't know if that helped with Emulgator's fps, FranceBB apparently had no problems with it.

Anyway, I have undone the changes. The reason is my stupidity (forgetfulness?), at that time I had sat for days on the playback thread until it ran satisfactorily.
The problem is the timing:
Windows has an accuracy of about 10-20 ms, but this is not enough, so the system timer is increased for the duration of the playback. If the used OS and hardware can't do this to 1 ms, everything runs a bit slower.
According to Microsoft, the performance timer is available from Win 2000, so if it runs slower with XP, then XP or the hardware is to blame.

I tried a loop, which is stupid because it also increases the CPU load. Therefore I have undone this.

The displayed fps are also only average values. It is the read frames with the past time calculated, and with several hundred frames then already deviations can arise.

@FranceBB I only want to read good things :)

poisondeathray
31st May 2023, 05:07
Is that supposed to be as default Levels(..., coring=True), ?


It's supposed to be coring = False, nice catch . Limiting or clipping values is separate step

FranceBB
31st May 2023, 09:11
apparently there are problems with 32bit in this callback routine.

Here I have a version that uses your own thread for audio playback. I am full of hope.

@FranceBB I only want to read good things :)

You wanted to hear only good things and let me tell ya: you got it!
This version works like a charm, including with the playback.
I played a content for 8 minutes and 39 seconds without a break and it just kept going and going with no issue.
I also moved ahead and started playing again and it worked. No problems at all.

- No errors accessing memory
- No crackling sound
- Jumping back and forth worked
- Standard playback worked
- Scrubbing worked
- peak FPS 49.94fps on some 50p contents and 49.81fps on some more complex contents


Sweet. Very sweet, considering that this is probably the best x86 can do.

Awesome, Gispos, awesome.

gispos
31st May 2023, 17:09
You wanted to hear only good things and let me tell ya: you got it!
This version works like a charm, including with the playback.

I am still waiting for a 'EDIT: Arg. Not so fast.' :D

Glad that it works.

StainlessS
31st May 2023, 17:31
@FaBB, More ass kissing required. [EDIT: Use your tongue, he like that]

FranceBB
31st May 2023, 18:21
More ass kissing required. Use your tongue, he like that

Chelsea is blue (https://photos.app.goo.gl/mSkALdDc6uBjmme58) and Gispos is a dude, we don't do that here. :P

I am still waiting for a 'EDIT: Arg. Not so fast.' :D

Glad that it works.

eheheheh not this time. This time it works for real.

Emulgator
31st May 2023, 22:45
2.7.4.7_(Windows_x86-32)_audio_XP: So geil !
2.7.4.7_(Windows_x86-32)_2_audio_XP: the same.

Everything works, scrub, audio, prefetch, normal speed, max.speed.
We are getting closer to Vegas, I feel ;-))

The odd .mp4 clip max unprefetched 260fps.
The proper DV-PAL avi prefetched (2,2) max 110fps, Prefetch 4,10 works too now ! the same 110fps @ 85% CPU playing from 7200rpm SSD.
Now Nominal speed fps (25fps). Reported fps starting with 23,xyz, approaching and crossing 25fps after some 10 frames, nothing to worry about.
QTGMC with Prefetch (4,10): 6,4fps @ 88..98% CPU.

A dream, not a single stall.
Deep respect, gispos !

FranceBB
3rd June 2023, 20:36
Thanks!
Not everyone shows love for XP, but it's nice when people do. :)

gispos
3rd June 2023, 21:47
Sorry, the 2.7.4.7 contained a bug that affected the menu bar. see Bugfix 2.7.4.8

AvsPmod 2.7.4.8 (https://github.com/gispos/AvsPmod/releases)

* Audio playback is now WinXP 32bit compatible
* Fast VUV > RGB conversion (DecodeYUVtoRGB.dll, DTL Doom9) now also for 32 bit available.
* Added: Options > Font & Colors > Mis 2 > 'Video controls frame text field bold', use bold font style or not.
* Added: avisynth 'DelayAudio' as a slider to filterdb.dat
* Minor bugfix audio: In the playback, an attempt was always made to create the audio, even if the video did not contain any audio.
* Bugfix 2.7.4.8: When clicking in the "Video" menu bar, an error is displayed if the video (clip) is not initialized. Sorry.


Edit:
What I noticed about the audio playback with LWLibavAudioSource:
You should always set av_sync to true, otherwise asynchronous playback can occur with some videos.
AvsPmod and VirtualDub2 for example plays them sometimes synchronous and sometimes not synchronous if av_sync is not set.

gispos
8th June 2023, 19:22
AvsPmod 2.7.4.9 Pre-Release

Playback thread revised again:
Replacing old proven routines has increased speed and response, I hope this is not at the expense of robustness.
Instead of an entry into the main thread a lock is used to avoid a collision between main and playthread.

On my system for 1920 x 1080 video without filter:
without 'Prefetch display conversion' from 80 fps to 100 fps
with 'Prefetch display conversion' from 102 fps to 148 fps
with 'Fast YUV420 display conversion' from 100 to 130 fps

With light filtering only 1 to 3 fps increase is left. But this can make the difference to a clean or not clean audio playback.
I am curious if it works with WinXP 32bit.

https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link

FranceBB
9th June 2023, 14:12
I am curious if it works with WinXP 32bit.


Source clip is an MPEG-2 SD in yv12 50p, playback speed set to "Normal Speed".


Playback results on Windows XP x86:

- Legacy legacy settings (video, no audio) 50fps
- Legacy settings (video, audio) 50fps
- Prefetch RGB Display Conversion (video, audio) 50fps
- Prefetch RGB Display Conversion, fast YUV420 auto reset (video, audio) 50fps
- Prefetch RGB Display Conversion, fast YUV420 display conversion using DecodeYUVtoRGB() (video, audio) - error


This is probably because DecodeYUVtoRGB() is expecting AVX2, however on Windows XP there's nothing after SSE4.2

In other words, you can make use of MMX, SSE, SSE2, SSSE3, SSE4.1, SSE4.2 but nothing else. It doesn't matter if the CPU supports them, XP won't use them.
This is an example using a simple utility called "CPU Instruction.exe" which checks the available CPU instructions from the OS:

Supported Features
==================

Vendor String: GenuineIntel
Brand String: Intel(R)Core(TM)i7-6700 CPU@2.60GHz

Instruction Sets
----------------

MMX SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2

Supported Special Instructions
------------------------------

Conditional Moves
FXSAVE and FXSTOR
XSAVE and XSTOR for processor extended state management.
POPCNT
RDRAND
AES (Advanced Encryption Standard) Instruction Set

Please, press enter to end the application ...

if you go to the Intel web page about my CPU, you'll see that it does actually support AVX and AVX2 as well, however that's useless in XP as it will just ignore them.



In fact, manually calling

DecodeYUVtoRGB(matrix=0, threads=1, gain=74, offset=0)

leads to:

https://i.imgur.com/TJQm1DD.png

If and only if DTL wants to make it XP friendly, he should check the available instructions at runtime and use the right codepath accordingly, 'cause otherwise it would fail.
This isn't just an XP thing, there might be people with other Windows (like Win7, Win10 etc) with CPUs without AVX2 and it would fail there too.

Anyway, as far as I'm concerned, I'm totally fine with the Avisynth YUV to RGB conversion used by AVSPmod mod by default. :)


Ok, SD was easy, let's try something harder.

Source clip is an H.264 FULL HD in yv12 23,976p, playback speed set to "normal speed":


- Legacy legacy settings (video, no audio) 23,97fps
- Legacy settings (video, audio) 23,97fps
- Prefetch RGB Display Conversion (video, audio) 23,97fps
- Prefetch RGB Display Conversion, fast YUV420 auto reset (video, audio) 23,97fps
- Prefetch RGB Display Conversion, fast YUV420 display conversion using DecodeYUVtoRGB() (video, audio) - error


Outstanding, but let's see if we can go one step further and dare to dream with UHD.

Source clip is an H.265 UHD in 4:2:0 10bit, 23,976p, playback speed set to "normal speed":


- Legacy legacy settings (video, no audio) 13,01fps
- Legacy settings (video, audio) 12,44fps
- Prefetch RGB Display Conversion (video, audio) - error
- Prefetch RGB Display Conversion, fast YUV420 auto reset (video, audio) - error
- Prefetch RGB Display Conversion, fast YUV420 display conversion using DecodeYUVtoRGB() (video, audio) - error


Although the system has 64 GB of RAM available through PAE, being a 32bit system, each process cannot exceed 2 GB of RAM, therefore with the Prefetch RGB Display Conversion, you end up saturating 2GB and getting a malloc error.
PAE is a clever way of extending the 32bit system to 36bit so that by having an HAL in front, the system is able to handle 64 GB of RAM, but with the same catches of a 32bit one, namely that you can't really exceed the maximum allocable memory per process of a 32bit system. Using things like MPPipeline() to split functions into different processes, allows you to have as many processes as you want, thus being able to allocate 2GB per filter (i.e per process) up to 64GB of RAM (the maximum possible RAM available in a 36bit system).

gispos
9th June 2023, 18:12
If and only if DTL wants to make it XP friendly, he should check the available instructions at runtime and use the right codepath accordingly, 'cause otherwise it would fail.

This isn't just an XP thing, there might be people with other Windows (like Win7, Win10 etc) with CPUs without AVX2 and it would fail there too.
I'm surprised about AVX2, because I have installed a check for the presence of AVX2. Then the menus should be turned off.
But as you write, the check on WinXP apparently does nothing because the CPU confirms AVX2 but XP can not use it and returns an error.
Then my AVX2 test is probably useless, it tests the CPU.


Outstanding, but let's see if we can go one step further and dare to dream with UHD.

Source clip is an H.265 UHD in 4:2:0 10bit, 23,976p, playback speed set to "normal speed":

- Legacy legacy settings (video, no audio) 13,01fps
- Legacy settings (video, audio) 12,44fps
- Prefetch RGB Display Conversion (video, audio) - error
- Prefetch RGB Display Conversion, fast YUV420 auto reset (video, audio) - error
- Prefetch RGB Display Conversion, fast YUV420 display conversion using DecodeYUVtoRGB() (video, audio) - error

OK, then with a 32bit system no UHD playback possible (or just with half speed).


PAE is a clever way of extending the 32bit system to 36bit so that by having an HAL in front, the system is able to handle 64 GB of RAM, but with the same catches of a 32bit one, namely that you can't really exceed the maximum allocable memory per process of a 32bit system. Using things like MPPipeline() to split functions into different processes, allows you to have as many processes as you want, thus being able to allocate 2GB per filter (i.e per process) up to 64GB of RAM (the maximum possible RAM available in a 36bit system).
Interesting thing

Edit:
Ever tested UHD with 'Resample Filter'? Should then at least run a little faster... I think.
Help > Resample Filter readme

Under Menu Options > 'Resample filter...' a prefetch can be added after the Spline36Resize, separated by a semicolon.
Spline36Resize;Prefetch(1)

If there are no problems with Prefetch(1) and it becomes faster, I can change the other prefetch too.

DTL
9th June 2023, 19:29
I currently do not know why at AVX2 CPU the targeted to AVX2 environment build of executable crash with 'illegal instruction' . As I understand operating system only route thread data to CPU core and not detect any instructions used. The only idea is to make SSE2-targeted build with AVX2 intrinsics-based SIMD program inside. May be with AVX2-targeting the VS2019 adds some not-supported by WinXP instructions at executable loading into process space ?

As a simple check - any other AVS plugin with x86-32 compilation and forcing of AVX2 with user-param also resulted in crash at 32bit WinXP with 'illegal instruction' reason ?

This is SSE2-targeted x86_32 build - https://drive.google.com/file/d/1OjHO1gF4Q0H_SM_KzG7EMfVr4OILq7Ht/view?usp=sharing . Do it also crashes with 'illegal instruction' reason at 32bit WinXP ? It must have only up to SSE2 instructions at all executable and run AVX2 part (main processing) only at CPUs with AVX2 detected.

Asd-g made llvm build of ver 0.4.1 of the decode YUV to RGB32 plugin - https://github.com/Asd-g/AviSynth-vsTTempSmooth/issues/4#issuecomment-1585940749 . It typically runs a bit faster.

stranno
11th June 2023, 14:17
I'm getting this error in the latest version. It crashes with MPC-HC and MPV.

https://i.imgur.com/cU3FU3p.png

gispos
11th June 2023, 17:08
I'm getting this error in the latest version. It crashes with MPC-HC and MPV.

https://i.imgur.com/cU3FU3p.png
A little more information could not hurt!
Are you using mpv.exe as an external player that is entered under the program options? If so, did it work in older AvsPmod versions?

Does the avisynth script passed work in AvsPmod?
I can only say that for ages nothing has been changed in the code responsible for it.

stranno
11th June 2023, 17:35
A little more information could not hurt!
Are you using mpv.exe as an external player that is entered under the program options? If so, did it work in older AvsPmod versions?

Does the avisynth script passed work in AvsPmod?
I can only say that for ages nothing has been changed in the code responsible for it.
Yes, MPV and MPC are there and they work fine opening the AVS directly. It is an AvsPmod related issue. I haven't been using Avisynth lately, so I'm not sure since when it has this issue, but it worked fine months ago.

tormento
11th June 2023, 17:51
If I associate AVS to AvsPmod, it launches a new session for every AVS I double click.

How to have them open in another tab instead of another session?

gispos
11th June 2023, 18:20
Yes, MPV and MPC are there and they work fine opening the AVS directly. It is an AvsPmod related issue. I haven't been using Avisynth lately, so I'm not sure since when it has this issue, but it worked fine months ago.
Everything entered correctly? Wrong or invalid parameter entered in the parameter field?
Program Options > Paths > 'External player:'
Program Options > Paths > 'External player extra args:'

If I associate AVS to AvsPmod, it launches a new session for every AVS I double click.

How to have them open in another tab instead of another session?
Program Options > Misc > 'Only allow a single instance of AvsPmod'

stranno
11th June 2023, 19:45
Everything entered correctly? Wrong or invalid parameter entered in the parameter field?
Program Options > Paths > 'External player:'
Program Options > Paths > 'External player extra args:'
https://i.imgur.com/2Z4HafE.png

Just the default settings and the executable is there.

But if it works fine for you, it must be a weird issue on my end.

tormento
11th June 2023, 21:11
Program Options > Misc > 'Only allow a single instance of AvsPmod'
Thank you!

Perhaps you should default it, as it's IMHO the way people could think it should work.

gispos
11th June 2023, 22:42
https://i.imgur.com/2Z4HafE.png

Just the default settings and the executable is there.

But if it works fine for you, it must be a weird issue on my end.
I tried it and used the same settings as you. But I used a different program. Everything works for me without problems.
Try to start another program, a media player or VDub2. Maybe the problem is the mpv.exe itself.

Thank you!

Perhaps you should default it, as it's IMHO the way people could think it should work.
You are right, I will do it.

DTL
12th June 2023, 12:12
It looks in ver 2.7.4.8 something bad with monitoring conversion of YUV to control window:
With script
ColorBarsHD(640, 480, pixel_type="YV24")

It always convert to 'full-RGB'. Changing in Settings -> Video -> Display default YUV->RGB conversion do not change anything (after applying settings and after program restart).

Also as we now have some content with 2020-matrix - may be add it too ?

Sharc
12th June 2023, 15:14
It always convert to 'full-RGB'. Changing in Settings -> Video -> Display default YUV->RGB conversion do not change anything (after applying settings and after program restart).

Maybe it's overwritten by what you select with
- Right click into the preview picture
- Display > YUV-> RGB .....

gispos
12th June 2023, 17:00
It looks in ver 2.7.4.8 something bad with monitoring conversion of YUV to control window:
With script
ColorBarsHD(640, 480, pixel_type="YV24")

It always convert to 'full-RGB'. Changing in Settings -> Video -> Display default YUV->RGB conversion do not change anything (after applying settings and after program restart).

For me it is displayed correctly when I switch between TV and PC levels:
YV24 > RGB
TV Levels rgb white = 255
PC Levels rgb white = 235

Should the selected matrix be retained even after a clip refresh:
Then 'Read from source or script' must be switched off and 'Reset matrix if not found' must be switched on.

'Reset matrix if not found':
At the beginning I had kept the matrix which was read at the first initialization of the clip even if after a change in the script no matrix could be read any more.
The reason was that at the beginning not all filters forwarded the matrix, but I wanted to avoid a constant change of the matrix by adding or removing a filter.
But some people didn't like that (the ones who like to experiment), so I added the option to re-read the matrix at each initialization.

I have to think about whether I should use the reading of the matrix at each clip refresh as default.


Also as we now have some content with 2020-matrix - may be add it too ?
I think we've had Matrix 2020 here before (FranceBB).
It can only be used over 8 bit, I draw with 8bit per channel. At least the result was not usable at that time.

DTL
12th June 2023, 19:33
Maybe it's overwritten by what you select with
- Right click into the preview picture
- Display > YUV-> RGB .....

Yes - in this menu TV levels and PC levels switch is working.

FranceBB
12th June 2023, 20:48
The tests date back to November 2018, which means that gispos has actually saved AVSPmod from the oblivion for quite some time now even if in my mind it feels like yesterday.
Anyway, you can integrate BT2020 but it won't be reproduced correctly by any Windows anyway for two reasons: the first is that some windows don't have any idea about it and those who do (10 and 11) don't get the info passed through DXGI nor the video stream by D3D12.

https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Samples/Desktop/D3D12HDR

So, again, we ended up with the conclusion that it doesn't really make sense.


Oh by the way, DTL, I'll try the new 32bit version of the filter on Wednesday, I just didn't have access to the PC I make those tests on, sorry about that.

FranceBB
14th June 2023, 09:29
The only idea is to make SSE2-targeted build with AVX2 intrinsics-based SIMD program inside.

The test build works.
Well, I mean, with an AVX2 capable CPU on XP (which only supports SSE4.2 max), now it doesn't crash but rather provides a nice error message saying that only AVX2 are supported.

Definitely better than a crash. ;)

https://i.imgur.com/zCHCuEB.png




As a simple check - any other AVS plugin with x86-32 compilation and forcing of AVX2 with user-param also resulted in crash at 32bit WinXP with 'illegal instruction' reason ?


Yes.
Aside from the manually written intrinsics in assembly which we'll leave aside for now, the reason why it crashes if you just target AVX2 on compilation time in Visual Studio is that it will read the C++ part of the plugin and it will try to "translate" it into AVX2 code, which of course is not compatible with XP or with anyone having a non AVX2 CPU on any modern Windows.

Now, since you already have manually written intrinsics, one could compile the C++ part as whatever (like even SSE2, it doesn't matter) 'cause it's not really important as it will use the manually written intrinsics anyway, which is why the test build works in telling the user that it needs AVX2 instead of crashing. :)

Of course this would be different if one was to write a plugin in C++ only without the assembly parts, 'cause in that case it would indeed be up to the compiler to create the necessary builds and indeed targeting SSE2 would be much slower than, let's say, AVX2.



This is SSE2-targeted x86_32 build - https://drive.google.com/file/d/1OjHO1gF4Q0H_SM_KzG7EMfVr4OILq7Ht/view?usp=sharing . Do it also crashes with 'illegal instruction' reason at 32bit WinXP ? It must have only up to SSE2 instructions at all executable and run AVX2 part (main processing) only at CPUs with AVX2 detected.


Yep, it loads correctly and provides the message that the there are no AVX2 and therefore it won't do anything as only AVX2 capable CPUs are supported.
Very nice debug message and much more user friendly than just crashing. :)

tormento
14th June 2023, 13:37
Anyway, you can integrate BT2020 but it won't be reproduced correctly by any Windows anyway
Dunno (https://learn.microsoft.com/en-us/windows/win32/direct3darticles/high-dynamic-range). And this (https://learn.microsoft.com/en-us/windows/win32/wcs/display-calibration-mhc).

DTL
14th June 2023, 14:45
As I understand from http://masm32.com/board/index.php?&topic=3191.0 - the OS do not limit SIMD instructions used but must support correct task switching with AVX (256bit and may be AVX512 too) software used. So it looks really no way to use AVX(2) at WinXP (32bit ? may be XP-64 can run AVX2 applications correctly ?).

So may be to save from plugins crash at plugins with auto-detect max-SIMD from AVS environment call GetCPU() at WinXP - the AVS environment report no-AVX to plugins even at AVX(2) CPUs and if WinXP detected ?

FranceBB
14th June 2023, 17:02
Dunno (https://learn.microsoft.com/en-us/windows/win32/direct3darticles/high-dynamic-range). And this (https://learn.microsoft.com/en-us/windows/win32/wcs/display-calibration-mhc).

Yes, the video coming out from AVSPmod mod is NOT (hence *not* is the keyword here) using D3D12 nor passing the info through DXGI. AVSPmod mod is using an old method to pass the stream which is 8bit RGB32 SDR only, so you could include the matrix="Rec2020" in the ConverttoRGB32() call that AVSPmod mod makes before outputting the video (which is what gispos did last time), however each and every monitor won't display it correctly.

If it's a must to have Rec2020 support as a toggle, I'm sure gispos could just reintroduce the change he did back then with the ConverttoRGB32 call.
Whether that's gonna be of any benefit to anyone other than giving some people peace of mind remains to be seen xD

DTL
14th June 2023, 18:26
As I see from Kr Kb coefficients of 2020 matrix it is not very different from 709 (difference between 601 and 709 is larger). So users may either use 709 as some replacement or add ConvertToRGB(matrix=2020) at the end of script to have a bit better dematrix with 2020 content.

"however each and every monitor won't display it correctly."

The rec.2020 WCG system include both a bit different from 709 matrix and significantly different (much more saturated) primaries. So users really can not get anything close to full WCG displaying without physical display with much more saturated primaries.

If display have wider colour gamut in compare with sRGB/709 - it may also have manual switch how to display incoming RGB data (in wide/maximum or 'narrower' colour gamut using internal colour management engine). It is still not about HDR (though many content after SDR/SCG have both WCG and HDR).

FranceBB
14th June 2023, 19:44
add ConvertToRGB(matrix=2020) at the end of script to have a bit better dematrix with 2020 content.

Well, then I guess we can ask Gispos to put it back.
Essentially when the user right clicks on the video and chooses the matrix, all is doing is setting the value of the ConverttoRGB32() call that AVSPmod mod is doing underneath before displaying the video.

Instead of having the user write that bit of code we can have it back in AVSPmod mod as it was in our first attempts.
I'm not against it, it's just a tiny bit of the puzzle, which is why I said that it wouldn't make much sense without the rest.


But... yeah, I guess as long as it gives people peace of mind, I don't mind about having the Rec2020 back in ConverttoRGB32 in AVSPmod mod...

DTL
14th June 2023, 20:01
"as long as it gives people peace of mind, "

It is simply to make processing more correct. If we have some content encoded into YUV with rec.2020 matrix it is a bit better to decode it into RGB with its natural matrix. It is really good the international organizations looks like stop produce new standards and new matrix/transfer/primaries. So may be we will live some long enough time with only 3 commonly used matrices of 601 (old), 709 and 2020 (current).

FranceBB
14th June 2023, 20:48
Yep, I'm with you, that's fine and yeah, hopefully there won't be anything new.

I just hope gispos is not gonna hate us for taking it away and asking him to reintroduce it back 3 years later

https://user-images.githubusercontent.com/12189856/178888953-6e41a402-160e-479e-b318-422220959020.gif

gispos
15th June 2023, 16:12
It is simply to make processing more correct. If we have some content encoded into YUV with rec.2020 matrix it is a bit better to decode it into RGB with its natural matrix.


I just hope gispos is not gonna hate us for taking it away and asking him to reintroduce it back 3 years later


Does that really make sense? Who and what is it to be used for?

When I load an HDR video into avisynth I use this:

/**avsp_filter
ConvertBits(16)
DGHDRToSDR(white=1420, black=0, gamma=0.42, hue=0.00, r=1.00, g=1.00, b=1.15, tm=0.90, roll=0.70, fulldepth=false, impl="255", mode="pq")
ConvertToYV12(matrix="Rec709")
**/


or

ConvertBits(16)
ConvertToPlanarRGB(matrix="Rec2020")
Cube("D:\Tools\AviSynth\FranceBB Luts\PQ_to_BT709_v2.cube")
ConvertBits(8)
ConvertToYV12(matrix="Rec709")

The first version can be adjusted wonderfully with the preview filter and both versions can also be used as display filters.
And above all, the result is probably worlds better than a ConvertToRGB with matrix 2020.

A matrix 2020 only leads to confusion and wrong assumptions (facts)! Or not?
I would like to be given good reasons to add a matrix 2020.

Edit:
Are there any other fast tonemaping plugin's for Avisynth?

FranceBB
15th June 2023, 17:55
Are there any other fast tonemaping plugin's for Avisynth?

HDRTools by JPSDR and Avsresize.

#BT2100 HDR PQ to BT709 SDR 8bit - 10bit - 16bit planar

ConvertBits(16)

ConvertYUVtoXYZ(Color=0, OutputMode=1, HDRMode=0, fullrange=false)

ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=2.5, contrast_X=0.9)

ConvertXYZtoYUV(pColor=0)

Converttoyuv420()


Also:


#BT2020 HLG HDR to BT709 SDR 8bit - 10bit - 16bit planar

ConvertYUVtoXYZ(Color=0, HDRmode=2)

ConvertXYZ_Reinhard_HDRtoSDR(exposure_X=2.1)

ConvertXYZtoYUV(pColor=0)



while for avsresize you can use:


#PQ to BT709

propclearall()

z_ConvertFormat(pixel_type="YUV420", colorspace_op="2020:st2084:2020:limited=>709:709:709:limited", resample_filter_uv="spline64", dither_type="error_diffusion", use_props=0)





#HLG to BT709

propclearall()

z_ConvertFormat(pixel_type="YUV420", colorspace_op="2020:std-b67:2020:limited=>709:709:709:limited", resample_filter_uv="spline64", dither_type="error_diffusion", use_props=0)

FranceBB
15th June 2023, 18:06
both versions can also be used as display filters.


Which is exactly what I'm doing eheheheh


And above all, the result is probably worlds better than a ConvertToRGB with matrix 2020.


Correct. The whole discussion arose from the fact that the reason why it looks good is that you're converting to BT709 and displaying it on a BT709 display.


A matrix 2020 only leads to confusion and wrong assumptions (facts)! Or not?
I would like to be given good reasons to add a matrix 2020.


Yes and no.
Here's the thing: when you apply tonemapping or a lut as above, you're going to BT709 on a BT709 display, so it will look perfect.
If you apply ConverttoRGB32(matrix="Rec2020"), you're just converting from YUV to RGB32 while preserving BT2020.
This isn't wrong per se, however:

A) it will look wrong on BT709 SDR displays as it's literally BT2020 RGB 8bit

B) even if you have a BT2020 display and you turned on the wide colour gamut option in a supported version of Windows like 10 or 11, it will still be displayed wrong because AVSPmod mod has currently no way of telling windows that it's actually BT2020 RGB (and windows will assume it's BT709)




So... it will look wrong (which is why we decided to remove it last time, remember?) however the ConverttoRGB32 call per se isn't wrong eheheheh

That's what I was trying to say with "it's useless, but it gives people peace of mind".

gispos
16th June 2023, 19:36
@ FranceBB, 2020, I understand.
And thanks for the tonemaping templates.

DTL
16th June 2023, 20:36
"B) even if you have a BT2020 display and you turned on the wide colour gamut option in a supported version of Windows like 10 or 11, it will still be displayed wrong because AVSPmod mod has currently no way of telling windows that it's actually BT2020 RGB (and windows will assume it's BT709)"

Do windows (10..10+ ?) GDI really try to do colour management service up to primaries relocation for (old) applications (in background) ? As I remember using some extended colour gamut monitor windows do nothing with RGB data to display (at least before Win10 ?). So to get correct colours in photo viewers with typical sRGB photos it was required to convert source gamut into display gamut with separate colour management software.

So in some modern windows if old application (not supporting any colour management and interfacing with OS) send 8bit RGB data to display - windows can (will ?) pass it to colour management engine to convert to display profile (ICC, installed for current display) ? May be user can configure windows to make such additional colour management or not (pass 8bit RGB data to display unchanged) ? To display bt.2020 data decoded to RGB at the display with (emulating) bt.2020 primaries no any additional processing needed.

Also if user work with old enough windows without any auto-forced additional colour managenment and uses bt.2020 emulating display (or real physical laser-based full-bt.2020 gamut display) - everything should work fine: application send RGB data encoded with bt.2020 primaries to GDI and windows will pass in unchanged form to bt.2020 display. The only issue with 8bit RGB is some increased colour saturation banding in compare with 10bit RGB signalling. So simple solution is not use too new windows with some auto-conversion options (impossible to disable ?) .

FranceBB
16th June 2023, 22:47
2020, I understand.

I know, it saddens my heart too eheheheheh



Do windows (10..10+ ?) GDI really try to do colour management service up to primaries relocation for (old) applications (in background) ?

For Windows 11 I can 100% tell you "yes, it does". I know this 'cause there were mixed elements in the UI and people complained, especially for HDR videos with SDR GUIs where the video was displayed correctly, while the SDR elements were skyrocketing high and were very annoying to viewers. One of the very typical examples was on youtube HDR videos while they were being watched framed and not in full screen: the youtube video per se was displayed correctly but the rest of the interface was so bright that it was really difficult to watch, especially during the night ('cause they were SDR "read" by the TV/Monitor as HDR). This issue/complaint made its way into the Microsoft uservoice thingie (the one in which you can report stuff to Microsoft from Windows 11) and they fixed it.

I'm not really sure whether that has been ported back to Windows 10 before the final 22H2 release (probably not, but I haven't tested yet).
I think I *might* have talked about this with Tormento at the time and he said that it wasn't gonna be ported back to 10, but again, it might have not been him.



As I remember using some extended colour gamut monitor windows do nothing with RGB data to display (at least before Win10 ?).


Correct, before Windows 10/11, older version of Windows will do absolutely nothing.



So to get correct colours in photo viewers with typical sRGB photos it was required to convert source gamut into display gamut with separate colour management software.


Correct.


So in some modern windows if old application (not supporting any colour management and interfacing with OS) send 8bit RGB data to display - windows can (will ?) pass it to colour management engine to convert to display profile (ICC, installed for current display) ?


Bingo. That's exactly it.

emcodem
17th June 2023, 02:21
Very interesting discussion :D ..i investigated a little and learned that GDI seems to be assumed to be srgb, so i guess there is no other option for it than to convert it from 709 to 2020 if thats the display current mode ^^
I also learned that only Directx 11/12 and some obscure other stuff can actually support hdr as well as few other obscure drawing methods but definitely no chance for wxpython/avspmod because of GDI usage, right?
https://learn.microsoft.com/en-us/windows/win32/direct3darticles/high-dynamic-range

DTL
17th June 2023, 08:22
"I know this 'cause there were mixed elements in the UI and people complained, especially for HDR videos with SDR GUIs where the video was displayed correctly, while the SDR elements were skyrocketing high and were very annoying to viewers. "

The simple professional solution is to separate content view display from control display. I currently not found if it possible to separate 'video' window from main program window in Avspmod ? So if programmer not make this window fixed child of main GUI window - it can be moved to different physical display location/output and 'fullscreened'. So user can work with comfortable scripting at the text display (sort of 100 nits as white paper at 250 lx on table) and make control of 'video' data on any WCG/HDR display naturally. And no complex colour managenent per-logical window is required. Also the 'video' display may have natural required for 'video' scaler.

In modern web-solutions I frequently see how 'video' window can be made floating (and freescaling) - so user can move it to 'video/WCG/HDR' physical display and keep other web-data in browser window in classic sRGB mode at standard sRGB PC display.

So from RGB data-source application only required to do YUV to RGB dematrix with correct matrix and send RGB data to physical display (with SCG or WCG physical primaries and possible emulation of narrower colour gamut based on user display settings). I hope in Win10/11 users also can switch off forced additional colour-gamut management for 'old' applications ?

So when we starting to have almost completely different digital images encoding for text/GUI and 'video' in physical brightness range and physical colour primaries (also the physical scaling also not same as for pixelart) - it is much easier to use different physical displays for different type of image data. Only for users of single display some 'compatibility' workarounds required. Up to separate colour-management engine for each logical window (also in best case must support different samples to physical pixels scaling methods).

" GDI seems to be assumed to be srgb, so i guess there is no other option for it than to convert it from 709 to 2020 if thats the display current mode ^^ "

Most of windows versions (before win10 and later ?) do not know what are the physical primaries of the connected display (or not use ICC information if even provided in the assigned ICC profile for display). So assumtion mean user will got sRGB (equal to rec.709) physical imaging if display have its natural sRGB physical primaries (or can simulate sRGB primaries from larger gamut using internal colour-management engine). If display have wider colour gamut (rec.2020 for example) - the incoming RGB data will be physically converted to that colour gamut. Conversion of digital 8 or higher bit RGB data into physical light (source of colour for viewer) performed by physical display light source. No additional windows service required to display rec.2020 WCG content decoded to RGB datastream on the RGB WCG-capable display.

So when user work with WCG content - it is required to connect (RGB) WCG display or make settings in the multi-format display to force manual incoming RGB data treating as WCG-data. When user work with SCG content - it is required to connect SCG display or make manual settings in multi-format display to treat incomimng RGB data as SCG (typically sRGB/rec.709) and use internal display colour-management engine to map incoming colour-gamut data into physical display gamut. Also there exist other colour gamuts for moving pictures production like P3 (not as large as rec.2020) so the task to correct colour tone/saturation display from incoming RGB data is mostly display responsibility. The application only provide correctly dematriced RGB data (and may be hint to user how to configure physical display for correct RGB primaries).

real.finder
21st June 2023, 10:01
In case someone interested I added some macros https://github.com/realfinder/AvsP-macros

rco133
21st June 2023, 19:05
If I load two files with the same amount of frames, for example an avs file in one window and a m2ts file in another window, it seems like it is assumed that because the frame numer is the same, the frames are also identical.

However in this case frame 4500 for example, is not the same content in both files.

I have looked in different menus, but I have not been able to find any place where I can choose that the frame numbers shall not track between windows.

I guess it is probably me doing something wrong, but I just can't get it to not change the framenumer of either window, if I change frame in the other. Which setting is it I am missing?

Thanks in advance

rco133

poisondeathray
21st June 2023, 19:23
If I load two files with the same amount of frames, for example an avs file in one window and a m2ts file in another window, it seems like it is assumed that because the frame numer is the same, the frames are also identical.

However in this case frame 4500 for example, is not the same content in both files.

I have looked in different menus, but I have not been able to find any place where I can choose that the frame numbers shall not track between windows.

I guess it is probably me doing something wrong, but I just can't get it to not change the framenumer of either window, if I change frame in the other. Which setting is it I am missing?

Thanks in advance

rco133


options => program settings => video tab => uncheckmark shared timeline

You might have to close & reopen for settings to take effect

(Another thing you could do is manipulate the script in one of the tabs, such as trim(1,0) , or add borders etc...)

rco133
22nd June 2023, 19:16
options => program settings => video tab => uncheckmark shared timeline

You might have to close & reopen for settings to take effect

(Another thing you could do is manipulate the script in one of the tabs, such as trim(1,0) , or add borders etc...)

Thanks!

rco133

gispos
25th June 2023, 14:11
New AvsPmod Pre-Release (32/64 bit)

* Hardware Accelerated (GPU) renderer window. ALPHA, BETA.. or wathever.
- YUV420P8 or RGB8888, automatic switching. If clip is not YUV420P8 (YV12) then the converted display clip (ConvertToRGB32) is used.
- Existing functions: double click=fullscreen or not, mouse forward-backward=bookmark next-previous, mouse wheel=frame change
- Todo:
- fix mouse position changes when switching from fullscreen and normal mode (double click)
- fix the window goes into the background if it did not get the focus with a mouse click
- add a few more functions (keyboard, mouse, aspect ratio, zoom)
- test second monitor behavior
* Bugfix when creating audio and preview filter enabled.
* Bugfix: When an error clip was created it could lead to a code error.

https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link

DTL
25th June 2023, 14:59
Right-click menu on 'old video window' not work at all and throw error in the Error Window.

Also every opening 'Video' menu in main program window adds errors in the Error Window.

Screenshots https://postimg.cc/gallery/Jn0K1KF

The direct3d window looks working. How to disable 'old video window' to check performance of 'direct3d' window only ?

Tested at Window 7 SP1 x64. With GeForce GT 440 card.

gispos
25th June 2023, 17:53
Right-click menu on 'old video window' not work at all and throw error in the Error Window.

Also every opening 'Video' menu in main program window adds errors in the Error Window.

Screenshots https://postimg.cc/gallery/Jn0K1KF

The direct3d window looks working. How to disable 'old video window' to check performance of 'direct3d' window only ?

Tested at Window 7 SP1 x64. With GeForce GT 440 card.

Can it be that you have mixed old with new?
I can't find any error here under Win10. Unpack the archive into a new directory and report.

Edit:
If the direct3D display is visible, it is only drawn in it during the playback

Edit2:
For an FHD video, your YUVConversion is faster. For UHD, direct3D is minimally faster.
However, it can still change for FHD. The problem is that drawing from another thread is difficult to handle. If the renderer is created in the thread, it can't be terminated so easily from the main thread.
So far it is created in the main thread and must enter the main thread from the playthread with an async call to draw.

Of course, this is only meaningful for my system, my graphics card is nothing special.
With ColorBars:

FHD YUV420P8
Normal YUV > RGB 124 fps
direct3D 226 fps

UHD YUV420P10 ConvertBits(8)
Normal 36 fps
direct3D 110 fps

kakaze
25th June 2023, 23:43
In the latest version (2.7.4.8), the right-click menu does not work in the video preview (everything is fine in previous versions). Clean separate unpacking is the same. the script doesn't matter. Win 10.
Error Window:
Traceback (most recent call last):
File "avsp.pyo", line 19197, in OnContextMenu
File "wx\_core.pyo", line 12172, in Check
wx._core.PyAssertionError: C++ assertion "IsCheckable()" failed at ..\..\src\msw\menuitem.cpp(583) in wxMenuItem::Check(): only checkable items may be checked

DTL
26th June 2023, 07:38
"Unpack the archive into a new directory and report."

It was downloaded all files from google drive as .zip and extracted to completely new folder in my temp (no system drive, no ProgramFiles). No old files.

"UHD YUV420P10 ConvertBits(8)"

DirectX (from some version ?) should support 10bit YUV directly:
https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format
DXGI_FORMAT_P010 = 104,
https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats

Is it expected in next versions ? It looks available in Win8 and later:
DXGI_FORMAT_P010
Value: 104
10-bit per channel planar YUV 4:2:0 video resource format. Valid luminance data view formats for this video resource format are DXGI_FORMAT_R16_UNORM and DXGI_FORMAT_R16_UINT. The runtime does not enforce whether the lowest 6 bits are 0 (given that this video resource format is a 10-bit format that uses 16 bits). If required, application shader code would have to enforce this manually. From the runtime's point of view, DXGI_FORMAT_P010 is no different than DXGI_FORMAT_P016. Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are DXGI_FORMAT_R16G16_UNORM and DXGI_FORMAT_R16G16_UINT. For UAVs, an additional valid chrominance data view format is DXGI_FORMAT_R32_UINT. By using DXGI_FORMAT_R32_UINT for UAVs, you can both read and write as opposed to just write for DXGI_FORMAT_R16G16_UNORM and DXGI_FORMAT_R16G16_UINT. Supported view types are SRV, RTV, and UAV. For luminance data view, the mapping to the view channel is Y->R16. For chrominance data view, the mapping to the view channel is U->R16 and
V->G16.

For more info about YUV formats for video rendering, see Recommended 8-Bit YUV Formats for Video Rendering.

Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the UV plane.

An app using the YUY 4:2:0 formats must map the luma (Y) plane separately from the chroma (UV) planes. Developers do this by calling ID3D12Device::CreateShaderResourceView twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the UV planes (together) maps only the U and V planes as a single resource view.

Direct3D 11.1: This value is not supported until Windows 8.

It looks for >8bit YUV via DirectX it is optimal to use DX12 and Win10 or later.

gispos
26th June 2023, 17:20
In the latest version (2.7.4.8), the right-click menu does not work in the video preview (everything is fine in previous versions). Clean separate unpacking is the same. the script doesn't matter. Win 10.
Error Window:
Error found, the error only occurred on CPU's without AVX2, so there was no error on mine.
However, if now someone reports that had the error and his CPU AVX2 has, then my test is no good and I have to remove or change it.




"UHD YUV420P10 ConvertBits(8)"

DirectX (from some version ?) should support 10bit YUV directly:
https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format
DXGI_FORMAT_P010 = 104,
https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats

Is it expected in next versions ?
It is Python 2.7 and not a C++ program where you can include a DirectX header.

I have to look around for Python 2.7 compatible ones.
There is not much, an old DirectX 11 module that is not updated anymore, then there are a few modules that only support OpenGL.

I chose sdl2 (https://www.libsdl.org/) because the latest dll also works with Python 2.7 and it supports OpenGL and Direct3d. And above all it is constantly improved.

But the possibilities with it are limited (as with almost all Python modules, easy to use but not everything possible).
What bothers me most:
You can't create your own window, you have to create an sdl2 window that has its own event loop that you have to trigger and query yourself.
So every 10 - 20 ms the loop has to be fired so that you can capture e.g. mouse clicks.

To the color format:
I tested YUV420P10 and saw only garbage, but maybe my monitor is not set to 10bit support (or Win10 ?).

Here are the supported color formats:

'INDEX1LSB': SDL_PIXELFORMAT_INDEX1LSB,
'INDEX1MSB': SDL_PIXELFORMAT_INDEX1MSB,
'INDEX4LSB': SDL_PIXELFORMAT_INDEX4LSB,
'INDEX4MSB': SDL_PIXELFORMAT_INDEX4MSB,
'INDEX8': SDL_PIXELFORMAT_INDEX8,
'RGB332': SDL_PIXELFORMAT_RGB332,
'RGB444': SDL_PIXELFORMAT_RGB444,
'RGB555': SDL_PIXELFORMAT_RGB555,
'BGR555': SDL_PIXELFORMAT_BGR555,
'ARGB4444': SDL_PIXELFORMAT_ARGB4444,
'RGBA4444': SDL_PIXELFORMAT_RGBA4444,
'ABGR4444': SDL_PIXELFORMAT_ABGR4444,
'BGRA4444': SDL_PIXELFORMAT_BGRA4444,
'ARGB1555': SDL_PIXELFORMAT_ARGB1555,
'RGBA5551': SDL_PIXELFORMAT_RGBA5551,
'ABGR1555': SDL_PIXELFORMAT_ABGR1555,
'BGRA5551': SDL_PIXELFORMAT_BGRA5551,
'RGB565': SDL_PIXELFORMAT_RGB565,
'BGR565': SDL_PIXELFORMAT_BGR565,
'RGB24': SDL_PIXELFORMAT_RGB24,
'BGR24': SDL_PIXELFORMAT_BGR24,
'RGB888': SDL_PIXELFORMAT_RGB888,
'RGBX8888': SDL_PIXELFORMAT_RGBX8888,
'BGR888': SDL_PIXELFORMAT_BGR888,
'BGRX8888': SDL_PIXELFORMAT_BGRX8888,
'ARGB8888': SDL_PIXELFORMAT_ARGB8888,
'RGBA8888': SDL_PIXELFORMAT_RGBA8888,
'ABGR8888': SDL_PIXELFORMAT_ABGR8888,
'BGRA8888': SDL_PIXELFORMAT_BGRA8888,
'ARGB2101010': SDL_PIXELFORMAT_ARGB2101010,
'RGBA32': SDL_PIXELFORMAT_RGBA32,
'ARGB32': SDL_PIXELFORMAT_ARGB32,
'BGRA32': SDL_PIXELFORMAT_BGRA32,
'ABGR32': SDL_PIXELFORMAT_ABGR32,
'YV12': SDL_PIXELFORMAT_YV12,
'IYUV': SDL_PIXELFORMAT_IYUV,
'YUY2': SDL_PIXELFORMAT_YUY2,
'UYVY': SDL_PIXELFORMAT_UYVY,
'YVYU': SDL_PIXELFORMAT_YVYU,
'NV12': SDL_PIXELFORMAT_NV12,
'NV21': SDL_PIXELFORMAT_NV21,
'EXTERNAL_OES': SDL_PIXELFORMAT_EXTERNAL_OES,

I use IYUV because YV12 has a different YUV order than avisynth.
You know more about it than I do, say something about it.

And here is a new Pre-Release that hopefully works.
Mouse pointer shift on fullscreen has been fixed and the spacebar key for playback works.
Problems with the left, right, up and down keys, I just don't get an event for these keys... they must be swallowed somewhere.

https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link

gispos
26th July 2023, 16:33
AvsPmod 2.7.5.0 (https://github.com/gispos/AvsPmod/releases)

* Hardware Accelerated (GPU) renderer window (reade the Help > D3D Window readme).
- the d3d renderer uses YUV420P8 (YV12) for all color formats. Only if the clip is RGB32 then ARGB8888 is used.
- No one AvsPmod filter can be used, only 'Split Clip' can be used. Or the clip must be RGB32.
- Existing functions and shortcuts:
- double click=fullscreen or not, mouse forward-backward=bookmark next-previous, mouse wheel=frame step,
- numpad 4,5=frame step, numpad 2,8=jump custom units, numpad 0 or numpad . or middle mouse = Close
- minus key=toggle'Split Clip', key b=add remove bookmark
* Added: Direct3D context menu with some options (e.g. you can hide the title bar and borders).
* Added: Video > Play video > 'Direct3D safe'.
- renders safer but slower (ColorBars YV12, FHD 794fps, FHD safe 238fps, ColorBars UHD YUV420P10 141fps and safe 104fps).
- enable the safe mode only if you get errors on the fast mode (fast mode runs fully threaded).
* Added: New double click layout for the video window, see below or reade the D3D Window readme.
* Added: Play button context menu 'Speed x' 2x up to 16x
* Changed: 'Prefetch display conversion' from Prefetch(2,2) to Prefetch(1,1). Slower but safer.
* Changed: The Preview filter doesn't disable 'Fast YUV420 display conversion'.
- Remember: if the "Fast YUV auto reset" option is selected, the fast YUV conversion will be disabled when the script is changed or refreshed.
* Bugfix: When creating audio and preview filter enabled.
* Bugfix: When an error clip was created it could lead to a code error.
* Bugfix: In case of a 'Display Filter' error, clip error was not reset when the 'Display Filter' was switched off (refresh was needed).



Video window fullscreen/fullsize doubel click layout left 0 to 50 pixel: (Not D3D Window)
___
d3d fullscreen (top start, 0)
___
normal fullscreen (top start, 51 pixel)
___
normal fullsize (top start, half height)
___
d3d fullsize (top start, height - 50 pixel)
___

Video window doubel click layout right, width -50 pixel:
___
Resample Filter current script (top start, 0)
___
normal fullscreen (top start, 51 pixel)
___
normal fullsize (top start, half height)
___
Resample Filter all scripts (top start heigth -50 pixel)

Emulgator
26th July 2023, 21:31
Beautiful, gispos, many thanks !

A small suggestion: How about renaming the 64bit version to AvsPmod64.exe ?
This is what I am doing here for years to have safe file associations.

gispos
26th July 2023, 22:34
Beautiful, gispos, many thanks !

A small suggestion: How about renaming the 64bit version to AvsPmod64.exe ?
This is what I am doing here for years to have safe file associations.
That makes sense, I'll have to see what I have to change to not have to do that manually with every build.

FranceBB
27th July 2023, 17:20
This is what I am doing here for years to have safe file associations.

LOL I do the same, but for folders, so I have an AVSPmod folder in which there are two AVSPmod_x86 and AVSPmod_x64 subfolders xD

gispos
27th July 2023, 20:06
AvsPmod 2.7.5.1 (https://github.com/gispos/AvsPmod/releases)

v2.7.5.1 Bugfix: Playback with D3DWindow and simultaneous actions in normal video window led to blocking of the program.

:o

Beautiful, gispos, many thanks !

A small suggestion: How about renaming the 64bit version to AvsPmod64.exe ?
This is what I am doing here for years to have safe file associations.

LOL I do the same, but for folders, so I have an AVSPmod folder in which there are two AVSPmod_x86 and AVSPmod_x64 subfolders xD

I could not decide. For now I just renamed the directorys. _64 or _32 related to the bit.

I don't see any reason to change the .exe, they have to be in different directories anyway. For me, these are AvsPmod and AvsPmod x64.
But maybe I still change my opinion.

Edit:
@FranceBB what about the UHD playback with the d3d window under 32bit?

FranceBB
27th July 2023, 20:46
what about the UHD playback with the d3d window under 32bit?

I have great expectations, but I haven't tried it yet.
I think we might be able to pull off the impossible and actually achieve realtime playback here. :eek:

I'll keep you posted.

Lan4
3rd August 2023, 14:20
Can I encode a video file with this application? Or is it only for working with scripts? Well, if so, what is the best way to deal with the results of work in this application?

gispos
3rd August 2023, 17:13
Can I encode a video file with this application? Or is it only for working with scripts? Well, if so, what is the best way to deal with the results of work in this application?
You can also encode the script to a video. Tools > 'Script encoder (CLI)'. There are different presets for different encoders (x264.exe must be present).
If you want to encode video with audio at the same time, ffmpeg.exe should be available.

I like to use this option, but if you want to use special options, there are surely better programs to encode, or you have to adapt the presets to your needs.

You can use any encoder program that can open an Avisynth script.

Lan4
3rd August 2023, 19:05
You can use any encoder program that can open an Avisynth script.
thanks.

I tried about 10 of these programs from VideoHelp top. All of them are clumsy and work with bugs. :(

If you want to encode video with audio at the same time, ffmpeg.exe should be available.
Do you mean that Avisynt does not know how to work with sound?

gispos
3rd August 2023, 22:42
Do you mean that Avisynt does not know how to work with sound?
Earlier x264 could only video, now apparently also audio? or only the vfw version? would have to look there again.
So if the x264 can also audio there are no suitable presets for it yet. The x264 presets are all without audio.

Therefore the recommendation ffmpeg

FranceBB
4th August 2023, 12:58
Well... what can I say other than... hats off...

Video
ID : 0
Format : YUV
Codec ID : v210
Codec ID/Hint : AJA Video Systems Xena
Bit rate : 8 847 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Compression mode : Lossless
Bits/(Pixel*Frame) : 21.333



Video fps: 50fps

CPU AVSPmod mod x64: 14fps
GPU D3D AVSPmod mod x64: 49.7fps
CPU AVSPmod mod x86: 11.21fps
GPU D3D AVSPmod mod x86: 43.1fps

videoFred
4th August 2023, 13:57
thanks.

I tried about 10 of these programs from VideoHelp top. All of them are clumsy and work with bugs.

Please try VirtualDub2, it works for me without any problems even with very large scripts.

Fred.

Lan4
4th August 2023, 15:49
Therefore the recommendation ffmpeg

means to read the file in the script to use FFmpegSource2?
---
no, it doesn't work.

gispos
4th August 2023, 18:57
AvsPmod 2.7.5.2 (https://github.com/gispos/AvsPmod/releases)

* New docking option for the frame properties window when 'Separate window' is selected in the options.
- if the docking option is selected (default), the window docks at the bottom-left of the main window.
- free space bottom 50 pixels for the double click action 'd3d window fullsize'.
* New docking option for the D3D Window (dock on video window).
- My recommendation: top-right or bottom-right
- Enabling: move the window in the desired monitor corner more then half size of the window outsite the corner.
- Disabling: d3d window context menu Additional > 'Disable docking'
* Improved moving the d3d window with the mouse (sometimes no response at first mouse botton down).

I think that "Dogway" with its large monitor, can make good use of the docking function.

Well... what can I say other than... hats off...

Video
ID : 0
Format : YUV
Codec ID : v210
Codec ID/Hint : AJA Video Systems Xena
Bit rate : 8 847 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Compression mode : Lossless
Bits/(Pixel*Frame) : 21.333



Video fps: 50fps

CPU AVSPmod mod x64: 14fps
GPU D3D AVSPmod mod x64: 49.7fps
CPU AVSPmod mod x86: 11.21fps
GPU D3D AVSPmod mod x86: 43.1fps
Well, it's okay ;) Unfortunately, the 50 fps have probably not yet been reached. :o I just saw it's YUV422, hmm.... 420 should be faster.
Do me a favour: Try the same video format with ColorBars. How fast is it then?

means to read the file in the script to use FFmpegSource2?
---
no, it doesn't work.
I think you're doing something wrong.
VirtualDub2 can read avs files and also encode them into a video. If you create a script with AvsPmod and you can see the video in AvsPmod, it should work with almost any video player.

Lan4
5th August 2023, 15:58
I have a problem with audio only. Only DirectShowSource works. All other methods do not play audio even in AvsP.

poisondeathray
5th August 2023, 16:04
I have a problem with audio only. Only DirectShowSource works. All other methods do not play audio even in AvsP.

Are you adding the audio ? Audiodub (vid,aud)

Post your script

Adding the audio to the script usually means you re-encode the audio (because it's decompressed) - so loss of quality - instead of stream copy . Unless you're editing the video/audio, most people don't add audio to the script

Lan4
5th August 2023, 21:13
Are you adding the audio ? Audiodub (vid,aud)
No, I'm adding a video file. The video is encoded, but the audio is not. But if I write DirectShowSource, then everything is fine.

poisondeathray
5th August 2023, 21:19
No, I'm adding a video file. The video is encoded, but the audio is not. But if I write DirectShowSource, then everything is fine.

DirectShowSource default is audio=True, so you are adding video AND audio

If your source filter only adds video, there is no audio added, so you won't "hear" anything . You need to add audio explicitly

If you add Info() to the end of the script, it will report if there is audio passed

eg.
aud=FFAudioSource("audio.ext")
vid=FFVideoSource("video.ext")
AudioDub(vid,aud)

Or

aud=LWLibavAudioSource("audio.ext")
vid=LWLibavVideoSource("video.ext")
AudioDub(vid,aud)

Dogway
5th August 2023, 22:42
I think that "Dogway" with its large monitor, can make good use of the docking function.

Thanks for the update.

My biggest problem is Avsp mod takes about 10 minutes to launch, yes in my "rush ahead" no-plan work ethic I have like 450 tabs open but even with 200 the slow down is present.
IIRC I switched the folder to an SSD, but didn't improve times. Anyway I'm in vacations/healing rest so I won't be working for some time.

gispos
6th August 2023, 00:39
Thanks for the update.

My biggest problem is Avsp mod takes about 10 minutes to launch, yes in my "rush ahead" no-plan work ethic I have like 450 tabs open but even with 200 the slow down is present.
IIRC I switched the folder to an SSD, but didn't improve times. Anyway I'm in vacations/healing rest so I won't be working for some time.
First of all, have a nice holiday and a good rest.

450 scripts (tabs) is neat.
After the holiday you should check under Program Options > Save/Load whether 'Save or read scripts with AvsPmod markings' is enabled.
If this is enabled, each script will be scanned completely on load to see if it contains a header for 'AvsP marked script'.
So deactivate.

Then there is a check for changes between the original script and the script saved in the session.
But this is only the case if the script was saved, then every saved script is compared by a hash (md5) when the session is started.
If the script does not exist on the hard disk, there is no delay because nothing is compared.

So if the 450 scripts are on the hard disk, I could possibly add an option that skips the md5 check.
In this case, however, no changes between the original script and the script saved in the session are recognised.

Edit:
I looked again and I don't think the md5 comparison takes that much time. And the script is not completely checked for an 'AvsPmod header', only the last line is read.
It is very likely that the functionality of AvsPmod is to blame. Every script is read for existing Avisynth functions. And nothing can be done about that, because it is needed.

It is needed in the same way as a number of other things that are unavoidable when opening a script.
I have changed a small thing that minimally accelerates the loading, but whether that is measurable...

I don't know why it takes so long for you. I just opened 70 scripts and with or without md5 check they took under 3 seconds.

Edit 2:
I did another test with 200 scripts, which took 12 seconds from the double click on the AvsPmod icon to the appearance of the window.

Lan4
7th August 2023, 00:25
DirectShowSource default is audio=True, so you are adding video AND audio

If your source filter only adds video, there is no audio added, so you won't "hear" anything . You need to add audio explicitly

If you add Info() to the end of the script, it will report if there is audio passed

eg.
aud=FFAudioSource("audio.ext")
vid=FFVideoSource("video.ext")
AudioDub(vid,aud)

Or

aud=LWLibavAudioSource("audio.ext")
vid=LWLibavVideoSource("video.ext")
AudioDub(vid,aud)
Thank you. I didn't fully understand how it works. but I will try. forgive my stupidity.:)

Dogway
7th August 2023, 19:06
Edit 2:
I did another test with 200 scripts, which took 12 seconds from the double click on the AvsPmod icon to the appearance of the window.
Thanks for testing. Most of the 467 tabs are not saved scripts and program (with its sessions) is indeed in the SSD. I changed the settings per your directions (see image) and it improved a little, from 13mins to 11. But then also tried to use your latest version since I was still on v2.7.1.1, but the launch time was also around 13mins. I had other issues there as Tabs and Playback bar being too small, but changing DPI settings would crash AvsPmod at launch (on v2.7.1.1 I have a DPI overall of 8)

https://i.imgur.com/vnsD8VZl.png

Anyway I recalled this might be a GPU related issue. I've been having window GPU redraw hangs in Vivaldi specially when playing videos for almost a year, but more clearly and consistently when AvsPmod is open. I practically have to wait for 2 mins or so until the redraw/hang finishes for playing a YT video (AvsPmod playback is fine). It also sporadically crashes when trying to open/draw the function autocomplete calltip.
I'm mostly sure this has to do with me using Win7 and subpar GPU drivers as Pascal (and Win7) max supported driver version is 473.62 or so, so I don't think you need to worry about this, I should very well be using Win10 by now.

FranceBB
8th August 2023, 13:05
Do me a favour: Try the same video format with ColorBars. How fast is it then?

ColorBars() is cheating eheheheh
But yeah, it ramped up to 50fps, steady, with colorbars, yv12.
Although with yv16 it went to 49.91fps and then it took a hell lot of time to slowly ramp up to 49.95, 49.96, 49.97, 49.98, 49.99 and then finally 50fps.

https://i.imgur.com/m9Ijdcu.png

but honestly, it's fine.
It's UHD with x86, I really didn't expect this to be in realtime and also I don't really mind, no worries.

Alex9876
8th August 2023, 20:01
Could you help me. Downloaded AvsPmod 2.7.5.2 GPo from this location https://github.com/gispos/AvsPmod/releases . Unpacked the folder AvsPmod_v2.7.5.2_.Windows_x86-64 to the new directory. When trying to start D3D, Windows throws an error (see the picture https://postimg.cc/CnjQR9Vh). In version 2.7.5.1, the Windows D3D function works.

gispos
8th August 2023, 22:44
Could you help me. Downloaded AvsPmod 2.7.5.2 GPo from this location https://github.com/gispos/AvsPmod/releases . Unpacked the folder AvsPmod_v2.7.5.2_.Windows_x86-64 to the new directory. When trying to start D3D, Windows throws an error (see the picture https://postimg.cc/CnjQR9Vh). In version 2.7.5.1, the Windows D3D function works.

Damn, again not unpacked and tested.
I used my existing options.dat when testing and didn't realise that I had mixed Python integers with C integers.

Here is a cleaned up version with a new function that is not quite ready yet, 'Script selector'.
Hmm... I also always have too many scripts open and started an attempt to minimize the tab count and still have quick access to scripts.

https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link

gispos
9th August 2023, 07:55
Thanks for testing. Most of the 467 tabs are not saved scripts and program (with its sessions) is indeed in the SSD. I changed the settings per your directions (see image) and it improved a little, from 13mins to 11. But then also tried to use your latest version since I was still on v2.7.1.1, but the launch time was also around 13mins. I had other issues there as Tabs and Playback bar being too small, but changing DPI settings would crash AvsPmod at launch (on v2.7.1.1 I have a DPI overall of 8)

https://i.imgur.com/vnsD8VZl.png

Anyway I recalled this might be a GPU related issue. I've been having window GPU redraw hangs in Vivaldi specially when playing videos for almost a year, but more clearly and consistently when AvsPmod is open. I practically have to wait for 2 mins or so until the redraw/hang finishes for playing a YT video (AvsPmod playback is fine). It also sporadically crashes when trying to open/draw the function autocomplete calltip.
I'm mostly sure this has to do with me using Win7 and subpar GPU drivers as Pascal (and Win7) max supported driver version is 473.62 or so, so I don't think you need to worry about this, I should very well be using Win10 by now.

Especially the title bar looks quite narrow in the picture.
What values are displayed when you click on 'DPI info' under Help. Please post a picture or the values.

That AvsPmod crashes with increased DPI settings is not nice either. But I think your 'Custom Theme' .dll is the cause.
If it were a problem in itself, others would probably have reported it already.

Yes, switch to Win10 but without the custom theme. :)

Alex9876
9th August 2023, 18:14
Damn, again not unpacked and tested.
I used my existing options.dat when testing and didn't realise that I had mixed Python integers with C integers.

Here is a cleaned up version with a new function that is not quite ready yet, 'Script selector'.
Hmm... I also always have too many scripts open and started an attempt to minimize the tab count and still have quick access to scripts.

https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link

Thank you very much! Now everything works!

Lourdes
17th August 2023, 16:11
Niche setup, Windows 11 for Arm in a Parallels VM on an Apple Silicon Mac, but I'm having problems with any version from 2.6.9.2 onwards crashing on preview. Stock settings, latest AviSynth+ 3.7.3.

With your very basic ffaudio/videosource/lwlibavvideosource(path) after indexing is done I can see the video information in the status bar for a split second before it crashes. With an empty script and previewing it crashes as well but in that same split second I see the "Not a clip" message in the preview area.

Were there any particular changes from 2.6.9.1 > 2.6.9.2 that could be suspect, any settings I can try, or a way to log the crash and see what's up?

Thanks

gispos
18th August 2023, 21:43
Niche setup, Windows 11 for Arm in a Parallels VM on an Apple Silicon Mac, but I'm having problems with any version from 2.6.9.2 onwards crashing on preview. Stock settings, latest AviSynth+ 3.7.3.

With your very basic ffaudio/videosource/lwlibavvideosource(path) after indexing is done I can see the video information in the status bar for a split second before it crashes. With an empty script and previewing it crashes as well but in that same split second I see the "Not a clip" message in the preview area.

Were there any particular changes from 2.6.9.1 > 2.6.9.2 that could be suspect, any settings I can try, or a way to log the crash and see what's up?

Thanks
Sorry to read that.
I looked at the changelog and the only thing that could make the difference is this.

--------------------------
Version 2.6.9.2 [2021-09-10] GPo
--------------------------
* Changed all default options for 'Accessing Avisynth in threads' to True (enabled)
- only noticeable if no options.dat is available

So turn off loading in threads, Menubar Options > 'Accessing AviSynth in threads'
And for the Playback turn off Video > Play video > 'Playback in threads'

However, some functions are deactivated, for example the full screen mode and the D3D Window does not work with playback without threads either.

Edit:
If the normal viewing works you can also test if the playback works with threads.
The audio is also running in various threads, so it's best to turn off the audio first. Context Menu Playback button 'Play audio' unchecked. And later test if audio works.

Lourdes
19th August 2023, 14:48
So turn off loading in threads, Menubar Options > 'Accessing AviSynth in threads'

That did it. :D

I found a random person on Discord running Windows 11 Arm natively (SQ3) who had the same results so it's not just a VM thing. But it's one of those "There are dozens of us!" situations. :)

gispos
19th August 2023, 15:58
That did it. :D

I found a random person on Discord running Windows 11 Arm natively (SQ3) who had the same results so it's not just a VM thing. But it's one of those "There are dozens of us!" situations. :)
It had here already one problems with the threads, is to me however completely puzzling... they are quite normal Python threads.
His CPU had no AVX extension so I had written that into the thread readme Otionen > 'Threads readme'.

An extract from it

A user has reported that the threads lead to an immediate crash (CPU without AVX extended command).
If the threads are causing problems on your system then you have to turn it off.

Does the playback work in threads? Does the audio playback work?
The audio works in playback only when playback threads are turned on. Without playback and playback threads the audio scrubbing should work.

Lourdes
19th August 2023, 17:49
Yeah, "Playback in threads" and audio work. Audio has bad sync and dropouts but I've never really tried it before so perhaps that's not unusual.

gispos
20th August 2023, 12:50
AvsPmod 2.7.5.3 final (https://github.com/gispos/AvsPmod/releases)

v2.7.5.3
* Video > Tools > 'Script selector' finished, read the readme
* Bugfix: D3D Window
* Bugfix: Frame properties window
* Bugfix: timline Bookmarks on tab change not set if 'Read from script' disabled or no bookmarks saved in the script.
v2.7.5.2
* New docking option for the frame properties window when 'Separate window' is selected in the options.
- if the docking option is selected (default), the window docks at the bottom-left of the main window.
- free space bottom 50 pixels for the double click action 'd3d window fullsize'.
* New docking option for the D3D Window (dock on video window).
- My recommendation: top-right or bottom-right
- Enabling: move the window in the desired monitor corner more then half size of the window outsite the corner.
- Disabling: d3d window context menu Additional > 'Disable docking'
* Improved moving the d3d window with the mouse (sometimes no response at first mouse botton down).


AvsPmod Script selector, GPo 20.08.2023

Preliminary:
Some functions in the script selector can only be used meaningfully if the scripts located on the hard disk also have unique names.
This means not only file 1, file 2 etc.
In my case almost all scripts (2500) have the name of the video file with .avs appended.
So 'The Midnight Crime Story.mpg' = 'The Midnight Crime Story.mpg.avs'
I have created a tab for each partition where avs files are located with the corresponding partition or folder name (E DVB, E, F, ...).
Still tabs for favorites and a temp tab (Favor, Favor2, Temp)
Of course you can also use it just as a kind of session file and insert the currently opened AvsPmod tabs.
Edit: Forgot to mention, double click on a tab to rename it

Functions:
'Add or Update all scripts' Insert or updates all opened AvsPmod scripts (tabs)
'Clear and Add all scripts' Clears the tab and insert all opened AvsPmod scripts (tabs)
'Add or update script' Insert or updated the current AvsPmod script (tab)

'Find or Update from avs...' Searches with sub folders, the last opened dir is saved for the current tab for next use
'Update selection from avs' The selected scripts are updated from avs files on the hard disk (no new files are added)
'Check existing 'Ctrl removes' All scripts in the current tab are checked for being present on the hard disk, if not exists and Ctrl was pressed the script is removed from the tab

Mouse events:
middle down = find the current AvsPmod script (tab)

List lines mouse events
Name:
left (22 pixel) if Note then show Note as tooltip
rigth - (22 pixel) show name if auto tooltip disabled
double Click = open script with AvsPmod

Bookmarks:
double Click = open AvsPThumb with bk6/bk3 file or with this script is no bk* file exists

Path:
left (22 pixel) show Path as tooltip if auto tooltip disabled
double Click = open script with AvsPmod

Keyboard events:
ESC = close
del and numpad del = Removes selected scripts from current tab
a to z and 0 to 9 = search for scripts in the current tab
Hot key AvsPmod for open/close Script selector = close

Note for Notes:
Note can be saved Edit > 'Change note'
Or the note is read from the script if #note: is found in the script in the first 10 lines (the line must start with #note:)

gispos
3rd September 2023, 10:42
Have created a AvsPmod macro for the preview of Topaz AI.
The Topaz preview is a disaster, for me it always takes 1 second when changing the tab, so you can not compare any settings.

The macro imports each newly created Topaz preview into a new AvsPmod tab with the group 1, this will also open each new file with the current frame number.

# Name: GetLastTopazPreview.py, v1.9.2, forked from GetLastFileFromDir.py
# Purpose: Finds the last created file (video) with the specified extensions. Search is dir recursive, so searches also subfolders.
# Change the sourceFilter according to your needs. But 'SourceFile' must be set as path in the source filter.
# If a file type based template exists and useTemplate is True, the template will be used else the sourceFilter.
# If you press the CTRL key when starting this macro or the last path does not exist, a settings dialog is displayed.
# For Topaz:
# Select the folder where Topaz saves the preview files (for me): ..Temp\AppData\Local\Temp
# A group (group 1) is added and each new file is added to this group. This will also open each new file with the current frame number.
# If you press Ctrl and Shift at the same time, all the found files (otherwise always the last one) will be added to a new tab.
# If addBookmarks = True, the bookmarks from the current script will be added.
# Add filters:
# Everything found after #addFilter in the current script will be added to the new script.
# For example, a color and/or a sharpness filter can be applied to all new previews.

GetLastTopazPreview.py (https://drive.google.com/drive/folders/1EVfjszNvWdnP-_twmgW5wSf1A7B9pILk?usp=drive_link)

GetLastFileFromDir.py has been updated, multiple file extensions are now possible.

gispos
6th September 2023, 18:45
Updated the macro GetLastTopazPreview.py. (https://drive.google.com/drive/folders/1EVfjszNvWdnP-_twmgW5wSf1A7B9pILk?usp=drive_link) The group assignment was incorrect.

Last update v1.9.4

1.8: added filename as Subtitle and improved the read of the current frame number
1.9 add filters:
Everything found after #addFilter in the current script will be added to the new script.
For example, a color and/or a sharpness filter can be applied to all new previews.
1.9.2: If addBookmarks = True, the bookmarks from the current script will be added.

gispos
4th October 2023, 17:05
AvsPmod 2.7.5.4 (https://github.com/gispos/AvsPmod/releases)

* Some fixes e.g. 'Run analisys pass' error handling, bugfix 'Script Selector' and more.


New macro. See below

gispos
6th October 2023, 19:11
Update macro SceneLogToBookmarks (https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn)

# Name: SceneLogToBookmarks.py 1.03
# Purpose: Insert Bookmarks from Dogway's SceneStats logfiles ( https://forum.doom9.org/showthread.php?t=182881 )
# or from SCDetect logfiles ( http://avisynth.nl/index.php/Category:Scene_change_detection )
# or from StainlessS's DBSC logfiles (start_frame logs with/without comment or all logfiles with comment=True)
# StainlessS doom9 ( https://forum.doom9.org/showthread.php?t=171624 )
#
# Example (change it to your needs and save it as snippet):
# logfile = Exist(ScriptFile()) ? ScriptFile() + ".log" : "E:\Temp\SceneStats.log"
# SceneStats("Range", path=logfile) or SCDetect(logfile=logfile)
# or for DBSC the fastest detection ( GScript dll is required ):
# logfile = "E:\Temp\DBSC.log"
# InfoDB = "E:\Temp\DBSC_Info.db"
# ScanDB = "E:\Temp\DBSC_Scan.db"
# DBSC_CreateInfo(InfoDB, RecycleDB=False)
# DBSC_Scan(InfoDB, ScanDB, RecycleDB=False)
# DBSC_WriteFiles(ScanDB, logfile, comment=False)
# use Video > Tools > 'Run analysis pass' or press Ctrl when starting the macro.
#
# Options:
# If you press Shift when starting this macro, a settings dialog is displayed.
# If you press Ctrl when starting this macro, it will start the analysis pass and then read the log file.
# If useScriptName is True:
# the script file name will be expanded with '.log' and this log file will be opened if it exists
# is the script not saved or this logfile is not available an open dialog will be displayed (defaultPath).
# Else:
# always an open dialog will be displayed (defaultPath).
# The bookmark title contains the frame range to the previous bookmark if insertRange is True
# Change the usedTool in the settings dialog to the tool you use ( SceneStats or SCDetect or DBSC )
# If you select 'All readable logfiles' as usedTool:
# then it is not checked if the function is present in the script and
# the function is not commented out after running the analisys pass (autoDisable is then False).
# However, it does not affect the reading of the log file, the required function is automatically selected.

StvG
21st October 2023, 13:48
Thanks for the updates.

avisynth.py and avsp.py:

sys.getfilesystemencoding = lambda: 'UTF-8'
encoding = sys.getfilesystemencoding()


pyavs.py:

sys.getfilesystemencoding = lambda: 'UTF-8'

#globals()['__debug__'] = True


Adding the bold line to the corresponding files makes AvsPmod to support unicode file names. Issues like this one (https://forum.doom9.org/showthread.php?p=1983852#post1983852) will be resolved.

tormento
21st October 2023, 14:15
Update macro SceneLogToBookmarks (https://drive.google.com/file/d/1yGK5PrRR62wm_IlVl2OWHBcK5A-eK3RY/view?usp=drive_link)

Page not found.

kedautinh12
21st October 2023, 14:16
Here:
https://drive.google.com/file/d/1X12U42jPzfYiy4r6E50M1-oR4iGFz6Ge/view?usp=drivesdk

gispos
21st October 2023, 18:24
Thanks for the updates.

avisynth.py and avsp.py:

sys.getfilesystemencoding = lambda: 'UTF-8'
encoding = sys.getfilesystemencoding()


pyavs.py:

sys.getfilesystemencoding = lambda: 'UTF-8'

#globals()['__debug__'] = True


Adding the bold line to the corresponding files makes AvsPmod to support unicode file names. Issues like this one (https://forum.doom9.org/showthread.php?p=1983852#post1983852) will be resolved.
Interesting, well found.
Did you test it only with the 32bit version?
I added it in avisynth_cffi.py too, because for 64bit this file is used instead of avisynth.py.
But have not tested it yet. I also don't know yet if it will affect other functions, like this one:

def GetEncodedText(self, txt, bom=False, forceUtf8=False):
'''Prepare a script's text for saving it to file

Prefer system's encoding to utf-8, just in case other applications
won't support it

If bom == True, insert the BOM at the beginning (except for UTF-8
without BOM on the original file)
'''
script = self.currentScript

# convert line endings to CRLF if necessary
if self.options['eol'] == 'force crlf' or self.options['eol'] == 'auto' and (
script.eol == 'crlf' or script.eol is None and os.name == 'nt'):
txt = txt.replace('\n', '\r\n')

if forceUtf8:
script.encoding = 'utf-8-sig'
bom = False # Python writes the bom if it doesn't exist

# try current encoding, else filesystem's
encoded = False # GPo 2021
try:
encoded_txt = txt.encode(script.encoding)
encoded = True
except UnicodeEncodeError:
sys_encoding = sys.getfilesystemencoding()
if sys_encoding != script.encoding:
try:
script.encoding = sys_encoding
encoded_txt = txt.encode(script.encoding)
encoded = True
except UnicodeEncodeError:
encoded = False
# mbcs just replaces invalid characters
if encoded and script.encoding.lower() == 'mbcs':
txt2 = encoded_txt.decode(script.encoding)
if txt != txt2:
encoded = False
# fallback to utf-8
if not encoded:
script.encoding = 'utf8'
bom = False # GPo 2021
try:
encoded_txt = txt.encode(script.encoding)
except UnicodeEncodeError:
encoded_txt = txt

# Add BOM
if bom:
if script.encoding == 'utf-8-sig': # GPo added bom to bom, also check for bom
if not encoded_txt.startswith(codecs.BOM_UTF8):
encoded_txt = codecs.BOM_UTF8 + encoded_txt
if script.encoding == 'utf-16-le':
encoded_txt = codecs.BOM_UTF16_LE + encoded_txt
elif script.encoding == 'utf-16-be':
encoded_txt = codecs.BOM_UTF16_BE + encoded_txt
elif script.encoding == 'utf-32-le':
encoded_txt = codecs.BOM_UTF32_LE + encoded_txt
elif script.encoding == 'utf-32-be':
encoded_txt = codecs.BOM_UTF32_BE + encoded_txt



Page not found.
Updated the link.
Under the AvsPmod menu Help > 'Video tutorials & more' you can go to the Google drive page of AvsPmod.

gispos
21st October 2023, 19:13
Looked at it again.

if forceUtf8:
script.encoding = 'utf-8-sig'
bom = False # Python writes the bom if it doesn't exist

# try current encoding, else filesystem's
encoded = False # GPo 2021
try:
encoded_txt = txt.encode(script.encoding)
encoded = True
except UnicodeEncodeError:
sys_encoding = sys.getfilesystemencoding() !! is now also UTF-8

UTF-8 is preferred, but if there is a UTF-8 encode error then sys.getfilesystemencoding() is used, but since that is now also UTF-8 there will be an encode error again.
There are other functions that are affected by this. But this is now too confusing and too time-consuming to check all affected functions.

gispos
21st October 2023, 20:13
ffvideosource works with UTF-8.
LWLibavVideoSource but not, is there a parameter? i can't find anything in a hurry.

ffvideosource("E:\DVB Aufnahme\ジャプステスト.mpg")
LWLibavVideoSource("E:\DVB Aufnahme\ジャプステスト.mpg", cache=False, indexingpr=False, format="")

gispos
21st October 2023, 23:12
Thanks for the updates.

avisynth.py and avsp.py:

sys.getfilesystemencoding = lambda: 'UTF-8'
encoding = sys.getfilesystemencoding()


pyavs.py:

sys.getfilesystemencoding = lambda: 'UTF-8'

#globals()['__debug__'] = True


Adding the bold line to the corresponding files makes AvsPmod to support unicode file names. Issues like this one (https://forum.doom9.org/showthread.php?p=1983852#post1983852) will be resolved.
Unfortunately, this does not work. Try to open a file with german umlauts.
I have to take a closer look.

StvG
21st October 2023, 23:19
Interesting, well found.
Did you test it only with the 32bit version?
I added it in avisynth_cffi.py too, because for 64bit this file is used instead of avisynth.py.

Actually I tested only the 64-bit version.
I didn't touch avisynth_cffi.py.
I tested it with this filename - "3 (1)áÅÄÖㅅи.mkv"

Looked at it again.

if forceUtf8:
script.encoding = 'utf-8-sig'
bom = False # Python writes the bom if it doesn't exist

# try current encoding, else filesystem's
encoded = False # GPo 2021
try:
encoded_txt = txt.encode(script.encoding)
encoded = True
except UnicodeEncodeError:
sys_encoding = sys.getfilesystemencoding() !! is now also UTF-8

UTF-8 is preferred, but if there is a UTF-8 encode error then sys.getfilesystemencoding() is used, but since that is now also UTF-8 there will be an encode error again.
There are other functions that are affected by this. But this is now too confusing and too time-consuming to check all affected functions.

What UTF-8 encode error? When can you have UTF-8 encode error?
Also you can save getfilesystemencoding() before it's changed to utf-8 (before sys.getfilesystemencoding = lambda: 'UTF-8') and use it here.

ffvideosource works with UTF-8.
LWLibavVideoSource but not, is there a parameter? i can't find anything in a hurry.

ffvideosource("E:\DVB Aufnahme\ジャプステスト.mpg")
LWLibavVideoSource("E:\DVB Aufnahme\ジャプステスト.mpg", cache=False, indexingpr=False, format="")


Tested with FFVideoSource and LWLibavVideoSource and no issues but you need this ffms2/lsmashsource version (https://filebin.net/hhp085il8z1xwg4n) if you use my ffms2 version from the forum and the lsmash version from homeofavisynthvapoursynth...


FFVideoSource("3 (1)áÅÄÖㅅи.mkv")
#LWLibavVideoSource("3 (1)áÅÄÖㅅи.mkv")


I tested it with and without "Beta: Use Unicode UTF-8 for worldwide language support" on W10 and no issues.
I opened the script file encoded as ANSI ("3 (1)áÅÄÖㅅи.mkv" -> "3 (1)áÅÄÖㅅи.mkv") and no issues.

Edit: I used this Python version (if matters) for building AvsPmod - Python 2.7.18.

Edit 1:
What UTF-8 encode error? When can you have UTF-8 encode error?
Also you can save getfilesystemencoding() before it's changed to utf-8 (before sys.getfilesystemencoding = lambda: 'UTF-8') and use it here.


I took a look at python UnicodeEncodeError. You can just set sys_encoding = sys.getfilesystemencoding() !! is now also UTF-8 to sys_encoding = 'mbcs' (source (https://docs.python.org/2.7/library/sys.html#sys.getfilesystemencoding)).

gispos
22nd October 2023, 14:43
AvsPmod 2.7.5.5 (https://github.com/gispos/AvsPmod/releases)

* New Trim Editor function: Bookmark range to selections (the trim editor must be visible for this).
- if you press Ctrl while clicking the slider, you set the selection in the range from the previous/or current to the next bookmark.
- if 'Bookmark range -1' is checked in the trim editor, the end selection is shortened by one frame (useful for scene change bookmarks).
* UTF-8 file names can now be used in the script.
* Fixed: error handling on creating a clip.


Actually I tested only the 64-bit version.
I didn't touch avisynth_cffi.py.
I tested it with this filename - "3 (1)áÅÄÖㅅи.mkv"
What UTF-8 encode error? When can you have UTF-8 encode error?

I don't know if it's the Windows version or the code page or the settings.

I get a UTF-8 encode error with german umlauts, and avisynth can't do anything with the conversion. The text is only converted correctly when I use system encoding.
I have now solved this differently and will look at it again.

StvG
22nd October 2023, 15:19
I don't know if it's the Windows version or the code page or the settings.

I get a UTF-8 encode error with german umlauts, and avisynth can't do anything with the conversion. The text is only converted correctly when I use system encoding.
I have now solved this differently and will look at it again.

You tested with this version of ffms2/lsmash - https://filebin.net/hhp085il8z1xwg4n ?
What's your system local (https://ibb.co/f0ZG5nF) and tested filename?

gispos
22nd October 2023, 15:32
https://i.postimg.cc/VNyRCmdd/Region.jpg (https://postimg.cc/qNLyffcT)
I am German... so german of course.
And there may be other regions that also cause problems.

This happens with german umlauts

File "C:\AvsPmod_x64\avsp.py", line 22989, in GetTextFromFile
File "encodings\utf_8.pyo", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 710: invalid start byte

https://i.postimg.cc/FRn5mYHY/Error.jpg (https://postimages.org/)

And this is what the potplayer says about the script that is in a directory with german umlauts and with japanese video name
https://i.postimg.cc/CL5CzzLF/Error2.jpg (https://postimages.org/)

StvG
22nd October 2023, 17:11
I set system locals to German (Germany) and I cannot reproduce it.
Can you test my AvsPmod build (https://gofile.io/d/2B5rJs)?

gispos
22nd October 2023, 18:34
I set system locals to German (Germany) and I cannot reproduce it.
Can you test my AvsPmod build (https://gofile.io/d/2B5rJs)?
Oh man I'm getting old.
The first try with your version gave the same result.

https://i.postimg.cc/y8dFpMhj/other.jpg (https://postimg.cc/7fFGfQWJ)


Then I tried to open your video file and it worked.
Then I tried to open your video file with my version and it worked.

Now I was confused.

It took me a while to realize that my Japanese video version was not where I thought it was.

So finally both versions work.
Happy End

StvG
23rd October 2023, 07:06
* UTF-8 file names can now be used in the script, but do not mix extended ascii table (german umlauts) and utf8 (eg. japanese name) in one script. - now the part , but do not mix extended ascii table (german umlauts) and utf8 (eg. japanese name) in one script. should be ignored, right?

I don't see the option Prefetch display conversion. Is Prefetch(1, 1) (https://github.com/gispos/AvsPmod/blob/GPo/changelog.txt#L88) still used. Just in case - Prefetch(1, 1) is not the same as no prefetch at all (Prefetch(1, 0)), the former still can deliver speed boost.

gispos
23rd October 2023, 16:27
* UTF-8 file names can now be used in the script, but do not mix extended ascii table (german umlauts) and utf8 (eg. japanese name) in one script. - now the part , but do not mix extended ascii table (german umlauts) and utf8 (eg. japanese name) in one script. should be ignored, right?.
Yes, you can forget that, I will remove it from the log.
But I will revise the whole thing. I wrote it too complicated due to my mistaken assumption of the UTF-8 error in umlauts.



I don't see the option Prefetch display conversion. Is Prefetch(1, 1) (https://github.com/gispos/AvsPmod/blob/GPo/changelog.txt#L88) still used. Just in case - Prefetch(1, 1) is not the same as no prefetch at all (Prefetch(1, 0)), the former still can deliver speed boost.
Video > Display > 'Prefetch RGB display conversion'

Was previously set higher, think (2,2), but had noticed since there were problems with some things that I do.
Is now set to (1,1), is slower than before but still faster than without prefetch.

Under Options > 'Resample filter' you can overwrite the default value of (1,1) if you use the resample filter.
After the resize filter enter the desired prefetch separated by a semicolon. Spline36Resize;Prefetch(2,2)
You can also enter another or ( additional function, but then do not separate by semicolon use the avisynth syntax).

StvG
24th October 2023, 05:44
Thanks for the info.

StvG
12th November 2023, 05:18
@gispos, with ffms2_r1386 (https://forum.doom9.org/showpost.php?p=1993748&postcount=2779), this file (https://forum.doom9.org/showpost.php?p=1993755&postcount=2781) and system locale Vietnamese AvsPmod 2.7.5.5 throw error about the file name but virtualdub2, avsmeter64 and my AvsPmod test version (https://forum.doom9.org/showpost.php?p=1993768&postcount=2794) work.

https://ibb.co/GkR10jk

gispos
13th November 2023, 17:20
@gispos, with ffms2_r1386 (https://forum.doom9.org/showpost.php?p=1993748&postcount=2779), this file (https://forum.doom9.org/showpost.php?p=1993755&postcount=2781) and system locale Vietnamese AvsPmod 2.7.5.5 throw error about the file name but virtualdub2, avsmeter64 and my AvsPmod test version (https://forum.doom9.org/showpost.php?p=1993768&postcount=2794) work.

https://ibb.co/GkR10jk
Bad.
As already written, I will change this again and then use UTF8 as standard.
At the moment system default is used if encoding and decoding match and only if decoding does not match the encoding, UTF8 is used.
In your case, system default is used because encoding and decoding match. But apparently ffms2 does not use system default but only UTF8.

What interests me:
Is this only with the one ffms2 version or also with other source filters?

kedautinh12
13th November 2023, 17:31
L-SMASH-Works have same error too
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/49

Emulgator
13th November 2023, 23:16
LWLibavVideoSource("ác quá.mkv")
Using 2.7.5.5 LWLibavVideoSource 1144 opens the Vietnamese file. LSmashVideoSource 1144 can not. (.mkv is not ISO)
Using 2.7.5.5 LWLibavVideoSource 1147 opens the Vietnamese file. LSmashVideoSource 1147 can not. (.mkv is not ISO)
Using 2.7.5.5 FFVideoSource 1386 can't open the Vietnamese file.
Using 2.7.3.6M FFVideoSource 1386 will open the Vietnamese file.

gispos
13th November 2023, 23:29
I will set UTF8 as default, but what I haven't checked yet:
CMD parameter passing and WinXP... might have problems with UTF-8... no idea yet. Can anyone answer that?

Emulgator
13th November 2023, 23:35
I will run all these sourcefilters and AvsPmod on WinXP32SP3 once it is compiled.

gispos
14th November 2023, 18:35
I am older but not as confused as I thought. ;)

https://i.postimg.cc/SKR6Pb4S/Screenshot-28.jpg (https://postimg.cc/QBLKBPVw)

There is a UTF-8 decode error when...
German is set as language, there are German umlauts but no other unicode characters in the script and the script is saved (with AvsPmod) and then opened with the test version of StvG.
Why? because the StvG test version only supports UTF-8 and cannot read the file saved as system encoding (Latin1). This is what the previous AvsPmod version does.
It only stores UTF-8 if the system encoding fails. And it does not fail with German umlauts if the system is set to German.

In short, the StvG test version can only handle UTF-8 and therefore cannot open older scripts or scripts saved with another editor that does not use UTF-8.
It can only open them if the character set they contain is within the range of normal ASCII table. I think it goes up to 128 which matches UTF-8.

I will now change it so that it is always saved with UTF-8 and when an older file that is not UTF-8 is opened, it is converted to UTF-8.

gispos
14th November 2023, 19:27
Please test AvsPmod 2.7.5.6 Pre-Release x64 (https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link)

Emulgator
14th November 2023, 22:49
Success, and many thanks ! All these work in AvsPmod 2.7.5.6 64bit on Win10P64, AVS+ 3.7.3 test 9 r4022
OS Region setting Deutsch, no UTF-8 support ticked, ffms2.dll 1386, lsmash 1147

#FFVideoSource("ジャプステスト.m2v")
#LWLibavVideoSource("ジャプステスト.m2v")
#FFVideoSource("3 (1)áÅÄÖㅅи.hevc")
#LWLibavVideoSource("3 (1)áÅÄÖㅅи.hevc")
#FFVideoSource("ác quá.mkv")
LWLibavVideoSource("ác quá.mkv")

gispos
16th November 2023, 23:39
I'm currently testing UTF-8 and my hair is about to fall out. At the moment it's a disaster with the source filters.
One can't do UTF-8, the other can only do UTF-8 but no system regional language.

Please! a source filter must be able to handle the regional language and the UTF-8 is the icing on the cake.
Or is there one that can do both?

gispos
18th November 2023, 15:33
AvsPmod 2.7.5.6

Deleted. Will come later

FranceBB
18th November 2023, 18:21
WinXP... might have problems with UTF-8... no idea yet. Can anyone answer that?

No problem, Windows XP is still going strong. :D

This is with AVSPmod mod 2.7.5.6:


FFmpegSource2("I:\proxy\àèéìò.mkv", atrack=1)

VideoTek()


https://i.imgur.com/4xfdgdR.png

Also no problem with:

LWLibavVideoSource("I:\proxy\àèéìò.mkv")

VideoTek()


works like a charm. :)

gispos
18th November 2023, 18:54
No problem, Windows XP is still going strong.
works like a charm. :)
But probably a wrong decision to use UTF-8 as standard.
Everyone who is not currently using new source filters will be cursing. Does DirectShowSource have an option for UTF-8?

VirtualDub also cannot open UTF-8 encoded scripts with DirectShowSource.
At least with my region setting and German umlauts in the name.

gispos
18th November 2023, 22:38
AvsPmod 2.7.5.7 (https://github.com/gispos/AvsPmod/releases)

* UTF-8 changes:
- The encoding for the Avisynth script transfer is now set for each script depending on the content in the script.
- No default UTF-8 can be used, that would be wrong and cause problems with source filters that cannot use UTF-8.
- e.g. DirectShowSource does not work with UTF-8 depending on the country setting and the characters it contains.
------
* Video > Video information new entry 'Current script UTF-8 encoded', 'True' or 'False' or 'True with BOM'.
* New Menus: Video > Groups > 'Change current group...', 'Change current/left tabs group...', 'Change current/right tabs group...'
* Group assignment improved: It is now possible to set the group of the tab to None, change the frame number and reassign it to the group.
- was not possible before and messed things up.
* Mouse pointer now changes when it is in the area of a zoom action (50 pixel area left or right), e.g. fullscreen, fullsize, resample zoom.
* If the mouse is in a zoom action area, action is displayed as a hint. Program options > Misc 2 > 'Show hint for the zoom action area' default enabled.
- available options: 'Off', 'On - staticaly', 'On - auto hide'
- if 'Reset' is displayed, it is the same as with a double click outside the action area.
* New statusbar popup menu entry 'Free scroll range', Complete timeline area can be scrolled (on status bar) without having to press Ctrl.
- Reminder status bar (timeline range):
-- double-click left or right to move the timeline area, middle mouse click returns to frame position, Shift pressed increases the scroll rate
-- focus on Video Window: if the Ctrl + Alt keys are held down, the Up or Down key moves the timeline area.
* New tab popup menu entry: Close... > 'All unopened', closes all tabs that are not initialized.
* Slider context menu new entry: 'Timeline range...' if statusbar is not visible (fullscreen) you can now show the context menu 'Timeline range'.
- or press Ctrl when right-clicking on the slider area.The timeline context menu will then also appear.
* Resample zoom filter menu now on as default.
* Fix: In fullscreen mode, not all shortcuts for "Next tab", "Previous tab" or "Previous selected tab" worked (e.g. F1..F12).
* Fix: If the 'Close all right' or 'Close all left' tabs menu was used, the bookmarks of the current tab were also deleted.
* 'Script Selector', another bugfix.
* Minor other modifications

FranceBB
19th November 2023, 00:52
Uhmmm DirectShowSource() is distributed as part of the main Avisynth installation, so I guess we *could* ask Ferenc or Stephen to make it support UTF-8.

StainlessS
19th November 2023, 17:01
Also, Anybody remember DSS2 ? [EDIT: Video decode only]

[EDIT: Use DSS2 without installing Haali? :- https://forum.doom9.org/showthread.php?t=170874 ]

kedautinh12
19th November 2023, 17:10
Yes, i still catch too :D

gispos
19th November 2023, 22:41
AvsPmod 2.7.5.8 (https://github.com/gispos/AvsPmod/releases)

* Program Options > Save / Load > 'Force UTF-8 encoding on saving the script' (for the sake of peace).
- as already mentioned: Some source filters do not work with UTF-8. See version 2.7.5.7 below.
* New Video information entry 'Script Avisynth encoding', 'UTF-8' or 'System locale: xxx'

StvG
20th November 2023, 05:43
Thanks for the updates.

FranceBB
20th November 2023, 10:01
Thank you for the update, once again, Gispos!

Current results:

Version: AvsPmod 2.7.5.8 x64
OS: Windows 10 Enterprise x64
Avisynth: 3.7.3 r4013 x64

Test file: àèéìòù.mkv

FFVideoSource() r1387 ok
LWLibavVideoSource() v1156 ok
DirectShowSource() ok

Version: AvsPmod 2.7.5.8 x86
OS: Windows XP Professional x86
Avisynth: 3.7.3 r4013 x86

Test file: àèéìòù.mkv

FFVideoSource() 2.40 2023-09-04 fail
LWLibavVideoSource() 2015-03-16 ok
DirectShowSource() ok


Looks like FFVideoSource() from the C plugin (https://forum.doom9.org/showthread.php?t=181802) throws an error if used with accents.
I asked Reino whether he can support UTF-8 too.
Let's see what he says.

In fact: FFMpegSource2("abc.mkv", atrack=-1) works but FFMpegSource2("àèéìòù.mkv", atrack=-1) doesn't.

kedautinh12
20th November 2023, 10:52
Why you don't use r1387 x86??

FranceBB
20th November 2023, 13:05
Why you don't use r1387 x86??

'cause only the C plugin works on XP x86.
People can use r1387 x86 as a failsafe on, let's say, Windows 10 or Windows 11, but not on XP.

gispos
20th November 2023, 17:29
Thank you for the update, once again, Gispos!

Current results:

Version: AvsPmod 2.7.5.8 x64
OS: Windows 10 Enterprise x64
Avisynth: 3.7.3 r4013 x64

Test file: àèéìòù.mkv

FFVideoSource() r1387 ok
LWLibavVideoSource() v1156 ok
DirectShowSource() ok

Version: AvsPmod 2.7.5.8 x86
OS: Windows XP Professional x86
Avisynth: 3.7.3 r4013 x86

Test file: àèéìòù.mkv

FFVideoSource() 2.40 2023-09-04 fail
LWLibavVideoSource() 2015-03-16 ok
DirectShowSource() ok


Looks like FFVideoSource() from the C plugin (https://forum.doom9.org/showthread.php?t=181802) throws an error if used with accents.
I asked Reino whether he can support UTF-8 too.
Let's see what he says.

In fact: FFMpegSource2("abc.mkv", atrack=-1) works but FFMpegSource2("àèéìòù.mkv", atrack=-1) doesn't.

The basic requirement for a source filter is that it can work with the system locale, this one can apparently only work with UTF-8.

You are not using characters for which UTF-8 is required on your system.
These Italian special characters and the German umlauts are in the extended ASCII table. The system locale is therefore used.

Look under video information 'Avisynth script encoding', it probably says 'System encoding: mbcs'
This is why DirectShowSource also works.

Now write a unicode character in the script e.g. test in Hindi as comment: # परीक्षा
Now press F5 and look under Video Information again: now it should say 'UTF-8' and the DirectShowFilter should no longer work.

abc.mkv does not cause any problems if a source filter cannot handle a system locale language, because these characters are the same for UTF-8.
So you have to ask for system locale support.

I will not use UTF-8 as default as long as:
DirectShowFilter cannot use UTF-8
Error messages are returned by Avisynth in UTF-8.
All users use new source filters. :D
Especially for new users the DirectShowSource filter should always work.

You can't just switch to UTF-8 overnight and ignore the system's own settings, that's a no go.

gispos
21st November 2023, 18:52
AvsPmod 2.7.5.9 (https://github.com/gispos/AvsPmod/releases)

* Program Options > Save/Load > 'Force Avisynth UTF-8 encoding' (pass the script to Avisynth always UTF-8 encoded else system locale or UTF-8)
- as already mentioned: Some source filters do not work with UTF-8. See version 2.7.5.7 below.
- my recommendation is not to use it and encode whether system locale or UTF-8 automatically.


Edit: If you downloaded it before 21.11.2023 Central European Time 21:02, please download it again.

And one more thing about UTF-8, it does not only affect the DirectShowSource.
As long as the system itself is not set to UTF-8, all plugins and functions (scripts) that ask for a path/filename in the parameter have problems, depending on the characters contained, this is then unreadable.

StvG
28th November 2023, 00:06
After 2.7.5.5 if you have open 6 tabs and press "6" to switch to tab #6, the tab is not changed but resample is activated. How can I have the old behavior?

gispos
28th November 2023, 12:28
AvsPmod 2.7.6.0 (https://github.com/gispos/AvsPmod/releases)

* Changed Fullscreen zoom setting from 'Normal' to 'Resample' as default (Program settings > Misc 2 > 'Fullscreen\Fullsize zoom'.
- for the Resample filter read the Help > 'Resample filter readme'
* Fullsize mode uses now the zoom settings from Fullscreen mode. (Program settings > Misc 2 > 'Fullscreen\Fullsize zoom').
- but only if the fullsize is activated by a double click with the mouse in the zoom action area.
- when activated via a shortcut or menu, the current zoom is used.
* Video Window hide scroll bars is now as default enabled (Options > 'Hide video window scrollbars').
* Zoom with mouse wheel overrides the zoom 'Fill' or 'Fit' settings (you can now always zooming with the mouse wheel).
* New zoom menu entry 'Custom', acts only as Indicator if the current zoom not in the other fixed value menus.
* Zoom action area: 'Resize single' and 'Resize all' changes the color yellow or blue depending on the function.
- if it is yellow, the resize filter is switched on when double-clicked, and switched off if it is blue.
- is it preceded by a +, this indicates that the global resample filter is switched on, i.e. that the resample is active every time a new tab is opened.
* Some small other changes


After 2.7.5.5 if you have open 6 tabs and press "6" to switch to tab #6, the tab is not changed but resample is activated. How can I have the old behavior?
Read too late, just uploaded a new version. I'll have to take a look.

gispos
28th November 2023, 12:51
After 2.7.5.5 if you have open 6 tabs and press "6" to switch to tab #6, the tab is not changed but resample is activated. How can I have the old behavior?
That's not the case for me.
Do you have a shortcut connected to the '6' or '&'? Look under the keyboard shortcut settings.

If that doesn't help, just try to see if it is the same with a freshly unpacked AvsPmod (I have no problems with this either).
If that works, it may be due to the options.dat in which something may have been saved incorrectly.

You can also post me your options.dat, then I can try to use your settings.
Perhaps this is only the case with certain settings.

StvG
28th November 2023, 14:07
Tested with just unpacked release (nothing changed) and 7 tabs with version() - https://i.ibb.co/L9h8t86/Untitled.png
See the red marked area at the status bar. It's added instead to change tab #6.

gispos
28th November 2023, 14:41
Very strange.
Even with a freshly unpacked AvsPmod without options.dat
What kind of keyboard are you using? Is it something special?

Delete the preset shortcuts for the resample in the freshly unpacked AvsPmod. I am curious.
https://i.postimg.cc/5tKqvBgw/Shortcuts2.jpg (https://postimages.org/)

Edit: And to be sure: restart the program.

gispos
28th November 2023, 15:00
Well, I hadn't thought of that. :)
Just had a look at the US keyboard layout, 6 and ^ are on one key.
So should be fine once the shortcuts are removed.
Will remove the default shortcuts.

StvG
28th November 2023, 15:08
Yes, without options.dat. Downloaded AvsPmod_v2.7.5.9_.Windows_x86-64, extracted, launched AvsPmod.exe. No extra steps.

Deleting the the preset shortcuts for the resample in the freshly unpacked AvsPmod resolves the issue (even without restart).

The Windows keyboard is English (US).

gispos
28th November 2023, 15:13
Just re-uploaded the release with the shortcuts removed. :)

StvG
28th November 2023, 15:19
Thanks.

FranceBB
28th November 2023, 19:09
Look under video information 'Avisynth script encoding', it probably says 'System encoding: mbcs'
This is why DirectShowSource also works.


Spot on, Script Avisynth Encoding does indeed say "System locale: mbcs".

I updated the list with the new proper tests and it's actually more interesting than I initially thought:



Version: AvsPmod 2.7.6.0 x64
OS: Windows 10 Enterprise x64
Avisynth: 3.7.3 r4013 x64

Test file: àèéìòù.mkv

Script Encoding: ANSI
Script Avisynth encoding: System locale mbcs

FFVideoSource() r1387 ok
LWLibavVideoSource() v1156 ok
DirectShowSource() ok

Script Encoding: UTF-8
Script Avisynth encoding: System locale mbcs

FFVideoSource() r1387 ok
LWLibavVideoSource() v1156 ok
DirectShowSource() ok


Script Encoding: UTF-8
Script Avisynth encoding: UTF-8

FFVideoSource() r1387 ok
LWLibavVideoSource() v1156 ok
DirectShowSource() fail




Version: AvsPmod 2.7.6.0 x86
OS: Windows XP Professional x86
Avisynth: 3.7.3 r4013 x86

Test file: àèéìòù.mkv

Script Encoding: ANSI
Script Avisynth encoding: System locale mbcs

FFVideoSource() 2.40 (C Plugin) 2023-09-04 fail
LWLibavVideoSource() 2015-03-16 ok
DirectShowSource() ok


Script Encoding: UTF-8
Script Avisynth encoding: System locale mbcs

FFVideoSource() 2.40 (C Plugin) 2023-09-04 fail
LWLibavVideoSource() 2015-03-16 ok
DirectShowSource() ok


Script Encoding: UTF-8
Script Avisynth encoding: UTF-8


FFVideoSource() 2.40 (C Plugin) 2023-09-04 ok
LWLibavVideoSource() 2015-03-16 ok
DirectShowSource() fail



So, to recap:


ffms2 r1387
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth

ffms2 c plugin 2023-09-04
- Supports UTF-8 Script + UTF-8 Avisynth
(anything else will only work if the file doesn't have accents)

libav v1156
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth

libav 2015-03-16
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth


DirectShowSource
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth

gispos
28th November 2023, 21:09
That is as I have already written. The FFVideoSource() 2.40 (C Plugin) 2023-09-04 can only use UTF-8.
You need to ask for system locale support.

AvsPmod does not care how the script is encoded, it understands System locale (ANSI) and UTF-8, UTF-16, UTF-32 with or without BOM

However, the script is not simply passed on to Avisynth, but is first decoded and then encoded as required or desired (see Forcing UTF-8) and then passed on to Avisynth.
If this were not the case, every script that was already encoded with UTF-8 when opened would have problems with various characters and filters (see DirectShowSource).

Pass a script encoded with UTF-8 with your Italian special characters to VirtualDub2 with DirectShowSource as source filter.
AvsPmod can handle this, VirtualDub2 cannot.

https://i.postimg.cc/0jTw4Rbv/Avs-Pmod-UTF-8.jpg (https://postimg.cc/JHQ0yFNY)

https://i.postimg.cc/yxgRnY6n/Virtual-Dub-UTF-8.jpg (https://postimages.org/)

Under Save/Load there is also the function 'Force Avisynth UTF-8 encoding' (see version 2.7.5.9).
Then your C-Plugin will work, but all other filters which cannot use UTF-8 and that ask for a path or file name will not work if they contain strange characters ÜÖ or your accents.

FranceBB
29th November 2023, 00:20
The FFVideoSource() 2.40 (C Plugin) 2023-09-04 can only use UTF-8.
You need to ask for system locale support.

Yep, this checks out after the last tests. I'll ask Reino! :)


AvsPmod does not care how the script is encoded, it understands System locale (ANSI) and UTF-8, UTF-16, UTF-32 with or without BOM

However, the script is not simply passed on to Avisynth, but is first decoded and then encoded as required or desired (see Forcing UTF-8) and then passed on to Avisynth.


This is actually very nice, also thank you for including this info when I right click on the clip, it's actually pretty useful to know and it makes this whole thing about encoding types much clearer and easier to understand and deal with. :)


If this were not the case, every script that was already encoded with UTF-8 when opened would have problems with various characters and filters (see DirectShowSource).


Gotcha.


Under Save/Load there is also the function 'Force Avisynth UTF-8 encoding' (see version 2.7.5.9).


Yep, I saw that, that's how I actually made the various tests, thank you for this inclusion. :)


So, current plan:

- Ask Ferenc for DirectShowSource() UTF-8 support (and someone should really test DSS2 as well

- Ask Reino about ANSI / System locale mbcs support for ffms2 C plugin

gispos
29th November 2023, 10:47
- Ask Ferenc for DirectShowSource() UTF-8 support (and someone should really test DSS2 as well

Unfortunately, that is not enough. As long as the system itself does not work with UTF-8, there are problems with all filters that ask for a path\file name in the parameter.

In the end, it's like I wrote at the very beginning (when I thought my age was making me stupid).
If there are accents or German umlauts and other unicode characters ('test' in Hindi) in the script, UTF-8 must be used and then there are problems with various filters.

As long as the system itself does not work with UTF-8, it should be very difficult (impossible?) for Avisynth to handle this.

tormento
29th November 2023, 17:18
Unfortunately, that is not enough. As long as the system itself does not work with UTF-8, there are problems with all filters that ask for a path\file name in the parameter.
If I am not wrong good old Donald added UTF-8 support to DGTools by manifest. Perhaps lurking in his forum would help.

gispos
29th November 2023, 23:32
If I am not wrong good old Donald added UTF-8 support to DGTools by manifest. Perhaps lurking in his forum would help.
I can't judge whether this is also possible for Avisynth.
So far, Avisynth has required UTF-8 to be specified as a parameter, see SubTitle.

Hopefully he doesn't make the same mistake and only supports UTF-8

gispos
30th November 2023, 00:19
Sorry, what 'mistake' are you talking about?
The FFVideoSource() 2.40 (C Plugin) 2023-09-04 can only use UTF-8
And other filters have problems with UTF-8, read the other posts.

FranceBB
30th November 2023, 02:40
Sorry what do you mean by only UTF8? You're looking for UTF16 support or some other variant?

Not quite.

As per the conversation in the previous posts (https://forum.doom9.org/showpost.php?p=1994365&postcount=1554), some indexers only support ANSI / Enhanced ANSI working with system locale mbcs in Avisynth and don't support UTF-8.
That is the case for DirectShowSource().
Other indexers like ffms2 C plugin support UTF-8 and ANSI but don't support Enhanced ANSI like WinLatin.
Some other like ffms2 r1387 and lwlibav v1156 support both, namely ANSI, Enhanced ANSI and UTF-8.

The idea here is to have everything support everything.


ffms2 r1387
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth

ffms2 c plugin 2023-09-04
- Supports UTF-8 Script + UTF-8 Avisynth

libav v1156
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth

libav 2015-03-16
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth

DirectShowSource
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth



So, as I was saying:

ffms2 r1387 is fine and doesn't need any changes.
libav v1156 is fine and doesn't need any changes.
libav 2015-03-16 (last xp compatible version) is fine and doesn't need any changes

while

ffms2 c plugin needs Enhanced ANSI (mbcs Avisynth) support.
DirectShowSource needs UTF-8 support

gispos
30th November 2023, 10:28
In AvsPmod you can set whether the script is passed to Avisynth only UTF-8 encoded or after an automatic decision with UTF-8 or System locale.

For 90% of the users the check whether the system locale can be used is the right one.

How the script is passed can be read under Video Information. 'Script Avisynth encoding'

Once again: If a source filter can only use UTF-8, the script must be saved UTF-8 encoded.
If it is then also passed to Avisynth in UTF-8 encoding, all filters that do not check for UTF-8 and ask for a path/filename in the parameter will have problems with the extended ANSI table that most European countries use.

A source filter must be able to use both UTF-8 and the system locale. This is the current state as long as Avisynth itself cannot change anything.

My opinion:
No user should be forced to use UTF-8, I don't need all this UTF-8 madness, if I see a name I can't read, I rename the file.
UTF-8 should only be of interest to people who do not use their own national language on their PC and may have set US.
Or for a few other reasons. see FranceBB

StvG
30th November 2023, 11:18
DirectShowSource is assuming ANSI code page for the file name when converting to wide string - https://github.com/AviSynth/AviSynthPlus/blob/master/plugins/DirectShowSource/directshow_source.cpp#L2005
This is the reason it cannot read UTF-8. It should convert to wstring using UTF-8 for such case.

ffms2/l-smash-source (ffmpeg based source filters): ffmpeg (at least the releases from the beginning of 2023) assumes UTF-8 when converting to wide string (the opposite of DirectShowSource). So additional case is required - ANSI code page to wstring.

gispos
30th November 2023, 12:02
DirectShowSource is assuming ANSI code page for the file name when converting to wide string - https://github.com/AviSynth/AviSynthPlus/blob/master/plugins/DirectShowSource/directshow_source.cpp#L2005
This is the reason it cannot read UTF-8. It should convert to wstring using UTF-8 for such case.

ffms2/l-smash-source (ffmpeg based source filters): ffmpeg (at least the releases from the beginning of 2023) assumes UTF-8 when converting to wide string (the opposite of DirectShowSource). So additional case is required - ANSI code page to wstring.
And what about all the other filters that ask for a path/filename in the parameter?

StvG
30th November 2023, 12:23
And what about all the other filters that ask for a path/filename in the parameter?

The logic is same. If the the input string is assumed ACP but it's UTF-8 or vice versa, you cannot read it correctly.

Generally both cases (ACP/UTF-8 to wide string) should be covered.

FranceBB
30th November 2023, 18:36
Are you saying the difference between Avisynth UTF8 and Avisynth mbcs is an AvsPmod setting?

The answer is "it depends".
What we're trying to say is that regardless of how the actual physical AVS Script.avs is saved (ANSI or UTF-8), AVSPmod mod can read it and then pass it as Avisynth mbcs or Avisynth UTF-8.

This means that if you save a .avs as UTF-8 but you wanna use DirectShowSource() which only supports Avisynth mbcs, in AVSPmod mod you can, 'cause it can read UTF-8 and pass it to DirectShowSource() as Avisynth mbcs thus making it work.

You can also do it the other way round, for instance you can save an AVS Script.avs as Enhanced ANSI WinLatin, open it in AVSPmod mod and then force AVSPmod mod to pass it as UTF-8 (that's what the Force UTF-8 setting does).



Can developers then ignore that distinction?

Well, in a nutshell, no.
The fact that AVSPmod mod can pass things as UTF-8 or mbcs to Avisynth plugins is something that Gispos did to make everyone's life easier, but AVSPmod mod is quite literally the only program able to do that.
In other words, if you were to save an AVS Script.avs as UTF-8 with DirectShowSource() and then pass it to, let's say, VirtualDub, it's gonna fail 'cause DirectShowSource() doesn't support UTF-8 and there's nothing converting things under its nose.

The same goes for an AVS Script.avs saved as ANSI WinLatin and then using ffms2 C plugin as it only supports UTF-8.


Ideally an indexer should support both UTF-8 and Enhanced ANSI, the same way LWLibav and FFMpegSource2 are doing.



support both UTF8 and system locale?


Yes. I think that the developers of other indexers should really talk to asd-g and StvG to understand what they've done to accomplish this and replicate exactly that.
I have excluded DGIndex / DGAVCIndex / DGIndexNV on purpose 'cause they're different in the fact that they use an external executable to create the index file and then the Avisynth function points towards that index file rather than the source, so I have to check what happens when such an index file has special characters in it.

I'll try to do it later / in the coming days.

gispos
30th November 2023, 19:51
Thank you FranceBB, I would just like to add a few things.
If no force UTF-8 is used:
The system locale is used first, but if there is a unicode character in the script that the system locale cannot decode, AvsPmod automatically switches to UTF-8 to pass on to Avisynth.

This has the disadvantage that some filters no longer work. The system locale should therefore always be tried first.

Therefore:
The basis for a source filter is that it can work with the system locale, the UTF-8 is then the bonus.
I personally will not use a filter that can only use UTF-8. At least that is the current status with the current Avisynth.

gispos
2nd December 2023, 14:29
AvsPmod 2.7.6.1 (https://github.com/gispos/AvsPmod/releases)

* Fix: The resample filter sets the wrong size for 'Fullsize' when double-clicking in the zoom action area.
* Another Bugfix for the 'Script Selector'

gispos
2nd December 2023, 18:46
I had asked what you meant by that. I ask again. Does that mean a filter must simultaneously support them both, i.e., automatically adjusting to the input encoding? Or is it OK if some configuration is needed to say whether to use system locale or UTF8?

Perhaps you can tell me what LWLibav and FFMpegSource2 are doing in this regard.

Thank you.
The source filters mentioned support both. Only the 32bit C plugin can only support UTF-8.

I have already written it:
The system locale is used if it is possible, if the source filter cannot handle it, there is an error.

Only if the user sets the options to use UTF-8 only, UTF-8 will always be used.
This is not so good because other filters have problems with UTF-8. So far...

gispos
2nd December 2023, 20:56
And then what? You're saying what you want but not how to do it. Can't you please give some pseudocode? Tell us your great solution.
I don't know what you want from me. I am only writing how I have arranged it in AvsPmod.
In AvsPmod the input is encoded and decoded with system locale and if the result matches the input the system locale can and will be used otherwise UTF-8 must be used.

I have no idea how this is handled in the source filters so that they can support both.

Ask StvG who has already given a hint above #1566, 1568. Or take a look at the code from Libav or ff-source.

FranceBB
3rd December 2023, 02:33
Grandmaster Ferenc updated DirectShowSource() to support UTF-8:


Avisynth+ 3.7.3post test 10 (20231202 - r4035) (https://drive.google.com/uc?export=download&id=1yuiF6rnphnfpBoZGFTsT9vKPGiZxbGCX)
It works the usual way, add utf8=true.

I tested it with AVSPmod mod 2.7.6.1 x86 by forcing UTF-8 and indeed it works:

https://i.imgur.com/U2FxwXM.png

therefore we're now in the following situation:


ffms2 r1387
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth

ffms2 c plugin 2023-09-04
- Supports UTF-8 Script + UTF-8 Avisynth

libav v1156
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth

libav 2015-03-16
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth

DirectShowSource
- Supports ANSI Script + mbcs Avisynth
- Supports UTF-8 Script + mbcs Avisynth
- Supports UTF-8 Script + UTF-8 Avisynth (utf8=true requried)



So, right now we have:

ffms2 r1387 is fine and doesn't need any changes.
libav v1156 is fine and doesn't need any changes.
libav 2015-03-16 (last xp compatible version) is fine and doesn't need any changes
DirectShowSource is fine and doesn't need any changes (utf8=true must be set utf8)

the only one left is

ffms2 c plugin needs Enhanced ANSI (mbcs Avisynth) support.


We're getting closer guys. :)

DReffects
9th December 2023, 13:23
Help me out here real quick: how do i get the preview window to be set to "fill window" or "Fit inside window" by default? Previous versions had this but i cannot get it to work with the latest ones ;-)

Thanks!

gispos
10th December 2023, 02:18
Help me out here real quick: how do i get the preview window to be set to "fill window" or "Fit inside window" by default? Previous versions had this but i cannot get it to work with the latest ones ;-)

Thanks!
I don't know exactly what you mean.
There is Fill and Fit in the Zoom menu, then there is the same as a resample version in the Zoom menu.

Or do you mean at program start as default?
This is under Program Settings > Video > 'Startup with last zoom settings'

If you unpack a new version into another directory, you can restore your old settings by copying the options.dat from the old directory into the new directory.

DReffects
20th December 2023, 20:41
Or do you mean at program start as default?
This is under Program Settings > Video > 'Startup with last zoom settings'


THANK YOU! That was it. It was driving me nuts

gispos
24th December 2023, 22:06
AvsPmod 2.7.6.2 (https://github.com/gispos/AvsPmod/releases)

* Audio playback improved. hanfrunz Christmas script (2023) now run without any dropouts ,) https://forum.doom9.org/showthread.php?t=185220
- audio playback is now disabled if playback not Normal speed (Halfspeed, Maximum etc.).
* Added Video > Zoom > 'Disable Fullscreen zoom'. Interesting for comparing 4K videos with 100% zoom on smaller monitors (on startup allways disabled).
- Note: if you change the tab on Fullscreen, the last zoom and position is used if 'Save pos & zoom on tab change' checked.
* In full screen mode, the filename and zoom settings are displayed when you move the mouse all the way up (first 5 pix).
* D3D Window automatically turns off drawing of the normal window when it is in fullscreen or fullsize mode.
- you can now always set 'Playback both' without losing speed when the D3D display is fullscreen\fullsize.
* Encoder_gui.py (Tools > Script encoder CLI) now remembers the last desktop position.
- if the whole archive is not unpacked, the old file encoder_gui.py in the tools folder must be replaced with the new one.
* Added ffmpeg x264, x265 and AV1 presets for Script encoder CLI:
- x264 lossless medium, x265 lossless medium, svt-av1 CRF Slower, svt-av1 CRF Slow, svt-av1 CRF Medium, av1_nvenc VBR, av1_nvenc CQP
- Suggestions for improving default encoder settings are welcome!


I have no idea why the hanfrunz 2023 script crashes AvsPmod when freeing tab memory.
It must have something to do with the Avisynth C interface again. But what is so unusual about the script?

A question about x264 and x265:
reale.finder I think had added 10bit ffmpeg presets back then which I adopted. Does that make sense at all?
Because if I want to have a 10bit file, I convert to 10bit in the script and ffmpeg then also encodes in YUV420P10 color format.

There are also two new macros to reposition bookmarks after one or more clip trims.
MoveBookmarksPass.py and SelectedTrimsMoveBookmarks.py
https://drive.google.com/drive/folders/1EVfjszNvWdnP-_twmgW5wSf1A7B9pILk?usp=drive_link

real.finder
25th December 2023, 05:59
had added 10bit ffmpeg presets back then which I adopted. Does that make sense at all?
Because if I want to have a 10bit file, I convert to 10bit in the script and ffmpeg then also encodes in YUV420P10 color format.

it wasn't like this IIRC that why I made 10bit presets (at least in x264), maybe some update in ffmpeg made it do it automatically? also did you tried the same thing with x264.exe (not x264 in ffmpeg)?

gispos
25th December 2023, 20:39
it wasn't like this IIRC that why I made 10bit presets (at least in x264), maybe some update in ffmpeg made it do it automatically? also did you tried the same thing with x264.exe (not x264 in ffmpeg)?
I think it can be removed for ffmpeg, makes little sense. I haven't tried x264.exe now, I never use it, I'll keep it for this.

gispos
27th December 2023, 08:04
AvsPmod 2.7.6.4 (https://github.com/gispos/AvsPmod/releases)

* Audio playback revised.
- under Video > Playback > 'Audio buffer count...', the number of buffered frames can be set.
- a lower value results in a faster response when playback is jerky. Default 6

FranceBB
27th December 2023, 09:11
Thank you for the audio buffer count, definitely helpful for playback on some systems! :)
On my Windows XP, for instance, the sweet spot seems to be 10.

gispos
27th December 2023, 17:29
Thank you for the audio buffer count, definitely helpful for playback on some systems! :)
On my Windows XP, for instance, the sweet spot seems to be 10.
I'm glad it can be useful.
The playback is unfortunately jerky with filters and audio (if the fps cannot be reached). VDub runs much more smoothly.

I think it comes from the audio buffer read (number of buffers set), the buffer is then before the actual frame and avisynth then keeps these frames in the cache and thus the next frames are played faster until the cache is empty.
I have already tried various things, but unfortunately without success. I don't know if the behavior is due to the C interface, but I will probably never know.

gispos
2nd January 2024, 11:10
AvsPmod 2.7.6.5 - Dire Straits Edition (https://github.com/gispos/AvsPmod/releases) :)

* Playback with audio now runs smoothly even if the video fps is not reached.
* Added and changed audio options.
- 'Audio only when Video setting is normal speed' - 'Audio rate always 100%' - 'Audio speed equals Video speed when Video speed 100% or less'
** Hint! My audio card works with all sample rates down to 1000 Hz, if problems occur the option must be changed to the first or second option.
- the settings and the settings for the audio buffer can be found under Video > Play video > 'Audio settings...' and in the Playback butten context menu.
* The audio buffer setting is now in milliseconds (200 to 2000), default 500 (buffers = ms/1000*framerate) eg. for 25fps round 13 frames.
* Drop frames 'Auto' (playback butten context menu > Drop frames... > 'Auto'):
- if drop frames 'Auto' is set, the audio buffer increase automatically up to 200 frames if a audio dropout detected (10 frames step).
- play back speed cannot higher as 100%, if Maximum speed is set, drop frames 'Auto' is not used.
- and one more thing, drop frames 'Auto' is a special function and should only be used if the audio should have priority (but then it is a nice function).
* Added play back butten context menu > Speed x > '0.25x'


And a happy new year to all members and readers.

FranceBB
2nd January 2024, 14:18
Happy New Year, Gispos and thank you for everything you've done!
I can actually say that the audio crackling issues are completely gone now, even when AVSPmod is used in very constrained in virtual machines whose virtual audio card timings are bad. :D

gispos
7th January 2024, 16:19
AvsPmod 2.7.6.6 (https://github.com/gispos/AvsPmod/releases)

* Playback option Drop frames 'Auto' is now set more aggressive.
- however, i have noticed that with filters that do not like large frame jumps it can take a long time until a new frame is drawn... can't be changed.
* Added tab context menu > 'Tab list'
- 'Tab list' is for those who have many tabs open and don't want to use 'Multiline tab Style' and don't like the 'Script Selector'.
- 'Tab list' is also available with a middle mouse click on a tab if the option is selected under Program Options > Misc > 'Middle mouse on tab'. Enabled by default.
- furthermore, the 'Tab list' is available in the video window and the script editor on the right side (25 pix) and on the slider window button with a right mouse click.
- you can use the mouse forward/backward buttons to jump to the previous tab. 'Tab list' closes automatically when the focus is lost.
- the settings for the font can be found under Options > Fonts and colors' > Advanced 2 > 'Tab list window'




I can actually say that the audio crackling issues are completely gone..
Nice to read, thanks for the info.

StvG
13th January 2024, 06:50
How can I disable the mouse cursor changing its form (completely disable full screen mode/zoom) when I point to the right area of the video preview?

Here (https://i.ibb.co/rbZVVY9/Screen-2024-01-13-07-43-40.jpg) the mouse cursor is hand instead of default arrow.

gispos
13th January 2024, 20:06
How can I disable the mouse cursor changing its form (completely disable full screen mode/zoom) when I point to the right area of the video preview?

Here (https://i.ibb.co/rbZVVY9/Screen-2024-01-13-07-43-40.jpg) the mouse cursor is hand instead of default arrow.
This option does not exist yet. I have added this option in the Pre-Release 2.7.6.7 x64
Program Options > Misc 2 > 'Change cursor in zoom action area'

https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=drive_link

gispos
21st January 2024, 14:10
AvsPmod 2.7.6.7 (https://github.com/gispos/AvsPmod/releases)

* Added Program Options > Misc 2 > 'Change cursor in zoom action area'
* 'Tab list' focus flickering improved.
* D3DWindow audio playback improved (was bad when the video fps was not reached).

Alex9876
24th January 2024, 14:32
hello! could you tell me how to properly open the .asf in the avsPmod ?

poisondeathray
24th January 2024, 18:24
hello! could you tell me how to properly open the .asf in the avsPmod ?

Try FFMS2 or LSmash . Last resort is DirectShowSource

DMD
29th January 2024, 23:20
Good evening.
How can I create the shortcut Crop editor.
Thank you

https://i.postimg.cc/j5znCc6t/Immagine-2024-01-29-230243.png

gispos
30th January 2024, 00:33
Double click on it

https://i.postimg.cc/GmkF0S6w/Screenshot-39.jpg (https://postimages.org/)

DMD
30th January 2024, 07:48
Double click on it

Thank you very much;)

https://i.postimg.cc/HjGt4w9W/Immagine-2024-01-30-074631.png

gispos
3rd February 2024, 17:33
AvsPmod 2.7.6.8 (https://github.com/gispos/AvsPmod/releases)

* Playback reworked.
* Added 'Tab list' context menu entries (Free memory, Other free memory, Close), this always refers to the current tab (the yellow one).
* Fix: Audio playback was stopped when 'Timeline Range' was set.

FranceBB
3rd February 2024, 20:48
Thank you, as always, Gispos!
I'll try those first thing on Monday, 'cause I've got to the point in which during the weekend I categorically refuse to turn on Windows ehehehehehehe

gispos
4th February 2024, 14:23
I'll try those first thing on Monday...
Not much has changed, Python is not particularly suitable for this.
In Python, only one thread can run at the same time. If another thread wants to start, it must first send a 'break' command and wait for the currently active thread to terminate or at least pause.

This means that when the video filters are strong, the CPU and the video thread are busy and there is no CPU time left for the audio buffer thread and the thread that plays the video has to wait until the audio buffer thread is finished.
At the moment, I don't see a solution and I don't feel like it anymore.

Edit:
Now I have found the problem. Videos with a 2 channel audio run smoothly even with strong video filters.
Only when downmixing the audio with avisynth there are problems.

takla
5th February 2024, 18:27
I haven't used this in a while, but I've noticed I can no longer zoom the text/change font size with ctrl+mousewheel.
Was there a setting for that anywhere?

gispos
6th February 2024, 17:51
I haven't used this in a while, but I've noticed I can no longer zoom the text/change font size with ctrl+mousewheel.
Was there a setting for that anywhere?
If under Program Options > Text > 'Mouse wheel scroll rate in editor' is set to greater than 0, zooming with the mouse wheel no longer works. Then it only works with Ctrl + numpad '+' or '-'

takla
7th February 2024, 03:07
If under Program Options > Text > 'Mouse wheel scroll rate in editor' is set to greater than 0, zooming with the mouse wheel no longer works. Then it only works with Ctrl + numpad '+' or '-'

Yeah. That fixed it. Thanks.

gispos
11th February 2024, 15:57
AvsPmod 2.7.6.9 (https://github.com/gispos/AvsPmod/releases)

* Bugfix: Audio can stop playing

PoeBear
19th February 2024, 10:23
That would be 48 bit, natively Python does not support 48 bit images, even Windows bitmaps only have 24bit + 8bit alpha

I'm curious, since this post is a few years old, is this limitation still the case for current Python? I was trying to save some of AviSynthPlus-MapNLQ's 12-bit outputs and noticed the same thing FranceBB mentioned

StvG
20th February 2024, 15:54
I'm curious, since this post is a few years old, is this limitation still the case for current Python? I was trying to save some of AviSynthPlus-MapNLQ's 12-bit outputs and noticed the same thing FranceBB mentioned

You can use ImageWriter (http://avisynth.nl/index.php/ImageWriter) to save 16-bit png. You need a 16-bit planar RGB before ImageWriter and DevIL.dll (usually is shipped with the avs+ installation). Example script:
source
some filtering
MapNLQ # output is 12-bit
z_convertformat(pixel_type="rgbp16")
ImageWriter(...)

gispos
20th February 2024, 17:55
You can use ImageWriter (http://avisynth.nl/index.php/ImageWriter) to save 16-bit png. You need a 16-bit planar RGB before ImageWriter and DevIL.dll (usually is shipped with the avs+ installation). Example script:
source
some filtering
MapNLQ # output is 12-bit
z_convertformat(pixel_type="rgbp16")
ImageWriter(...)
But the saved png seems to have only 8bit per channel (RGB24). Or have I overlooked something?
Does it have to be saved as 'ebmp'? but then only Avisynth can read it?

Edit:
My mistake, had opened the png with VDub2 which apparently always opens png in RGB24 format. With FFImageSource the color format is then displayed correctly

gispos
20th February 2024, 18:04
I'm curious, since this post is a few years old, is this limitation still the case for current Python? I was trying to save some of AviSynthPlus-MapNLQ's 12-bit outputs and noticed the same thing FranceBB mentioned
Under Macros > Extras there is the macro 'Save as Tiff_rgb48'
It uses ffmpeg to save the current frame as a 48bit tiff.

Change the path in the macro to ffmpeg.exe

StvG
20th February 2024, 20:00
But the saved png seems to have only 8bit per channel (RGB24). Or have I overlooked something?
Does it have to be saved as 'ebmp'? but then only Avisynth can read it?

Edit:
My mistake, had opened the png with VDub2 which apparently always opens png in RGB24 format. With FFImageSource the color format is then displayed correctly

It is saved with bit depth 16 - https://ibb.co/fvvb5RR
Same image saved with 8-bit depth - https://ibb.co/RvWGNvs

The 16-bit can be read with ffimagesource and it's read as rgbp16.

Edit: you edited when I was writing the reply.

gispos
2nd March 2024, 12:44
AvsPmod 2.7.7.0 (https://github.com/gispos/AvsPmod/releases)

* Audio downmix is now mixed to stereo using its own mixer (with Avisynth mixer there were problems with prefetch and multichannel).
- the audio volume values have changed, now 0.25 to 2.0, the value 1 corresponds to 100%,
- the value 2.0 is slightly less than twice the volume, approx. 7 decibels (setting per script).
* The values of the audio buffer have also changed, now 1 to 6 seconds. 3 seconds as default.
* The mix portion of the center channel can be done under Playback button context menu > 'Audio settings'. Default 0.7 (global for all scripts).
* The menu Play > 'Downmix audio' has been removed, it is now located under Audio settings.
* Audio playback is now also possible with the preview filter switched on.
* The macro 'Save as Tiff_rgb48' has been replaced by 'Save Image_rgb48'. It can now be saved as tiff or png (requires ffmpeg.exe).
* Some minor corrections and cleanups (e.g. option 'Playback in threads' removed).

FranceBB
2nd March 2024, 14:56
Thank you, as always, Gispos for keeping the project alive. :)

tormento
10th March 2024, 11:35
AvsPmod 2.7.7.0
Please, have a look here (https://forum.doom9.org/showthread.php?p=1998875#post1998875).

gispos
10th March 2024, 15:09
Please, have a look here (https://forum.doom9.org/showthread.php?p=1998875#post1998875).
I have revised the macro again, test it and let me know what should be changed.
I don't know whether the metadata is also saved, but FFImageSource at least displays the properties correctly.
https://drive.google.com/drive/folders/10GACvD476noiUTbaqVP4UN3--DDZJA8z?usp=drive_link

hello_hello
13th March 2024, 04:18
Some video preview questions, referring to the preview displaying in the same window as AvsPmod rather than a separate one, but they might apply to both.

Is there a way to prevent AvsPmod changing the size of the video window and resetting the zoom when displaying an Avisynth error message? It can become quite frustrating when doing something like editing a function and previewing the result, at least if you're stupid like me and there's a fair chance an edit will result in an error message. To duplicate....

Open an Avisynth script that outputs video.
Uncheck "Video/Additional/Resize video window".
Set the video zoom to "fit inside window".
Add something to the script that'll result in an Avisynth error message.
The video window will resize to display the error message, although the "resize video window" option remains unchecked.
The video zoom will reset to 100%.
Removing the cause of the error message displays the video at 100% and the video window is resized accordingly.

Should double left clicking on the video to view it full size behave differently compared to using the Video/Fullsize menu? Double clicking on the video to enter full size mode and then again to leave it returns the preview to it's original state, whereas using the Video/Fullsize menu instead resets the size of the video preview when exiting full size mode.

Is there a way to configure the preview so a single left click on the video starts/pauses playback? I ask, as the many years I've spent using software players such as MPC-HC has trained my brain to start/pause playback that way and it's ignoring my requests to think differently for AvsPmod.

Some auto-cropping questions...

I noticed an oddity with AvsPmod's auto cropping after opening an incredibly average 720p video and adding Subtitle() to the script. The short version of the story...
Adding subtitle("0") caused AvsPmod's auto-cropping to decide 8 pixels should to be cropped from the left (the "0" would have been overlaid starting from pixel 9 on the left). Without subtitle("0") it decided no cropping was required, which was correct.

The minimum number of frames that can be specified for auto-cropping to check is one. Would a value of zero, telling auto-crop to check only the current frame be useful? If the amount of black varies, then according to how you prefer to crop, it'd be easy to pick a frame requiring the least amount of cropping, or one requiring the most, and auto crop the whole video accordingly.

Would the crop editor window be more fun to use if it had a button for resetting the cropping to zero? I know changing the mod setting, or the number of frames to check, resets the auto cropping, but a reset button might still be useful.

Thanks for all the hard work keeping AvsPmod up to date!

gispos
13th March 2024, 18:52
Is there a way to prevent AvsPmod changing the size of the video window and resetting the zoom when displaying an Avisynth error message? It can become quite frustrating when doing something like editing a function and previewing the result, at least if you're stupid like me and there's a fair chance an edit will result in an error message. To duplicate....
I did this because otherwise you can't read the error message depending on the zoom used.
And the easiest thing to do is to reset the zoom to 100%. Everything else requires an effort that I have to think about and I have a look at the possibilities.
Zoom must be saved beforehand (there are 2 types of zoom), and must be restored, so it must also be saved whether an error message was present during the previous initialization, and...
I understand you, but as I said, the effort has to be manageable. Let's see...


Should double left clicking on the video to view it full size behave differently compared to using the Video/Fullsize menu? Double clicking on the video to enter full size mode and then again to leave it returns the preview to it's original state, whereas using the Video/Fullsize menu instead resets the size of the video preview when exiting full size mode.

That's how it's meant to be. Left double click activates the resize filter (like fullscreen), and is reset to the previously set zoom and position.
The shortcut (menu entry) only enlarges the window and does not change the zoom (I want to use both options).


Is there a way to configure the preview so a single left click on the video starts/pauses playback? I ask, as the many years I've spent using software players such as MPC-HC has trained my brain to start/pause playback that way and it's ignoring my requests to think differently for AvsPmod.

I'm used to it that way, but from video players. But in AvsPmod playback is not the main function. You move the window with the mouse.
I don't know if it makes sense to add another mouse click function to the other click functions like Fullsize, Fullscreen, Resize Filter. I think no (for now).


Some auto-cropping questions...

I don't want to say anything about auto crop at the moment, I'll have to take a closer look at your question and the code.
Just to start with: I wouldn't have integrated an auto crop function myself, I don't know of any that work really well (it always depends on the video).
I don't use auto crop, I always know what I want to cut off. :)

hello_hello
14th March 2024, 05:42
Thanks for the reply.

I did this because otherwise you can't read the error message depending on the zoom used.
And the easiest thing to do is to reset the zoom to 100%. Everything else requires an effort that I have to think about and I have a look at the possibilities.
Zoom must be saved beforehand (there are 2 types of zoom), and must be restored, so it must also be saved whether an error message was present during the previous initialization, and...
I understand you, but as I said, the effort has to be manageable. Let's see...

Personally I think it'd be better to keep the existing preview size for the error message. That's the biggest annoyance for me as it invariably results in the preview area becoming much smaller when displaying the error message, and then large enough to hide the text in the script when returning to previewing the video. If just the zoom was reset for the error message the worst that would happen is you'd need to scroll around a bit to read it all, and the zoom being reset is less of an issue because I realize, now that I've checked, it's possible to create a keyboard shortcut to set it back to "fit inside window", or whatever you're preferred zoom level may be.

I'm used to it that way, but from video players. But in AvsPmod playback is not the main function. You move the window with the mouse.
I don't know if it makes sense to add another mouse click function to the other click functions like Fullsize, Fullscreen, Resize Filter. I think no (for now).

Fair enough. For MPC-HC I always change the fullscreen mouse action to a middle click instead of a double left click, as even though it defaults to a left click for play/pause you can't start and pause playback quickly without it being interpreted as a double click. I think I also changed the default from "left click down" to "left click up" for play/pause so the player wouldn't have to decide if I'd left clicked to move the video around the screen or to start/pause playback, or something like that. So yes... I appreciate making it work reliably mightn't be easy.

I don't want to say anything about auto crop at the moment, I'll have to take a closer look at your question and the code.
Just to start with: I wouldn't have integrated an auto crop function myself, I don't know of any that work really well (it always depends on the video).
I don't use auto crop, I always know what I want to cut off.

I don't trust auto cropping either so I haven't used it much myself, but rather than enabling an auto crop plugin and hoping for the best, AvsPmod's auto cropping is more of a starting point for manual cropping, if that makes sense. It's no big deal, but I thought I'd at least report the cropping oddity I discovered.

Cheers.

hello_hello
14th March 2024, 06:18
...because I realize, now that I've checked, it's possible to create a keyboard shortcut to set it back to "fit inside window", or whatever you're preferred zoom level may be.

Except it appears not to work.
I've created a keyboard shortcut, and when I look at the Video/Zoom menu it shows the zoom has changed to "fit inside window" but the video zoom itself doesn't change. I'm running AvsPmod in Wine on Linux but I don't think that's the cause as the preset shortcut "NumberPad /" for resetting the zoom to 100% is working.

gispos
14th March 2024, 17:46
Thanks for the reply.
Personally I think it'd be better to keep the existing preview size for the error message. That's the biggest annoyance for me as it invariably results in the preview area becoming much smaller when displaying the error message, and then large enough to hide the text in the script when returning to previewing the video....

With normal zoom it may still work, but zoom with Resize Filter will then be greatly enlarged.
It bothers you that the zoom is reset, others (including me) are bothered by the fact that I can't read the error messages and have to fiddle around.
That's just how it is, It is difficult to satisfy everyone.

Please test it.
https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=drive_link

* After an error message (error clip), the previously used zoom is restored (factor, fit, fill, position).
- however, the 'Resize filter' is not restored.
* When 'Resize video window' is disabled, the size of the video window is now more stable and will not reset on an error clip.


A note:
If the video window is too large for you, you can also set the minimum visible text lines higher under Program Options > Text > 'Min text lines', e.g. to 20

hello_hello
15th March 2024, 11:48
With normal zoom it may still work, but zoom with Resize Filter will then be greatly enlarged.
It bothers you that the zoom is reset, others (including me) are bothered by the fact that I can't read the error messages and have to fiddle around.
That's just how it is, It is difficult to satisfy everyone.

I guess it depends on the type of zoom you normally use. For a "fit inside window" zoom, or any zoom above 100%, the error message could only get bigger if the zoom was retained.
I'm struggling to think of a reason for using a fixed zoom less than 100% when you can fit the video to the preview window, prevent the preview size from changing automatically, and changing the window size manually changes the video size to match. Each to their own though....

Please test it.
https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=drive_link

* After an error message (error clip), the previously used zoom is restored (factor, fit, fill, position).
- however, the 'Resize filter' is not restored.
* When 'Resize video window' is disabled, the size of the video window is now more stable and will not reset on an error clip.


That seems to be working as advertised, but I'd be happy for the "fit inside window" zoom not to be reset for the error message, because as I said it'll only make it larger. It's fine as it is though.

For some reason I can't create a working keyboard shortcut for changing the video zoom unless I use the numeric keypad keys. Am I missing something? Not that it matters too much as I've found a way to create a shortcut that works.

Some little nitpicks....
When I created a non-working shortcut for changing the video zoom to "fit inside window", even though the zoom didn't change, the View/Zoom menu showed that it had.
Now that I have working shortcuts for changing it to "fit inside window" and "resample fit", the change is not reflected when opening the View/Zoom menu.

When the video from a script is displaying, using shortcut keys to change the zoom never causes the preview area to lose focus, so you can zoom in and out etc without an issue.
When an error message is displayed, after changing the zoom level the preview area loses focus and if you attempt to change the zoom again before clicking on the video area, the line of text where the cursor has focus is replaced. Changing the zoom level for an error message isn't something that's likely to happen too often, but I just thought I'd mention it.

Thanks again!

gispos
15th March 2024, 19:41
...
I'm struggling to think of a reason for using a fixed zoom less than 100%...
You only think about yourself. :D


For some reason I can't create a working keyboard shortcut for changing the video zoom unless I use the numeric keypad keys. Am I missing something? Not that it matters too much as I've found a way to create a shortcut that works.
I'm very surprised. Is that really the case? If the menu indicates that fit or fill is set, then that must be the case.
And when you select the menu with the mouse, does it work? Show me your shortcuts for this.


Some little nitpicks....
Now that I have working shortcuts for changing it to "fit inside window" and "resample fit", the change is not reflected when opening the View/Zoom menu.
Look at the old AvsPmod version, almost nothing is confirmed in the menus.
The whole menu system in Python is more tedious and time-consuming for the writer than in some other languages, and it doesn't always make sense to confirm something.
Use the zoom, if you change the zoom with the mouse, the menu entry is not changed and is still at 100%. When the menu is opened, you have to check which entry corresponds to the current zoom.
Usually none, so what should be displayed in the menu? Nothing (there is/was no such thing), and it also has to be checked when the menu is opened and for some things the check for an entry is too time-consuming or not possible at all or the programmer sees no need for a confirmation.


When an error message is displayed, after changing the zoom level the preview area loses focus and if you attempt to change the zoom again before clicking on the video area, the line of text where the cursor has focus is replaced...
A little fun is a must:
Why do you want to zoom with the keyboard when an error clip is displayed? ;)
This is one of the other reasons that 100% zoom is set, because with an error clip the line containing the error is marked in the script and the script gets the focus.
You should (want) eliminate the error. And that's why the video window is minimized so that you can see the script and the error location better.

Sometimes the programmer has even thought of something, but there are also users who swim against the tide. :D

gispos
15th March 2024, 19:42
@gispos
Zoom > Fit Window only works if the video is above a certain size
Could you make it so it always scales to the optimal size with "Fit Window" selected?

See this video for what I mean (https://drive.google.com/file/d/1lWj3isnb5sNYyZ4zYcaV0Rw6gtLl46kn/view?usp=sharing)

Basically, Fit Window only works if the video resolution is higher then the window size.
You'll have to explain that to me in more detail, I think it works as it should. The only thing I have changed is that I don't consider portrait format with 'Fill'.

What do you mean by 'optimal'? What should be set if the video is smaller than the window?
With 'Fit' it is adjusted to the window in height and width (so that it is fully visible) and with Fill the height is adjusted and the width is not, the image can then be wider than the window.

hello_hello
16th March 2024, 03:15
I'm very surprised. Is that really the case? If the menu indicates that fit or fill is set, then that must be the case.
And when you select the menu with the mouse, does it work? Show me your shortcuts for this.

The menu appears to be changing correctly for a working keyboard shortcut. It was after an error message had displayed that the zoom menu was staying at 100%. I must have been confused there.

Please ignore the script. It's a mess because I've been updating a function and doing some testing.

Video running at 100%.

https://imgur.com/7xxXCwhl.png

After using the "Numberpad 9" shortcut I created to change the zoom to "fit inside window".

https://imgur.com/Yv4JuLnl.png

From 100% zoom and then using a non-working shortcut (Shift + Q):
The menu changes and still works, but because it's already selected you need to select another zoom mode first, then go back to the original selection.

https://imgur.com/Um4uUJRl.png

Not all non-working shortcuts seem to change the menu. For example "Shift + Numberpad 9" doesn't work or change the menu.
Maybe it's a Wine related oddity as I'm running AvsPmod in Wine on Linux. I'll test it again on Windows later if you don't have the same problem, although even then it'll be running in VirtualBox.

Use the zoom, if you change the zoom with the mouse, the menu entry is not changed and is still at 100%. When the menu is opened, you have to check which entry corresponds to the current zoom.
Usually none, so what should be displayed in the menu?

Zoom/Custom? That appears to be what it changes to. :)

Why do you want to zoom with the keyboard when an error clip is displayed?

I don't. It was just an inconstancy relating to behavior I thought I'd mention.

Cheers.

gispos
16th March 2024, 13:32
AvsPmod 2.7.7.1 (https://github.com/gispos/AvsPmod/releases)

* After an error message (error clip), the previously used zoom is restored (factor, fit, fill, position).
- however, the 'Resize filter' is not restored.
* When 'Resize video window' is disabled, the size of the video window is now more stable and will not reset on an error clip.
* When 'Resize video window' is enabled and no 'Resize filter', zooming with the mouse wheel now also changes the size of the video window.
* You can now set the script's minimum visible text lines on the fly (Program options > Text > 'Min text lines')
- with the script context menu Miscellaneous > 'Set min text lines (Ctrl + splitter move)'
- or press Ctrl and move the video/script splitter (first press Ctrl to unlock then move the splitter and release Ctrl).
* Bugfix: if 'Resize video window' is disabled and switching between fullsize and normal view, the normal view was set the wrong splitter position.




The Fill Window setting only works when the video size is first increased. When the video size is too small it does nothing

What I expect to it to do, is to always increase or reduce the video size.

You have a mistake in your thinking.
The limitation and basis is the script/video splitter, If the video window has the same size as the video, as in your case (zoom to 400%, the splitter now adapts to the video if 'Resize video window' is set).
If you now use Fill or Fit nothing happens. Things only change when the splitter is moved or you double click on the video window.
This is fill or fit, adapt to the window, but the window limit upwards is the splitter.
100% zoom shows your final result and not fill or fit.

Try it differently:
Set 100% zoom, now move the splitter up, the video image is still the same size. Now use Fit or Fill, what happens?

takla
17th March 2024, 01:08
I don't have the words, but a video.


https://c.tenor.com/ZFc20z8DItkAAAAC/tenor.gif

Lol. Danke. :o

jonnypoe
5th April 2024, 17:53
I have a problem where AvsPmod 2.7.3.4 and newer crashes when using AviSynthPlus-RIFE. Reproduced on multiple computers. Rendering scripts using FFMPEG does not result in a crash with the same script.

I've gone through a bunch of previous versions from videohelp.com and found that version 2.7.3.4 is the first version to crash (2.7.3.2 seems fine). The crash does not happen on the initial load of the script and the first preview - the crash will happen once a change is made to the script and that change is attempted to be previewed.

Not sure if this is helpful, but with versions 2.7.3.4 and newer, if I remove the following plugins then it also does not crash with RIFE present in the script: DePan.dll, DePanEstimate.dll, RemoveDirt.dll, TDeint.dll.

I have created a copy of my plugins folder and included an example file that crashes in a 7zip here: https://1drv.ms/u/s!AvMHKRqgtwEd1w7uEgkE6-g9Pxio?e=fDCFAB

To reproduce:


Copy plugins folder to the AviSynth plugins dir
Open Test.avs in AvsPmod 2.7.3.4 or newer
Preview the script
Make a change to the script (uncomment the Spline64Resize)
AvsPmod will crash


Appreciate any help you can provide. Will be reverting back to 2.7.3.2 for now.

Using Windows 11 with AviSynth 3.7.3 and NVidia Studio Drivers 551.86.

gispos
7th April 2024, 17:26
AvsPmod 2.7.7.2 (https://github.com/gispos/AvsPmod/releases)

* The script/video window splitter functionality has been revised.
* There are 3 video window resize modes ( Force, Normal, Static )
- Force: Resize if video size or normal zoom has changed. With Zoom or Resample fit/fill, the size of the video window does not change when switching tabs.
- Normal has 3 options, Program Options > Video > 'Video window resize option (only mode Normal)'
--- Zoom or Size change: Resize when video size or zoom has changed.
--- Size change: Resize if video size has changed (Includes also zoom resample).
--- Zoom change: Resize if zoom has changed.
--- No for both: No resize, each tab (script) keeps the manually set splitter position.
--- if not 'No for both' and the video is smaller then the video window, the splitter moves down if not zoom or resample fit/fill set.
- Static: No resize, the splitter is set by the first initialization or manual script/video window splitter moving for all tabs.
*** Exceptions for all settings: when groups are assigned, all tabs in that group have the same splitter position when switching tabs.
*** If something is wrong, report it immediately. In 2 weeks I won't be able to see through it anymore..)
------
* Under Program Options > Video > 'Keep video window size if zoom fit/fill (only mode Normal)'
- you can select whether the size of the video window should be retained when Zoom or Resample Fit/Fill is set and the tabs are changed (default Off).
* Under Program Options > Video > 'Double click on MaxView resets to minimum text lines' you can set what position the splitter should take
- on a double click into the video window when zoom or resample fit/fill is used (not for Static),
- either the last position before MaxView (double click at normal size), or the minimum text lines that you have set.
* A double click on the script/video splitter sets the splitter to original video size (max. minimum text lines).
* In the event of an error message, the video window is minimized and the zoom factor is set to 100%, but is restored (not resample zoom) upon reinitialization.
* The 'Resample zoom' menu entries processes now all scripts by default. If Ctrl is pressed only the current script is processed.
** The menu items of the resample zoom, 'Resample fill' and 'Resample fit' have been changed by name.
-- you must create new shortcuts (Fit is now Fill and vice versa).
-- the names were wrong from the beginning and did not match the normal zoom Fit/Fill. Sorry.

Julek
7th April 2024, 17:31
How do I check the pixel color array (with the values for each plane)? I only see the hex value

poisondeathray
7th April 2024, 18:37
How do I check the pixel color array (with the values for each plane)? I only see the hex value


options => program settings => customize video status bar

gispos
8th April 2024, 19:54
I have a problem where AvsPmod 2.7.3.4 and newer crashes when using AviSynthPlus-RIFE. Reproduced on multiple computers. Rendering scripts using FFMPEG does not result in a crash with the same script.

I've gone through a bunch of previous versions from videohelp.com and found that version 2.7.3.4 is the first version to crash (2.7.3.2 seems fine). The crash does not happen on the initial load of the script and the first preview - the crash will happen once a change is made to the script and that change is attempted to be previewed.

Not sure if this is helpful, but with versions 2.7.3.4 and newer, if I remove the following plugins then it also does not crash with RIFE present in the script: DePan.dll, DePanEstimate.dll, RemoveDirt.dll, TDeint.dll.

I have created a copy of my plugins folder and included an example file that crashes in a 7zip here: https://1drv.ms/u/s!AvMHKRqgtwEd1w7uEgkE6-g9Pxio?e=fDCFAB

To reproduce:


Copy plugins folder to the AviSynth plugins dir
Open Test.avs in AvsPmod 2.7.3.4 or newer
Preview the script
Make a change to the script (uncomment the Spline64Resize)
AvsPmod will crash


Appreciate any help you can provide. Will be reverting back to 2.7.3.2 for now.

Using Windows 11 with AviSynth 3.7.3 and NVidia Studio Drivers 551.86.
First of all, thanks for the good preparation for the problem.
Unfortunately, I cannot reproduce the problem on my PC. See the video (https://drive.google.com/file/d/1nVS7gxjd_LmeYdSGlAMXh7DtihvXmjzI/view?usp=drive_link).
However, I am using Win10.

Have a look here (https://forum.doom9.org/showthread.php?p=1996799#post1996799), there have been problems with other functions that were fixed with Avisybth 3.7.3post test 14.
Your description of the problem is exactly the same, namely when releasing the clip and reinitializing.

What Avisynth version are you using exactly? I have Avisynth 3.7.3post test 14 on my PC and have no problems with your script.
If you have a different version then please test the latest Avisynth test version. (https://forum.doom9.org/showthread.php?t=181351)

Let me know in any case.

gispos
8th April 2024, 20:03
How do I check the pixel color array (with the values for each plane)? I only see the hex value
My setting. Copy and paste into the text field.

Frame %F / %FC %TR - (%T) %BM %POS %YUV %RGB \t\t %Z %Wx%H (%AR) - %FR fps - %FB %PS - %CS (%BITbit) (Audio %AUBbit, %AURHz) %DYR

poisondeathray
17th April 2024, 15:17
blankclip(pixel_type="RGBPS", colors=[-1,-1,-1]) reads as "0" in the color picker ; the true rgb value "disappears" , only the 8bit rgb value is displayed

blankclip(pixel_type="RGBPS", colors=[-2,-2,-2]) reads as "-2"

Not an avs+ core issue because blankclip(pixel_type="RGBPS", colors=[-1,-1,-1]) avs script to ffmpeg correctly uses gbrpf32le for avs demuxer , writing out exr and reading with vapoursynth reports the correct -1

float pattern tiff if you want to test. The values for the 5 patches should be RGB -2.-1,0,1,2
https://www.mediafire.com/file/bu75778olh05fbc/float_pattern.zip/file

BestSource2 can load float files into AVS+ now, based on those observations, it's not a plugin issue either



EDIT: Interestingly, if any of the values are not -1, all 3 values now read correctly . Problem only occurs when all three are -1

e.g
colors=[-1,-1.01,-1] now reads all the values correctly

gispos
18th April 2024, 21:18
blankclip(pixel_type="RGBPS", colors=[-1,-1,-1]) reads as "0" in the color picker ; the true rgb value "disappears" , only the 8bit rgb value is displayed

blankclip(pixel_type="RGBPS", colors=[-2,-2,-2]) reads as "-2"

Not an avs+ core issue because blankclip(pixel_type="RGBPS", colors=[-1,-1,-1]) avs script to ffmpeg correctly uses gbrpf32le for avs demuxer , writing out exr and reading with vapoursynth reports the correct -1

float pattern tiff if you want to test. The values for the 5 patches should be RGB -2.-1,0,1,2
https://www.mediafire.com/file/bu75778olh05fbc/float_pattern.zip/file

BestSource2 can load float files into AVS+ now, based on those observations, it's not a plugin issue either



EDIT: Interestingly, if any of the values are not -1, all 3 values now read correctly . Problem only occurs when all three are -1

e.g
colors=[-1,-1.01,-1] now reads all the values correctly

In AvsPmod -1, -1, -1 is recognized as an error and therefore no Avisynth RGB value is returned. What is the valid range of values for RGBPS ?

2.7.7.3 Pre-Release (https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=drive_link)

poisondeathray
18th April 2024, 22:53
What is the valid range of values for RGBPS ?

Not sure if there is "valid range" . Normalized range is [0,1] .

Usable range is much greater than [0,1]. Large positive and small negative values exist for 32bit float in actual usage,actual files in other programs. I've seen .hdr's , .exr's that have usable highlight details in the +50 range, usable shadow details as low as -2 .




2.7.7.3 Pre-Release (https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=drive_link)

Thanks

poisondeathray
18th April 2024, 23:12
Is there an option disable the D3D window functions completely , including the popup in the preview ?

eg. you're reading values using color picker, and the pop up opens, changing the values

gispos
19th April 2024, 19:42
Is there an option disable the D3D window functions completely , including the popup in the preview ?

eg. you're reading values using color picker, and the pop up opens, changing the values
Under Program Settings > Misc 2 > 'Show hint for zoom action area' set to Off and de-activate 'Change cursor in zoom action area' next to it.

DTL
19th April 2024, 20:48
In AvsPmod -1, -1, -1 is recognized as an error and therefore no Avisynth RGB value is returned. What is the valid range of values for RGBPS ?


For safety it may be expected as any valid float32 range. The real errors are encoded as different Not a Number bit sets - https://en.wikipedia.org/wiki/NaN .

gispos
19th April 2024, 21:54
The real errors are encoded as different Not a Number bit sets - https://en.wikipedia.org/wiki/NaN .
Thanks, I know. I was just interested in why there are negative black values.

Blacker than black... deadlier than dead :)

DTL
19th April 2024, 23:06
It may be simply digital undershoots from oversharpening or very 'video-look/makeup'. With new HDR with very high above 1.0f max white the undershoots at sharp transients to black may go much below 0.0f of nominal black.

Some still very few ringing samples sequences may have undershoots about -0.3 of nominal white to black range

https://i.postimg.cc/T1Dqbzg9/undsh01.png

With not very big (for HDR) white or 3.0f..3.5f the most negative sample value may be close to -1.0f.

So good safe footroom for undershoots is about -30..-40% of max white is expected in perspective systems. The typical 8bit narrow range encoding have only about 15/219 ~= -7% footroom only for undershoots.

With float encoding systems it is possible to have a bit more sharper transients with still low ringing because footroom is unlimited in comparison with integer systems with only about -7% footroom at any bitdepth.

gispos
20th April 2024, 18:46
AvsPmod 2.7.7.3 (https://github.com/gispos/AvsPmod/releases)

* Audio mixer values for mix of left/right and center lowered (clipping minimized).
* Switching the 'Preview Filter' on/off is now faster if no change was made.
* Bugfix: tab context menu 'Close... > 'All unopened', either Error or tabs were no longer visible.
* Fix: Resize video window > 'Force' no resize if 'Split Clip' was used and the video dimensions changed.
* Fix: RGBPS/RGBPSA values -1, -1, -1, -1 were treated as errors.


@DTL, thank you for the explanation.

poisondeathray
20th April 2024, 19:23
Under Program Settings > Misc 2 > 'Show hint for zoom action area' set to Off and de-activate 'Change cursor in zoom action area' next to it.

AvsPmod 2.7.7.3 (https://github.com/gispos/AvsPmod/releases)


Thanks

Emulgator
21st April 2024, 18:03
Many thanks for your continued development, gispos !

Wilbert
4th May 2024, 15:21
@turbomund, please remove the spam in your signature. Thanks.

gispos
15th June 2024, 18:52
AvsPmod 2.7.7.4 (https://github.com/gispos/AvsPmod/releases)

* 'Resample filter' is restored after an error clip.
* Closing a tab using the 'Tab list' will no longer force an adjacent uninitialized tab to open.
** Added to 'Tab list' new functions:
- context menu 'Show Bookmarks'
- context menu 'Auto close' closes the 'Tab list' if the Focus is losen (except see below 'MediaInfo').
- if you have AvsPThumb, a double-click on the bookmarks column row will run AvsPThumb and displays or reads the bookmarks stored in the script.
- if you click a line in the first 15 pixels, a tooltip appears and if you hold Ctrl a window appears with the result of MediaInfo.dll.
- font and color is the same as for the 'Scrap Window' or German 'Ablage Fenster' and the font should be Mono Space (Options > Font & colors).
-- Prerequisite: MediaInfo.dll must be found in the system (system directories or the AvsPmod directory). The source file must be findable in the script (see below).
-- Info: Multiple MediaInfo windows can be opened (context menu 'Single instance'), and as long as a MediaInfo window is open the 'Tab list' does not close automatically.
-- MediaInfo.dll: https://mediaarea.net/de/MediaInfo/Download/Windows ( Choose DLL without installer: 7z, zip )
* Added default encoder_gui presets (your own presets will no longer be overwritten by a new version, thanks to @silverbacknet on github)
* Fixed video slider flickering when there are a large number of bookmarks.
* When saving a new script, the source file extension is now included as the suggested name ( Test.mkv.avs ).
* When saving a new script the source file name is now also found with the script syntax below (SourceFile and : or = must also exist):
-- SourceFile = ScriptDir() + "Test.mkv" (no drive no path, this is also not found)
-- SourceFile = Exist(SourceFile) ? SourceFile : "E:\Video\Test.mkv" (this is found and valid if the file exists)
-- video=LWLibavVideoSource(SourceFile)
- if the source name was not found, then a search is made for: Drive + Path\Filename + Extension enclosed in " "
- extensions are '.avi','.mkv','.mp4','.mpg','.mpeg','.ts','.mts','.m2ts','.vob','.webm','.wmf','.mov','.mxf'
* Bugfix macro 'Save Image Sequence.py', also thanks to @silverbacknet.
* Bugfix and update macros 'PreviewEncode.py' (and 'PreviewEncodeThread.py' on Google drive).
* Bugfix macro 'DeleteEncodings.py'
* When AvsPmod is closed, it searches for open dialogs and destroys them (prevents AvsPmod from running a background process after closing).
*** Reminder: Tab list is also accessible with a right click in the right area (20 pixels) of AvsPmod's Display, Editor and Slider-Sidebar (except D3DWindow).

https://i.postimg.cc/9Mvf1Pjh/Demo-1920.jpg (https://postimg.cc/PpQh5wx3)

FranceBB
16th June 2024, 00:17
Thank you for yet another release! :D


- if you click a line in the first 15 pixels, a tooltip appears and if you hold Ctrl a window appears with the result of MediaInfo.dll.


I'm probably too stupid to understand this statement.
Where exactly should I click? Anywhere at the top of the preview image and then Ctrl? 'cause that's what I tried but everything stayed still, so I'm obviously doing it wrong... :(

(Mediainfo is installed).

https://i.imgur.com/iIk1jZg.png

gispos
16th June 2024, 07:29
Where exactly should I click? :)

** Added to 'Tab list' new functions:
- context menu 'Show Bookmarks'
- context menu 'Auto close' closes the 'Tab list' if the Focus is losen (except see below 'MediaInfo').
- if you have AvsPThumb, a double-click on the bookmarks column row will run AvsPThumb and displays or reads the bookmarks stored in the script.
- if you click a line in the first 15 pixels, a tooltip appears and if you hold Ctrl a window appears with the result of MediaInfo.dll.
- font and color is the same as for the 'Scrap Window' or German 'Ablage Fenster' and the font should be Mono Space (Options > Font & colors).
-- Prerequisite: MediaInfo.dll must be found in the system (system directories or the AvsPmod directory). The source file must be findable in the script (see below).
-- Info: Multiple MediaInfo windows can be opened (context menu 'Single instance'), and as long as a MediaInfo window is open the 'Tab list' does not close automatically.
-- MediaInfo.dll: https://mediaarea.net/de/MediaInfo/Download/Windows ( Choose DLL without installer: 7z, zip )

It was about the 'Tablist' (right click in the editor or AvsPmod window in the right area 20 pixels), and then on the Tablist that appears, click on a line in the first 15 pixels of the line. Sorry my english...:)

Video: https://drive.google.com/file/d/15h73v-emGYluFLMuaSVRAj5CtXEgPKYr/view?usp=drive_link

Edit:
Valid Source Filters:
AVISource, WAVSource, D2VSource, AVCSource, DGSource, DirectShowSource, ImageSource

Still added to the valid source filters:
lwLibavvideosource, lsmashvideosource, ffms2, ffmpegsource2

1. First, an attempt is made to extract the file name from the source filters.
2. If nothing is found, the text 'SourceFile = ""' or 'SourceFile :' is searched for. see changelog.
3. If still nothing is found, a search for files with video extensions enclosed in " " is performed. Valid extensions are listed in the changelog

gispos
19th June 2024, 20:29
AvsPmod 2.7.7.6 (https://github.com/gispos/AvsPmod/releases)

Forgot to delete entries from the tests in the code. When saving the script a message 'found' could be displayed. Sorry.

gispos
21st July 2024, 10:01
AvsPmod 2.7.7.7 (https://github.com/gispos/AvsPmod/releases)

* Bugfix:
Resample Filter could under certain circumstances, depending on the video source and filters used, get into a resize loop and block everything.
For me, this was only the case with a corrupted 4K video and with MCTemporalDenoise with settings 'High' and 'Very High'.

FranceBB
21st July 2024, 14:29
It'a always a nice day when you wake up and there's a new version of AVSPmod mod available. :)

gispos
21st July 2024, 14:38
It'a always a nice day when you wake up and there's a new version of AVSPmod mod available. :)
Thank you very much for the flowers :)

Sqlfox
24th July 2024, 14:33
How to compare avspmod source coding? thank you

LigH
24th July 2024, 14:38
What exactly do you want to compare?

Two video sources, or two AviSynth source scripts?

Sqlfox
24th July 2024, 17:56
What exactly do you want to compare?

Two video sources, or two AviSynth source scripts?

sourced and encoding

LigH
24th July 2024, 18:15
To compare the source and the encoded copy, AviSynth provides several video filters. You can stack (https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/stack.html) them next to each other, horizontal or vertical direction; you can calculate the difference (https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/subtract.html) of two clips and change contrast to enhance it; you can let it calculate values with different metrics (PSNR (https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/compare.html), SSIM (http://avisynth.nl/index.php/SSIM), VMAF (http://avisynth.nl/index.php/VMAF)) and much more (http://avisynth.nl/index.php/External_filters#Debugging.2FDiagnostic_Filters).

All of that are features of the AviSynth scripting language, either in the core or in plugins. But AvsPmod as such is not a tool specialized in supporting you to compare videos... other tools may help you better for this purpose.

Sqlfox
24th July 2024, 18:29
To compare the source and the encoded copy, AviSynth provides several video filters. You can stack (https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/stack.html) them next to each other, horizontal or vertical direction; you can calculate the difference (https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/subtract.html) of two clips and change contrast to enhance it; you can let it calculate values with different metrics (PSNR (https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/compare.html), SSIM (http://avisynth.nl/index.php/SSIM), VMAF (http://avisynth.nl/index.php/VMAF)) and much more (http://avisynth.nl/index.php/External_filters#Debugging.2FDiagnostic_Filters).

All of that are features of the AviSynth scripting language, either in the core or in plugins. But AvsPmod as such is not a tool specialized in supporting you to compare videos... other tools may help you better for this purpose.

All I need is the remux b frame image and the same b frame image shown?

What do you recommend me to do?

LigH
24th July 2024, 18:41
Either:

Learn AviSynth. Write a script that opens both videos into two separate clip variables and displays both clips next to each other using StackHorizontal or StackVertical.

Or:

Open both videos in a tool which is specialized in comparing videos.

Sqlfox
24th July 2024, 18:46
Either:

Learn AviSynth. Write a script that opens both videos into two separate clip variables and displays both clips next to each other using StackHorizontal or StackVertical.

Or:

Open both videos in a tool which is specialized in comparing videos.

thank you for the information

gispos
24th July 2024, 22:33
All I need is the remux b frame image and the same b frame image shown?

What do you recommend me to do?
If both videos have the same dimension (otherwise one has to be resized) this can be done very well with 'Split View' and the sub option 'Split View alternate'.
And what about the tabs? Open the original and encoded video in a separate tab and compare them by switching.
Set the same group for the tabs so that it stays frame accurate when scrolling.

https://drive.google.com/file/d/17aLcTsq4bQBucobzDojHv6ylgfkC_2YA/view?usp=drive_link

gispos
25th July 2024, 17:03
All I need is the remux b frame image and the same b frame image shown?

What do you recommend me to do?
It was late yesterday, so more on this now.
If you want to use 'Split View' but the video dimensions are different, the 'Resample filter' can also be used before using 'Split View'.
This is then mod 2 and in most cases leads to the same dimensions if the AR is the same.
Switch on the resample filter: Double click right bottom in the video window when 'Resize all' is displayed or from the menu or shortcut.

Another possibility with only one tab is the script below.
This script works with one tab without a group but with the option Video > 'Split Clip on/off'. Either the first or second video source is displayed.

LWLibavVideoSource("Original.mkv")

/**avsp_split
LWLibavVideoSource("Encoded.mkv")
**/

LigH
26th July 2024, 02:15
Sorry gispos. :o I see AvsPmod supports video comparison a lot better than I knew yet. Great job! :cool:

gispos
26th July 2024, 19:42
Sorry gispos. :o I see AvsPmod supports video comparison a lot better than I knew yet. Great job! :cool:
No problem. But you will have scared the new user away first. :)

I am sure that at least 50 percent of users only know and use 50 percent of the functional scope.
If you don't read every changelog for the new version, it's easy to miss something.

If you are interested, Help > Video tutorials & more... I have a few videos on the things you may not easily understand.
And in the help menu there are also various readme's which are written in an undefined English.

rco133
27th July 2024, 06:41
Hi.

I am probably missing some setting.

I am using a rather old AvsPmod because in that verion if I open several tabs with different resolution, the widow will still have the same size.

In newer versions if I have a 1920x1036 tab open, and then open a tab with 720x388 the video in that tab becomes very small.

I like the old behavior where all opened tabs just have the same video size, no matter what the resolution of the video is.

Am I missing a setting somewhere?

rco133

gispos
27th July 2024, 07:23
Hi.

I am probably missing some setting.

I am using a rather old AvsPmod because in that verion if I open several tabs with different resolution, the widow will still have the same size.

In newer versions if I have a 1920x1036 tab open, and then open a tab with 720x388 the video in that tab becomes very small.

I like the old behavior where all opened tabs just have the same video size, no matter what the resolution of the video is.

Am I missing a setting somewhere?

rco133
Under Program Options Video > 'Video window resize option (only mode normal)' you can set the behavior for mode 'Normal'. There are also two options below this.

However, when opening (reinitializing) a tab for the first time, the window size is always adjusted in 'Normal' and 'Force' mode.
Only if zoom fit/fill has been set and the option under the program options 'Keep window size if zoom fit/fill' is checked will the window size not be changed.

But there is also the 'Static' mode which always retains the set window size (splitter position).
This will probably be the mode of your choice.

The modes can be selected under Video > Additional > 'Resize video window'.

Edit:
Have I misunderstood something? Do you mean window size or displayed video size?
If you want all the videos to be displayed in the same size, you must of course use zoom or resample filter fit or fill. You don't think of such a simple question...

rco133
27th July 2024, 12:30
Under Program Options Video > 'Video window resize option (only mode normal)' you can set the behavior for mode 'Normal'. There are also two options below this.

However, when opening (reinitializing) a tab for the first time, the window size is always adjusted in 'Normal' and 'Force' mode.
Only if zoom fit/fill has been set and the option under the program options 'Keep window size if zoom fit/fill' is checked will the window size not be changed.

But there is also the 'Static' mode which always retains the set window size (splitter position).
This will probably be the mode of your choice.

The modes can be selected under Video > Additional > 'Resize video window'.

Edit:
Have I misunderstood something? Do you mean window size or displayed video size?
If you want all the videos to be displayed in the same size, you must of course use zoom or resample filter fit or fill.

Sorry if I was not clear.

I always have zoom set to "Fit inside window".

Lets say I open a 1920x1080 video in tab 1, and then I move the horizontal slider, down, so I can see more of the avs script above.

Then I open a new tab with a video at 720x360 in that new tab. This window will then become much smaller than the one in tab1, and I have to adjust the horizontal bar up, to get the video part to become the same size as in tab 1.

This does not happen in the older version I use. If I have a video in tab1 where I have adjusted the horizontal bar to get the sice of the video window I want, then if I open a video in tab2, the video window will just get the same size (horizontal bar at the same place) as in tab1. No matter what the resolution of the video in tab1 and tab2 is. the horizontal bar is placed at the same location, and video window stays the same.

I think version 2.7.2.0 is tha last one that behaves in the "old" way, and not changing video window size between tabs depending on the resolution.

I will try to fiddle with the settings you mentioned.

rco133

gispos
27th July 2024, 13:12
Sorry if I was not clear.

I always have zoom set to "Fit inside window".

Lets say I open a 1920x1080 video in tab 1, and then I move the horizontal slider, down, so I can see more of the avs script above.

Then I open a new tab with a video at 720x360 in that new tab. This window will then become much smaller than the one in tab1, and I have to adjust the horizontal bar up, to get the video part to become the same size as in tab 1.

This does not happen in the older version I use. If I have a video in tab1 where I have adjusted the horizontal bar to get the sice of the video window I want, then if I open a video in tab2, the video window will just get the same size (horizontal bar at the same place) as in tab1. No matter what the resolution of the video in tab1 and tab2 is. the horizontal bar is placed at the same location, and video window stays the same.

I think version 2.7.2.0 is tha last one that behaves in the "old" way, and not changing video window size between tabs depending on the resolution.

I will try to fiddle with the settings you mentioned.

rco133
I have just noticed that when I open a new tab that was not yet open, the window size is also changed with Zoom Fit/Fill. I'll have to look again to see what's going wrong.

Edit: It's a little different than I first thought.
If under Program Options > Video > 'Keep window size if zoom fit/fill' is turned on there should be no size change when you open a new script, only if the tab was loaded from the session at start up, then the last size for the tab will be set.

rco133
27th July 2024, 16:17
Ok.

I just tried to run AvsPmod_v2.7.7.7_.Windows_x86-64

I copied the options.dat file from my v2.7.2.0 version (also 64 bit).

When I open an avs file that opens just fine in 2.7.2.0 in 2.7.7.7 I get the following error:

"Script Error: Invalid arguments to function 'Prefetch'".

I don't have anything in my avs file that mentions Prefetch though.

Edit:

I went to Video/Display and disabled that Prefetch line in there. and now I can open avs file.

And for some reason the problem I have previously had seems to be gone in 2.7.7.7.

I must say that it has been a while since I last tested the newer versions, since 2.7.2.0 never actually gave me any problems.

I will play a bit more with 2.7.7.7 and see if I can make it fail again.

rco133.

gispos
27th July 2024, 17:20
Ok.

I just tried to run AvsPmod_v2.7.7.7_.Windows_x86-64

I copied the options.dat file from my v2.7.2.0 version (also 64 bit).

When I open an avs file that opens just fine in 2.7.2.0 in 2.7.7.7 I get the following error:

"Script Error: Invalid arguments to function 'Prefetch'".

I don't have anything in my avs file that mentions Prefetch though.

Edit:

I went to Video/Display and disabled that Prefetch line in there. and now I can open avs file.

And for some reason the problem I have previously had seems to be gone in 2.7.7.7.

I must say that it has been a while since I last tested the newer versions, since 2.7.2.0 never actually gave me any problems.

I will play a bit more with 2.7.7.7 and see if I can make it fail again.

rco133.
Yes, please test and let me know.
Try to switch on the prefetch again, maybe I have overlooked something in the options.dat and old and new options.dat is not 100% compatible at the beginning until the new values are set.

rco133
27th July 2024, 17:38
Yes, please test and let me know.
Try to switch on the prefetch again, maybe I have overlooked something in the options.dat and old and new options.dat is not 100% compatible at the beginning until the new values are set.

As soon as I switch on that Prefect setting, I get that error.

I am using this avisynth:
VersionString: AviSynth+ 0.1 (r2772, MT, x86_64)
VersionNumber: 2.60

Maybe thats why.

Works fine for me, so I have never seen a reason to change it.

rco133

gispos
27th July 2024, 17:46
As soon as I switch on that Prefect setting, I get that error.

I am using this avisynth:
VersionString: AviSynth+ 0.1 (r2772, MT, x86_64)
VersionNumber: 2.60

Maybe thats why.

Works fine for me, so I have never seen a reason to change it.

rco133
Please use the latest Avisynth+ version, in older versions there were sometimes errors that caused AvsPmod to crash.

gispos
4th August 2024, 13:40
AvsPmod 2.7.7.8 (https://github.com/gispos/AvsPmod/releases)

* Added directory 'sound' in the program folder. Please unzip it into the AvsPmod folder if you do not unzip everything.
* In the Tablist context menu there is an entry 'Execute menu'. You have to configure this entry yourself, read Help > 'Tablist readme'.
* Script Selector has been updated. There is now a simple search function and the tabs got a context menu.
- the search function finds scripts by name (wildcards * and ?) and displays found scripts in a new tab.
- these tabs are write protected, you cannot add elements or update these tabs.
- to reduce the amount of data, you should delete these tabs when they are no longer needed (tab name starts with @).
* Changed: The window state from maximized to normal now restores the script height or (video height when zoom fit/fill).
* Bugfix: An error could occur when changing the window state from maximized to normal.
* Bugfix audio playback: Unknown error float/int fixed.
* Bugfix: If the program was closed and a script was saved, an error could occur if the 'Tablist' was open.
* Bugfix: Resize filter was not removed from all scripts when setting a manual zoom value.
* Some other small corrections.

FranceBB
4th August 2024, 19:45
Thanks for yet another update and keeping the project alive. :)

BuCCi
10th August 2024, 15:03
The following error occurs when using the trim editor when the preview window and source are separated.
(This does not seem to occur when the preview and source are in one window.)

https://bucci.bp7.org/avspmod_err.png

This has been happening since the next version 2.7.4.1, will this ever be fixed?

Thank you in advance.

gispos
10th August 2024, 18:51
The following error occurs when using the trim editor when the preview window and source are separated.
(This does not seem to occur when the preview and source are in one window.)

https://bucci.bp7.org/avspmod_err.png

This has been happening since the next version 2.7.4.1, will this ever be fixed?

Thank you in advance.
Tomorrow there will be a new version with the fix for the Separate Video Window and the Trim Editor.
I do not use the Separate Video Window and only become aware of errors when users report them. So if you still find a bug please let me know. Thank you.

BuCCi
11th August 2024, 00:37
Tomorrow there will be a new version with the fix for the Separate Video Window and the Trim Editor.
I do not use the Separate Video Window and only become aware of errors when users report them. So if you still find a bug please let me know. Thank you.

Thank you for your reply.
We are very pleased to hear that you will correct the problem immediately.

Thank you for always maintaining our great software.

gispos
11th August 2024, 10:32
AvsPmod 2.7.7.9 (https://github.com/gispos/AvsPmod/releases)

* Another update for the 'Script Selector': Added to context menu Options & Aditional > 'Find dups', 'Find dups (dif) and 'Find dups (same tab)'.
- 'Find dups' shows all duplicate entries and 'Find dups (dif)' only duplicate entries with different script text. 'Find dups (same tab)' shows duplicates if the entries in the same tab.
- '@ dups' tabs are read-only, but the entries referred to the other tabs can be updated with 'Update selection from avs'.
- and a double click on an entry in the '@ dups' tab opens the linked tab.
* Removed del protection from the 'Script Selector' search tabs (this was not the intention, only the entries should be protected against deletion) ,)
* Who uses AvsPThumb: In the 'Script Selector' several list entries can now be opened at once (multi selection) with AvsPThumb.
* Bugfix: On closing the 'Script Selector' the application loses the focus.
* Bugfix Tablist: Error avsp.pyo line 4931 in OnGetItemTextColour: invalid item index in GetItemState.
* Bugfix 'Separate Video Window': Trim Editor error and zoom fit/fill fixed.
* Added some voices in the sound directory (They can be exchanged, only the name must be the same).
- if you do not like it, remove the sound directory or the voice file. But I find it more pleasant than a Bell without a hint or a MessageBox when it is not needed.
- there won't be come many.

BuCCi
11th August 2024, 11:03
* Bugfix 'Separate Video Window': Trim Editor error and zoom fit/fill fixed.

Thank you very much for the quick correction.
We have confirmed that this issue has been resolved and is working properly.

Many thanks.

TomGo
12th August 2024, 05:30
Thanks for the AvsPmod, it is very helpful for my vacation videos and other stuff. The example macros are quite good and helped me to learn much about how to program my own macros.

Questions:
1.) Every time I open the Trim editor, it is placed in the left bottom corner over the video output. I have to reposition it to a place where it doesn't disturb me. How do I save the position of the Trim Editor?
2.) For certain codec (e. g. Windows Media Video 9 Advanced Profile), navigating in the video can be quite slow. Is there a way to improve performance - for example by defining some kind of frame cache for the frames coming from avisynth, or something like that?

Feature request
1.) It would be very convenient if the Trim editor window could be kept from closing when pressing "Apply". Similar to to the search dialog in "Notepad++" with a checkbox "keep open". Additionally it would be very nice to make it transparent, when no Trims are set, again similar to the search dialog of "Notepad++" :D
2.) When using the Trim editor to select a region AND the slider is still on the last frame of the marked region, pressing "Apply" in the Trim editor (often this inserts the Trim commands to a commented line) will reset the video slider to the frame number of the complete movie equal to the number of selected frames of the marked region. For me this behaviour is not very useful, especially when Trims are appended to commented lines, and I would appreciate could it be disabled in the options or something like that.


Thanks,
Tom

StvG
12th August 2024, 22:55
Using 2.7.7.9.
I set Resize video window to Static.
When 100% zoom and double click on the splitter line, the video window is reset to the video height. https://i.ibb.co/mybdh9j/Untitled.png
When zoom is different than 100% zoom and double click on the splitter line, the video window is reset to 100% video height instead to X% (zoom % different than 100%) video height. For e.g., if 50% zoom when double click on the splitter line, the video window isn't reset to the new video height - https://i.ibb.co/PG2PZdZ/Untitled1.png
Can you make it the video window to be reset to the video height for any zoom factor?

gispos
13th August 2024, 18:14
Questions:
1.) Every time I open the Trim editor, it is placed in the left bottom corner over the video output. I have to reposition it to a place where it doesn't disturb me. How do I save the position of the Trim Editor?

In general, this behavior is not so wrong; if the sliding window is visible, the Trim Editor is displayed on the sliding window. Ok, sometimes it annoys me too :), if I feel like it I might change it and save the position.


2.) For certain codec (e. g. Windows Media Video 9 Advanced Profile), navigating in the video can be quite slow. Is there a way to improve performance - for example by defining some kind of frame cache for the frames coming from avisynth, or something like that?

This would not speed up navigation but slow it down. You would only notice a difference if you jumped to a few of the same frames again and again or went backwards a few frames. I had already tested it once and the benefit is questionable.
If you jump back and forth often enough (to the same frame) Avisynth does the caching quite well.


Feature request
1.) It would be very convenient if the Trim editor window could be kept from closing when pressing "Apply". Similar to to the search dialog in "Notepad++" with a checkbox "keep open". Additionally it would be very nice to make it transparent, when no Trims are set, again similar to the search dialog of "Notepad++" :D

Explain why. You can leave the Trim Editor open.
Transparent? for what? Close it when you no longer need it. If you choose 'Copy to Clipboard' nothing will be changed immediately and all selections will be kept and you can paste the trims from the clipboard if you want.
The selections can even be saved in the script and restored. And in the context menu of the timeline you can do different actions with the selections (trim, clip...)


2.) When using the Trim editor to select a region AND the slider is still on the last frame of the marked region, pressing "Apply" in the Trim editor (often this inserts the Trim commands to a commented line) will reset the video slider to the frame number of the complete movie equal to the number of selected frames of the marked region. For me this behaviour is not very useful, especially when Trims are appended to commented lines, and I would appreciate could it be disabled in the options or something like that.

If I have understood your question (wish) correctly. If you transfer the trims into the script with 'Apply', the script will be updated automatically.
But you don't want the script to be updated when you press 'Apply', you would rather update it manually.

Either use 'Copy to Clipboard' as already mentioned or switch off the automatic update completely in the program options. Video > 'Refresh preview automatically'
Then you have to refresh the script with F5. But I will think about whether your request makes sense and can be easily implemented.

-----------------

Using 2.7.7.9.
I set Resize video window to Static.
When 100% zoom and double click on the splitter line, the video window is reset to the video height. https://i.ibb.co/mybdh9j/Untitled.png
When zoom is different than 100% zoom and double click on the splitter line, the video window is reset to 100% video height instead to X% (zoom % different than 100%) video height. For e.g., if 50% zoom when double click on the splitter line, the video window isn't reset to the new video height - https://i.ibb.co/PG2PZdZ/Untitled1.png
Can you make it the video window to be reset to the video height for any zoom factor?
After double-clicking on the spitter, the window size is now adapted to the video*zoom in 'Static' mode.
I don't know yet whether I will do the same for other modes. Newer versions will definitely have this for 'Static'.

Look under Pre-Releases, it is version 2.7.7.9 with this one change (after-release)

https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link

What I have forgotten: The new 'Static' splitter position is then the current one.

StvG
14th August 2024, 09:20
After double-clicking on the spitter, the window size is now adapted to the video*zoom in 'Static' mode.
I don't know yet whether I will do the same for other modes. Newer versions will definitely have this for 'Static'.

Look under Pre-Releases, it is version 2.7.7.9 with this one change (after-release)

https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link

What I have forgotten: The new 'Static' splitter position is then the current one.

Thanks.

TomGo
16th August 2024, 06:51
Hello gispos,

thanks for your reply and sorry for my late reply.

Let me explain the context of my current project:
I have a lot of old vacation videos, digitized from tape, and my wife came up with this "idea" that, after I have this expensive equipment, at leat I can do something "useful" and cut those digitized viedeos according to her categorization. So she gave me 10 categories I have to scan and cut those viedeos for.
I do this in one tab of avspmod, having a line of Trims for each category and year - the lines are commented out to avoid refreshing the video window to the scene I just apllied.

This involves:
- as categories are overlapping sometimes, one scenes for one category might include scenes fitting to other categories, while having the "main" scene in the Trim editor I add Trims to the other fitting categories manually - I could go over scene repeatedly to cut out the appropriate scenes for every category, but I think the other method is faster.

- repositioning back and forth to find the right cut points (I already got reminded that I need to do cutting more accurately and smoother :rolleyes:)

- having to fill different categories, I often "apply" with Trim editor (added script to cusor position) for non overlapping scenes, meaning I have to reopen the Trim editor quite often - It would be quite helpfull to have the option to keep it open after pressing apply. [Btw. in this scenario it would be convenient to have an option to append Trims to a line, meaning to add the "++" before the Trim automatically, sorry couldn't resist to add it. ;)]
etc.





In general, this behavior is not so wrong; if the sliding window is visible, the Trim Editor is displayed on the sliding window. Ok, sometimes it annoys me too :), if I feel like it I might change it and save the position.
I would appreciate that.


This would not speed up navigation but slow it down. You would only notice a difference if you jumped to a few of the same frames again and again or went backwards a few frames. I had already tested it once and the benefit is questionable.
If you jump back and forth often enough (to the same frame) Avisynth does the caching quite well.

I see, you are the expert here .. :-)


Explain why. You can leave the Trim Editor open.
Transparent? for what? Close it when you no longer need it. If you choose 'Copy to Clipboard' nothing will be changed immediately and all selections will be kept and you can paste the trims from the clipboard if you want.
The selections can even be saved in the script and restored. And in the context menu of the timeline you can do different actions with the selections (trim, clip...)

Transparent? Ok, you are right it isn't such a good idea.
But the advantage to be able to keep the Trim editor open is explained above in the context of the categorisation project.


If I have understood your question (wish) correctly. If you transfer the trims into the script with 'Apply', the script will be updated automatically.
But you don't want the script to be updated when you press 'Apply', you would rather update it manually.

Sorry, bad explained from my side: I usually select the mode to enter the trims at the cursor position and I want the script to be updated. BUT, under the described conditions, the video window is updated and the slider is moved! As I add to lines which are commented out , moving the slider in that scenario is just inconvenient.


Either use 'Copy to Clipboard' as already mentioned or switch off the automatic update completely in the program options. Video > 'Refresh preview automatically'
Then you have to refresh the script with F5. But I will think about whether your request makes sense and can be easily implemented.


Let me check, if deselecting "Video > 'Refresh preview automatically'" helps ... - nope, that doesn't work in that scenario. Let me describe what i mean step by step:
1. load a movie into avspmod
2. position video slider at any position grater zero, for example to frame 1000
3. press Home to start a selection with trim editor
4. advance 100 frames and press End and without any further change press apply.
5. Video slider is now placed at frame 100 and not 1100. It might make sense to do it this way, when you added a new trim to an uncommented line, but at least if you applied the trims to a commented line, so that the inserted trim is not "active", the video slider position should not be changed.
Btw., if you, after pressing End AND advance by one or more frames, avspmod doesn't move the video slider. Unfortunately, at least I forget to advance, after pressing End, much too often :confused:
Hope that explains it.

Thanks in advance,
Tom

gispos
1st September 2024, 14:28
AvsPmod 2.7.8.1 (https://github.com/gispos/AvsPmod/releases)

* The reason for this version 2.7.8.1 is that due to the new bookmark handling some macros no longer work properly,
- instead of changing all macros the problem was fixed in this version. Sorry.
* Added automatic loading of the function 'LocateFrames'.
- if the function 'LocateFrames' is not found when executing 'Locate frame', it is imported from the specified file.
- Program options > Path > 'Function LocateFrames import'.
* 2.7.8.0
* Bookmarks handling reworked. There should be no more incorrect assignments.
* Loading sessions and files has been reworked and should now be faster (Dogway?, for me 200 scripts 10sec).
* Improved Tablist update: If the tab list is visible, the entries should now always be up-to-date (bookmark count is only on show and tab change updated).
* Tablist Execute menu: added Separator and Submenu. Use '-' for an separator and '>Name of menu' for indicate to put the next entrie in this submenu, indication of end is <
- example: Save script|File -> Save script, >My Submenu, Bookmarks to script|Video -> Bookmarks -> Bookmarks to script, <, next entrie in main context menu
* Added to 'Script Selector' context menu:
- 'Search in scripts...', searches in all scripts for the given text (good for finding functions that you have used before).
- 'Find only new from avs...' searches for new scripts (names) that are not present in the data and does not update other scripts.
- Edit > 'Search in Notes...', searches in all Notes for the given text.
- Edit > 'Change note...', now with multiselection and @ linked tabs.
- Options & Additional > 'Selections distribute all', distributes all values (script, markers, note) from this entrie to all entries with the same file (path,name).
* 'Script Selector' can now show the saved scripts (double click Path or -20 pixel Name). You can copy the text but the script cannot be saved.
- for this function there is also an option Option & Additional > 'Same size on showing scripts'
- note: linked @tabs processes the linked entries. If you delete the link, the linked entry will also be deleted.
* The Trim Editor got a context menu and can now save/restore it's position and can be made transparent (Hold down the left mouse button and move to the left or right).
- known bug: if the AvsPmod option 'Always on top' is set, the trim editor is overlaid by the program window. (no fix at the moment).
* Added to MediaInfo context menu 'Auto close'
* Function 'Locate Frame' revised:
- no more variables or selections required (optional but possible) always the next script (the right one) is used for finding the frame.
- there is now an dialog for start, stop, threshold and 'Split View freeze frame' settings.
- more in the 'Locate Frame' readme.
* Fixed: The tab's reactions became slower when many files were open (>100) and no multiline tab style and tab images were enabled.
* Bugfix Macro 'PreviewEncode.py': The encoded clips were entered twice in the script.
* Some other changes.

TomGo
21st September 2024, 05:54
* The Trim Editor got a context menu and can now save/restore it's position and can be made transparent (Hold down the left mouse button and move to the left or right).

Thanks, that's very convenient, I use it constantly.

TomGo

tormento
21st September 2024, 11:35
Is there any way to add chapters to the timeline for a given mkv/mp4 when loaded? Even from external file would be fine.

Adding shortcuts/buttons to jump back and forth would be even better.

poisondeathray
21st September 2024, 14:33
Is there any way to add chapters to the timeline for a given mkv/mp4 when loaded? Even from external file would be fine.

Adding shortcuts/buttons to jump back and forth would be even better.


Macros => "import bookmarks from file"

in the GUI on the bottom left, there are navigate from previous/to next bookmark buttons (the "<<" and ">>" buttons". You can set a hotkey for them, default keys are shift+f2 , f2

gispos
29th September 2024, 14:13
AvsPmod 2.7.8.2, see later posting 2.7.8.3

BuCCi
29th September 2024, 15:00
When the video preview window is separated, “Add Bookmark” is not working.
We would appreciate it if you could fix this when you have time.

Thank you in advance.

gispos
29th September 2024, 18:34
AvsPmod 2.7.8.3 (https://github.com/gispos/AvsPmod/releases) :)

* Added Trim Dialog context menu 'Don't close on 'Apply', does not close the Trim Dialog after pressing 'Apply' (User wish).
* Added Video > Bookmarks > Copy/Paste bookmarks. Copies or paste bookmarks direct from/into the timeline.
* Added Video > Navigate > Goto selection next/previous. For same functionality you can also press Shift on other bookmark jump controls
- eg. video control button or mouse browse buttons forward/backward (Aux1, Aux2).
- Note: if more then one tab opened and tab switching with the mouse browse buttons enabled (Program options > Misc > 'Mouse browse buttons'),
- you can then jump bookmarks if the mouse in the video slider or status bar area or inside the slider window or Ctrl or Shift is held down.
* Added direct setting a selection mark start\end without showing the trim editor.
- when right clicking the video slider press Ctrl for selection start and Shift for selection end (else default bookmark).
* Added 'Locate frame' text label 'Start' and 'Stop' sets on clicking selection start or stop without showing the trim editor.
* Added to templates Options > 'Apply filter...' function 'ClipClop', ClipClop.dll @StainlessS is required.
-- for copy and paste if needed (for current options), open Options > 'Apply filter...' and make new entries:
Entry name: 'CLipClop copy' (for process single selection, name can be changed and preview filter flags can be removed)
/**avsp_filter
%*%join%copy
ClipClop(last, r1, sCMD="r1(%start,%stop)")
**/
Entry name: 'ClipClop copy *' (for process all selections, name can be changed and preview filter flags can be removed)
/**avsp_filter
%*%join%copy
%> r1(%start,%stop);
ClipClop(last, r1, sCMD="%insert")
**/
--
* Bugfix: Trim Editor save/restore the position only works when closing the dialog, but not on 'Apply'
- if you press Ctrl on mouse down, the transparent value doesn't change (for nicer setting the transparent value).
* Bugfix: Bookmark difference warning didn't work.
* Bugfix: If "Tab change loads script bookmarks" was disabled, the tab bookmarks were not displayed in the timeline when switching tab.
* Some other changes.
Version 2.7.8.3
* Bugfix: bookmarks not added if separate video window enabled. Sorry this was since 2.7.8.0
* Apparently a double release is becoming a habit ,)


I would like to add a example for the function 'ClipClop' with 'Apply filter'.
Two filters were marked in the script and 'ClipClop copy' was executed. So an area of ​​the video is processed with these two filters.

/**avsp_filter
r1 = SmoothLevels(input_low=16, gamma=1.00, input_high=220, output_low=16, output_high=235, TVrange=True, Lmode=3, darkSTR=0, brightSTR=200, debug=False)
\.NonlinUSM(z=3, pow=1.2, str=0.22, rad=6)
ClipClop(last, r1, sCMD="r1(1477,3117);")
**/

BuCCi
29th September 2024, 21:23
I was able to confirm that the bookmark addition works correctly.
Thank you very much for fixing it, even though it was just after the release.

FranceBB
30th September 2024, 08:35
Thank you for yet another release, Gispos.
No problem on my systems, as always, although I had to manually create an exception in Avast this time round, so I sent the whole thing to them for analysis marking it as false positive so that they can whitelist it. :)
That was on my beloved Windows XP Professional x86.
Ironically Windows Defender and Crowstrike on Windows 10 Enterprise x64 and Windows Server 2019 Standard x64 were happy with it, when it's generally the other way round.
Anyway, other than this, nothing to report, thank you for keeping the project alive, as always. ;)

gispos
30th September 2024, 10:53
Thank you for yet another release, Gispos.
No problem on my systems, as always, although I had to manually create an exception in Avast this time round, so I sent the whole thing to them for analysis marking it as false positive so that they can whitelist it. :)
That was on my beloved Windows XP Professional x86.
Ironically Windows Defender and Crowstrike on Windows 10 Enterprise x64 and Windows Server 2019 Standard x64 were happy with it, when it's generally the other way round.
Anyway, other than this, nothing to report, thank you for keeping the project alive, as always. ;)
And this was the first time this happened?
I checked the files with several virus scanners and didn't get a single virus message.
I also scanned the complete zip archive and received 1 message out of 65 scanners. However, this message was pointed out that it is not 100% clear.

The only thing is the firewall message when closing AvsPmod.
But I wrote that before, it's because of the single instance mode, which sends a message to the thread via a port to close.

FranceBB
30th September 2024, 11:10
And this was the first time this happened?


Yep, it generally opens in the sandbox, Avast waits for it to do something "weird", sees that it doesn't do anything malicious, and then it allows it to run directly all the time. Anyway, no biggie, I reported it anyway so that they're gonna whitelist it and other people running Avast won't have the annoyance as it won't be detected any longer. ;)

hello_hello
4th October 2024, 16:08
I'm running 64 bit AvsPmod in a Wine prefix, so I'm not expecting too much help, but I thought I'd ask anyway in case it's something that's happening in Windows too....

Since version 2.7.8.0, AvsPmod has stopped displaying the contents of the script area after a tab is closed and a new tab is opened, although it appears to only happen after a video has been previewed. Version 2.7.7.9 and earlier seem to be okay. Has anyone else experiencing this sort of thing?

Cheers.

Edit: I also tried the 32 bit version of AvsPmod in a 32 bit Wine prefix, but the result was the same.

https://imgur.com/0CK2g3bl.png

https://imgur.com/Ls5URWMl.png

gispos
6th October 2024, 01:46
I'm running 64 bit AvsPmod in a Wine prefix, so I'm not expecting too much help, but I thought I'd ask anyway in case it's something that's happening in Windows too....

Since version 2.7.8.0, AvsPmod has stopped displaying the contents of the script area after a tab is closed and a new tab is opened, although it appears to only happen after a video has been previewed. Version 2.7.7.9 and earlier seem to be okay. Has anyone else experiencing this sort of thing?

Cheers.

Edit: I also tried the 32 bit version of AvsPmod in a 32 bit Wine prefix, but the result was the same.

Very strange. I've never had this on Windows and can't figure out how it could happen.
I remember that I changed two things from 2.7.8.0 that have to do with the tabs. I looked at the code but can't find anything that could lead to this behavior.
Test all three points one after the other.

1.) Download the latest pre-release version (Help > Video tutoreals & more) and test whether the error still exists.
2.) Under program settings Misc disable 'Use keyboard images in tabs'
3.) Under program settings Misc enable 'Show tabs in multiline style' and close and reopen the program and show under Options if 'Multiline tab style' checked.

I think you have already tried it with a newly unpacked version and I don't need to ask for your options.dat to test your settings.
Report the result, if nothing helps I may think of something else.

hello_hello
6th October 2024, 06:23
Thanks for the update.

I hadn't tested it with a fresh options.dat file as I was using the same file when testing older versions, but it turns out the "show tabs in multiline style" option was the cause, at least for version 2.7.8.0. The pre-release version you linked to seems to be fine with it enabled though.

Cheers.

gispos
6th October 2024, 12:16
Thanks for the update.

I hadn't tested it with a fresh options.dat file as I was using the same file when testing older versions, but it turns out the "show tabs in multiline style" option was the cause, at least for version 2.7.8.0. The pre-release version you linked to seems to be fine with it enabled though.

Cheers.
Good thing the error has been fixed with the pre-release version.
Just to narrow down the problem (so that it doesn't happen again).
There are two versions of the pre-release, the normal one and one with the extension '_test_version_hello_hello.zip'

1.) which one did you use?
2.) You write that turning on 'multiline tab style' helped, what about turning off 'tab images', that should help too, if not then I can't find the error and it could occur again.

Thanks

hello_hello
6th October 2024, 18:03
Disabling the "multi line tab style" option fixes the problem, or enabling it causes the problem, however you'd prefer to look at it.

I tried the "normal" pre-release for you. For that one the "multi line tab style" option only causes the problem when "keyboard images in tabs" is enabled at the same time. Likewise the "keyboard images in tabs" option is fine when enabled on it's own.

I checked "_test_version_hello_hello" again for you too, just to be sure, and it's okay when both options are enabled.

I also went back to version 2.7.8.0 and checked it again. Once again both options had to be enabled at the same time to cause the problem.

Thanks!

hello_hello
6th October 2024, 18:31
Trying "_test_version_hello_hello" again, I just noticed that when the "keyboard images in tabs" option is enabled, the images don't actually show until a video has been previewed.

https://imgur.com/veh0z3Z.png

https://imgur.com/KerprxM.png

And the images disappear when switching tabs with playback stopped, then appear again when playback is resumed.

https://imgur.com/fptc6V3.png

The "normal" pre-release also behaves the same way.

Not that I care, and it's possibly just a Wine oddity, but I thought I'd mention it.

Cheers.

gispos
6th October 2024, 19:19
@hello_hello, Thanks for testing, normally the tab images are displayed when the video window has the focus.
If the script has the focus, the tab images are hidden because the tabs cannot then be switched with the number keys.

radiant chains
9th October 2024, 18:59
Starting with version 2.7.8.1, I get an error message when dragging a file from an explorer window onto the tab bar, to open the file in a new tab. This worked fine on versions before 2.7.8.1

This is the error message on version 2.7.8.3 (using Windows 11 x64):
Traceback (most recent call last):
File "avsp.pyo", line 10765, in OnData
AttributeError: 'MainFrameDropTarget' object has no attribute 'UpdateTabImages'

tormento
9th October 2024, 20:00
@gispos

I'd like to switch from VirtualDub to AvsPmod for script previews but I always postponed as I have huge amount of silent crashes with gpu intensive scripts.

I can open 4-5 sessions of VD with no hiccups.

Do you have any idea of why does it happen?

DTL
9th October 2024, 23:10
Try to select most stable drivers for GPU ?

tormento
10th October 2024, 13:01
Try to select most stable drivers for GPU ?
It's a long time issue. I always use nVidia Studio drivers.

gispos
11th October 2024, 10:34
@gispos

I'd like to switch from VirtualDub to AvsPmod for script previews but I always postponed as I have huge amount of silent crashes with gpu intensive scripts.

I can open 4-5 sessions of VD with no hiccups.

Do you have any idea of why does it happen?
I can't say for sure (only guess).
If AvsPmod crashes without an error message, the problem has always been a plugin or Avisynth. If something goes wrong in this chain, the AvsPmod process is also terminated.

I think it could be the Avisynth C interface. In the past there were some problems which were then resolved.
It is also possible that the C interface only has problems with your CPU\GPU combination, if I remember correctly your CPU does not have AVX 2.
It might be difficult to find it, because an error only occurs every now and then and pinterf is probably not that active anymore.

What you could try is importing the script with the GPU-intensive code into an AvsPmod empty script with AviSource (not with import).
If there are fewer or no more crashes, I would say that the problem is the C interface.

From the AvsPmod code perspective, it doesn't care if it is CPU or GPU intensive. Normally it should even be better to handle a GPU intensive script because AvsPmod itself is more CPU intensive.
The problem could be in the memory pipeline CPU -> GPU and back. But DTL knows more about that.

Starting with version 2.7.8.1, I get an error message when dragging a file from an explorer window onto the tab bar, to open the file in a new tab. This worked fine on versions before 2.7.8.1

This is the error message on version 2.7.8.3 (using Windows 11 x64):
Traceback (most recent call last):
File "avsp.pyo", line 10765, in OnData
AttributeError: 'MainFrameDropTarget' object has no attribute 'UpdateTabImages'
I hadn't noticed that because I transfer my files to AvsPmod using another program.

But for Explorer, take a look at FileTypesMan (https://www.nirsoft.net/utils/file_types_manager.html) from Nirsoft (https://www.nirsoft.net/).
You can use it to create your own entries in the Explorer context menu.

Example mkv files.
https://i.postimg.cc/br329Wn1/Files-Type-Man.jpg (https://postimages.org/)

tormento
11th October 2024, 11:05
@gispos

Ad I said, VirtualDub is rock solid.

DTL
11th October 2024, 11:22
It's a long time issue. I always use nVidia Studio drivers.

Try to ask for debugging build and run from debugger. If it can catch some exception at crash - it may help to developer. And you can report all possible user-side debugging information about crash.

gispos
11th October 2024, 15:50
@gispos

Ad I said, VirtualDub is rock solid.

You did not understand me!!! I mentioned the C interface because AvsPmod exchanges data with Avisynth via the C interface. VirtualDub does not use the C interface !!!

That's why I suggested testing it with AviSource, which has always caused fewer problems in the past and showed me that the error may be in the C interface.

gispos
11th October 2024, 19:43
I have just discovered a bug in either AvsPmod or Avisynth. I had suggested AviSource as a test source for the C interface, and just tested it.

I get an error message when 'Prefetch Display conversion' is enabled in AvsPmod and a script is imported with AviSource.
If I use DirectShowSource to import a script, everything is fine.

I still have to test if it is the same with older Avisynth versions.
Why does DirectShowSource work and AviSource causes problems?

@ tormento, turn off prefetch under Video > Display > 'Prefetch display conversion'.

gispos
11th October 2024, 21:47
It is once again much more complex and confusing.

AviSource seems to have problems with Prefetch in the script if MCTemporalDenoise() in the importet script.
Even if SetFilterMTMode 3 is used and other filters are present before the prefetch.

AviSource("E:\Temp\test.mpg.avs")
SetFilterMTMode("DEFAULT_MT_MODE", 3, force=True)
sharpen(0.3)
Prefetch(1,1)

Also leads to an error under AvsPmod and VirtualDub.

The script imported with AviSource contains:

video=LWLibavVideoSource(E:\Temp\test.mpg, cache=False, indexingpr=False)
audio=LWLibavAudioSource(E:\Temp\test.mpg, cache=False)
audioDub(video, audio)

MCTemporalDenoise(settings="low", sigma=4, strength=100, tovershoot=1, post=0 , twopass=false, GPU=false)


If I remove MCTemporalDenoise, everything is fine. If the script is imported with DirectShowSource, there is no such problem.
So AviSource is not so good for importing a script. In future I will use DirectShowSource for testing.

@tormento so use DirectShowSource if you want to test.

LigH
11th October 2024, 21:54
An alternative to loading AviSynth scripts as source in other scripts should be Import instead of AviSource; but I understand you want it that way to detect a reason for an issue.

tormento
12th October 2024, 09:53
It is once again much more complex and confusing.

@tormento so use DirectShowSource if you want to test.
Now I am the one confused.

I usually read videos with DGSource().

You are telling me to test scripts replacing it with DirectShowSource()?

gispos
12th October 2024, 11:23
Now I am the one confused.

I usually read videos with DGSource().

You are telling me to test scripts replacing it with DirectShowSource()?

Have you read all the postings?

https://forum.doom9.org/showpost.php?p=2007996&postcount=1697

https://forum.doom9.org/showpost.php?p=2007997&postcount=1698

https://forum.doom9.org/showpost.php?p=2008006&postcount=1700

Especially the last one.

If the problem is the C interface, there is nothing I can do. C interface belongs to Avisynth.

gispos
16th October 2024, 11:52
Deleted.

FranceBB
16th October 2024, 13:00
Sorry Gispos but that's the end of the road for me, for now at least, as I'm always on the latest stable at work and on Ferenc's test builds at home.
I know that "official" is a very relative term when it comes to open source, but I kinda go by the reasoning of considering Ferenc (pinterf) & Stephen (qyot) builds in the main GitHub repository as the "official" Avisynth.
If past releases are an indication of future ones, we should be getting Avisynth 3.7.4 Stable before the end of the year anyway, so I don't think it's a big deal in any case.

gispos
16th October 2024, 21:18
Sorry Gispos but that's the end of the road for me, for now at least, as I'm always on the latest stable at work and on Ferenc's test builds at home.
I know that "official" is a very relative term when it comes to open source, but I kinda go by the reasoning of considering Ferenc (pinterf) & Stephen (qyot) builds in the main GitHub repository as the "official" Avisynth.
If past releases are an indication of future ones, we should be getting Avisynth 3.7.4 Stable before the end of the year anyway, so I don't think it's a big deal in any case.
You're probably right, I was a bit upset by the lengthy process of troubleshooting when I wrote the post with the new version here. Sometimes you write things you regret afterwards.
I have deleted the post here and will only offer the version as a Pre-Release version with a reference to the Avisynth version to be used.

gispos
18th October 2024, 06:44
AvsPmod 2.7.8.7 (https://github.com/gispos/AvsPmod/releases)

* The editor and the tabs have been given a new context menu entry. 'Preload script':
- 'Preload script' menu is only visible if Avisynth version greater then 3.7.3 or Version is 3.7.3 and release is greater r4070
- you can get working versions from here: https://gitlab.com/uvz/AviSynthPlus-Builds
- the function creates the clip of a script (tab) in the background and shows a progress dialog.
- one clip after the other is created when scripts (tabs) are added with 'Preload script'.
- before each run, the available memory is checked and if it is less than 2001 MB, a dialog appears asking whether to cancel.
- if in the progress dialog the 'Cancel' button is clicked, all pending processes are deleted and the dialog closes after the current process has ended.
- a running process cannot be aborted directly, you have to wait for Avisynth to return.
- if the process does not end (Avisynth does not return), only a program restart can help.
- It should also be clear that other processes such as playback will slow down while clips are loading in the background.
- Since source filter indexers do not consume as much CPU power, they should be well suited for this purpose.
-
* New option: Options > 'AvsPmod & Avisynth test'. Test AvsPmod and Avisynth. More in the dialog that appears.
- info: 'Preload script' uses also this option. The Analysis passes not.
* Flickering on showing the separate video window reduced and if it minimazed it will now restore the size and shown.
* Separate video window resets now the zoom and position after maximazed and restored with a dbl. click if 'Save view pos on tab change' checked.
* Video > Tools > 'Locate frame' reworked: read the Locate frame readme.
* Split View shows an Indicator (marker) in the timeline. If the parent tab selected (the left tab) then green else blue color.
- the indicator distance to the video slider indicates the frame distanze in the not selectet Split View tab (if you not see it, the distance is to small).
- if you click on the indicator the tab will change if not 'Freeze frame' enabled. Use Video > Tools > 'Locate frame' to turn on/off 'Freeze frame'.
- Note: in the status bar right side is the accurate frame distance displayed.
* 'Run analysis pass' can now run a single pass wihout a frame loop (only initialize the clip). Do use it: Press Ctrl before clicking the menu.
- background: there are functions, e.g. the SceneLog DBSC from StainlessS that runs through its own frame loop and then returns the result or writes it to a file.
* Changed: If the script was on a USB drive, for example, and the device was not connected when loading a session,
- the path was removed from the file name and reloading the script was no longer possible, even after connecting the device.
* The 'SceneLogToBookmarks' and 'Run analysis paas' macro has been updated (see Run analysis pass) and other macros (Help > 'Video tutorials & more') have been added.
* Update AvsPmod 'About' dialog
* Fix: When AvsPmod was used with Wine, it could be that the script text was not displayed.
* Bugfix: Copied bookmarks could be 0 after paste it into the timeline and then you delete the bookmarks in the timeline.
* Bugfix: Drag & Drop files causes an 'UpdateTabImages' error.
* Bugfix: Media Info Dialog can cause an 'KillFocus' error if auto close enabled.

'Preload script' menu is only visible if Avisynth version greater then 3.7.3 or Version is 3.7.3 and release is greater r4070

At the risk that someone gets angry.
I think that the “official” version (linked everywhere) should be updated after major bugs have been found and fixed.

Yes, it's open source and it's all out of “charity”, but it would still be nice and certainly in the interest of all those who use Avisynth.

As you can see, there are no more current pinterf test versions, then perhaps a link to the 'G S (https://gitlab.com/uvz/AviSynthPlus-Builds)' page should be added.
Thanks to 'G S'

Emulgator
18th October 2024, 15:44
Many thanks for your continued work, gispos !
BTW, the latest Avisynth+ uvz builds (IIRC 4073) can not serve successfully to Topaz Video Enhance AI 2.6.4 (TVEAI sees framecount 0),
so here I have to stick with Avisynth+ pinterf 4066.
Maybe others see the same behaviour, so it's up to testing which version is compatible for anyone's workflow.

gispos
18th October 2024, 22:10
Many thanks for your continued work, gispos !
BTW, the latest Avisynth+ uvz builds (IIRC 4073) can not serve successfully to Topaz Video Enhance AI 2.6.4 (TVEAI sees framecount 0),
so here I have to stick with Avisynth+ pinterf 4066.
Maybe others see the same behaviour, so it's up to testing which version is compatible for anyone's workflow.
Have you already reported the error?
At least I've done it right, depending on the Avisynth version used, the function may or may not be available.

Either AvsPmod crashes or other programs have problems, nice decision.
I've had enough for now and need a break.

FranceBB
18th October 2024, 22:49
Thank you Gispos!
Hiding the option for unsupported versions is actually the way to go and I totally agree with the decision.
I guess that's the best of both worlds and it should actually make everyone happy. :)

Emulgator
19th October 2024, 09:39
Thank you Gispos from me too, and happy break time !
AvsPmod is the best editor for me and not at fault anyway in my described scenario.
I did not report AviSynth+ uvs builds, from the start I had no luck with the Clang branch at all,
seeing myself as the problem, and of the LLVM branch only 4073 was usable for me.
I see these as WIP tests and I am happily working with pinterf builds, these were gold standard so far here.

gispos
24th October 2024, 13:19
I stopped looking at Avisynth for 5 days and got busy with other things. I have now recovered from all that.

Let's continue. :)
I also had problems with the previous LLVM builds and it doesn't work so well with Clang.
However, the latest LLVM build works perfectly for me, but it is still pity that uvz doesn't offer a normal build.

But I have totally changed my old opinion about the uvz builds.
These are builds in which the latest fixes have been added, so you can expect that the later final (public) Avisynth version will hardly differ from it.
Therefore, it would not be wrong to report uvz problems.

It's also a real pity that the "official" version is not updated even if there are major bugs.

Hello FranceBB, I know you are a lover of original and nostalgia, that's OK!

@Emulgator:
Have a look at the macro 'TopazEncode (https://drive.google.com/drive/folders/1EVfjszNvWdnP-_twmgW5wSf1A7B9pILk?usp=drive_link)', it uses the current script and ffmpeg to forward (pipe) the whole thing to topaz ffmpeg.
On my system as fast as directly from the GUI. And no problems with avisynth.
However, you will need the latest pre-release version (2.7.8.8) (https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=drive_link). And please read the information in the macro.
It would be nice if I could get some feedback on the macro. Thank you!

Emulgator
24th October 2024, 20:12
Many thanks, Gispos, for going through all that !
I have trouble finding ffmpeg.exe within Topaz, I still run 2.6.4 and here it is all ffmpeg.dlls
(avcodec-58.dll, avdevice-58.dll, avfilter-7.dll, avformat-58.dll, avutil-56.dll).
Well, I can not test for now, no biggie, once there will be a Avisynth+ build that is up to date and bugfree.

gispos
25th October 2024, 17:47
Many thanks, Gispos, for going through all that !
I have trouble finding ffmpeg.exe within Topaz, I still run 2.6.4 and here it is all ffmpeg.dlls
(avcodec-58.dll, avdevice-58.dll, avfilter-7.dll, avformat-58.dll, avutil-56.dll).
Well, I can not test for now, no biggie, once there will be a Avisynth+ build that is up to date and bugfree.
I hadn't thought of that, I used version 5.0.4 for testing. Can version 2.6.4 load avs files directly?

Emulgator
25th October 2024, 21:54
Oh, the circus it at stage 5 now ;-)
Yes, fortunately the Topaz VEAI versions 2 (last 2.6.4) silently had that feature
(dragging an .avs script onto GUI just works, but file import pretends not to see .avs)
and it still works beautifully with pinterf Avisynth+ 4066.
Dragging an .avs script from uvz 4073 to Topaz VEAI 2.6.4 fails, delivering 0 frames.
From version 3 on Topaz VEAI had that ability removed, citing "unclear license situation".
(I don't get it: Seemingly feeling restricted by free avisynth, but using ffmpeg under the hood, for free...?)
So nothing wrong with AvsPmod in that regard. I am happily using your AvsPmod for script compilation and preview.
(maybe for exporting intermediates soon when I get around making an encoder preset for 10-bit APCH .mov)

gispos
26th October 2024, 18:00
Oh, the circus it at stage 5 now ;-)
;)
I read the forum from time to time and am always stunned at how the programmer and Topaz himself deal with problems.
Simply ignore them and prefer to add new and sometimes pointless (childish) functions that are full of new bugs that will never be fixed.
The GUI is a disaster, but the result for some videos is surprisingly good for the most part with a few outliers in some frames.

tormento
27th October 2024, 10:20
;)
I read the forum from time to time and am always stunned at how the programmer and Topaz himself deal with problems.
Once mlrt will become widespread, they’d better fix their quirks or disappear. How I wish to convert their encrypted models to usable ones.

bbcby
27th October 2024, 19:42
I tray to get Preview from current point ->
Error in the macro: 'Notebook' object has no attribute 'GetPagCount' (Preview from current point.py, line 11)

gispos
27th October 2024, 21:42
I tray to get Preview from current point ->
Error in the macro: 'Notebook' object has no attribute 'GetPagCount' (Preview from current point.py, line 11)
This must be a bug that has always existed but was never found because apparently the macro is not used. GetPagCount does not exist should be GetPageCount.
Either download the latest Pre-Release version here (https://drive.google.com/drive/folders/1I7yNkFLoYmOush5Olx-jT799GphKcSwX?usp=drive_link) or change the macro if you are using 32bit.

Edit:
The changes in the macro do not fix the error, I had overlooked something. But there is now also a 32 bit Pre-Release (https://drive.google.com/drive/folders/18rt8VtT-efkxmz4g7YWtFcmUlZ2s7E7G?usp=drive_link) available in which the bug is fixed.

bbcby
28th October 2024, 09:31
Pre-Release is OK, thank you.

x265
22nd November 2024, 03:45
I'm getting this error when trying to save bookmarked image sequence.

https://i.ibb.co/5r8XG4m/Screenshot-2024-11-22-064230.png

gispos
22nd November 2024, 13:33
I'm getting this error when trying to save bookmarked image sequence.

https://i.ibb.co/5r8XG4m/Screenshot-2024-11-22-064230.png
I can't reproduce the error.
I tried it with jpeg and png. With individual bookmarks and bookmark range. No error.

Please always provide more precise information when reporting errors.
What dimensions and pixel format does the video have? What is saved, individual bookmarks or bookmark ranges, jpeg or png or...?

Does it work with other settings or other videos?
Is the macro from an older AvsPmod version?

gispos
23rd November 2024, 15:01
AvsPmod 2.7.8.8 (https://github.com/gispos/AvsPmod/releases)

* The selected tab shows now an image with blue sign #
* New macro monster 'TopazEncode.py' for AvsPmod 2.7.8.8 and later (Help > 'Video tutorials & more'), more info in the macro itself.
* Added macro type 'button' the event is the first default value, more in the macro readme.
* Added to macro function GetTextEntry the parameter 'getControls'
- returns the dlg itself and the insertet controls in a dict with tuple values and int key numbers, more in the macro readme.
* Bugfix Script Selector: a 'key error' may occur when closing the script.
* Bugfix: RunExternalPlayer (macro: Preview from current point)
* Bugfix: when macros showing MsgBox with 'Cancel' button, the result was always False.
* Bugfix: MediaInfo window when auto close was turned on an error could occur.
* Some small fixes.

Macro TopazEncode:
https://drive.google.com/drive/folders/1xPoJbMpqV5kUzSQ39tS4XUTlHl5RBVC9?usp=drive_link

FranceBB
24th November 2024, 04:38
Thank you, as always, Gispos. :)
By the way, today I was on my way to create a DCI P3 output so that I could export the TIFF, re-encode them to .j2k and finally create the MJPEG2000 mxf output for the DCP of a documentary about the tragedy of Rigopiano (the avalanche from 2017 that killed several people) and I noticed that AVSPmod mod wasn't recognizing the SMPTE 428-1 transfer in the frame properties.
This can be reproduced with:

https://i.imgur.com/1GELsvj.png

The question mark is on 17 (transfer), but it did recognize the primaries, 11, as 431-2 (which again is DCI P3).
I looked it up and it seems to be related to a very simple piece of code in funcs.py, so I tried my luck and added it to my test branch along with other missing values (https://github.com/FranceBB/AvsPmod/blob/GPo/func.py).
It seemed to be working, so I made a very humble pull request: https://github.com/gispos/AvsPmod/pull/14

Let me know and thank you as always. :)

x265
24th November 2024, 07:55
I can't reproduce the error.
I tried it with jpeg and png. With individual bookmarks and bookmark range. No error.

Please always provide more precise information when reporting errors.
What dimensions and pixel format does the video have? What is saved, individual bookmarks or bookmark ranges, jpeg or png or...?

Does it work with other settings or other videos?
Is the macro from an older AvsPmod version?

The source is a VOB file (720x540, YV12). The error occurs only when trying to export as PNG; exporting as JPEG works fine.

https://i.ibb.co/YTTBvMb/image.png

Emulgator
24th November 2024, 10:54
540 would be a strange VOB height...not divisible by 16, not by 8. But this may not be the culprit at all, so...

gispos
24th November 2024, 19:14
Let me know and thank you as always. :)
"This branch cannot be rebased due to conflicts"

Thank you FranceBB,
I don't really understand GitHub and don't even look at it (I always get messages that I can't understand, see above).
So I will add everything manually:

GetTransferName
17:'428-1'

GetMatrixName
15: 'IPT-C2',
16: 'YCGCO-R-E',
17: 'YCGCO-R-O'

Is that right?


The source is a VOB file (720x540, YV12). The error occurs only when trying to export as PNG; exporting as JPEG works fine.
I will have a look at it.

gispos
24th November 2024, 19:41
The source is a VOB file (720x540, YV12). The error occurs only when trying to export as PNG; exporting as JPEG works fine.

https://i.ibb.co/YTTBvMb/image.png

Please set the bit depth of the PNG to 8bit.
I have just tested the original AvsPmod version and with 16bit Png there is no error message but the image is unusable.
I have to take a closer look, but I don't know if it works with 16 bit PNG.

FranceBB
24th November 2024, 19:59
"This branch cannot be rebased due to conflicts"


Oh... yeah, there must be something it doesn't like.


I will add everything manually:

GetTransferName
17:'428-1'

GetMatrixName
15: 'IPT-C2',
16: 'YCGCO-R-E',
17: 'YCGCO-R-O'

Is that right?


Yep, that's right, go for it. :)

PoeBear
24th November 2024, 21:25
Is there an option to always match the preview window framing when comparing tabs of the same resolution/frame count? On previous versions, when I would load up two files and switch between them, they would always be aligned. On the current version, I have to drag the preview window multiple times when switching back and forth, as it will constantly reset/drop down when switching

poisondeathray
24th November 2024, 23:49
Is there an option to always match the preview window framing when comparing tabs of the same resolution/frame count? On previous versions, when I would load up two files and switch between them, they would always be aligned. On the current version, I have to drag the preview window multiple times when switching back and forth, as it will constantly reset/drop down when switching

options => program settings => video tab => shared timeline (checkmark) , only on tabs of the same characteristics (checkmark)

PoeBear
25th November 2024, 23:49
Those are both already on. The problem isn't the timeline not being in-sync, it's the preview window changing sizes when switching back and forth. I want to keep them in sync. Eg. Zoom tab 1 to 200%, when I switch to tab 2 it's zoomed to 200%, but the preview window slider is all the way at the bottom and I have to drag it to the top to match. It will also often reset the slider when I switch back and forth, making me resize a few times before it "sticks"

Previous version I was using (v2.7.5.1) didn't experience this, the preview windows were always in sync as far as sizing

gispos
26th November 2024, 19:12
Those are both already on. The problem isn't the timeline not being in-sync, it's the preview window changing sizes when switching back and forth. I want to keep them in sync. Eg. Zoom tab 1 to 200%, when I switch to tab 2 it's zoomed to 200%, but the preview window slider is all the way at the bottom and I have to drag it to the top to match. It will also often reset the slider when I switch back and forth, making me resize a few times before it "sticks"

Previous version I was using (v2.7.5.1) didn't experience this, the preview windows were always in sync as far as sizing
If both videos have the same dimension, nothing should change when switching back and forth.
Only if you have switched on the resample zoom 'Resize single' for a tab at the top right could the video window size change.
Or you have switched on 'Save pos & zoom on tab change' in the tab context menu.

You can also switch on the resample zoom at the bottom right with a double click.
Then there are also 3 options under Video > Additional > Resize video window (Force, Normal, Static) and further settings can be made for the Normal mode
under the program options (Video > 'Video window resize option' and 'Keep window size if zoom fit/fill').

Or you can assign a group for both tabs (Video > 'Groups').

Try:
Program Options Video > 'Keep window size if zoom fit/fill' and under Video > Additional > Resize video window > 'Normal'
And switch off in the video or tab context menu 'Save pos & zoom on tab change'

Edit: Make a double click on the script/video separator, then the bar adapts to the video size

Edit 2:
I think I know what you mean, if you zoom and then change the tab, the new tab still has the previous splitter position, right?

Either in the tab context menu 'Resize video window' set it to 'Force' or 'Static'
or under Program Options > Video > 'Video window resize option (only mode normal)' select either 'Size change' or 'No for both'.

hello_hello
18th December 2024, 16:35
gispos,

I don't know if this is something you're interested in looking at, or able to look at, as I'm running AvsPmod in Wine, but I just upgraded Wine from version 8 to version 9.21, and the only program I have installed that isn't happy about it is AvsPmod. After a bit of experimenting (it was naturally the last thing I thought to try) I discovered it's only an issue when running Wine at a DPI greater than the default of 96 (I'd increased it to 104, which wasn't a problem with Wine version 8) however with version 9 it's upsetting AvsPmod. Here's a screenshot with the DPI in Wine increased to 120. https://i.imgur.com/4ok8PKR.png
The window displays normally when I resize the video to fit in the preview, but it's still fairly unresponsive and the status bar is missing and seems to flash over the top of the video when it's playing.
It's not a huge issue as I can run it at the default DPI and then it works normally, but I thought I'd ask anyway. https://i.imgur.com/haHvl9h.png

Cheers.

gispos
19th December 2024, 03:35
hello_hello,
The image with 120 DPI looks really strange and I don't know what's going wrong.
You wrote that there were no problems with the older Wine version, so it's probably not a general error.

To me it looks like the scaling for a component (possibly the wxNotebook, i.e. the tabs) is not set correctly.

What is displayed when you go to Help > DPI Info? Please post the values.

Make changes under the program options Misc 2 > 'DPI settings' does that have any effect?
For the changes to take effect, AvsPmod must be restarted.

Just to narrow down the problem, download 2.7.2.2 from VideoHelp (https://www.videohelp.com/download/AvsPmod_v2.7.2.2_.Windows_x86-64.zip):
In this version, Windows automatic DPI scaling can be turned off.
Program Options > Misc 2 > 'DPI scaling overall only manually' and 'Disable DPI awareness' check both boxes or play around with them.
To take effect, AvsPmod must be restarted.

Does this help in any way?

Big edit:
I hadn't looked into Wine before and thought it was a virtual environment in which you could install Windows.
But that's not the case, the Windows API calls are translated in real time, then the old version will probably not help to narrow down the problem.
Oh dear, I don't know what the problem could be, sorry.

Wine 10.0-rc2 Released, maybe it helps.

hello_hello
20th December 2024, 14:12
gispos,
I took version 2.7.2.2 out for a spin and checking "Disable DPI awareness" fixed the problem.

With DPI awareness disabled and the DPI setting in Wine increased to 168, "Help/DPI Info" shows 100% for all scaling.
https://i.imgur.com/VwGbCAc.png
With DPI awareness enabled.
https://i.imgur.com/Hz8Lhog.png

I can live with the default DPI setting so I wouldn't go to any trouble. I probably only increased the DPI originally as the text in program menus etc was fairly small, but I've increased the text size where I need to instead now. I probably should have done it that way in the first place. :(
https://i.imgur.com/EP4ZHim.png

As a side note I just discovered MKVToolNixGUI won't work at all in Wine 9.21. It appears in Task Manager but the GUI never displays. Even the unofficial Windows7 build won't run. Not that it matters as I have the native Linux version installed, but if I have any more problems I might revert back to Wine 8 and wait for version 10 to be finalized. All the programs I have installed worked pretty well in Wine 8.

gispos
20th December 2024, 19:28
It looks like something is going wrong with Wine 9xx when translating the API call to SetProcessDpiAwareness.

I don't know how Wine does the DPI scaling.
If the DPI awareness is turned off in AvsPmod under Win10 and you set in Windows the zoom to 125%, the displayed video will also be enlarged.
Does your displayed video image have the correct size if you turn off the awareness ?

hello_hello
20th December 2024, 22:00
Does your displayed video image have the correct size if you turn off the awareness ?

If the DPI setting in Wine is increased it enlarges everything, or are you just referring to the size of the video itself?

This is AvsPmod running with the default DPI of 96 displaying a video at it's native resolution.
https://i.imgur.com/FWe00hc.png
Same again with a DPI of 120 and awareness disabled.
https://i.imgur.com/G3MgX95.png

So yeah, everything gets larger, but the screenshots are the same size as AvsPmod was maximized on the same 4:3 monitor each time. Is that how it should work?

gispos
21st December 2024, 01:54
If the DPI setting in Wine is increased it enlarges everything, or are you just referring to the size of the video itself?

This is AvsPmod running with the default DPI of 96 displaying a video at it's native resolution.
https://i.imgur.com/FWe00hc.png
Same again with a DPI of 120 and awareness disabled.
https://i.imgur.com/G3MgX95.png

So yeah, everything gets larger, but the screenshots are the same size as AvsPmod was maximized on the same 4:3 monitor each time. Is that how it should work?
I'm not sure because the images have different sizes, but to me it looks like it's not correct.
If you are on the right edge of the video image with the mouse pointer, with 100% zoom in AvsPmod and DPI awareness, the correct dimension of the video should always be displayed in the status bar pos=(x, y).
Also for a 1280x720 video 1278 to 1280 depending on whether you are sensitive enough to the right edge.

And if Wine really supports DPI awareness, this should be the case for all programs. The displayed image must always have the same dimensions, only the space around it becomes smaller because the font size increases when you set e.g. 150% DPI zoom.

It is not the same as with a different monitor resolution, with a higher DPI (correctly called PPI) the image becomes smaller, if a zoom is set in Windows only the font and the space required for it should be enlarged, but the video image remains smaller than with a lower monitor PPI.
My English... I hope you understand.

So if 1278 to 1280 are displayed in the status bar under pos=(x, y) for a 1280x720 video, everything is fine.

Edit:
I just googled Wine DPI awareness, they are apparently in the process of improving it. So even in older versions of Wine, this is only poorly implemented.
Whether it will ultimately be like in Windows is not known.

New Pre-Release. (https://drive.google.com/drive/folders/1-2MOIzJ6R3jQOlWh0Fq0x8fbscr_FEcn?usp=drive_link) As in the old version, I have added the option to deactivate DPI awareness under Program Options > Misc 2 (Linux Wine workaround)

gispos
21st December 2024, 16:48
I just looked at your screenshots again. Either I was too tired before or I'm slowly going senile. It seemed to me yesterday (today?) as if the images were displayed in different sizes.
The second image with 120 DPI is from a newer AvsPmod version where you can't turn off DPI awareness. But you wrote that you turned it off. Did you get something mixed up?

Either way, if the values ​​in the status bar pos=(x, y) match the video values, everything is as it should be.

Cheers

hello_hello
22nd December 2024, 12:31
The second image with 120 DPI is from a newer AvsPmod version where you can't turn off DPI awareness. But you wrote that you turned it off. Did you get something mixed up?

How did you determine the second pic is using a newer version?

If you're referring to my last post I'm pretty sure they were both version 2.7.2.2, but if not, the second pic must have been as enabling DPI awareness causes the display issue. So far it only appears to be AvsPmod that isn't happy when changing the DPI in Wine, although I haven't checked every program I have installed.

I tried Wine 10.0-rc2 and it's the same, so I'll be restoring an image of my setup and returning to version 8 (downgrading to version 8 isn't something my package manager wants to co-operate with, and I've turned my setup into a bit of a mess experimenting anyway).

It doesn't affect AvsPmod (I checked) but my other problems were being caused by Microsoft's dot net 4.8. I have one program that doesn't work properly with Mono but it does with dot net, another one that works with mono but not with dot net installed, and dot net 4.8 is mysteriously preventing MKVToolNix from running. None of those problems existed for Wine version 8 and may not exist at all in a 32 bit Wine prefix, but I'd prefer to stick with 64 bit. Worst case scenario I could create two 64 bit Wine prefixes and install dot net in one but not the other. Fun and games.....

Thanks for the new pre-release. I give it a try soon.

gispos
22nd December 2024, 14:25
How did you determine the second pic is using a newer version?
...So far it only appears to be AvsPmod that isn't happy when changing the DPI in Wine,
...Fun and games.....
You are right, I was wrong. The newer version has the blue number sign # on the selected tab

Good luck on your adventure. :)

StvG
22nd December 2024, 17:52
* The selected tab shows now an image with blue sign #

How can I get the old behavior (I do want the tab number instead #)?

gispos
22nd December 2024, 22:33
* The selected tab shows now an image with blue sign #

How can I get the old behavior (I do want the tab number instead #)?
No matter how you do it, you do it wrong.:D
It took me a long time to highlight the current tab so that you can see it better... I thought it wouldn't be a problem without a number because the numbers are on the right and left of it.

So there's another option for this too... coming soon.

StvG
23rd December 2024, 11:23
No matter how you do it, you do it wrong.:D
It took me a long time to highlight the current tab so that you can see it better... I thought it wouldn't be a problem without a number because the numbers are on the right and left of it.

So there's another option for this too... coming soon.

I'm using and switching between the tabs a lot (probably 90%-95% of the time). I used to look at the current tab to see the number so I can switch the tabs.
If it would take time or it would be some headache, you shouldn't bother with this.

In every case, thanks for the updates. Happy Holidays.

gispos
23rd December 2024, 13:34
AvsPmod 2.7.8.9 (https://github.com/gispos/AvsPmod/releases)

* Transfer and matrix names added, thanks to FranceBB.
* Added Program Options > Misc 2 > 'Disable DPI awareness*'. Workaround for Linux Wine incompatible Windows DPI awareness.
- if you use higher DPI values in Wine and display errors occur, this option must be set.
* Added an option to deactivate the highlighting of the current tab with a blue number sign (Program Options > Misc > 'Highlight the current tab #').
* Bugfix: if raw frame data was read for PNG 16 bit or for macro pipe functions with yuv4mpeg2 header.
* Bugfix: an 'UpdateTabImages' error could appear.
* Some other small fixes


I'm using and switching between the tabs a lot (probably 90%-95% of the time). I used to look at the current tab to see the number so I can switch the tabs.
I can understand that. I only use it very rarely because I usually have around 100 tabs loaded. I have it set to On by default, so you have to turn it Off.

Happy holidays to everyone.

FranceBB
24th December 2024, 12:46
Yaaaaay, thank you for the new version Gispos. Merry Christmas! :D


I usually have around 100 tabs loaded.

Same, the workstation at work probably has too many of them, but I just like to have them all at hand, what can I say ehehehehhe

FranceBB
1st February 2025, 21:09
Hey Gispos, out of curiosity, when I have a picture that is larger than the screen and my zoom is set at 100% it shows in its native resolution and I can move through it and that's fine, but what I'm wondering is whether not having the bar down is expected or not.
Let me rephrase: in the older versions there used to be a bar that I could use to move up and down, left and right, however in 2.7.8.9 it disappeared.
Obviously I can still hold the picture by left clicking on it with the mouse and move across it, which is fine, but the "resize" bar is gone. Was that an intentional change?

https://i.imgur.com/9oNVU7P.png

gispos
2nd February 2025, 18:28
Obviously I can still hold the picture by left clicking on it with the mouse and move across it, which is fine, but the "resize" bar is gone. Was that an intentional change?

I think you mean the scrollbars of the video window, it's possible that I set the scrollbars as standard to off. I can't remember.

Simply deactivate it under Options > 'Hide video window scrollbars'.

FranceBB
6th February 2025, 19:27
Ah yeah, they were turned on by default, gotcha.
They're back now. Yay. :D

https://i.imgur.com/u9ZzRlq.png

In case anyone is actually interested in the picture, I was making some tests by downscaling by 4 times the input source and upscaling it back to the original resolution using the various resizing methods. Here's the actual comparison in case you were wondering:
https://i.imgur.com/cbBjukV.png


"Immagine Originale" means "Original Picture" in Italian.

jpsdr
7th February 2025, 18:27
What are SRGAN & ESRGAN ?
Where can this plugins be found ?

DTL
7th February 2025, 23:29
Some info may be https://forum.doom9.org/showthread.php?t=184386

May we need to update QTGMC deinterlace script with SRGAN and ESRGAN fields upsamplers instead of NNEDI ? Though they may be much more slower (and also require very fast GPUs to work ?).

real.finder
8th February 2025, 02:26
What are SRGAN & ESRGAN ?
Where can this plugins be found ?

IIRC you can use them with https://forum.doom9.org/showthread.php?t=184768

but they not stable as nnedi3 and so slow

edit: also see this https://forum.doom9.org/showpost.php?p=1987581&postcount=70 and https://forum.doom9.org/showpost.php?p=1886035&postcount=6

gispos
8th February 2025, 08:16
AvsPmod 2.7.9.0 ( deleted ) not clean

Emulgator
8th February 2025, 11:34
Thank you gispos ! 2.7.9.0 x64 delivers frames again, from AviSynth64 r4176 and AviSynth64 r4177.

gispos
8th February 2025, 11:59
Thank you gispos ! 2.7.9.0 x64 delivers frames again, from AviSynth64 r4176 and AviSynth64 r4177.
Nice :) Thank you for the feedback.

FranceBB
9th February 2025, 02:11
What are SRGAN & ESRGAN ?
Where can this plugins be found ?

They're not plugins, they're Generic Adversarial Network models exported as onnx. You can use them via mlrt like

mlrt_ort(network_path="ESRGAN.onnx", builtin=false)

The simple function I made to test the various resizing methods is very simple:


function my_upscale_test(clip clp, int downscale_factor) {

source=ConvertToPlanarRGB(clp).ConvertBits(32)
first_image=source.Subtitle("Immagine Originale")

my_width=source.Width()
my_height=source.Height()

SinPowerResize(source, my_width/downscale_factor, my_height/downscale_factor)

point=PointResize(my_width, my_height).Subtitle("Point")
bilinear=BilinearResize(my_width, my_height).Subtitle("Bilinear")
bicubic=BicubicResize(my_width, my_height).Subtitle("Bicubic")
gauss=GaussResize(my_width, my_height).Subtitle("Gauss")
sinc=SincResize(my_width, my_height).Subtitle("Sinc")
lanczos=LanczosResize(my_width, my_height).Subtitle("Lanczos")
blackman=BlackmanResize(my_width, my_height).Subtitle("Blackman")
spline=Spline64Resize(my_width, my_height).Subtitle("Spline64")
nnedi=nnedi3_rpow2(cshift="Spline64ResizeMT", rfactor=downscale_factor, fwidth=my_width, fheight=my_height, nsize=3, nns=4, qual=2, etype=0, pscrn=0).Subtitle("NNEDI")
srgan=mlrt_ort(network_path="O:\SRGAN.onnx", builtin=false).Subtitle("SRGAN")
esrgan=mlrt_ort(network_path="O:\ESRGAN.onnx", builtin=false).Subtitle("ESRGAN")

row1=StackHorizontal(first_image, point, bilinear, bicubic, gauss, sinc)
row2=StackHorizontal(lanczos, blackman, spline, nnedi, srgan, esrgan)

StackVertical(row1, row2)

return last

}



Beware that GAN are subject to hallucination. The problem with the normal resizers is that they lack high frequency details as they're just really using different interpolation methods of existing pixels which leads to flat uniform areas, especially when upscaling by a large factor. The use of GANs (Generative Adversarial Networks) can overcome this problem as the images are created synthetically by mapping points from the latent space according to the similarities with the training dataset and the input. In the Generative Adversarial Network you have a Generator and a Discriminator, essentially two networks fighting against each other in a zero sum game (i.e the gain of one are the loss of the other and vice versa). The Generator is supposed to generate the images synthetically to fool the Discriminator while the Discriminator is trained to detect whether the images are real or not (there's literally a sigmoid at the end that is used to output either 0 or 1). In real life, the network is the generator and the human being is the discriminator: the idea here is not to get the output right but rather to get it "good enough" to fool a human viewer (discriminator). I actually very recently published a 169 pages academic paper in which I went through the various classic resizing methods in details, their peculiarities and their issues, how solving those led to the creation of the first neural networks like the one you support and keep alive (i.e NNEDI) and how the lack of high frequency details led to a change of direction and the use of GAN with SRGAN and ESRGAN. I talked about how the team who created those in the past trained them, the problems they addressed in ESRGAN like avoiding batch normalization which caused issues with artifacts coming and going during the training epochs (like if you train the network with only pictures of the sky then you get parts of the sky where it shouldn't be and although this is a rather extreme case, it shows how it can cause issues if the input dataset isn't "generic enough"), the activation problem, the use of LeakyReLU to compensate for the dead neurons, the residual in residual blocks and I even went as far as experimenting with a retraining of ESRGAN using freshly new available datasets publicly available on the web but retaining a similar method to the original authors (4x downscale with SinPowerResize, 4x upscale and SSIM/PSNR comparison using an NVIDIA Quadro P4000 for ~ 11 months). For anyone interested, it's here Link (https://view.publitas.com/p222-8308/francesco-bucciantini-utilizzo-dei-gan-nellupscale-delle-immagini-fisse-ed-in-movimento-2024-edition/) (the GAN part starts at page 44), however beware that like all my other publications, it's for an Italian university and therefore is in Italian. Anyway, aside from the hallucinations, the biggest problem is when those models cannot find the references which, unlike still pictures, occurs quite commonly with videos for one simple reason: motion blur. Don't get me wrong, when it works, it works spectacularly, but when it fails, the results are terrible (and I mean really terrible).

Screenshots from the video examples (the more it has motion blurs, the worse it gets):

Example 1 (https://i.imgur.com/IL25DJ6.jpeg) - Example 2 (https://i.imgur.com/BPlanzu.jpeg)
- Example 3 (https://i.imgur.com/poWtyCL.jpeg)

As for still images, one of the results that surprised me is the one with grayscale pictures. Obviously they're all in RGB so it's not like in YUV in which you have a separate luma and chroma components (and it's easy to see that the chroma is empty), but rather each component contributes to the creation of the whole image and when I retrained ESRGAN, it introduced fake chroma in the black and white input when it generated the output 'cause the pictures it has been re-trained with also contained real old scanned photos which had a yellowish/amber component and it thought that they were the closest match when it mapped the points:

https://i.imgur.com/XRsIKxe.png

in fact it literally "invented" chroma:

https://i.imgur.com/JKZgT3s.png

DTL
9th February 2025, 07:46
"4x downscale with SinPowerResize"

It may be somehow outdated and not best way of downsize because it still uses dual-1D resampler instead of more 'natural' 2D (as we have in real physical optics like eye or shooting camera lens). The 2D resamplers expected to make better results. Also some users report usage of ewa-lanczos (or ewa-jinc) from avs_libplacebo make good results for very high compression ratio MPEG encodings (though SinPow or UserDefined2 kernels may with currently available dual-1D resamplers are not tested (?)). Some quick working 2D downsample plugin with 'conditioning' kernels like SinPow or UserDefined2 may be created for AVS using 2D resampler from JincResize plugin but I still waiting if AVS developers can add 2D resampling engine to AVS core so we can adapt any existing kernel to this resampler too (sort of 2D-bilinear - 2D-bicubic - 2D-Sinc(Jinc) - 2D-Gauss and 2D-SinPow (JincPow ?) and 2D-UserDefined2 ).

Also in your work you use old SincResize from AVS core and it is known as not very perfect in computing in 8 bit and very short kernels (create additional distortions if taps <~80 for 8bit computing). Better use SincLin2Resize (taps >8..10) or simple LanczosResize with big enough taps value (taps >20). They are not suffer from computing issues at the edges of very truncated sinc kernel.

jpsdr
9th February 2025, 12:28
@FranceBB
Thanks for the big explaination.
Finaly for now it's somehow an "all or nothing" situation, and not usable on video.
I'll stay for now with NNEDI3 for video if needed (cases for me very few and will even be fewer...).

real.finder
9th February 2025, 15:52
Finaly for now it's somehow an "all or nothing" situation, and not usable on video.
I'll stay for now with NNEDI3 for video if needed (cases for me very few and will even be fewer...).

well, as I said before https://forum.doom9.org/showpost.php?p=1974989&postcount=14

nnedi3 will be great if there is nnsharpen (https://web.archive.org/web/20140412064950/http://bengal.missouri.edu/~kes25c/nnedi4/) (which didn't see the light of the day)

maybe some smart guy can make something similar, who knows

FranceBB
10th February 2025, 09:53
AVSPmod mod 2.7.9.0 seems to be behaving ok-ish (as in "it no longer crashes when trying to display frames") with both Windows XP Professional x86 and Windows 10 Enterprise x64, running Avisynth 3.7.4 r4178.
More extensive tests is needed anyway, but I'll let you know if I'm gonna face any hiccups through the day.

"4x downscale with SinPowerResize"

It may be somehow outdated and not best way of downsize because it still uses dual-1D resampler instead of more 'natural' 2D (as we have in real physical optics like eye or shooting camera lens). The 2D resamplers expected to make better results.

Yes, that's true, however between the internal Avisynth resizers it was the one that achieved the best results when it came to downscaling.

https://i.imgur.com/QcJQ1R3.png

Not only it kept all the details in the fur, but there are also high frequency details in both the grain of sands and the rocks in the front which got completely flattened out in other resizers like GaussResize().
That's not an outlier, the results are pretty much the same in all tests:

https://i.imgur.com/7rXrlt0.png



Also in your work you use old SincResize from AVS core and it is known as not very perfect in computing in 8 bit and very short kernels (create additional distortions if taps <~80 for 8bit computing).

Well, the calculations were made in high bit depth RGB with 32bit precision, but yeah the point about SincResize() is still valid but it helped showing the problems with overshooting in natural images. I basically used it to show that it was able to preserve the diagonal component (after all it is a Fourier Zero Padding) and that it wasn't subject to staircase artifacts but that it had ripples scattered all over the picture as sinc(x) decays very slowly at the speed of 1/x so the "damage" that we face when we hit an edge (boundary) is spread all over the picture. Although it's possible to see it in natural images as well, I used a synthetic one to make it obvious:

https://i.imgur.com/7ujGZbK.png

and then I moved on showing how it could be approximated with a compact function and introduced the windowed sincs the likes of LanczosResize() and BlackmanResize().

https://i.imgur.com/ncBQOPr.png

That's LanczosResize() by the way.

I'll stay for now with NNEDI3 for video if needed

Yes, I also suggest staying on NNEDI3. While many people's view on the GANs is projected towards the future and with a great hype in mind, mine was pretty much down to earth and very realistic. Currently, the fact that they don't output a deterministic result that can be predicted in all scenarios and the fact that they might introduce details that are not there make their usage in professional settings unfeasible. I'm sure that - with enough optimization - they might find some use in real time applications on consumer devices in the future, but we're not even there yet. As for my use-case, which is remastering and archival, I'm also gonna stick with NNEDI3 whose output is actually solid.

https://i.imgur.com/7FvGfID.png

This is the Avisynth Remaster workflow taking in input v210 lossless 720x576 25i (TFF or BFF) BT601 SDR video + PCM 24bit 48000Hz lossless audio, muxed in an AVI container. The workflow indexes the contents, checks the field parity to see whether they're TFF, BFF or progressive, bobs them to 50p if they're interlaced via QTGMC() or just leaves them as 25fps if they're not, then it separates the audio tracks into discrete mono and checks the name of the file (i.e TG24_ or SPORT_ or PCE_ to see whether it's News, Sport or Promo/Cinema/Entertainment). This is important to know which kind of filtering to apply (for instance Sport is spatial only as temporal filters are prone to create artifacts with small fast moving objects like tennis balls, hokey disks etc). Then it checks if there's 4x3 or 16x9 in the name 'cause analog supports don't have an AR flag so the workflow couldn't possibly know (and it relies on a human naming it correctly at acquisition time), at that point it brings everything to 16bit, applies a series of filtering according to the genre and whether it can go temporal or only spatial, but essentially it's a combination of MDegrain3(), dfttest(), z_ConvertFormat(), eventual AddBorders(), nnedi3_rpow2(), Limiter() and if it needs to separate in fields again it does that to get 25i TFF. The final output is an XDCAM-50 file, so

Video: FULL HD 1920x1080 MPEG-2 High 4:2:2 Profile, Level High 50 Mbit/s yv16 25i TFF BT709 SDR

Audio: 8 Mono 1ch PCM 24bit 48000Hz tracks

Container: mxf


Obviously I would never dream to use GANs on such a workflow.

wonkey_monkey
10th February 2025, 11:14
and that it wasn't subject to staircase artifacts

Arguably those are not artifacts if the original image shows a staircase.

DTL
10th February 2025, 19:15
" the calculations were made in high bit depth RGB with 32bit precision,"

I think this computing issue does not depend on computing bit depth and will be visible in 8 bit after converting to 8 bit. I think the amplitude of edge-kernel distortion is simply above +-1 LSB of 8 bit so it is visible in 8 bit output. But if you calculate all in 32bit float it may still degrade your PSNR and other metrics.

So SincResize is perfect for perfectly conditioned (for 1D upscale) sources but only in the 'ideal' computing case (when you use large enough taps value and end of kernel can fade enough for current precision). But AVS implementation of SincResize with too low default taps value causes additional distortions. They are not very visible in natural home processing but if you use it as a processing tool for science research it may make some more diffrence between SincResize and LanczosResize.

The distortion at the end of the kernel is not simple sinc ringing - it looks more different. It is > 1 LSB error at the end of the kernel and located at 'taps' distance from some image level transient. So it is expected to cause PSNR metric degradation from possible better value.

You may repeat some of your tests with PSNR metric using SincResize() default taps number and some high value (like 100 or 150 - I do not remember current AVS limit but it is > 100 I think). And to see if the PSNR metric will be different.

Test example - for input bitmap https://drive.google.com/file/d/1wIXN-8zZSmflrvxNnBra1dtw7h7fkoTm/view?usp=sharing

ImageReader("1point_27_132.bmp")

AddBorders(50,50,50,50)

std=SincResize(width*4, height*4).Crop(400,400,-400,-400)
lk=SincResize(width*4, height*4, taps=100).Crop(400,400,-400,-400)

StackHorizontal(std.Subtitle("SincResize(x4)"), lk.Subtitle("SincResize(x4, taps=100)"))


Result (400%) https://ibb.co/LzxDLLDQ . taps=20 also not save 8bit from distortion only make lower (and at larger distance) https://ibb.co/QvY6MYxm . And when you compute PSNR vs clean input source these 'ghosts' cause additional PSNR metric degradation.

Attempt to make processing in 32bits floats do not helps too :

ImageReader("1point_27_132.bmp")

AddBorders(50,50,50,50)

ConvertToPlanarRGB()

ConvertBits(32)

std=SincResize(width*4, height*4).Crop(400,400,-400,-400)
lk=SincResize(width*4, height*4, taps=20).Crop(400,400,-400,-400)

StackHorizontal(std.Subtitle("SincResize(x4)"), lk.Subtitle("SincResize(x4, taps=20)"))

ConvertBits(8)
ConvertToRGB24()



So LanczosResize with taps > 30..50 of SincLin2Resize taps > 20 emulates SincResize with taps around 10 without such distortions.

gispos
11th February 2025, 14:53
AvsPmod has been running for years with more or less problems, but since the new Avisynth API 11 there are very strange errors that I don't want to deal with.
If the script is loaded in a similar way to VDub2 everything works smoothly, but if the C interface is used there are problems, but AvsPmod is dependent on the C interface.

The 2.7.9.0 was just a quick temporary solution to be able to use the API 11 versions. However, I will delete it again because the code is not clean and it should not be used.

I am on Avisynth r4096 and AvsPmod 2.7.8.9 and will stay with it and slowly phase out all AvsPmod programming vor now.
I have reached a point where I don't want to continue yet.

pinterf
12th February 2025, 09:06
AvsPmod has been running for years with more or less problems, but since the new Avisynth API 11 there are very strange errors that I don't want to deal with.
If the script is loaded in a similar way to VDub2 everything works smoothly, but if the C interface is used there are problems, but AvsPmod is dependent on the C interface.

The 2.7.9.0 was just a quick temporary solution to be able to use the API 11 versions. However, I will delete it again because the code is not clean and it should not be used.

I am on Avisynth r4096 and AvsPmod 2.7.8.9 and will stay with it and slowly phase out all AvsPmod programming vor now.
I have reached a point where I don't want to continue yet.
I need your advice.

I've been working on this topic for the past few days because the applied solution should have worked (I added two more conditionals in the Avs value release section - values must be released - except the array itself), but it didn't. I got frustrated because I tested it with an older version of Avisynth, and even the original lines didn't work. I encountered the same problem: not all clips were released. Today, I tried running the plain run.py without the .EXE compilation, and it worked. I switched back to my new AVSValue release lines with the new Avisynth, and it worked!

My version of the release. Everything, except the array itself.
def release(self):
if self.is_array():
for index in range(self.array_size()):
element = avs.avs_array_elt_w(self.cdata, index)
if not avs.avs_is_array_w(element): # Only release non-array elements
avs.avs_release_value_w(element)
else:
avs.avs_release_value_w(self.cdata)
if self.is_defined():
self.set_void()


Have you experienced issues where some versions of the Python 2.7 to .exe utility might be buggy and should be avoided? Or script related? The script contains a check whether it is run from script or within a packed .exe. EDIT: I have 0.6.9.

gispos
12th February 2025, 19:38
I need your advice.

I've been working on this topic for the past few days because the applied solution should have worked (I added two more conditionals in the Avs value release section - values must be released - except the array itself), but it didn't. I got frustrated because I tested it with an older version of Avisynth, and even the original lines didn't work. I encountered the same problem: not all clips were released. Today, I tried running the plain run.py without the .EXE compilation, and it worked. I switched back to my new AVSValue release lines with the new Avisynth, and it worked!

My version of the release. Everything, except the array itself.
def release(self):
if self.is_array():
for index in range(self.array_size()):
element = avs.avs_array_elt_w(self.cdata, index)
if not avs.avs_is_array_w(element): # Only release non-array elements
avs.avs_release_value_w(element)
else:
avs.avs_release_value_w(self.cdata)
if self.is_defined():
self.set_void()


Have you experienced issues where some versions of the Python 2.7 to .exe utility might be buggy and should be avoided? Or script related? The script contains a check whether it is run from script or within a packed .exe. EDIT: I have 0.6.9.

You can stop any further efforts.
I have just created a version that works with r4178.

And that is now very very embarrassing!
When I saw your change in 'release' in your posting, I already thought that the old code without 'else' is a stupid bug.

But I didn't think that this could lead to the result.
BUT IT DOES !

I never changed anything there and the stupid bug has probably existed since AvsP exists and only became a real problem with API 11.

I did a lot of tests and deleted almost every function that wasn't needed until I finally had enough and gave up.

4 eyes see more than 2

Thank you for your support!

gispos
12th February 2025, 21:00
AvsPmod 2.7.9.2 (https://github.com/gispos/AvsPmod/releases/tag/2.7.9.2)

* Fixed Version that is now working with newer Aviynth API 11 Versions. RIFE should also no longer cause any problems.
The thanks go to pinterf.

Emulgator
12th February 2025, 21:26
Congrats, you two, and many thanks for the effort !
Soon testing...
Yes, AvsPmod64 2.7.9.2 can handle AviSynth64+ r4066 and r4178 nicely, releasing works, no stalls on my few attempts.

Still AviSynth64+ r4178 crashes if I call RIFE instances within Scriptclip while r4066 performs nicely.
Will test further with which Avs+ version the regression came in and notice pinterf.
AviSynth64+ r4066: 1 RIFE instance within Scriptclip: ok.
AviSynth64+ r4073: 1 RIFE instance within Scriptclip: ok. Seems last good for me now.
AviSynth64+ r4096 Clang: 1 RIFE instance within Scriptclip: ok, but slower.
AviSynth64+ r4173: 1 RIFE instance within Scriptclip: F5-loading in AvsPmod 2.7.9.2:
1st frame loaded, when press Play: stuck for 5..10 seconds, then AvsPmod aborts.

AviSynth64+ r4177: 1 RIFE instance within Scriptclip: F5-loading in AvsPmod 2.7.9.2: 1st frame 0 gets loaded.
When I press Play: I hear the first audio blip for that frame 0, then frame 0 is shown stuck for 5..6 seconds, no audio.
After these 5 seconds I hear the same audio blip of frame 0 a second time, then AvsPmod aborts.

AviSynth64+ r4178: 1 RIFE instance within Scriptclip: F5-loading in AvsPmod 2.7.9.2: 1st frame 0 gets loaded.
When I press Play: I hear the first audio blip for that frame 0, then frame 0 is shown stuck for 5..6 seconds, no audio.
After these 5 seconds I hear the same audio blip of frame 0 a second time, then AvsPmod aborts.

pinterf
13th February 2025, 08:31
AvsPmod 2.7.9.2 (https://github.com/gispos/AvsPmod/releases/tag/2.7.9.2)

* Fixed Version that is now working with newer Aviynth API 11 Versions. RIFE should also no longer cause any problems.
The thanks go to pinterf.

Long live AvsPMod!

pinterf
13th February 2025, 08:36
Congrats, you two, and many thanks for the effort !
Soon testing...
Yes, AvsPmod64 2.7.9.2 can handle AviSynth64+ r4066 and r4178 nicely, releasing works, no stalls on my few attempts.

Still AviSynth64+ r4178 crashes if I call RIFE instances within Scriptclip while r4066 performs nicely.
...
Thanks! Since this isn't quantum mechanics, there must be a core reason that's most probably not specific to AvsPMod. I'll get it resolved sooner or later.

gispos
13th February 2025, 22:12
AvsPmod 2.7.9.3 (https://github.com/gispos/AvsPmod/releases)

Additional updates for Avisynth API 11




AviSynth64+ r4178: 1 RIFE instance within Scriptclip: F5-loading in AvsPmod 2.7.9.2: 1st frame 0 gets loaded.
When I press Play: I hear the first audio blip for that frame 0, then frame 0 is shown stuck for 5..6 seconds, no audio.
After these 5 seconds I hear the same audio blip of frame 0 a second time, then AvsPmod aborts.
[/SIZE]
It hangs in the playback?
I have tested RIFEwrap and normal RIFE with playback, and it runs smoothly for me.

You using another ScriptClip in addition to the RIFEwrap ScriptClip or do you use RIFE in ScriptClip direct?
Here is a short video in 7z of my test with RIFE.

https://drive.google.com/file/d/1uhyPgRpzZnF3RYo3WNIedhoUhaNfv-Oz/view?usp=sharing

Emulgator
14th February 2025, 12:46
gispos, many thanks ! All is/was solved, already in your version 2.7.9.2.
It was a regression within AviSynth+. Ferenc found it and built AviSynth+ r4182.
https://forum.doom9.org/showthread.php?p=2014712#post2014712
Yesterday I started a "mean stacked script", fed this to Topaz 2.6.4 and just in this very minute it finished sucessfully.
Do you accept donations ?

gispos
14th February 2025, 16:25
gispos, many thanks ! All is/was solved, already in your version 2.7.9.2.
It was a regression within AviSynth+. Ferenc found it and built AviSynth+ r4182.
Ferenc is once again working at full capacity. Thanks again from my side :thanks:

Do you accept donations ?
No, never ask that again.

tormento
15th February 2025, 14:18
Also in your work you use old SincResize from AVS core and it is known as not very perfect in computing in 8 bit and very short kernels (create additional distortions if taps <~80 for 8bit computing). Better use SincLin2Resize (taps >8..10) or simple LanczosResize with big enough taps value (taps >20). They are not suffer from computing issues at the edges of very truncated sinc kernel.
You wrote SincResize but actually FranceBB wrote Sin not Sinc and they are two different beasts.

Emulgator
26th February 2025, 11:18
Hi gispos ! While I am digging into python incompatibilites against older systems (XP SSE, XP SSE-2)
it may be helpful if you could upload some builds of your missing AvsPmod Versions from back in 2018 (if still available at all):

Version 2.5.1.12 [2018-09-29] GPo
Version 2.5.1.14 [2018-11-06] GPo
Version 2.5.1.15 [2018-11-17] GPo
Version 2.5.1.16 [2018-12-08] GPo
Version 2.6.0.1 [2019-01-04] GPo

first non-starter under these vintage conditions so far is Version 2.6.0.2 [2019-01-07] GPo, Python fault (2.7.15150.1013)
(non-starter under GERICOM M6T WinXP32ProSP3 Tualatin 1,2GHz MMX,SSE 512MB)
(non-starter under Toshiba Satellite 5200-801 WinXP32ProSP3 P4m-2000 2,0GHz MMX,SSE-2, TM1 1GB)

mixed under these vintage conditions: Version 2.5.1-452 [2015-08-09] Python 2.7.10150.1013
(non-starter under GERICOM M6T WinXP32ProSP3 Tualatin 1,2GHz MMX,SSE 512MB)
(starts under Toshiba Satellite 5200-801 WinXP32ProSP3 P4m-2000 2,0GHz MMX,SSE-2, TM1 1GB)

last good under these vintage conditions seems to be Version 2.5.1-90 [2017-03-24] Python 2.7.13150.1013
(starts under GERICOM M6T WinXP32ProSP3 Tualatin 1,2GHz MMX,SSE 512MB)
(starts under Toshiba Satellite 5200-801 WinXP32ProSP3 P4m-2000 2,0GHz MMX,SSE-2, TM1 1GB)

Many thanks in advance !

gispos
26th February 2025, 14:40
Hi gispos ! While I am digging into python incompatibilites against older systems (XP SSE, XP SSE-2)
it may be helpful if you could upload some builds of your missing AvsPmod Versions from back in 2018 (if still available at all):

Version 2.5.1.12 [2018-09-29] GPo
Version 2.5.1.14 [2018-11-06] GPo
Version 2.5.1.15 [2018-11-17] GPo
Version 2.5.1.16 [2018-12-08] GPo
Version 2.6.0.1 [2019-01-04] GPo

first non-starter under these vintage conditions so far is Version 2.6.0.2 [2019-01-07] GPo
(non-starter under GERICOM M6T WinXP32ProSP3 Tualatin 1,2GHz MMX,SSE 512MB) Python fault (2.7.15150.1013)
(non-starter under Toshiba Satellite 5200-801 WinXP32ProSP3 P4m-2000 2,0GHz MMX,SSE-2, TM1 1GB) Python 2.7.10150.1013

mixed under these vintage conditions: Version 2.5.1-452 [2015-08-09]
(non-starter under GERICOM M6T WinXP32ProSP3 Tualatin 1,2GHz MMX,SSE 512MB) Python 2.7.10150.1013
(starts under Toshiba Satellite 5200-801 WinXP32ProSP3 P4m-2000 2,0GHz MMX,SSE-2, TM1 1GB) Python 2.7.10150.1013

last good under these vintage conditions seems to be Version 2.5.1-90 [2017-03-24]
(starts under GERICOM M6T WinXP32ProSP3 Tualatin 1,2GHz MMX,SSE 512MB) Python 2.7.13150.1013
(starts under Toshiba Satellite 5200-801 WinXP32ProSP3 P4m-2000 2,0GHz MMX,SSE-2, TM1 1GB) Python 2.7.10150.1013

Many thanks in advance !
Oh dear,
the oldest version on my PC is 2.7.4.0 and on VideoHelp (https://www.videohelp.com/software/AvsP) under older versions 2.6.1.1
And there is still a 2.6.0.6 on Github (https://github.com/gispos/AvsPmod/releases?page=16).

I'm sorry, but I can't help you with that.

Emulgator
26th February 2025, 15:07
No problem at all. This was rather academic, and geared toward python.
I may as well be moving python around and see where it fits.

gispos
1st March 2025, 15:43
AvsPmod 2.7.9.4 (https://github.com/gispos/AvsPmod/releases)

* Further changes for the avisynth API 11:
- e.g. if AvsPmod was terminated and the memory was exceeded (to many scripts opened), it could happen that AvsPmod did not terminate.
- for API 10 and before a Destroy() call was sufficient which could lead to problems with API 11

FranceBB
1st March 2025, 17:09
Thank you Gispos!
About the avspmod mod and Windows XP incompatibility that Emulgator is mentioning, I think it has more to do with the lack of newer instruction sets than anything else.
In particular, even the latest version, 2.7.9.4 x86 seems to work just fine on Windows XP Professional x86:

https://i.imgur.com/ONTfcXP.png

The reason why I used "Info()" instead of just Version() is that I wanted to show the instruction sets.
As you can see, I'm running XP on a fairly "modern" CPU ("modern" as in "per XP times" of course) which has up to SSE4.2, in fact Avisynth is reporting:

MMX, ISSE, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, F16C

however in your case you're limited to up to SSE2 with the Pentium 4.
I'm pretty sure that the reason why it's not running is the lack of instruction sets for some commands.
There's also nothing wrong in Dependency Walker:
https://i.imgur.com/k3bv4US.png

gispos
1st March 2025, 20:15
I think Emulgator suspects that the Python version is the problem because previous AvsPmod versions seem to be able to run under the old hardware/software.
It may be possible, I had changed Python and especially the wxPython version at some point because there were problems with UTF-8/Unicode, especially with wxPython.

Emulgator
2nd March 2025, 00:36
Nothing to be concerned about recent AviSynth+ and recent AvsPmod, sorry for any disturbances !

Indeed I was doing a post-mortem for academic reasons, meaning to find about python/runtime dependencies,
seeing some development parallels (KiCAD 5 to 6, then to 7)
where a silent python upgrade had lead to incompatibilities, so KiCAD 6 would no longer run under Win7:
"Das Programm kann nicht gestartet werden, da api-ms-win-core-path-l1-1-0.dll auf dem Computer fehlt..."
The reason: KiCAD builds on python, developers updated python silently, and python 3.9.2 had dropped Win7 support.
A good soul built a special compile, and who was able to find his "api-ms-win-core-path-blender-0.3.1.zip",
unpacked and inserted api-ms-win-core-path-l1-1.0.dll had a running KiCAD 6 on Win7.
Until KiCAD 7 broke Win7 support completely.

And I am not asking to build especially for that vintage case.
This is only for maintaining some sahara-stable backwards-compatible emergency systems,
with basic but safe and frozen office, design, audio, video capabilities.
I may swap in runtimes and pythons into these older systems and see which combo holds up.

FranceBB
2nd March 2025, 18:20
By the way Gispos, I almost forgot about this, but when you have a tiny bit of free time, do you mind clicking "merge" here (don't worry I resolved all conflicts a long time ago)? https://github.com/gispos/AvsPmod/pull/14
I know that you've added those a long time ago (and actually "thank you" for that :) ) but unfortunately the way GitHub works unless you click "merge" (you are the only one who can do it as the owner of that repository) it will stay there, pending, for the eternity and beyond xD

pinterf
3rd March 2025, 08:20
AvsPmod 2.7.9.4 (https://github.com/gispos/AvsPmod/releases)

* Further changes for the avisynth API 11:
- e.g. if AvsPmod was terminated and the memory was exceeded (to many scripts opened), it could happen that AvsPmod did not terminate.
- for API 10 and before a Destroy() call was sufficient which could lead to problems with API 11

It's strange because, from AvsPmod's perspective, the only relevant behavior change was the infamous "don't call release on the array itself." Anyway, when memory is exceeded, anything can happen; even Schrödinger's cat may or may not have successful encoding session. :)

gispos
3rd March 2025, 15:07
By the way Gispos, I almost forgot about this, but when you have a tiny bit of free time, do you mind clicking "merge" here (don't worry I resolved all conflicts a long time ago)? https://github.com/gispos/AvsPmod/pull/14
I know that you've added those a long time ago (and actually "thank you" for that :) ) but unfortunately the way GitHub works unless you click "merge" (you are the only one who can do it as the owner of that repository) it will stay there, pending, for the eternity and beyond xD
"Pull request successfully merged and closed"
"You're all set — the branch has been merged."

I hope Github calms down now.:)

It's strange because, from AvsPmod's perspective, the only relevant behavior change was the infamous "don't call release on the array itself." Anyway, when memory is exceeded, anything can happen; even Schrödinger's cat may or may not have successful encoding session. :)
I was surprised by that too, but when the program ends, each script must be released individually in a loop, then there are no problems.
With a simple Destroy(), Python is probably not acting in the spirit of the new Avisynth diva. ;)

StvG
6th April 2025, 15:44
Feature request: option to see avs stdout and stderr messages.

gispos
8th April 2025, 15:04
Feature request: option to see avs stdout and stderr messages.
I don't have time at the moment, I'm in the middle of moving house.
I also don't know how to get the stdout, as far as I know the dll has to be loaded into a process?

StvG
9th April 2025, 15:55
I also don't know how to get the stdout, as far as I know the dll has to be loaded into a process?

If catching stdout/stderr/both is enabled, you have to set up stdout/stderr/both redirection before calling the avs.

Similar to cmd redirection (in this example redirection to file):
call_app > log.txt.

tormento
22nd May 2025, 18:12
How can I have the same video on two tabs but with different zoom values?

When I change the zoom in one tab, the other changes too.

I've found the setting to decouple just the timeline but nothing about zoom/position.

Raizo
8th July 2025, 13:55
Hi :)

Using x264.exe via CLI works only up to version x264-r3173-4815cca.exe (14-Jan-2024). With newer versions, the encoding doesn't start at all. Is anyone else experiencing this?

https://artifacts.videolan.org/x264/release-win64/

LigH
8th July 2025, 15:18
Is there possibly a change in the command line syntax around that time?

I rather doubt for x264; it has happened for x265 sometimes, though.

Raizo
8th July 2025, 16:40
I believe I found the cause: AVSPmod's default output container is set to 'mp4'.
I don't know why, but it seems that newer x264 releases only accept .mkv or .264 as output extensions, otherwise, it just crashes.

LigH
8th July 2025, 16:49
You may need a binary which has L-SMASH as MP4 multiplexer included. Like e.g. some of mine (https://forum.doom9.org/showthread.php?t=175288).

Raizo
8th July 2025, 17:16
It doesn't seem to work with yours either but thanks a lot anyway:)

LigH
8th July 2025, 17:23
So it must be a different reason, and that may require verbose log files...

real.finder
8th July 2025, 20:42
It doesn't seem to work with yours either but thanks a lot anyway:)

try https://github.com/jpsdr/x264/releases

Raizo
8th July 2025, 20:56
try https://github.com/jpsdr/x264/releases

This worked perfectly...!!
So, what's wrong with videolan release?
ty

LigH
8th July 2025, 22:33
As long as we don't see any error message from the failing versions, we won't know the reason.

takla
10th September 2025, 08:11
How can I make "Video > Zoom > Resample fit" the default so I don't have to set it manually on every startup? "Startup with last zoom settings" does not work...

Lan4
24th October 2025, 19:08
I'm using version 2753. I decided to update, but the link in the app took me to Github with the latest version, Version 2.5.1 [2013-06-25] from Feb 16, 2015. Is there a way to fix this?

I learned about this thread later.

One more question: Does the app have a dark mode?

VoodooFX
25th October 2025, 02:58
I'm using version 2753. I decided to update, but the link in the app took me to Github with the latest version, Version 2.5.1 [2013-06-25]

Update to the latest version: https://github.com/gispos/AvsPmod/releases

Lan4
25th October 2025, 18:52
Is it possible to correct the information and links in that abandoned mod?

VoodooFX
25th October 2025, 19:25
Is it possible to correct the information and links in that abandoned mod?

I misread version in your post, looks like you already using this mod. The latest version has correct links.

Lan4
27th October 2025, 00:11
The latest version is correct. Is it possible to fix the links in older mods? The links don't lead directly to GitHub, they point to a website.

VideoMilk78
27th October 2025, 16:24
Would it be possible to have an actual dark mode as opposed to this which still has the white background on the built in viewer?
https://i.postimg.cc/rms9JHHm/Screenshot-2025-10-27-at-11-22-39-AM.png (https://postimg.cc/YGcg2dMK)
When working at night this can be quite bothersome.

VoodooFX
27th October 2025, 18:19
The latest version is correct. Is it possible to fix the links in older mods?

Yes, even you can "fix" it, it's open source, but the reason for doing so completely eludes me. :)

Lan4
29th October 2025, 18:46
The reason is to ensure users are kept up-to-date with relevant information.
The link from the old apps leads to this site:
https://avspmod.github.io/
This site has a link to the old GitHub, and this link needs to be updated to the new GitHub. How can this be done? How can I find out who owns this page? Maybe GitHub support can help?

VoodooFX
30th October 2025, 06:07
These are two different programs. One is "AvsPmod", and this thread is for "AvsPmod GPo".
"AvsPmod" leads to its correct website and GitHub, there is nothing to fix.

Lan4
30th October 2025, 16:14
It is important to note that the new application is called AvsPmod GPo. This should be clarified in various places.
However, it's incorrect to say that these are completely different applications. The application information window in the new version mentions the old website and the old application.
It would be a good idea to contact the author of the website https://avspmod.github.io/ so they can add information about the new version of AvsPmod GPo.

VoodooFX
30th October 2025, 18:18
It is important to note that the new application is called AvsPmod GPo. This should be clarified in various places.

If you understand how GitHub/Open source works then there is no confusion.

However, it's incorrect to say that these are completely different applications.

Same you could say about water vs urine, both are forks of H₂O. :D

It would be a good idea to contact the author of the website https://avspmod.github.io/ so they can add information about the new version of AvsPmod GPo.

You can try to email him if you want: dfgosende [at] gmail [dot] com
Note: "Last Activity: 22nd January 2019 20:33" here on forum, on GitHub last - "Jan 25, 2019"

Meanwhile I added a note at its Issues: https://github.com/AvsPmod/AvsPmod/issues

Lan4
8th November 2025, 06:08
Is it possible to compare videos (especially in alternative view) between tabs without using the same frame number? I'm recording a screen, the video duration is different, and the frame numbers don't match for the same image. Currently, I have to trim the videos, which is difficult.

Lan4
8th November 2025, 21:55
I couldn't find a way to remove the top white box with the script. It's easier to watch the video without it.

---

I found the answer. Double-click on the video. Is that the only option?

gispos
30th December 2025, 11:56
AvsPmod 2.7.9.5 (https://github.com/gispos/AvsPmod/releases)

* Added a favorite list, you can enable it in the tablist context menu > 'Show favorite menus'
- it is switched off by default. This feature allows you to load your favorite scripts (tabs) in one go.
- in the favorite window simply select the scripts you want to open and press 'Return'.
- if the script is not in the tabs, it will be loaded from the hard disk and opened with the frame number with which it was added to the favorites.
- if the script is not found, a dialog will be displayed.
- the function is complex, if there are any errors please let me know.
- Note: Scripts can only be recognized by path and name; if you have only multiple 'New file' tabs, you won't enjoy this function.
* if 'Show favorite menus' enabled two other menus become visible in the tablist: 'Select for preload' and 'Preload selections', what the name says.
- if nothing is for preload selected, the current selection is used (in the tablist use Ctrl and left click for multible selections).
* Added to 'Script Selector' context menu 'AvsPmod preload'. Preloads the selections (only if the script are saved on the hard disk).
* Added File > 'Save session (only opened)...', saves only the opened scripts in a session file.
* Added to Tools > Session info tool contextmenu > 'Preload', preloads the selected scripts (only if the script are saved on the hard disk).
* Added to menu 'Tools' and to the External player button context menu > 'Audio trim helper':
- the function plays the audio in a loop from or to the current frame for better trimming the start or end frame (audio).
- while the audio is playing you can change the current frame with mouse wheel or the keyboard (the video window must be focused).
- if you do not update all AvsPmod files, you must update the "tools" folder:
- "ToolsMenu.py" must be overwritten and "audio_trim_helper.py" must be located in the "tools" folder.
* Added to the frame history in the timeline edit field: Individual entries can be deleted by holding down the CTRL key while clicking the menu.
* Added to (popup timeline) selections context menu > 'All to clips'
* Added to (popup timeline) selections context menu: copy to clipboard for the frame range menu, eg. 12-128 (click on the menu copys '12, 128' to clipboard)
* Some fixes



Would it be possible to have an actual dark mode as opposed to this which still has the white background on the built in viewer?
Options > 'Fonts and colors':
Basic (1): 'Select an predefined theme' > 'default dark'
Advanced 2 check: 'Slider window sidebar color', 'Video controls color'
And now Video > Background color > 'Dark gray'
wxPython can't set everything to dark: So it won't get any darker...

Is it possible to compare videos (especially in alternative view) between tabs without using the same frame number? I'm recording a screen, the video duration is different, and the frame numbers don't match for the same image. Currently, I have to trim the videos, which is difficult.
1) changelog.txt read 'How do I sync videos with groups:'

2) If 'Split view' enabled:
Video > Groups > 'Freeze split view frame' you can freeze the unselected tab (set an shortcut for it, or use the tool 'Locate Frame', see below).
Locate Frame Video Tutorial: https://drive.google.com/file/d/1l_0PksYFCHh4mXz8iM94X17-60ym9Rs9/view?usp=drive_link

For the function Video > Tools > 'Locate Frame':
LocateFrames.avs from Doom9 member StainlessS is needed.
https://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS or http://www.sendspace.com/folder/2mwrco

I couldn't find a way to remove the top white box with the script. It's easier to watch the video without it.
I found the answer. Double-click on the video. Is that the only option?
D3D Window or Fullscreen or Fullsize with a narrow light border at the top.

Columbo
30th December 2025, 14:30
:thanks:

FranceBB
30th December 2025, 21:12
Thank you for the update, as usual, gispos.
Works just fine on Windows XP Professional x86 and Windows 11 Enterprise x64. :D

Merry Christmas and Happy New Year!

gispos
31st December 2025, 10:43
Works just fine on Windows XP Professional x86 and Windows 11 Enterprise x64. :D

Merry Christmas and Happy New Year!
Lucky me! :)
Happy New Year to everyone from me too!

Genji
22nd January 2026, 04:22
Please allow me to make a request.
I would like to set multiple custom jump sizes and assign each to a keyboard shortcut for different uses.
I kindly ask for your consideration.

gispos
24th January 2026, 10:48
Please allow me to make a request.
I would like to set multiple custom jump sizes and assign each to a keyboard shortcut for different uses.
I kindly ask for your consideration.

AvsPmod multiple custom jump distances via shortcut.
https://drive.google.com/file/d/17V7dlsrvE4906zsjHpeTPCaaqMNVgl96/view?usp=drive_link

Extract the 'Jump' folder into the AvsPmod > macros directory. You can also rename the 'Jump' folder or the macros.
Restart or open AvsPmod.

Under Options > 'Keyboard shortcuts...', go to Macros > Jump and assign a keyboard shortcut to each macro.
Now you can select the desired jump distance using a keyboard shortcut.

Take a look at the contents of the macros; you can easily change the values ​​or add copies of the macros with different values.

PS: if the link doesn't work use the AvsPmod menu Help > 'Video tutorials & more' and go to AvsPmod public > Macros > 'Macros_Jump.7z'

FranceBB
1st March 2026, 23:47
Hey Gispos,
I've just realized that after asd-g updated LWLibavAudioSource() to include the drc_scale and fill_agaps options, we never updated the filterdb.
I've just updated the Avisynth Wiki (http://avisynth.nl/index.php/LSMASHSource/LWLibavAudioSource#Syntax_and_Parameters), so I thought it was worth updating AVSPmod mod too. :)
Pull request here: https://github.com/gispos/AvsPmod/pull/18

Genji
2nd March 2026, 04:32
AvsPmod multiple custom jump distances via shortcut.
https://drive.google.com/file/d/17V7dlsrvE4906zsjHpeTPCaaqMNVgl96/view?usp=drive_link

Extract the 'Jump' folder into the AvsPmod > macros directory. You can also rename the 'Jump' folder or the macros.
Restart or open AvsPmod.

Under Options > 'Keyboard shortcuts...', go to Macros > Jump and assign a keyboard shortcut to each macro.
Now you can select the desired jump distance using a keyboard shortcut.

Take a look at the contents of the macros; you can easily change the values ​​or add copies of the macros with different values.

PS: if the link doesn't work use the AvsPmod menu Help > 'Video tutorials & more' and go to AvsPmod public > Macros > 'Macros_Jump.7z'

Sorry for the delayed response—I didn't notice your post earlier.
After testing it, I was able to get it working exactly as I wanted.
Thank you so much!

gispos
2nd March 2026, 21:48
Hey Gispos,
I've just realized that after asd-g updated LWLibavAudioSource() to include the drc_scale and fill_agaps options, we never updated the filterdb.
I've just updated the Avisynth Wiki (http://avisynth.nl/index.php/LSMASHSource/LWLibavAudioSource#Syntax_and_Parameters), so I thought it was worth updating AVSPmod mod too. :)
Pull request here: https://github.com/gispos/AvsPmod/pull/18
Thanks FranceBB,
I've also added all the other missing arguments for LSMASHSource.dll and updated the filterdb.dat on GitHub.

Sorry for the delayed response—I didn't notice your post earlier.
After testing it, I was able to get it working exactly as I wanted.
Thank you so much!
Thanks for the feedback.

gispos
2nd March 2026, 22:39
I've revised the filterdb.dat file again.

LWLibavAudioSource was throwing an error when an empty string was used for the 'layout' argument, which surprises me because the default value is an empty string "". Could this be a bug?
I'm using version 1253, though, since all newer versions have problems with interlaced .TS files.

EDIT:
Now I remember.
We already had this issue with 'format'; the default was also an empty string, but if format="" was specified, an error occurred.

That shouldn't happen; if an empty string is passed (which is the default), there shouldn't be an error.

FranceBB
3rd March 2026, 00:06
LWLibavAudioSource was throwing an error when an empty string was used for the 'layout' argument, which surprises me because the default value is an empty string "".


Yep, I tried as well and this fails

LWLibavAudioSource("Test.mxf", stream_index=1, fill_agaps=1, layout="")

while this works

LWLibavAudioSource("Test.mxf", stream_index=1, fill_agaps=1, layout="FL")

as well as this

LWLibavAudioSource("Test.mxf", stream_index=1, fill_agaps=1)


I was curious, so I did some digging and looked at https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/blob/54b6d97f993e33d82ec3692fc501abb26eae6e95/AviSynth/lwlibav_source.cpp

In line 481 we can see

const char* layout_string = args[5].AsString(nullptr);

This is what is reading the string we're passing as layout in LWLibavAudioSource() like layout="FL" and it's putting it in layout_string.

When we're defining it, then args[5] exists and it's passed through, while when it doesn't exist, then it's a null pointer.

The problem is that specifying layout="" means that it exists (even though we're not passing anything as we're passing an empty string) so it doesn't get assigned to a null pointer, rather it goes through and gets passed to line 240 which is prepare_audio_decoding


static void prepare_audio_decoding(lwlibav_audio_decode_handler_t* adhp, lwlibav_audio_output_handler_t* aohp, const char* channel_layout,
int sample_rate, lwlibav_file_handler_t& lwh, VideoInfo& vi, IScriptEnvironment* env)
{
lw_log_handler_t* lhp = lwlibav_audio_get_log_handler(adhp);
lhp->priv = env;
/* Import AVIndexEntrys. */
if (lwlibav_import_av_index_entry((lwlibav_decode_handler_t*)adhp) < 0)
env->ThrowError("LWLibavAudioSource: failed to import AVIndexEntrys for audio.");
/* */
AVCodecContext* ctx = lwlibav_audio_get_codec_context(adhp);
as_setup_audio_rendering(aohp, ctx, &vi, env, "LWLibavAudioSource", channel_layout, sample_rate);
/* Count the number of PCM audio samples. */
vi.num_audio_samples = lwlibav_audio_count_overall_pcm_samples(adhp, aohp->output_sample_rate);
if (vi.num_audio_samples == 0)
env->ThrowError("LWLibavAudioSource: no valid audio frame.");
if (lwh.av_gap && aohp->output_sample_rate != ctx->sample_rate)
lwh.av_gap = ((int64_t)lwh.av_gap * aohp->output_sample_rate - 1) / ctx->sample_rate + 1;
vi.num_audio_samples += lwh.av_gap;
/* Force seeking at the first reading. */
lwlibav_audio_force_seek(adhp);
}




Could this be a bug?


Well... I mean... "it depends" I guess would be my answer xD
Either we ask asd-g to verbosely check each and every possible audio channel layout, which is not great or we ask him to add something like this

if (layout_string && strlen(layout_string) == 0) {
layout_string = nullptr;
}

so that even if the layout being passed in LWLibavAudioSource() exists, as long as its length is zero like when we're passing layout="", it still gets assigned to a null pointer, so it doesn't fail.
This wouldn't obviously prevent the user from doing something stupid like

LWLibavAudioSource("test.mxf" stream_index=1, fill_agaps=1, layout="abc")

as the string length would be greater than 0 and therefore it would still be passed through and then it errors out, however it would solve the case in which layout is passed as an empty string like

LWLibavAudioSource("test.mxf" stream_index=1, fill_agaps=1, layout="")

Should we ask asd-g to change it? I'm leaning towards "no" as passing an empty string for layout is arguably also a silly thing to do, but I'm conflicted at this point.
What do you think?

p.s if you wanna open the issue yourself on GitHub, go for it XD

gispos
3rd March 2026, 01:23
I don't care about the 'layout'.
I asked asd-g to change the 'format' back then; it was important to me because I use format="" as a template in hundreds of scripts.

However, I still think it's wrong not to check the string and to set the default for an empty string.
If an empty string is the default (no change), this should not result in an error.

gispos
19th April 2026, 18:02
AvsPmod 2.7.9.6 was deleted, see below version 2.7.9.7

Emulgator
19th April 2026, 22:46
If an empty string is the default (no change), this should not result in an error.
Second this, has bothered me numerous times when trying to generate multi-purpose scripts fed to a choice of sourcefilters

gispos
20th April 2026, 23:17
AvsPmod 2.7.9.7 (https://github.com/gispos/AvsPmod/releases)
Sorry for the quick update, but a bug somehow crept into the 2.7.9.6 code.

Version 2.7.9.7 [2026-04-21]
* This is a bugfix version with new features.
* Text fields in the Slider Window now have a mouse wheel value change function.
- if the value is an integer or float, it can be changed using the mouse wheel.
- the left mouse button must be pressed to do this. For floats, the last decimal place is changed by 1
- if CTRL is pressed the last decimal place is changed by 5.
- the same applies to integer values, which can be changed in 1 or 5 steps.
- general for edit fields: to update the preview, you must press the Enter key or focus the video window.
* Scrolling the slider window with the mouse wheel is no longer interrupted by other controls (slider, choice box).
- to change a slider with the mouse wheel, the left mouse button must be pressed.
* Fixed: If the filter database (sliders) was edited, an error could occur: 'defMod not referenced' (2.7.9.6)
-
Version 2.7.9.6 [2026-04-17]
* The slider window gets a 'Reset' button for each function.
- by default only sliders are reset to default values, if you press Ctrl while clicking 'Reset', all items will be reset.
- only works for known functions (filterdb.dat or self-created function declarations with default values).
* Added playback for left mouse click. Program options > Video > 'Playback on left mouse click'
- 0 = disabled by default. Read the option notes before making any changes.
- the function is not executed on the first click under various conditions: after a popup menu, when the mouse is moved, after the script has had focus.
- my recommendation is to set only a narrow range (bottom): 40 to 80. The mouse double click is on this area then deaktivated.
- you can enable/disable the function under the Playback button context menu > 'Left click playback'
* Changed frame text field: Frame history is now script (tab) related.
- as a reminder: individual entries can be deleted by holding down the CTRL key while clicking the menu.
* Added 'Sort history' to frame text field context menus.
* If all left or right tabs are changed to a group, the new selected group will now be deleted first.
* Added Video > Tab add group > 'Break group offset': Allows setting of new offset for the tab's with the same group.
- setting a new offset: Check it > change the frames on the tab's with the same group > uncheck it
- it's the same as set tab group to None > change frame > set tab group again. But we can do that now with one shortcut for all tabs with the same group.
* Added to video slider timeline context menu "Clear all selections"
- this menu is only visible if there are no selections under the mouse cursor, but selections are present.
* Fixed: The checked state for menu items 'Split view alternate' was not set correctly in all menus.
* Fixed: Fast YUVToRGB display conversion did not take matrix 601 into account and always used 709.
* A few glitches in the filter database functions have been fixed.
* Some updates in the filterdb.dat file, so update it!

turbomund
5th August 2026, 01:16
I have a favorite avs template that makes constructs a Scenes/chapter list. I have not been able to have AvsPmod read the scene info- I know there is a macro/thumb option but i want the bookmarks to come from the script. Is this durable anyhow ?
Regards turbo.

gispos
6th August 2026, 17:43
I have a favorite avs template that makes constructs a Scenes/chapter list. I have not been able to have AvsPmod read the scene info- I know there is a macro/thumb option but i want the bookmarks to come from the script. Is this durable anyhow ?
Regards turbo.

There are two macros that can import bookmarks from files (scene/chapter log files).

The first one is "Import bookmarks from file.py" which can be found in the 'Macros' menu in AvsPmod.
A file containing a frame number on each line is all that is needed to set bookmarks.

The second one is SceneLogToBookmarks.py 1.06 (can read SceneStats, SCDetect or DBSC logfiles)
Insert Bookmarks from Dogway's SceneStats logfiles ( https://forum.doom9.org/showthread.php?t=182881 )
or from SCDetect logfiles ( http://avisynth.nl/index.php/Category:Scene_change_detection )
or from StainlessS's DBSC logfiles (start_frame logs with/without comment or all logfiles with comment=True)
StainlessS doom9 ( https://forum.doom9.org/showthread.php?t=171624 )

You can download SceneLogToBookmarks.py under AvsPmod > Help > 'Video tutorials & more'