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 4th March 2020, 17:03   #21  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Thanx magiblot, I have no idea what my shell is, but assume bash.
(Had mint installed for several months(maybe 6, maybe 9), only ever updated it, done nothing else).
EDIT: almost nothing else, sometimes Ive used it as a browser. [I never seem to have time for anything else]

MOBILE:

EDIT: Powerhouse Porter is great, Adnams Broadside next, lubbely
__________________
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; 4th March 2020 at 17:28.
StainlessS is offline   Reply With Quote
Old 4th March 2020, 17:36   #22  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by StainlessS View Post
Thanks DJATOM,

Results
Code:
steve@Plex-780:~/AviSynthPlus/avisynth-build$ CC=gcc-9 CXX=g++-9 LD=gcc-9 cmake ../ -G Ninja -DCMAKE_CXX_FLAGS="-fpermissive" && ninja && sudo ninja install 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/steve/AviSynthPlus/avisynth-build
[2/66] Building CXX object avs_core/CMakeFiles/AvsCore.dir/core/PluginManager.cpp.o
FAILED: avs_core/CMakeFiles/AvsCore.dir/core/PluginManager.cpp.o 
/usr/bin/g++  -DAvsCore_EXPORTS -DBUILDING_AVSCORE -I../avs_core/include -Iavs_core -fpermissive -msse2  -Wl,--no-undefined -fPIC   -std=c++1z -MD -MT 
avs_core/CMakeFiles/AvsCore.dir/core/PluginManager.cpp.o -MF avs_core/CMakeFiles/AvsCore.dir/core/PluginManager.cpp.o.d 
-o avs_core/CMakeFiles/AvsCore.dir/core/PluginManager.cpp.o -c ../avs_core/core/PluginManager.cpp
../avs_core/core/PluginManager.cpp:8:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
[7/66] Building CXX object avs_core/CMakeFiles/AvsCore.dir/core/avisynth.cpp.o
../avs_core/core/avisynth.cpp: In member function ‘virtual char* ScriptEnvironment::VSprintf(const char*, void*)’:
../avs_core/core/avisynth.cpp:3142:50: warning: ISO C++ forbids casting to an array type ‘va_list {aka __va_list_tag [1]}’ [-fpermissive]
     std::string str = FormatString(fmt, (va_list)val);
                                                  ^~~
ninja: build stopped: subcommand failed.
steve@Plex-780:~/AviSynthPlus/avisynth-build$
EDIT: Edited a line for line wrap
CMake can't reconfigure compilers after you've already configured it for a different set.

Looks like I need to make the instructions a little more explicit. I'd been in a bit of a rush when I wrote that up and neglected to actually put down the build instructions for AviSynth+ on Ubuntu.
qyot27 is offline   Reply With Quote
Old 4th March 2020, 18:00   #23  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
little more explicit.
Yep, good idea for us tards
__________________
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 4th March 2020, 18:24   #24  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by qyot27 View Post
I'd been in a bit of a rush when I wrote that up and neglected to actually put down the build instructions for AviSynth+ on Ubuntu.
In that case, I must have run the instructions for macOS. I thought that there was a gap in the guide but interpreted it to mean that after the prerequisites had been satisfied, the build instructions were the same for macOS and Ubuntu.

Last edited by Richard1485; 4th March 2020 at 18:26.
  Reply With Quote
Old 4th March 2020, 19:27   #25  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Well, truth be told, I prefer Ninja anyway, so even on Ubuntu I still use it (on macOS it's a little more important to use Ninja because of weirdness concerning the Apple binutils and linking to libstc++). The major difference is that on 19.10, there's no need to override CC/CXX/LD because you're already using GCC 9.

For 19.04 and 19.10:
Code:
git clone git://github.com/AviSynth/AviSynthPlus.git
cd AviSynthPlus
mkdir avisynth-build
cd avisynth-build

cmake ../ -G Ninja -DCMAKE_CXX_FLAGS="-fpermissive"
ninja
    sudo checkinstall --pkgname=avisynth --pkgversion="$(grep -r \
    Version avs_core/avisynth.pc | cut -f2 -d " ")-$(date --rfc-3339=date | \
    sed 's/-//g')-git" --backup=no --deldoc=yes --delspec=yes --deldesc=yes \
    --strip=yes --fstrans=no --default ninja install
Or if you'd rather use regular old GNU make:

Code:
git clone git://github.com/AviSynth/AviSynthPlus.git
cd AviSynthPlus
mkdir avisynth-build
cd avisynth-build

cmake ../ -DCMAKE_CXX_FLAGS="-fpermissive"
make -j$(nproc)
    sudo checkinstall --pkgname=avisynth --pkgversion="$(grep -r \
    Version avs_core/avisynth.pc | cut -f2 -d " ")-$(date --rfc-3339=date | \
    sed 's/-//g')-git" --backup=no --deldoc=yes --delspec=yes --deldesc=yes \
    --strip=yes --fstrans=no --default
For 18.04, after adding the PPA mentioned and installing the gcc-9 and g++-9 packages, the only difference for both of the above examples would be tacking CC=gcc-9 CXX=g++-9 LD=gcc-9 onto the front of the cmake command, just like on Mac.
qyot27 is offline   Reply With Quote
Old 4th March 2020, 19:54   #26  |  Link
Richard1485
Guest
 
Posts: n/a
If I used the macOS instructions as opposed to the Ubuntu ones just posted, do I have to uninstall and reinstall with the latter?
  Reply With Quote
Old 4th March 2020, 20:06   #27  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Not really, the only substantive difference is checkinstall, which doesn't affect the actual running of anything (it just supervises the install process, makes a deb package and actually registers it in dpkg/apt so it can be handled with the package management system). If you didn't use checkinstall, you probably do need to run sudo ldconfig after sudo make install, though.
qyot27 is offline   Reply With Quote
Old 4th March 2020, 20:18   #28  |  Link
reisub
Registered User
 
Join Date: Feb 2020
Posts: 5
I can `t believe my eyes. Avisynt + released on * NIX. This is amazing.
Quote:
Originally Posted by sl1pkn07 View Post
Thanks!
reisub is offline   Reply With Quote
Old 4th March 2020, 20:20   #29  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by qyot27 View Post
If you didn't use checkinstall, you probably do need to run sudo ldconfig after sudo make install, though.
Yeah, I didn't use checkinstall. I ran sudo ninja install in accordance with the macOS instructions, so I'll just run sudo ldconfig.
  Reply With Quote
Old 4th March 2020, 21:16   #30  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
I can only encourage all not-so-commandline hero Windows guys to plunge into this another world. StainlessS, it's not magic (haha, yes, it is)

I apologize from those who are using linux regularly but the first steps are always hard for a beginner, even if I have already used it many years ago for some days. When you say that one should simply "configure again", everybody understands except poor us, without a context this simple sentence means nothing for us. One simple additional sentence or hint can spare us hours

My learning curve in brief.

I'm on Windows 10. Downloaded and installed the 18.04 WSL Ubuntu app (!), upgraded to 19.10.

Fortunately I had zero problems with GCC, I got version 9 ready.

Since I put a non-final test username at the installation time I then spent some hours with altering the default user who logins when I start the Ubuntu app. (Yes, Windows registry). I even learned the su command.

Then I got Midnight Commander, learned about nano (a text editor here, read about it on SO), configured git, and with qyot27's help I was able to build ffmpeg and avisynth+. Some problematic steps in the learning curve were the rights, such as using MC CTRL-X C for setting execute rights on files, keyboard commands of nano, that the letter M means ALT key in nano's help, frequently using that sudo thing for getting elevated rights. And there was a familiar thing: using the TAB key(s) I could easily auto-complete the commands or file and directory names. And finally: the file system is nicely mapped and accessible from Windows under \\wsl$\Ubuntu-18.04\ folder.

It's so simple, you are using Windows _and_ can have a couple of Ubuntu terminal windows.

One with avisynth build directory, another one with test avs scripts and ffmpeg, a third one with nano, a fourth console with mc to copy this and that.
pinterf is offline   Reply With Quote
Old 4th March 2020, 21:20   #31  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
And a question: I have an AVX2 capable processor but the Info() filter tells me that Avisynth+ is seeing only up to AVX. However when I cat the processor features in the console I can see there AVX2.
I wonder if AVX2 detection fails only for me (because of WSL) or it has a generic problem.
pinterf is offline   Reply With Quote
Old 4th March 2020, 21:34   #32  |  Link
Richard1485
Guest
 
Posts: n/a
So, for installing ffmpeg on Ubuntu, the instructions say to leave out the --prefix option and add a checkinstall command. If I've understood correctly, this should be right:

Code:
    ./configure --enable-gpl --enable-version3 \
    --disable-doc --disable-debug --enable-pic --enable-avisynth && \
make -j$(nproc) && \
sudo checkinstall --pkgname=ffmpeg --pkgversion="7:$(git rev-list \
--count HEAD)-g$(git rev-parse --short HEAD)" --backup=no --deldoc=yes \
--delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes \
--fstrans=no --default
  Reply With Quote
Old 4th March 2020, 22:02   #33  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377

OS: Debian 10.3, CPU: i3-8100.
It seems there is no AVX2 detection on my side.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 4th March 2020, 22:27   #34  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by Richard1485 View Post
So, for installing ffmpeg on Ubuntu, the instructions say to leave out the --prefix option and add a checkinstall command. If I've understood correctly, this should be right:

Code:
    ./configure --enable-gpl --enable-version3 \
    --disable-doc --disable-debug --enable-pic --enable-avisynth && \
make -j$(nproc) && \
sudo checkinstall --pkgname=ffmpeg --pkgversion="7:$(git rev-list \
--count HEAD)-g$(git rev-parse --short HEAD)" --backup=no --deldoc=yes \
--delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes \
--fstrans=no --default
Yes, if you want that FFmpeg installed to the system. I set the instructions up to have FFmpeg installed to $HOME (which can be installed with just make install because you own that directory and don't want to be using sudo there) because I didn't want to get into the weeds of all the other things distros compile into FFmpeg (if you want libxvid, libx264, libx265, libdav1d, libaom, libopus, mbedtls, etc.). I kept it down to strictly what it takes for an AviSynth-supporting build, so that if you'd rather have a more fully-featured FFmpeg on the system, they won't conflict with each other.

If you're adventurous/patient enough to go through and make sure the builds are equivalent (or you don't care about any of those other external libraries), then installing to the system should be fine. sudo apt-get build-dep ffmpeg would have gotten you most of the way there, dependency-wise, so you could then use ffmpeg -buildconf and copy the configuration options over to the avsplus_linux patched version.

Ubuntu (well, Debian) configures its FFmpeg package with --enable-avisynth, so once the situation about switching away from AvxSynth gets resolved, there will be a point where we don't have to cover FFmpeg in the Ubuntu section of the docs. It'll just work once you install AviSynth+.
qyot27 is offline   Reply With Quote
Old 4th March 2020, 23:33   #35  |  Link
Richard1485
Guest
 
Posts: n/a
That all makes sense. I noticed in the past that after building ffmpeg, there can be issues with other programs that expect to see certain versions of libraries. For now, I'll stick to installing to $HOME. Unfortunately, an error appears during make. This is where the error occurs:

Code:
AR	libavdevice/libavdevice.a
AR	libavfilter/libavfilter.a
AR	libavformat/libavformat.a
AR	libpostproc/libpostproc.a
AR	libavcodec/libavcodec.a
AR	libswresample/libswresample.a
AR	libswscale/libswscale.a
CC	libavutil/hwcontext_cuda.o
CC	libavutil/integer.o
CC	libavutil/intmath.o
CC	libavutil/lfg.o
CC	libavutil/lls.o
CC	libavutil/log.o
CC	libavutil/log2_tab.o
CC	libavutil/lzo.o
CC	libavutil/mastering_display_metadata.o
CC	libavutil/mathematics.o
CC	libavutil/md5.o
In file included from libavutil/hwcontext_cuda.c:27:
libavutil/hwcontext_cuda.c: In function ‘cuda_device_uninit’:
libavutil/hwcontext_cuda.c:300:28: error: ‘CudaFunctions’ {aka ‘struct CudaFunctions’} has no member named ‘cuDevicePrimaryCtxRelease’
  300 |                 CHECK_CU(cu->cuDevicePrimaryCtxRelease(hwctx->internal->cuda_device));
      |                            ^~
libavutil/cuda_check.h:62:114: note: in definition of macro ‘FF_CUDA_CHECK_DL’
   62 | #define FF_CUDA_CHECK_DL(avclass, cudl, x) ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x)
      |                                                                                                                  ^
libavutil/hwcontext_cuda.c:300:17: note: in expansion of macro ‘CHECK_CU’
  300 |                 CHECK_CU(cu->cuDevicePrimaryCtxRelease(hwctx->internal->cuda_device));
      |                 ^~~~~~~~
libavutil/hwcontext_cuda.c: In function ‘cuda_context_init’:
libavutil/hwcontext_cuda.c:353:26: error: ‘CudaFunctions’ {aka ‘struct CudaFunctions’} has no member named ‘cuDevicePrimaryCtxGetState’
  353 |         ret = CHECK_CU(cu->cuDevicePrimaryCtxGetState(hwctx->internal->cuda_device,
      |                          ^~
libavutil/cuda_check.h:62:114: note: in definition of macro ‘FF_CUDA_CHECK_DL’
   62 | #define FF_CUDA_CHECK_DL(avclass, cudl, x) ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x)
      |                                                                                                                  ^
libavutil/hwcontext_cuda.c:353:15: note: in expansion of macro ‘CHECK_CU’
  353 |         ret = CHECK_CU(cu->cuDevicePrimaryCtxGetState(hwctx->internal->cuda_device,
      |               ^~~~~~~~
libavutil/hwcontext_cuda.c:362:30: error: ‘CudaFunctions’ {aka ‘struct CudaFunctions’} has no member named ‘cuDevicePrimaryCtxSetFlags’
  362 |             ret = CHECK_CU(cu->cuDevicePrimaryCtxSetFlags(hwctx->internal->cuda_device,
      |                              ^~
libavutil/cuda_check.h:62:114: note: in definition of macro ‘FF_CUDA_CHECK_DL’
   62 | #define FF_CUDA_CHECK_DL(avclass, cudl, x) ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x)
      |                                                                                                                  ^
libavutil/hwcontext_cuda.c:362:19: note: in expansion of macro ‘CHECK_CU’
  362 |             ret = CHECK_CU(cu->cuDevicePrimaryCtxSetFlags(hwctx->internal->cuda_device,
      |                   ^~~~~~~~
libavutil/hwcontext_cuda.c:368:26: error: ‘CudaFunctions’ {aka ‘struct CudaFunctions’} has no member named ‘cuDevicePrimaryCtxRetain’
  368 |         ret = CHECK_CU(cu->cuDevicePrimaryCtxRetain(&hwctx->cuda_ctx,
      |                          ^~
libavutil/cuda_check.h:62:114: note: in definition of macro ‘FF_CUDA_CHECK_DL’
   62 | #define FF_CUDA_CHECK_DL(avclass, cudl, x) ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x)
      |                                                                                                                  ^
libavutil/hwcontext_cuda.c:368:15: note: in expansion of macro ‘CHECK_CU’
  368 |         ret = CHECK_CU(cu->cuDevicePrimaryCtxRetain(&hwctx->cuda_ctx,
      |               ^~~~~~~~
CC	libavutil/mem.o
make: *** [ffbuild/common.mak:59: libavutil/hwcontext_cuda.o] Error 1
make: *** Waiting for unfinished jobs....
  Reply With Quote
Old 5th March 2020, 03:52   #36  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Those relate to trying to enable CUDA, which is autodetected apparently. I don't personally have an Nvidia card new enough to support CUDA, so I guess it skips it here. You may want to either --disable-cuvid (hopefully that's the right one; there's like three of them) or if more things in the hwaccels have problems, even go nuclear and use --disable-hwaccels.
qyot27 is offline   Reply With Quote
Old 5th March 2020, 05:30   #37  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by qyot27 View Post
You may want to either --disable-cuvid (hopefully that's the right one; there's like three of them) or if more things in the hwaccels have problems, even go nuclear and use --disable-hwaccels.
Unfortunately, even if I add both options to configure, I still see the error message,

Code:
./configure --prefix=$HOME/ffavx_build --enable-gpl --enable-version3 \
--disable-doc --disable-debug --enable-pic --enable-avisynth --disable-cuvid --disable-hwaccels
My card is pretty old now: ~8 years. It was as useful on Windows as it's been annoying on Linux.

EDIT: This seems to work.

Code:
./configure --prefix=$HOME/ffavx_build --enable-gpl --enable-version3 \
--disable-doc --disable-debug --enable-pic --enable-avisynth --disable-cuvid --disable-hwaccels --disable-cuda-llvm --disable-ffnvcodec

Last edited by Richard1485; 5th March 2020 at 05:54.
  Reply With Quote
Old 5th March 2020, 06:29   #38  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
@qyot27 little offtopic but related

you have plans for send the avisynth+ patches to upstream ffmpeg and ffms2?

greetings
__________________
[AUR] Vapoursynth Stuff
[AUR] Avisynth Stuff
sl1pkn07 is offline   Reply With Quote
Old 5th March 2020, 09:54   #39  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by DJATOM View Post
OS: Debian 10.3, CPU: i3-8100.
It seems there is no AVX2 detection on my side.
Thank you. I'll check it then.
pinterf is offline   Reply With Quote
Old 5th March 2020, 12:10   #40  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
mmm



BlankClip(color=$000000)

same output

but version works ok



EDIT: ColorbarsHS() works

__________________
[AUR] Vapoursynth Stuff
[AUR] Avisynth Stuff

Last edited by sl1pkn07; 5th March 2020 at 12:18.
sl1pkn07 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 20:39.


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