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

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

 

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 31st May 2023, 18:21   #1421  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by StainlessS View Post
More ass kissing required. Use your tongue, he like that
Chelsea is blue and Gispos is a dude, we don't do that here. :P

Quote:
Originally Posted by gispos View Post
I am still waiting for a 'EDIT: Arg. Not so fast.'

Glad that it works.
eheheheh not this time. This time it works for real.

Last edited by FranceBB; 31st May 2023 at 18:36.
FranceBB is offline   Reply With Quote
Old 31st May 2023, 22:45   #1422  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
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 !
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 5th June 2023 at 10:53.
Emulgator is offline   Reply With Quote
Old 3rd June 2023, 20:36   #1423  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Thanks!
Not everyone shows love for XP, but it's nice when people do.
FranceBB is offline   Reply With Quote
Old 3rd June 2023, 21:47   #1424  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 996
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
Code:
* 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.
__________________
Live and let live

Last edited by gispos; 3rd June 2023 at 21:54.
gispos is offline   Reply With Quote
Old 8th June 2023, 19:22   #1425  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 996
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/folde...usp=drive_link
__________________
Live and let live
gispos is offline   Reply With Quote
Old 9th June 2023, 14:12   #1426  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by gispos View Post
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:

Code:
                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

Code:
DecodeYUVtoRGB(matrix=0, threads=1, gain=74, offset=0)
leads to:



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).

Last edited by FranceBB; 9th June 2023 at 14:14.
FranceBB is offline   Reply With Quote
Old 9th June 2023, 18:12   #1427  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 996
Quote:
Originally Posted by FranceBB View Post

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.

Quote:
Originally Posted by FranceBB View Post
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).

Quote:
Originally Posted by FranceBB View Post
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.
__________________
Live and let live

Last edited by gispos; 9th June 2023 at 18:33.
gispos is offline   Reply With Quote
Old 9th June 2023, 19:29   #1428  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
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/1OjH...ew?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-vs...ent-1585940749 . It typically runs a bit faster.

Last edited by DTL; 11th June 2023 at 04:47.
DTL is offline   Reply With Quote
Old 11th June 2023, 14:17   #1429  |  Link
stranno
Registered User
 
Join Date: Jul 2011
Posts: 50
I'm getting this error in the latest version. It crashes with MPC-HC and MPV.

stranno is offline   Reply With Quote
Old 11th June 2023, 17:08   #1430  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 996
Quote:
Originally Posted by stranno View Post
I'm getting this error in the latest version. It crashes with MPC-HC and MPV.

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.
__________________
Live and let live
gispos is offline   Reply With Quote
Old 11th June 2023, 17:35   #1431  |  Link
stranno
Registered User
 
Join Date: Jul 2011
Posts: 50
Quote:
Originally Posted by gispos View Post
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.
stranno is offline   Reply With Quote
Old 11th June 2023, 17:51   #1432  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
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?
__________________
@turment on Telegram
tormento is online now   Reply With Quote
Old 11th June 2023, 18:20   #1433  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 996
Quote:
Originally Posted by stranno View Post
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:'

Quote:
Originally Posted by tormento View Post
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'
__________________
Live and let live
gispos is offline   Reply With Quote
Old 11th June 2023, 19:45   #1434  |  Link
stranno
Registered User
 
Join Date: Jul 2011
Posts: 50
Quote:
Originally Posted by gispos View Post
Everything entered correctly? Wrong or invalid parameter entered in the parameter field?
Program Options > Paths > 'External player:'
Program Options > Paths > 'External player extra args:'


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.
stranno is offline   Reply With Quote
Old 11th June 2023, 21:11   #1435  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by gispos View Post
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.
__________________
@turment on Telegram
tormento is online now   Reply With Quote
Old 11th June 2023, 22:42   #1436  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 996
Quote:
Originally Posted by stranno View Post


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.

Quote:
Originally Posted by tormento View Post
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.
__________________
Live and let live
gispos is offline   Reply With Quote
Old 12th June 2023, 12:12   #1437  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
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 ?
DTL is offline   Reply With Quote
Old 12th June 2023, 15:14   #1438  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by DTL View Post
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 .....
Sharc is offline   Reply With Quote
Old 12th June 2023, 17:00   #1439  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 996
Quote:
Originally Posted by DTL View Post
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.

Quote:
Originally Posted by DTL View Post
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.
__________________
Live and let live
gispos is offline   Reply With Quote
Old 12th June 2023, 19:33   #1440  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
Quote:
Originally Posted by Sharc View Post
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.
DTL is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 16:44.


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