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

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

 

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th May 2018, 18:06   #741  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,983

__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 30th May 2018, 18:12   #742  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,041
Would it be possible to build an updated vapoursynth vslsmashsource.dll companion please ?
poisondeathray is offline   Reply With Quote
Old 1st June 2018, 05:51   #743  |  Link
l33tmeatwad
Registered User
 
l33tmeatwad's Avatar
 
Join Date: Jun 2007
Posts: 167
Added a copy of FFMS2 that works with the same shared libs in case that's useful for someone, to like safe space and stuff maybe?
l33tmeatwad is offline   Reply With Quote
Old 1st June 2018, 08:13   #744  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,983
That's an interesting bonus. Let's hope they work well.

__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 1st June 2018, 15:57   #745  |  Link
l33tmeatwad
Registered User
 
l33tmeatwad's Avatar
 
Join Date: Jun 2007
Posts: 167
Quote:
Originally Posted by poisondeathray View Post
Would it be possible to build an updated vapoursynth vslsmashsource.dll companion please ?
That's low on my priority list, but I'll see what I can do.
l33tmeatwad is offline   Reply With Quote
Old 3rd June 2018, 13:59   #746  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 248
When decoding 10-bit YUV 4:2:0, is there a need/way to specify whether the source is Rec.709 or Rec.2020? My source is Rec.709.
I'm using this bit of code from the wiki:

Code:
## Decoding 10bit, YUV 4:2:0 source
LSMASHVideoSource(<path>, stacked=true, format="YUV420P10")
ConvertFromStacked(bits=10)
It works. I'm just wondering if there's anything else that I need to add.
Richard1485 is offline   Reply With Quote
Old 3rd June 2018, 14:21   #747  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,500
Not in that simple script because you are not doing any "real" color conversions (like YUV to RGB or vice versa), only changing the storage format. (But you should set the correct flags in the encoder like x265/x264 you feed the script to.)
sneaker_ger is offline   Reply With Quote
Old 3rd June 2018, 14:33   #748  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Hello and thank you for the update of L-SMASH,

Previously i was using the FFMS2 shipped with Staxrip ( version 2.23.1 too apparently ), to give it a try I replaced it by the one released with libs and tried to open a .GIF file as input/source and it does not like this :
Quote:
Indexing using ffmsindex failed with exit code: -1073741701 (0xC000007B)
Tried some other files and getting the same kind of error messages with some MKV's or MP4's containers having some x264 streams inside.

Then tried to replace the ffmsindex.exe provided in the zip file by the one shipped in Staxrip (while keeping all other dll's you provided) and it seems to work like this, not sure what is going on.

Noticed that here https://github.com/FFMS/ffms2/releases there is a different ffmsindex.exe for both x86 and x64 ( hash is different ), while on your release a single one is provided for both, not sure if normal or not.

Using win7 x64 and all the workflow in Staxrip is x64 if this helps.

Thanks a lot

Edit : command used triggering the problem when i use your release:

Code:
LoadPlugin("H:\StaxRip-x64-1.7.0.6-test\Apps\Plugins\both\ffms2\ffms2.dll")
FFVideoSource("H:\test.mkv", colorspace = "YUV420P8", \
              cachefile = "H:\TEMP\test_temp\test.ffindex")

Last edited by Yanak; 3rd June 2018 at 14:40.
Yanak is offline   Reply With Quote
Old 3rd June 2018, 14:58   #749  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 248
Quote:
Originally Posted by sneaker_ger View Post
Not in that simple script because you are not doing any "real" color conversions (like YUV to RGB or vice versa), only changing the storage format.
Thanks! I should have thought of that. May I ask how I convert the video to 10-bit RGB? (The source is progressive, and I'm using Avisynth+.)

Sorry for this! I've looked at the Wiki but can't work it out. I've never worked with a 10-bit source before...

Last edited by Richard1485; 3rd June 2018 at 16:39.
Richard1485 is offline   Reply With Quote
Old 3rd June 2018, 15:15   #750  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,666
Quote:
Originally Posted by Richard1485 View Post
May I ask how I convert the video to 10-bit RGB?
I never did this but it's probably ConvertToRGBP10 ;
http://avisynth.nl/index.php/Avisynthplus_color_formats

And maybe add matrix="Rec709".
Music Fan is offline   Reply With Quote
Old 3rd June 2018, 15:22   #751  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 248
^ Yeah, thanks. :-) That's what I tried (with the matrix), but I received the standard "There is no function..." error message.
Richard1485 is offline   Reply With Quote
Old 3rd June 2018, 16:18   #752  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 448
Quote:
Originally Posted by l33tmeatwad View Post
So this was kind of a pain to figure out so I decided I would post some build notes to help anyone else out trying to compile their own. The static libs build is a single DLL file and the shared libs contains the libav DLLs.

LSMASHSource r941 (hydra3333 Mod)
Static Libs Build (x86 & x64) | Shared Libs Build (x86 & x64) | Sources
Bonus: FFMS2 with Shared Libs

Build Notes:
Compiled with Microsoft Visual Studio 2015
Shared Libs & Include Files were copied to the Visual Studio Directories in: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
Patch included with previous releases was applied to FFmpeg before compiling.

Static FFmpeg compiled with:
Code:
./configure --toolchain=msvc --enable-gpl --enable-version3 --disable-encoders --disable-programs --disable-filters \
 --disable-network --disable-doc --disable-avdevice --disable-swresample --disable-postproc --disable-avfilter --enable-avresample
make install
Shared Libs FFmpeg compiled with:
Code:
./configure --toolchain=msvc --enable-gpl --enable-version3 --enable-shared --disable-encoders --disable-programs --disable-filters \
--disable-network --disable-doc --disable-avdevice --disable-swresample --disable-postproc --disable-avfilter --enable-avresample
make install
Visual Studio Project Modifications (x86 Static Build)
Project Properties > Configuration Properties > VC++ Directories
- Include Directories: C:\msys32\usr\local\include
- Library Directories: C:\msys32\usr\local\lib
Project Properties > Configuration Properties > Linker > General
- Additional Library Directories: C:\msys32\usr\local\lib
Project Properties > Configuration Properties > Linker > Input
- Additional Dependencies: libavutil.a;libavcodec.a;libavformat.a;libswscale.a;libavresample.a;

Visual Studio Project Modifications (x64 Static Build)
Project Properties > Configuration Properties > VC++ Directories
- Include Directories: C:\msys64\usr\local\include
- Library Directories: C:\msys64\usr\local\lib
Project Properties > Configuration Properties > Linker > General
- Additional Library Directories: C:\msys64\usr\local\lib
Project Properties > Configuration Properties > Linker > Input
- Additional Dependencies: libavutil.a;libavcodec.a;libavformat.a;libswscale.a;libavresample.a;

Changes to exlibs.cpp (both Static Builds)
Code:
//#pragma comment( lib, "libmingwex.a" )
//#pragma comment( lib, "libgcc.a" )
#pragma comment( lib, "lsmash.lib" )
#pragma comment( lib, "bcrypt.lib" )
//#pragma comment( lib, "avutil.lib" )
//#pragma comment( lib, "avcodec.lib" )
//#pragma comment( lib, "avformat.lib" )
//#pragma comment( lib, "swscale.lib" )
//#pragma comment( lib, "avresample.lib" )
Changes to exlibs.cpp (both Builds w/ Shared Libs)
Code:
//#pragma comment( lib, "libmingwex.a" )
//#pragma comment( lib, "libgcc.a" )
#pragma comment( lib, "lsmash.lib" )
#pragma comment( lib, "avutil.lib" )
#pragma comment( lib, "avcodec.lib" )
#pragma comment( lib, "avformat.lib" )
#pragma comment( lib, "swscale.lib" )
#pragma comment( lib, "avresample.lib" )
Included Libs:
LibAV (from FFmpeg 4.0)
L-Smash 2.14.5

Other Software:
MSYS2 (i686 & x86_64)
Yasm 1.3.0 (General Use Executables)
this is a avs 2.5 API. can you update this to avs 2.6? greetings
__________________
[AUR] Vapoursynth Stuff
sl1pkn07 is offline   Reply With Quote
Old 3rd June 2018, 16:31   #753  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,361
Quote:
Originally Posted by Richard1485 View Post
^ Yeah, thanks. :-) That's what I tried (with the matrix), but I received the standard "There is no function..." error message.
Got same message here using trial avs+ from a couple of days back (not todays issue).

Tried with RT_Stats Make_Avisynth_BuiltIn_FunctionList.avs
Got this (partial output below)
Code:
        AviSynth+_0.1_(r2693,_MT,_i386)_ORDERED_Function_List


There follows a list of all function names together with CPP style argument specifiers that inform
Avisynth the argument types and optional names. Optional arguments have square brackets surrounding
their name as in [name] and are followed by a type specifier character that gives the type.
Unnamed arguments are not optional. eg "cc[arg1]b[arg2]i" would be two compulsory unnamed clip args,
followed by optional 'arg1' of type bool and optional 'arg2' of type int.

# Argument type specifier strings.
 c - Video Clip
 i - Integer number
 f - Float number
 s - String
 b - boolean
 . - Any type (dot)
# Array Specifiers
 i* - Integer Array, zero or more
 i+ - Integer Array, one or more
 .* - Any type Array, zero or more
 .+ - Any type Array, one or more
#    Etc
###################################

BitsPerComponent          "c"
BuildPixelType            "[family]s[bits]i[chroma]i[compat]b[oldnames]b[sample_clip]c"
ColorSpaceNameToPixelType "s"
CombinePlanes             "cccc[planes]s[source_planes]s[pixel_type]s[sample_clip]c"
ComponentSize             "c"
ConvertBackToYUY2         "c[matrix]s"
ConvertBits               "c[bits]i[truerange]b[dither]f[dither_bits]i[fulls]b[fulld]b"
ConvertTo16bit            "c[bits]i[truerange]b[dither]f[dither_bits]i[fulls]b[fulld]b"
ConvertTo8bit             "c[bits]i[truerange]b[dither]f[dither_bits]i[fulls]b[fulld]b"
ConvertToFloat            "c[bits]i[truerange]b[dither]f[dither_bits]i[fulls]b[fulld]b"
ConvertToMono             "c"
ConvertToPlanarRGB        "c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s"
ConvertToPlanarRGBA       "c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s"
ConvertToRGB              "c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s"
ConvertToRGB24            "c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s"
ConvertToRGB32            "c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s"
ConvertToRGB48            "c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s"
ConvertToRGB64            "c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s"
ConvertToY                "c[matrix]s"
ConvertToY8               "c[matrix]s"
ConvertToYUV411           "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s"
ConvertToYUV420           "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s[ChromaOutPlacement]s"
ConvertToYUV422           "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s"
ConvertToYUV444           "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s"
ConvertToYUY2             "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s"
ConvertToYV12             "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s[ChromaOutPlacement]s"
ConvertToYV16             "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s"
ConvertToYV24             "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s"
ConvertToYV411            "c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s"
Is420                     "c"
Is422                     "c"
Is444                     "c"
IsFloatUvZeroBased        ""
IsPackedRGB               "c"
IsPlanar                  "c"
IsPlanarRGB               "c"
IsPlanarRGBA              "c"
IsRGB                     "c"
IsRGB24                   "c"
IsRGB32                   "c"
IsRGB48                   "c"
IsRGB64                   "c"
IsVideoFloat              "c"
IsY                       "c"
IsY8                      "c"
IsYUV                     "c"
IsYUVA                    "c"
IsYUY2                    "c"
IsYV12                    "c"
IsYV16                    "c"
IsYV24                    "c"
IsYV411                   "c"
MergeARGB                 "cccc"
MergeChroma               "cc[chromaweight]f"
MergeLuma                 "cc[lumaweight]f"
MergeRGB                  "ccc[pixel_type]s"
NumComponents             "c"
PixelType                 "c"
PlaneToY                  "c[plane]s"
RemoveAlphaPlane          "c"
ShowAlpha                 "c[pixel_type]s"
ShowBlue                  "c[pixel_type]s"
ShowGreen                 "c[pixel_type]s"
ShowRed                   "c[pixel_type]s"
ShowU                     "c[pixel_type]s"
ShowV                     "c[pixel_type]s"
ShowY                     "c[pixel_type]s"
VToY                      "c"
VToY8                     "c"
YToUV                     "cccc"
YToUV                     "cccc"
YToUV                     "cccc"
This works OK
Code:
ColorBars.Killaudio
#ConvertToRGBP10(Matrix="rec709")   # Fail
#ConvertToPlanarRGB        "c[matrix]s[interlaced]b[ChromaInPlacement]s[chromaresample]s"
#ConvertBits               "c[bits]i[truerange]b[dither]f[dither_bits]i[fulls]b[fulld]b"
ConvertToPlanarRGB()       # Presumably dont need matrix here as from RGB
ConvertBits(10)
Info
ConverttoRGB32 # for display


EDIT: ConvertBits only works on Planar RGB, but OK on Planar YUV, eg YV12,
produces ColorSpace: YUV420P10, BitsPerComponent: 10.

EDIT:
AviSynth+_0.1_(r2693_ORDERED_Function_List.TXT.7z (Does not included any updated builtin filter definitions for todays updated avs+).
7Zip file ~5KB, expanded ~ 22KB text file.
http://www.mediafire.com/file/3ub7ld...on_List.TXT.7z

EDIT: Have extended partial output of builtin function definitions earlier in this post, Its possible that I may have missed one or two out.

EDIT: Only Single function definitions given in earlier text file, eg BlankClip has multiple alternate arg lists, but the RT_Stats script
cannot output multiple, they all produce same result text (there was no way to parse multiples external to avs Standard, I assume this has not changed in avs+).

EDIT: The ColorSpaceNameToPixelType() listed takes a colorspace name eg "RGBP10" and returns hex 0x90050001 [internal bit flags descriptor].
Perhaps some other missing definition (missing multiple definition) can take a PixelType and produce a clip, maybe eg
BlankClip(PixelType) exists, dont know (or some clip conversion filter).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 3rd June 2018 at 17:50.
StainlessS is offline   Reply With Quote
Old 3rd June 2018, 18:25   #754  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 248
^ I appreciate your help and interest in this problem. With your script, I get an error message that says: "There is no function named ConvertToPlanarRGB()", which baffles me. When I call Version(), the correct AviSynth+ version is displayed: I'm using the one released today (r1576, x64).
Richard1485 is offline   Reply With Quote
Old 3rd June 2018, 18:32   #755  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,041
Quote:
Originally Posted by Richard1485 View Post
I'm using the one released today (r1576, x64).
Seems old ? StainlessS is on r2693 if you look above
poisondeathray is offline   Reply With Quote
Old 3rd June 2018, 18:35   #756  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,983
Quote:
Originally Posted by sl1pkn07 View Post
Quote:
Page
long
full
quote
wasting
space
One line
Just a matter of taste?

If I refer to a specific part of a quote, I crop the quote down to the relevant part. Or just mention "@ author".
__

@ Richard1485:

Still the "ancient" version from http://avs-plus.net/ ... no, this page seems to be abandoned since 2014.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 3rd June 2018 at 18:37.
LigH is offline   Reply With Quote
Old 3rd June 2018, 18:39   #757  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 248
Quote:
Originally Posted by poisondeathray View Post
Seems old ?
That's very strange, because I reinstalled it today. But you're right. It must be picking up an old version from somewhere. I'll try installing it again.

EDIT: Okay. The version information is now correct. (Thanks, LigH!)

EDIT: Now there's a message about the conversion to RGB being possible only from an 8-bit source. It must be the call to ConvertToRGB32() at the end.

EDIT: Well, if I remove the call to ConvertToRGB32(), the error message goes away, but VirtualDub2 chokes on the video because it "can't locate a decompressor for format "G3[0][10]" (unknown)".

Last edited by Richard1485; 3rd June 2018 at 18:48.
Richard1485 is offline   Reply With Quote
Old 3rd June 2018, 19:50   #758  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,258
Ok. In latest avs+ _test_ build, see avs+ topic for r2696, I have made ConvertoRgb32 callable from any bitdepth, helping the previewing. When you removed the conversion, your clip is fed to vdub as planar 10 bit rgb fooucc code: G3[0][10] which is not handled by your system. You may do Convertbits(8).Converttorgb32 or Convertbits(16). Converttorgb64 if you are using avs+ r2664 (latest official). Latter needs Vdub2
pinterf is offline   Reply With Quote
Old 3rd June 2018, 22:01   #759  |  Link
Richard1485
Registered User
 
Join Date: Feb 2010
Posts: 248
Yeah, I guessed the reason for the last error message. Thanks! Is ConvertToRGBP10() not an option at present? I'm just trying to get my head round this high bit-depth stuff. ☺
Richard1485 is offline   Reply With Quote
Old 3rd June 2018, 23:34   #760  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,096
Quote:
Originally Posted by Richard1485 View Post
Is ConvertToRGBP10() not an option at present?
IMO, there's way too many* new pixel formats added to AviSynth+ to add explicit bridging functions for all of them to the core. A better place for them - if you really feel like you need direct shortcuts, rather than using the more generic functions added to AviSynth+ to handle this - would be to break them out into an AVSI file like the colors_rgb list is. Otherwise it's a lot of nearly-identical code copy-pasted over and over again with only minor changes, for each destination format.

*you can see them all listed in the AviSynth+ headers (link directs only to the new set, just scroll up a little for the 2.5/2.6 formats):
https://github.com/AviSynth/AviSynth...synth_c.h#L146

That's 52 new pixel formats. And most of the internal bridges would just be invoking a combination of ConvertBits and ConvertTo[YUV***|PlanarRGB(A)], which like I said, is much easier to just break out into an AVSI:
Code:
function ConvertToRGBP10(clip c)
{
    ConvertToPlanarRGB(c)
    ConvertBits(10)
}
That is, of course, just an example and doesn't enable most of the underlying extra params from ConvertBits and ConvertToPlanarRGB, but those could be passed through with minimal effort, right there in the AVSI.
qyot27 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 19:09.


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