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

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

 

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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 16th August 2018, 21:34   #4241  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by davidhorman View Post
Is this expected/deliberate behaviour?

Code:
function _flipit(clip c) { # note the underscore
  return c.flipvertical
}

function flipit(clip c) {
  return c.fliphorizontal
}

version._flipit # note the underscore
The result is flipped horizontally, not vertically as you might expect. It seems that when faced with a function call with a leading _, Avisynth first matches it without the underscore, and only falls back to the underscored function (_flipit) if there is no non-underscored function (flipit).
It flips vertically with classic Avisynth (2.60, 2.61).

Edit: It also flips vertically with AVS+ r1576.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 16th August 2018 at 21:38.
Groucho2004 is offline  
Old 16th August 2018, 21:35   #4242  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
Quote:
Originally Posted by LigH View Post
You may prefer a function like flipit(clip c, bool vertical) instead.
It was just an example I had written a script function, and was replacing it with a filter verision, and using a _ prefix to distinguish them while I worked on it.

I didn't know about the DLL specifier. That's useful to know.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline  
Old 16th August 2018, 21:40   #4243  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by Groucho2004 View Post
It flips vertically with classic Avisynth (2.60, 2.61).

Edit: It also flips vertically with AVS+ r1576.
Agreed.

r1825 not Affected (flip vertical)
r2172 IS affected (oops)

EDIT: David, "Plugin Autoload and Conflicting Function Names"
http://avisynth.nl/index.php/Plugins...Function_Names
EDIT: Some dll names used to cause problems for avs and AvsPMod, if they had eg a hyphen in them,
(as not valid in variable name or plugin name), think there was some kind of kludge implemented to eg
convert non valid chars to something else, maybe '_' .
__________________
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; 16th August 2018 at 22:21.
StainlessS is offline  
Old 17th August 2018, 17:31   #4244  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
An AVS+ noob again:

I have really gotten used to have the AVS docs installed locally as a "Docs" subfolder under the AviSynth folder on my HDD. AVS+ does not offer this option. Is it possible to download the available AVS+ online docs and store them locally in a "Docs" subfolder just like in classic AVS?

I am not always online when I do AviSynth stuff (my neighborhood beergarden refuses to install WLan because they want their guests to talk to each other instead of staring at their smartphones - which I totally agree with).


Cheers
manolito
manolito is offline  
Old 17th August 2018, 23:21   #4245  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Depends on what you mean by 'docs'. To my knowledge, most of the new information on AviSynth+ has simply been added directly to the AviSynth wiki, the docs in the source tree haven't merged those changes in (partly because I'm not really sure how to keep track of the Wiki changes to know if there's something that needs it; there's also some pages that were written new for the Wiki; even the new pages I added to the docs in the source tree, mostly a primer for how to build AviSynth+, are themselves outdated now). The docs in the AviSynth+ source tree are mostly a direct port of the old AviSynth docs to Sphinx, which would have allowed/does allow much easier changes than having to wrangle directly with HTML (the .rst files used by Sphinx are mostly plaintext; Sphinx itself can then be used to generate the docs in a variety of output formats, provided you have the necessary tools for it to do so - it can do HTML by default).

If you have Python installed (with pip), you can generate the docs by doing this (in a Command Prompt):
Code:
pip install sphinx

git clone -b MT git://github.com/pinterf/AviSynthPlus.git
cd AviSynthPlus/distrib/docs/english
make html
The generated doc tree will be in the 'build' directory that gets created in the same location (distrib/docs/english). Do note, however, that the pages for External Filters were removed, on the basis that that should be the plugin's job to provide documentation, not the main project's (and the avisynth.ru mirror still exists with all those pages, and most/all of them are also documented on the Wiki). I had ported the externalfilters to rst with the rest of the docs, and the archive of that is here. I can't remember how complete it was, though.

Fun fact: because Github uses a variant of RST for its markup, most of the docs pages can actually be viewed as-is straight from the source tree with a minimalistic amount of styling.

Last edited by qyot27; 17th August 2018 at 23:26.
qyot27 is offline  
Old 18th August 2018, 01:23   #4246  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
V2.60 docs as compressed CHM here, including SDK stuff + Aivsynth v3 (v2.58) and v6 (v2.60) Avisynth Headers.h

AvisynthEngHelp SDK26_FINAL-2015-05-31 (~4.6MB):-
http://www.mediafire.com/file/62mphc...2015-05-31.zip

Sling it on a hotkey eg CTRL/ALT/H.
__________________
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  
Old 18th August 2018, 09:30   #4247  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
I remember there are some plugins to display reStructuredText and MarkDown documents in web browsers...
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 18th August 2018, 10:32   #4248  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
As qyot27 mentioned above, the docs in the AviSynth+ source tree are basically equivalent to the old AviSynth docs.

If one wants documentation of all the new functionality, the wiki is the only place to go. Special credit goes to raffriff42 who spent countless hours updating the wiki for AVS+.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 18th August 2018, 12:07   #4249  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Thanks guys,

I already copied the old AVS 2.60 Docs folder under the AVS+ folder. I'll see if I can copy&paste together a short HTML from the AVS+ Wiki which points out the most important differences.


Cheers
manolito
manolito is offline  
Old 18th August 2018, 17:29   #4250  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Groucho2004 View Post
If one wants documentation of all the new functionality, the wiki is the only place to go. Special credit goes to raffriff42 who spent countless hours updating the wiki for AVS+.
Cough cough
Reel.Deel is offline  
Old 18th August 2018, 18:11   #4251  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Reel.Deel View Post
Cough cough
Of course there are others who spent a lot of their spare time maintaining the wiki. I was referring in particular to AVS+.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 21st August 2018, 15:59   #4252  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by LigH View Post
It is probably related to the function syntax {DllFileName}_{FunctionName} to select a function provided by a specific DLL when several DLLs in the range of loaded plugins (especially with a full auto-load directory) provide functions of the same name. An empty DLL name may match the AviSynth core.

You may prefer a function like flipit(clip c, bool vertical) instead.
In general, when there is no dll then avs+ will simply use an empty dll name and "_" will appear as the first character in the "canonical" function name.
https://github.com/pinterf/AviSynthP...nager.cpp#L209

Storing in the list using the original name
https://github.com/pinterf/AviSynthP...nager.cpp#L871
Storing in the list with the canonical (in this case with the _ prefix) name
https://github.com/pinterf/AviSynthP...nager.cpp#L886

This latter is overwriting the intentionally "_" prefixed _flipit function with the canonical version of flipit.
pinterf is offline  
Old 21st August 2018, 20:45   #4253  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
And I did not even read the sources...
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 22nd August 2018, 11:35   #4254  |  Link
djonline
Registered User
 
Join Date: Mar 2011
Posts: 40
Quote:
Originally Posted by StainlessS View Post

Suggest that you change
Code:
DirectShowSource("00114.MTS-pass2-64.avs").Trim(30,0)
to
Code:
Import("00114.MTS-pass2-64.avs").Trim(30,0)
Trim not work after Import, only after DirectShowSource.

DirectShowSource("avisynth-stage1-with-MTS.avs") still not work with LAV splitter 0.71

Last edited by djonline; 22nd August 2018 at 11:41.
djonline is offline  
Old 22nd August 2018, 11:41   #4255  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Then write the Trim in a separate line, not after a dot.

If the imported script returns a clip, then it should be passed to the usual internal variable "last", which is then implicitly assumed where no explicit clip variable was written.

If it does not return any clip, then it can't be used as video source anyway.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 24th August 2018, 15:07   #4256  |  Link
preludium975
Registered User
 
Join Date: Aug 2018
Posts: 12
Why do I get a pink screen when I'm trying to dither 10bit -> 8bit? The source is 10bit, 4:2:0, bt.709. This is modded FFMS2, with ffmpeg decoder, but i tried all of the modded ffms2 decoders, but none of them work. I always get pink screen. LSMASH works fine, but i need FFMS2.

Here's the avs script:
Code:
FFVideoSource("sample.mkv", enable10bithack=true)
ConvertFromStacked(bits=10)
ConvertBits(bits=8, dither=0)
image

Last edited by preludium975; 24th August 2018 at 15:15.
preludium975 is offline  
Old 24th August 2018, 22:43   #4257  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Why don't you use the regular, non-modded ffms2? It supports >8 bit depths of AviSynth+ natively.
sneaker_ger is offline  
Old 24th August 2018, 23:47   #4258  |  Link
preludium975
Registered User
 
Join Date: Aug 2018
Posts: 12
I was read this, in the Avisynth‘s site: "(10-bit formats are supported with the 10bithack version - see alternate download above)"

Last edited by preludium975; 24th August 2018 at 23:50.
preludium975 is offline  
Old 25th August 2018, 04:42   #4259  |  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 preludium975 View Post
I was read this, in the Avisynth‘s site: "(10-bit formats are supported with the 10bithack version - see alternate download above)"
Yes, in the past Avisynth+ didn't exist and regular Avisynth was working in 8bit, so 10bit+ videos were indexed as 16bit stacked (MSB at the top, LSB at the bottom).
Nowadays, Avisynth+ supports regular high bit depth, so does FFMpegSource2.
Get the latest official version of ffms2 or the latest test version of ffms2000 and index your file; ffms will automatically index it in its native bit-depth (i.e if a file is 10bit, it will be indexed as 10bit).

*if* you are using regular Avisynth and you wanna use 16bit stacked for whatever reason, then that's another story, but since you are replying in the Avisynth+ development topic, I assume you are using Avisynth+
FranceBB is offline  
Old 28th August 2018, 00:56   #4260  |  Link
preludium975
Registered User
 
Join Date: Aug 2018
Posts: 12
Quote:
Originally Posted by FranceBB View Post
Yes, in the past Avisynth+ didn't exist and regular Avisynth was working in 8bit, so 10bit+ videos were indexed as 16bit stacked (MSB at the top, LSB at the bottom).
Nowadays, Avisynth+ supports regular high bit depth, so does FFMpegSource2.
Get the latest official version of ffms2 or the latest test version of ffms2000 and index your file; ffms will automatically index it in its native bit-depth (i.e if a file is 10bit, it will be indexed as 10bit).

*if* you are using regular Avisynth and you wanna use 16bit stacked for whatever reason, then that's another story, but since you are replying in the Avisynth+ development topic, I assume you are using Avisynth+
I tried it, it's working. But I don't need ConvertFromStacked(), because the new FFMS2 can load native 10bit, i just need the ConvertBits().

Thank you.
preludium975 is offline  
Closed Thread

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 18:10.


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