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 27th December 2019, 06:26   #141  |  Link
imsrk48
Registered User
 
imsrk48's Avatar
 
Join Date: Nov 2017
Posts: 154
Quote:
Originally Posted by StainlessS View Post
See Wiki [see everything on wiki homepage] :- http://avisynth.nl/index.php/Main_Page

Internal filters:- http://avisynth.nl/index.php/Internal_filters
External Filters:- http://avisynth.nl/index.php/External_filters
Thanks Sir
imsrk48 is offline   Reply With Quote
Old 31st March 2020, 11:01   #142  |  Link
Mertiz88
Registered User
 
Join Date: Mar 2020
Posts: 4
Hi there,
Iv'e searched many times but couldn't find what I'm looking for. My question is, can I use any filter of Avisynth separately. For example, someone gave me an encoded video and I wanna apply some filter on it without encoding it again? is that possible by command line or any other way?
Thanks.
Mertiz88 is offline   Reply With Quote
Old 31st March 2020, 11:29   #143  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by Mertiz88 View Post
Hi there,
Iv'e searched many times but couldn't find what I'm looking for. My question is, can I use any filter of Avisynth separately. For example, someone gave me an encoded video and I wanna apply some filter on it without encoding it again? is that possible by command line or any other way?
Thanks.
mpv allows ffmpeg and vapoursynth filters:


ffmpeg filters:

https://mpv.io/manual/master/#video-filters


vapoursynth filters:

https://mpv.io/manual/master/#video-filters-vapoursynth


per file configuration:

https://mpv.io/manual/master/#file-s...guration-files
stax76 is offline   Reply With Quote
Old 31st March 2020, 11:38   #144  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,821
Mertiz88,

If you have ffdshow installed it has an Avisynth filter and you can add most things to it. "Add ffdshow video source" usually needs to be checked near the top of the Avisynth filter section.

You can probably install only the ffdshow raw video filter and add it to MPC-HC as an external filter and add Avisynth stuff to it.

I don't use Potplayer, but it has an Avisynth section in it's options so it should do much the same.

Or you could create a script to open the video and audio, add filters to it, then open the script with a media player such as MPC-HC. ie

LoadPlugin("C:\Program Files\MeGUI\tools\ffms\ffms2.dll")
FFMS2("E:\Episode 7.mkv")
SomeFilter()

You'll probably have to be careful not to use any filtering that's too slow to allow real-time playback.
hello_hello is offline   Reply With Quote
Old 31st March 2020, 12:14   #145  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
There is also a new-ish video source for VLC [ VLC - AviSynth plugin ]:- https://forum.doom9.org/showthread.php?t=178531
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 31st March 2020, 17:05   #146  |  Link
Mertiz88
Registered User
 
Join Date: Mar 2020
Posts: 4
Thanks guys for great information, much appreciated!!
I'm still newbie for these stuff (like using or adding filters of (avisynth/vapoursynth) to other softwares). I just used handbrake to encode some videos and found out they need to be denoised (slightly) but couldn't do that with its filters (NLMeans & HQDN3D). So, I intended to filter them with staxrip at first and then thought about doing that separately by (avisynth/vapoursynth). What I meant, I want a new video to be created (like 'render' in some video editors) but with exactly the same encode settings (CRF, subme, ref, ....etc) i.e. only the filter will be applied. Is that even possible with the methods you mentioned above OR the filter's effect will remain only in the media player (VLC/mpv/MPC). If you can explain with some details, I'll be thankful!

Last edited by Mertiz88; 1st April 2020 at 11:33.
Mertiz88 is offline   Reply With Quote
Old 2nd April 2020, 04:54   #147  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Filtering interlaced content:
Reading: http://avisynth.nl/index.php/FAQ_dif...ced_content.3F
I'm wondering whether:
Code:
AssumeXY().Bob().Filter(...).AssumeXY().Separatefields().Selectevery(4,0,3).Weave()
would be better than:
Code:
SeparateFields()
even = SelectEven(last).Filter(...)
odd = SelectOdd(last).Filter(...)
Interleave(even, odd)
Weave()
thinking about temporal filters I thought the second one would be better suited,...

What do you think is 'better' and why? Is it depended on the following filter or is one always better than the other.
Note: that I don't care that the first method adds an additional bobber and the time it takes,...

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd April 2020, 07:03   #148  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,340
Quote:
Originally Posted by Selur View Post
Filtering interlaced content:
Reading: http://avisynth.nl/index.php/FAQ_dif...ced_content.3F
I'm wondering whether:
Code:
AssumeXY().Bob().Filter(...).AssumeXY().Separatefields().Selectevery(4,0,3).Weave()
would be better than:
Code:
SeparateFields()
even = SelectEven(last).Filter(...)
odd = SelectOdd(last).Filter(...)
Interleave(even, odd)
Weave()
thinking about temporal filters I thought the second one would be better suited,...

What do you think is 'better' and why? Is it depended on the following filter or is one always better than the other.
Note: that I don't care that the first method adds an additional bobber and the time it takes,...

Cu Selur




It depends on source, and what you are doing, obviously

Not bob() for the first case - use a smarter double rate deinterlacer that corrects for the up/down field shift.

It's pros /cons -

In the 1st case you have to deinterlace, but you can use temporal filter more effectively

In the 2nd case, you don't get temporal filtering between even/odd fields, only within each group. Motion vectors don't cross between even/odd because they are grouped separately. This can induce a type of flicker on some sources.

But on the other hand some sources may require separate filtering (eg. some defect occurs on even fields, maybe more noise or more saturated etc...) . Using the 1st method will "contaminate" the good fields in those cases
poisondeathray is offline   Reply With Quote
Old 2nd April 2020, 14:02   #149  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Quote:
Not bob() for the first case - use a smarter double rate deinterlacer that corrects for the up/down field shift.
Just wrote bob not having to start a discussion which bobber might be better suited in this case.

Quote:
It's pros /cons -
In the 1st case you have to deinterlace, but you can use temporal filter more effectively
In the 2nd case, you don't get temporal filtering between even/odd fields, only within each group. Motion vectors don't cross between even/odd because they are grouped separately. This can induce a type of flicker on some sources.
But on the other hand some sources may require separate filtering (eg. some defect occurs on even fields, maybe more noise or more saturated etc...) . Using the 1st method will "contaminate" the good fields in those cases
Thanks for the clarification.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd April 2020, 16:43   #150  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
And how is it for spatial filtering?
In the 'bob' case the spatial filtering is basically done for the original field and the synthesized other field.
In the 'even/odd' case the spatial filtering is done intra-field (the original fields) only.
Is this correct? Is one method better than the other, or does it also depend on the source?
Some noise filters are spatial-temporal; is there a clear preference for these, or is it also source dependent (I tend to believe so).

Last edited by Sharc; 2nd April 2020 at 16:49.
Sharc is offline   Reply With Quote
Old 7th July 2020, 23:51   #151  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,869
Question about the wiki.
In the VapourSource page it says: "*Y8/YV12/16/24 allow bit depths >8 using the Stack16 format." however when I look at the color spaces themselves like YUV420P16 it says "YV12 (x2 width)".
I haven't tried to output anything through VapourSource 'cause I don't have VapourSynth installed, but to me "x2 width" means DoubleWidth which is 16bit interleaved NOT 16bit stacked (which is double height).
Is it outputting 16bit stacked or interleaved? Is it 2x height so 16bit stacked or 2x width so 16bit interleaved?
I'm asking 'cause I generally correct the wiki when I find boo boos and I like everything to be right.


p.s yes, wiki maintainers, if you found out some pages (like this) silently and "auto-magically" updating themselves, it wasn't dark magic, it was me xD

Last edited by FranceBB; 8th July 2020 at 00:15.
FranceBB is offline   Reply With Quote
Old 8th July 2020, 14:35   #152  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
you won't be needing the stack16 format, my filters/scripts are exclusive to fp32 precision and you will be dealing with YUV444PS or YV24 x4 height (what is this?).
feisty2 is offline   Reply With Quote
Old 8th July 2020, 15:59   #153  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by FranceBB View Post
Question about the wiki.
In the VapourSource page it says: "*Y8/YV12/16/24 allow bit depths >8 using the Stack16 format." however when I look at the color spaces themselves like YUV420P16 it says "YV12 (x2 width)".
I haven't tried to output anything through VapourSource 'cause I don't have VapourSynth installed, but to me "x2 width" means DoubleWidth which is 16bit interleaved NOT 16bit stacked (which is double height).
Is it outputting 16bit stacked or interleaved? Is it 2x height so 16bit stacked or 2x width so 16bit interleaved?
I'm asking 'cause I generally correct the wiki when I find boo boos and I like everything to be right.


p.s yes, wiki maintainers, if you found out some pages (like this) silently and "auto-magically" updating themselves, it wasn't dark magic, it was me xD
I think it's like the old LSMASHSource, it will out in interleaved unless you set stacked=true

but in avs+ it will output HBD

I think you should re-stated that lsb in most filters mean stacked in http://avisynth.nl/index.php/ConvertStacked since there are many n00bs users
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th July 2020, 09:03   #154  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,869
Quote:
Originally Posted by real.finder View Post
I think it's like the old LSMASHSource, it will out in interleaved unless you set stacked=true

but in avs+ it will output HBD
Ok, got it. Corrected on the wiki

Quote:
Originally Posted by real.finder View Post
I think you should re-stated that lsb in most filters mean stacked in http://avisynth.nl/index.php/ConvertStacked since there are many n00bs users
Done.
FranceBB is offline   Reply With Quote
Old 8th December 2020, 22:16   #155  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,036
It is possible to insert Unicode char into text, rendered by Subtitle() function ?

Trying
Subtitle(c, +Chr($2022),font="Arial",size=isize,x=10,y=20,halo_color=$FF000000, text_color=$00e0e0e0,utf8=true) to rasterize 'bullet' char with code 0x2022 and it prints " - symbol with code 0x22. I.e. it ignores first byte. May I need somehow StrToUTF8() ? I set font to Arial and looks for the char code in the Insert->Symbol window.

Using Avisynth+.
DTL is offline   Reply With Quote
Old 8th December 2020, 22:50   #156  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
Not in general, it seems (edit: wrong, see below), but that particular character does exist in whatever the default Windows ASCII character set is these days, and can be typed directly into your script with "ALT+7".

EDIT: Got it. You can do it, but you have to use the full UTF-8 encoding spelled out in bytes, and specify utf8 = true:

Code:
subtitle(chr($E2) + chr($80) + chr($A2), utf8 = true)
Or you change the encoding of your script in your text editor to "UTF-8 no BOM" and type or copy/paste directly into your script:

Code:
subtitle("•", utf8 = true)
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 8th December 2020 at 22:57.
wonkey_monkey is offline   Reply With Quote
Old 8th December 2020, 23:08   #157  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Try Chr($95)

Code:
Function SubtitleCharSet() {
        S=""
        for(y=0,15) {
            s=s+"$"+RT_Hex(y*16,2)+ " "
            for(x=0,15) {
                n=y*16+x
                c=(n<32) ? "." : Chr(n)
                s=s+c
            }
            s=s+"\n"
        }
    S
}

colorbars(width=360,height=512).Trim(0,-1).KillAudio
s=RT_StrReplace(SubtitleCharSet,Chr(10),"\n")
Subtitle(s,font="Courier New",size=32,lsp=0)
return  Last
EDIT:


EDIT
Code:
BlankClip(Length=1,width=20,height=20)
Bullet=Chr($95)
Subtitle(Bullet)
return last


Code:
BlankClip(Length=1,width=20,height=20)
Bullet=Chr($95)
Subtitle(Bullet)
BilinearResize(80,80)
return last
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 8th December 2020 at 23:41.
StainlessS is offline   Reply With Quote
Old 8th December 2020, 23:37   #158  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
Wait, something's not right there... $80 is the Euro symbol, that's correct, but the ellipsis (…) should be $85. Your graphic shows it at position 84.

Likewise the • symbol sould be $95, but it's at position $94.

Characters $90 and $81 do not encode to anything. There are other missing characters too.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 8th December 2020, 23:49   #159  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
It depends upon Character Set [EDIT: Font] , I used Courier New [which is MonoSpaced to maintain format of the hex/ascii block]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 8th December 2020, 23:56   #160  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
WingDings
Code:
Function SubtitleCharSet() {
        S=""
        for(y=0,15) {
            s=s+"$"+RT_Hex(y*16,2)+ " "
            for(x=0,15) {
                n=y*16+x
                c=(n<32) ? "." : Chr(n)
                s=s+c
            }
            s=s+"\n"
        }
    S
}

colorbars(width=880,height=512).Trim(0,-1).KillAudio
s=RT_StrReplace(SubtitleCharSet,Chr(10),"\n")
#Subtitle(s,font="Courier New",size=32,lsp=0)
Subtitle(s,font="Wingdings",size=32,lsp=0)
return  Last


EDIT:
Default Character sets of Subtitle(), RT_Subtitle() and RT_DebugF() are all different outside of $20 -> $7E range.

EDIT: The Hex/Ascii block prints out chars below 32($20) as '.' as they are usually control characters,
some Subtitle() fonts may actually have valid characters for those chars, but we just printed same as '.',
as in Hex/ASCII block.
Also, the similar-ish stuff on the Left above in Windigs block, are Digits in the hex/ascii block.

EDIT:
Quote:
Wait, something's not right there... $80 is the Euro symbol, that's correct, but the ellipsis (…) should be $85.
You miscounted the characters, There is a comma after Euro symbol which you failed to count, and same on line below it.
[Mentally align with the characters above the euro line]
EDIT: hang on. you're right, maybe something strange there.
I reccon that something on $80 line prints nothing, dont offhand know which character. [there are spaces at end of line]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 11th December 2020 at 17:40.
StainlessS is offline   Reply With Quote
Reply

Tags
avisynth, faq

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 07:50.


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