Quote:
Originally Posted by forgetfool
Ok, I started all over. (Deleted all the old stuff.)
AviSynth+
---------
git clone git://github.com/AviSynth/AviSynthPlus.git
cd AviSynthPlus
mkdir avisynth-build
cd avisynth-build
cmake ../ -G Ninja
ninja
su
ninja install
FFmpeg
------
git clone git://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
mkdir ffmpeg-build-for-ffms2
cd ffmpeg-build-for-ffms2
../configure \
--prefix=$HOME/ffmpeg_build_for_ffms2 \
--enable-gpl \
--enable-version3 \
--disable-encoders \
--disable-muxers \
--disable-doc \
--disable-debug \
--disable-devices \
--disable-avdevice \
--enable-libdav1d \
--extra-cflags="-march=native"
make -j$(nproc)
su
make install
Test 1
-------
nano test.avs
Version()
./ffplay -i test.avs
[info] ffplay version N-101739-gcad3a5d715 Copyright (c) 2003-2021 the FFmpeg developers
[info] built with gcc 10.2.0 (GCC)
[info] configuration: --prefix=/home/user1/ffmpeg_build_for_ffms2 --enable-gpl --enable-version3 --disable-encoders --disable-muxers --disable-doc --disable-debug --disable-devices --disable-avdevice --enable-libdav1d --extra-cflags='-march=native'
[info] libavutil 56. 72.100 / 56. 72.100
[info] libavcodec 58.135.100 / 58.135.100
[info] libavformat 58. 77.100 / 58. 77.100
[info] libavfilter 7.111.100 / 7.111.100
[info] libswscale 5. 10.100 / 5. 10.100
[info] libswresample 3. 10.100 / 3. 10.100
[info] libpostproc 55. 10.100 / 55. 10.100
[verbose] Initialized opengl renderer.
[NULL @ 0x7ff1a8000c80] [debug] Opening 'test.avs' for reading
[file @ 0x7ff1a8001980] [debug] Setting default whitelist 'file,crypto,data'
[avs2 @ 0x7ff1a8000c80] [warning] Format avs2 detected only with low score of 1, misdetection possible!
[avs2 @ 0x7ff1a8000c80] [debug] Before avformat_find_stream_info() pos: 0 bytes read:11 seeks:0 nb_streams:1
[avs2 @ 0x7ff1a8000c80] [warning] Could not find codec parameters for stream 0 (Video: avs2, 1 reference frame, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[avs2 @ 0x7ff1a8000c80] [debug] After avformat_find_stream_info() pos: 11 bytes read:11 seeks:0 frames:1
[info] Input #0, avs2, from 'test.avs':
[info] Duration: N/A, bitrate: N/A
[info] Stream #0:0, 1, 1/1200000: Video: avs2, 1 reference frame, none, 1200k tbr, 1200k tbn, 1200k tbc
[warning] No decoder could be found for codec avs2
[fatal] Failed to open file 'test.avs' or configure filtergraph
[AVIOContext @ 0x7ff1a8009dc0] [verbose] Statistics: 11 bytes read, 0 seeks
Any suggestion what to try?
THANKS
!
|
Of course it didn't work. Those were the minimal FFmpeg instructions intended only to build FFMS2, and AviSynth wasn't enabled. Even if it was, you wouldn't be able to do anything with it.
Quote:
And if I follow this guide: https://github.com/AviSynth/AviSynth...ting/posix.rst, up to test installation with Version(), I get just this:
[info] ffplay version N-101739-gcad3a5d715 Copyright (c) 2003-2021 the FFmpeg developers
[info] built with gcc 10.2.0 (GCC)
[info] configuration: --enable-gpl --enable-version3 --disable-doc --disable-debug --enable-pic --enable-avisynth --cc=cc
[info] libavutil 56. 72.100 / 56. 72.100
[info] libavcodec 58.135.100 / 58.135.100
[info] libavformat 58. 77.100 / 58. 77.100
[info] libavdevice 58. 14.100 / 58. 14.100
[info] libavfilter 7.111.100 / 7.111.100
[info] libswscale 5. 10.100 / 5. 10.100
[info] libswresample 3. 10.100 / 3. 10.100
[info] libpostproc 55. 10.100 / 55. 10.100
[verbose] Initialized opengl renderer.
[NULL @ 0x7f9b14000c80] [debug] Opening 'test.avs' for reading
[file @ 0x7f9b14001980] [debug] Setting default whitelist 'file,crypto,data'
[avisynth @ 0x7f9b14000c80] [debug] Format avisynth probed with size=2048 and score=50
[AVIOContext @ 0x7f9b14009dc0] [verbose] Statistics: 11 bytes read, 0 seeks
[error] test.avs: Unknown error occurred
I don't think any AddAutoLoadDir() is needed for just Version(), right?
So I went back to previous ../configure options. I think we didn't get something right in ffmpeg configure...
|
Code:
ls -l /usr/local/lib/libavisynth*
There should be
three files it lists: libavisynth.so.3.7.0, libavisynth.so.8, and libavisynth.so. For whatever reason, the libavisynth.so symlink doesn't always get installed.
Or much more easily:
1) Install AviSynth+ and FFmpeg from the Community repo.
2) Build/install minimal FFmpeg as listed above
3) Build/install FFMS2, directing PKG_CONFIG_PATH to the minimal FFmpeg and installing it to $HOME/.local:
Code:
PKG_CONFIG_PATH=$HOME/ffmpeg_build_for_ffms2/lib/pkgconfig \
CPPFLAGS="-I/usr/include/avisynth" \
./autogen.sh --prefix=$HOME/.local --libdir=$HOME/.local/lib/avisynth --enable-shared --enable-avisynth && \
make -j$(nproc)
make install
And then whenever you feel the need to update FFMS2 (every few months or something), repeat steps 2 & 3.
You may or may not need to add $HOME/.local/bin to the $PATH in your user profile so you can use ffmsindex.
Do not use root permissions when installing things to your $HOME directory. That is asking for trouble.