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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th March 2021, 16:50   #121  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by MeteorRain View Post
For anyone who wants to try x265 and avs+ under Debian buster and Ubuntu bionic: https://yuuki-deb.x86.men/
I receive an error message on Buster:
Quote:
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://yuuki-deb.x86.men buster InRelease' doesn't support architecture 'i386'
My /etc/apt/sources.list.d/yuuki-deb.list looks like this:
Quote:
deb http://yuuki-deb.x86.men/ buster main
EDIT: I have i386 architecture enabled only because of Wine.

Last edited by Richard1485; 16th March 2021 at 19:50.
  Reply With Quote
Old 20th March 2021, 21:05   #122  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
Yea it's x86_64 only. You can safely ignore it.

Also I believe fft3d doesn't work correctly. I may need to look into it at a later time.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 20th March 2021, 23:47   #123  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by MeteorRain View Post
You can safely ignore it.
Cool. I don't need fft3d, so no worries there.

Hey, there's some good stuff in this repo, which I didn't know about until recently. It's nice not to have to build some plugins from source, and closer to the way that we're meant to do things on Linux. Thanks!

EDIT: The instructions here for building ffmpeg worked fine on Debian. I installed avisynthplus-yuuki-dev in addition to avisynthplus-yuuki.

Last edited by Richard1485; 21st March 2021 at 20:23.
  Reply With Quote
Old 26th May 2021, 00:55   #124  |  Link
pokota
Plushie
 
pokota's Avatar
 
Join Date: Dec 2016
Posts: 2
You can specify an architecture for a specific repository in your sources.list file - in this case, by using
Code:
deb [arch=amd64] http://yuuki-deb.x86.men buster main
Are there still no plugin autoload directories, or has that changed? Also are there any Linux-ecosystem players that accept frameserved input, or will I be stuck encoding for preview work?
__________________
Still watching stuff on a 16:9 720p60 TV
pokota is offline   Reply With Quote
Old 26th May 2021, 01:31   #125  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
Quote:
Originally Posted by pokota View Post
Are there still no plugin autoload directories, or has that changed? Also are there any Linux-ecosystem players that accept frameserved input, or will I be stuck encoding for preview work?
Autoload directories have worked on Linux, macOS, and at least¹ FreeBSD since 3.5.1.

¹requires mounting /proc, which OpenBSD (and possibly others) don't have.

Anything that uses libavformat, so long as it's FFmpeg 4.3 or higher and was configured with --enable-avisynth. If the ffmpeg supplied by the distro doesn't use that configuration flag, you'll have to build it yourself or use a third-party repo.
qyot27 is offline   Reply With Quote
Old 7th September 2023, 18:05   #126  |  Link
JunkyardCat
Registered User
 
Join Date: Jul 2023
Posts: 3
cannot get .avs test script to run

I've run into a wall with getting AviSynth+ running on my Fedora 38 box. I believe I compiled AviSynth+ & and ffmpeg properly, but get the error below when trying to run the test.avs script. Could this be a codec issue? Not sure where to go...any point in the right direction would go most appreciated!

test.avs:

Code:
$ cat test.avs 
Version()
Error when testing out the test.avs script

Code:
$ ./ffplay test.avs 
ffplay version N-111974-gfd9bafc85e Copyright (c) 2003-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/junkyardcat/ffmpeg_build --enable-gpl --enable-version3 --disable-doc --disable-debug --enable-pic --enable-avisynth
  libavutil      58. 19.100 / 58. 19.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 11.100 / 60. 11.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
test.avs: Unknown error occurred   0KB vq=    0KB sq=    0B f=0/0   
warning: queue 0x3cfab10 destroyed while proxies still attached:
  wl_callback@40 still attached
  wl_surface@38 still attached
confirmation AviSynthPlus is installed:
Code:
$ /home/junkyardcat/ffmpeg_build/bin/ffmpeg -formats | grep avisynth
ffmpeg version N-111974-gfd9bafc85e Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/junkyardcat/ffmpeg_build --enable-gpl --enable-version3 --disable-doc --disable-debug --enable-pic --enable-avisynth
  libavutil      58. 19.100 / 58. 19.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 11.100 / 60. 11.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
 D  avisynth        AviSynth script
JunkyardCat is offline   Reply With Quote
Old 15th September 2023, 03:13   #127  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
I really do need to revamp the POSIX page in the docs. But I went ahead and spun up a fresh Fedora 38 VM to confirm my suspicions, and I'm pretty much 100% certain that your issue is with LD_LIBRARY_PATH (that is, unless you did something weird, like try to build AviSynth+ as a static library).

Fedora installs user-compiled things to /usr/local by default (like most distros do), and shared libraries in that situation go into /usr/local/lib64. /usr/local/bin is on the PATH, but /usr/local/lib64 is not on LD_LIBRARY_PATH. /usr/lib64 is on LD_LIBRARY_PATH, so if you install directly into /usr it'll work.

Since there aren't any Fedora-specific instructions in that guide in the docs, here's what you'd ideally be looking at:
Dependencies:
Code:
sudo dnf install git ninja-build DevIL g++ DevIL-devel cmake
AviSynth+:
Code:
git clone https://github.com/AviSynth/AviSynthPlus.git
cd AviSynthPlus
mkdir avisynth-build
cd avisynth-build
cmake ../ -G Ninja -DCMAKE_INSTALL_PREFIX=/usr
ninja
sudo ninja install
I've become rather partial to making use of $HOME/.local if possible, since it removes the need to use sudo, and $HOME/.local/bin is on the PATH for your user.

avs2yuv:
Code:
git clone https://github.com/DJATOM/avs2yuv.git
cd avs2yuv
mkdir build
cd build
cmake ../ -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/.local
ninja
ninja install
avs2yuv can be used to pipe into the standard Fedora build of ffmpeg-free, so you could run the test check like this:
Code:
echo 'Version(pixel_type="YUV420P8")'>test.avs
Code:
avs2yuv test.avs -o - | ffplay -
FFmpeg:
Code:
sudo dnf install nasm
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
mkdir ffmpeg-build
cd ffmpeg-build
../configure --prefix=$HOME/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth <other configuration options if you want>
make -j$(nproc)
make install
Now you can invoke the AviSynth-supporting FFmpeg using ffmpeg-avs.


Example of the above FFmpeg-avs trying and failing to find AviSynth+ in /usr/local/lib64 (under LXDE):
Code:
[qyot27@fedora ~]$ ffmpeg-avs -i test.avs
ffmpeg version N-112081-gc1b6235d41 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/qyot27/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth
  libavutil      58. 24.100 / 58. 24.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 12.101 / 60. 12.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[in#0 @ 0x30363c0] Error opening input: Unknown error occurred
Error opening input file test.avs.
Error opening input files: Unknown error occurred
[qyot27@fedora ~]$
However, with LD_LIBRARY_PATH:
Code:
[qyot27@fedora ~]$ LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg-avs -i test.avs
ffmpeg version N-112081-gc1b6235d41 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/qyot27/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth
  libavutil      58. 24.100 / 58. 24.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 12.101 / 60. 12.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, avisynth, from 'test.avs':
  Duration: 00:00:10.00, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m/unknown/unknown), 480x106, 24 fps, 24 tbr, 24 tbn
At least one output file must be specified
[qyot27@fedora ~]$

What this means is that you have several different options:
A) Install AviSynth+ to /usr, so that the library and its symlinks get put in /usr/lib64. This is the most straightforward to make sure that avs2yuv, ffmpeg, etc. can always see it.
B) Use LD_LIBRARY_PATH= to add /usr/local/lib64 (or ~/.local/lib64, if you also install AviSynth+ to $HOME/.local) to the search path when you run avs2yuv or ffmpeg-avs. Alias them in .bashrc if you don't want to keep remembering to override LD_LIBRARY_PATH.
C) Unconditionally add /usr/local/lib64 (and/or ~/.local/lib64) to LD_LIBRARY_PATH in .bashrc. May or may not be a good idea.

Last edited by qyot27; 16th September 2023 at 23:40.
qyot27 is offline   Reply With Quote
Old 16th September 2023, 22:57   #128  |  Link
JunkyardCat
Registered User
 
Join Date: Jul 2023
Posts: 3
Thank you so much for the response. This is super helpful. I have a poor understanding of how libraries are shared with local vs system installs, but your explanation helps explain some of that.

I compiled and built everything to your instructions with the exception of the below, had to change --enable-version to --enable-version3.

Quote:
Originally Posted by qyot27 View Post
FFmpeg:
Code:
sudo dnf install nasm
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
mkdir ffmpeg-build
cd ffmpeg-build
../configure --prefix=$HOME/.local --progs-suffix=-avs --enable-gpl --enable-version --disable-debug --disable-doc --enable-pic --enable-avisynth <other configuration options if you want>
make -j$(nproc)
make install
Now you can invoke the AviSynth-supporting FFmpeg using ffmpeg-avs.
ffmpeg-avs did not return an error when not pointing to LD_LIBRARY_PATH=/usr/local/lib64 per the below. See my output. What are your thoughts?

Quote:
Originally Posted by qyot27 View Post
Example of the above FFmpeg-avs trying and failing to find AviSynth+ in /usr/local/lib64 (under LXDE):
Code:
[qyot27@fedora ~]$ ffmpeg-avs -i test.avs
ffmpeg version N-112081-gc1b6235d41 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/qyot27/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth
  libavutil      58. 24.100 / 58. 24.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 12.101 / 60. 12.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[in#0 @ 0x30363c0] Error opening input: Unknown error occurred
Error opening input file test.avs.
Error opening input files: Unknown error occurred
[qyot27@fedora ~]$
However, with LD_LIBRARY_PATH:
Code:
[qyot27@fedora ~]$ LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg-avs -i test.avs
ffmpeg version N-112081-gc1b6235d41 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/qyot27/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth
  libavutil      58. 24.100 / 58. 24.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 12.101 / 60. 12.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, avisynth, from 'test.avs':
  Duration: 00:00:10.00, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m/unknown/unknown), 480x106, 24 fps, 24 tbr, 24 tbn
At least one output file must be specified
[qyot27@fedora ~]$
MY OUTPUT:

Code:
[junkyardcat@fedora ~]$ ffmpeg-avs -i test.avs
ffmpeg version N-112103-gb5c07a368b Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/junkyardcat/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth
  libavutil      58. 24.100 / 58. 24.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 12.101 / 60. 12.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, avisynth, from 'test.avs':
  Duration: 00:00:10.00, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m/unknown/unknown), 480x106, 24 fps, 24 tbr, 24 tbn
At least one output file must be specified

[junkyardcat@fedora ~]$ LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg-avs -i test.avs
ffmpeg version N-112103-gb5c07a368b Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/junkyardcat/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth
  libavutil      58. 24.100 / 58. 24.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 12.101 / 60. 12.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, avisynth, from 'test.avs':
  Duration: 00:00:10.00, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m/unknown/unknown), 480x106, 24 fps, 24 tbr, 24 tbn
At least one output file must be specified
To clarify, the instructions you gave provide option B without aliasing LD_LIBRARY_PATH. Is this correct?

Quote:
Originally Posted by qyot27 View Post
What this means is that you have several different options:
A) Install AviSynth+ to /usr, so that the library and its symlinks get put in /usr/lib64. This is the most straightforward to make sure that avs2yuv, ffmpeg, etc. can always see it.
B) Use LD_LIBRARY_PATH= to add /usr/local/lib64 (or ~/.local/lib64, if you also install AviSynth+ to $HOME/.local) to the search path when you run avs2yuv or ffmpeg-avs. Alias them in .bashrc if you don't want to keep remembering to override LD_LIBRARY_PATH.
C) Unconditionally add /usr/local/lib64 (and/or ~/.local/lib64) to LD_LIBRARY_PATH in .bashrc. May or may not be a good idea.
JunkyardCat is offline   Reply With Quote
Old 16th September 2023, 23:59   #129  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
Quote:
Originally Posted by JunkyardCat View Post
I compiled and built everything to your instructions with the exception of the below, had to change --enable-version to --enable-version3.
Oh yeah, that was a typo. Fixed.

Quote:
ffmpeg-avs did not return an error when not pointing to LD_LIBRARY_PATH=/usr/local/lib64 per the below. See my output. What are your thoughts?
That's because the instructions I gave for AviSynth+ actually do go ahead and have you install it into /usr so you don't have to mess with LD_LIBRARY_PATH.

Quote:
MY OUTPUT:

Code:
[junkyardcat@fedora ~]$ ffmpeg-avs -i test.avs
ffmpeg version N-112103-gb5c07a368b Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/junkyardcat/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth
  libavutil      58. 24.100 / 58. 24.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 12.101 / 60. 12.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, avisynth, from 'test.avs':
  Duration: 00:00:10.00, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m/unknown/unknown), 480x106, 24 fps, 24 tbr, 24 tbn
At least one output file must be specified

[junkyardcat@fedora ~]$ LD_LIBRARY_PATH=/usr/local/lib64 ffmpeg-avs -i test.avs
ffmpeg version N-112103-gb5c07a368b Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (GCC)
  configuration: --prefix=/home/junkyardcat/.local --progs-suffix=-avs --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-pic --enable-avisynth
  libavutil      58. 24.100 / 58. 24.100
  libavcodec     60. 26.100 / 60. 26.100
  libavformat    60. 12.101 / 60. 12.101
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, avisynth, from 'test.avs':
  Duration: 00:00:10.00, start: 0.000000, bitrate: 0 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(tv, smpte170m/unknown/unknown), 480x106, 24 fps, 24 tbr, 24 tbn
At least one output file must be specified
If it shows that it detects the input as avisynth with all the normal stats (resolution, pixel format, etc.) then it's seeing libavisynth.so like it's supposed to. If you were to use ffplay-avs test.avs, you'd actually see the script output.

But this also means you now have two copies of AviSynth+ installed, so I'd recommend going into /usr/local and deleting the pertinent files there (the three libavisynth.so* files in /usr/local/lib64, the 'avisynth' directory in /usr/local/lib64, and the 'avisynth' directory in /usr/local/include).

Quote:
To clarify, the instructions you gave provide option B without aliasing LD_LIBRARY_PATH. Is this correct?
The instructions were for scenario A. The FFmpeg examples I showed (where it doesn't work by default but does with LD_LIBRARY_PATH) were if I let AviSynth+ be installed to /usr/local like it would be if I didn't use -DCMAKE_INSTALL_PREFIX to override the install location.

Basically,

Option A: Install AviSynth+ to /usr
Result: avs2yuv and FFmpeg with --enable-avisynth will *just work*.

Option B: Install AviSynth+ to /usr/local (the default behavior) or literally anywhere else on the system
Result: you need to use LD_LIBRARY_PATH when invoking avs2yuv or ffmpeg-avs so they can see where libavisynth.so is located. The aliasing would be adding a line to .bashrc so that when you use 'avs2yuv' or 'ffmpeg-avs', the bash profile automatically adds the correct LD_LIBRARY_PATH value to the front of the command.

Option C: same as option B, but instead of aliasing anything, you would just add more search paths to LD_LIBRARY_PATH, so that every program looks in those areas, not just avs2yuv or ffmpeg-avs. If you planned to write shell scripts that would be working with encoding from AviSynth scripts, aliased functions don't work; you either have to add LD_LIBRARY_PATH values in the shell script, or rely on the values already having been added by the environment.

Last edited by qyot27; 17th September 2023 at 00:02.
qyot27 is offline   Reply With Quote
Old 21st September 2023, 19:20   #130  |  Link
belonesox
Registered User
 
Join Date: May 2010
Location: Moscow, Russia
Posts: 47
Hello, just compiled AVISynth+ (+ffmpeg, +mpv) on linux, examples with
«Version»/«ColorBars» works OK.

But I cannot find working source filter for media files,
looks like on Linux we have no internal AVISource.
Code:
avisynth: Script error: There is no function named 'AVISource'
If the only way to open media is a plugin, that plugin (FFMS2, BestSource…) works better now for AVS+ on Linux?

And how (without AVISource ) we should open "avs" scripts from AVISynth scripts?

Last edited by belonesox; 21st September 2023 at 23:04.
belonesox is offline   Reply With Quote
Old 21st September 2023, 23:12   #131  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
FFMS2 (both the C++ and C plugin) and LSMASHSource (https://github.com/HomeOfAviSynthPlu.../L-SMASH-Works) are both able to be used with AviSynth+ on Linux. AVISource (and its sister functions OpenDMLSource, AVIFileSource, and WAVSource) and DirectShowSource are both tied to Windows-specific media frameworks, so they'll only work on Windows - or in AVISource's case if you've set up the codecs correctly, Wine.

Quote:
Originally Posted by belonesox
And how (without AVISource ) we should open "avs" scripts from AVISynth scripts?
Import(), just like on Windows.
qyot27 is offline   Reply With Quote
Old 23rd September 2023, 12:28   #132  |  Link
belonesox
Registered User
 
Join Date: May 2010
Location: Moscow, Russia
Posts: 47
Thank you very much!

Unfortunately still cannot get working sample of MPV + AVS + FFMS2.

Here test files to reproduce («Download all files» button on right top corner).

./mpv-avisynth-colorbars-ok.sh — Show MPV with AVS ColorBars, OK.

./mpv-avisynth-ffms-not-ok.sh — MPV did not showing without any errors in log

'''

[ 0.136][d][demux] Trying demuxer: lavf (force-level: unsafe)
[ 0.145][d][file] resize stream to 131072 bytes, drop 0 bytes
[ 0.145][v][lavf] Found 'avisynth' at score=50 size=181.
[ 0.158][d][osc] osc_init
[ 0.158][d][cplayer] Run command: change-list, flags=64, args=[name="shared-script-properties", operation="append", value="osc-margins=0.000000,0.000000,0.000000,0.000000"]
[ 0.158][v][cplayer] Set property: shared-script-properties -> 1
[ 10.831][d][cplayer] Run command: quit, flags=73, args=[code="4"]
'''

Does anyone have an idea what is wrong?

Last edited by belonesox; 23rd September 2023 at 12:43.
belonesox is offline   Reply With Quote
Old 23rd September 2023, 23:01   #133  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
FFMS2 doesn't install to any of the autoload directories* by default. You need to either symlink or copy it there, or use LoadPlugin (or AddAutoloadDir, but I wouldn't do that for locations like /usr/local/lib) in the script. I have seen some plugins hook their buildsystems' install function to put the plugin in the system autoload directory, but it's not universal, and in some cases, there is no buildsystem install function, requiring the user to just copy/move the plugin to the right directory.

*On *nix, there are three locations searched for plugins to autoload: $(prefix)/$(libdir)/avisynth, $HOME/.avisynth, and $HOME/.local/lib/avisynth (which can also be overridden when configuring the core). The latter two aren't created automatically, so if you'd rather use one of those, you'll have to create them. $(prefix)/$(libdir)/avisynth is created by the normal install process to hold the core plugins (TimeStretch, Shibatch, ImageSeq, and ConvertStacked).
qyot27 is offline   Reply With Quote
Old 24th September 2023, 09:00   #134  |  Link
belonesox
Registered User
 
Join Date: May 2010
Location: Moscow, Russia
Posts: 47
Quote:
Originally Posted by qyot27 View Post
FFMS2 doesn't install to any of the autoload directories* by default. You need to either symlink or copy it there, or use LoadPlugin (or AddAutoloadDir, but I wouldn't do that for locations like /usr/local/lib) in the script.
Yes, I copy it here (I have tried with absolute path and without it, no errors in log), I load FFMS directly (mpv-avisynth-ffms-not-ok.avs)

Code:
LoadPlugin("libffms2.so")
FFVideoSource("test.avi")
Please, look at test files, probably AVS works OK, but there might be something wrong on the border between AVS, MPV, and FFMS.

Last edited by belonesox; 24th September 2023 at 09:05.
belonesox is offline   Reply With Quote
Old 24th September 2023, 15:43   #135  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
How did you build FFMS2?
qyot27 is offline   Reply With Quote
Old 24th September 2023, 23:41   #136  |  Link
belonesox
Registered User
 
Join Date: May 2010
Location: Moscow, Russia
Posts: 47
Quote:
Originally Posted by qyot27 View Post
How did you build FFMS2?

commit ef243ab40b8d4b6d18874c6cef0da1a2f55a6a45

Code:
CPPFLAGS=-I/usr/local/include/avisynth LDFLAGS=-L/usr/local/lib  ./configure --enable-avisynth
CPPFLAGS=-I/usr/local/include/avisynth LDFLAGS=-L/usr/local/lib make
Shoud I try other version of FFMS? Can you recommend any version of FFMS that is working for you?

Last edited by belonesox; 24th September 2023 at 23:44.
belonesox is offline   Reply With Quote
Old 25th September 2023, 00:05   #137  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
The FFmpeg you built - did you build it as shared or as static? And if there are two installs of FFmpeg on the system (one in /usr, and your locally-built one in /usr/local), which one is FFMS2 actually linking against?
qyot27 is offline   Reply With Quote
Old 25th September 2023, 01:05   #138  |  Link
belonesox
Registered User
 
Join Date: May 2010
Location: Moscow, Russia
Posts: 47
Quote:
Originally Posted by qyot27 View Post
And if there are two installs of FFmpeg on the system (one in /usr, and your locally-built one in /usr/local), which one is FFMS2 actually linking against?
I did not install any locally builded ffmpegs into my system, so I link FFMS2 against standard system (dynamic) ffmpeg from RPMs for Fedora 37:

Code:
ffmpeg-libs-5.1.3-3.fc37.x86_64
ffmpeg-5.1.3-3.fc37.x86_64
ffmpeg-devel-5.1.3-3.fc37.x86_64
Code:
rpm -ql ffmpeg-devel
…
/usr/lib64/libavcodec.so
/usr/lib64/libavdevice.so
/usr/lib64/libavfilter.so
/usr/lib64/libavformat.so
/usr/lib64/libavutil.so
/usr/lib64/libpostproc.so
/usr/lib64/libswresample.so
/usr/lib64/libswscale.so
…

Quote:
Originally Posted by qyot27 View Post
The FFmpeg you built - did you build it as shared or as static?
Yes, I also build local version of ffmpeg

Code:
commit 9b454fdaef413edfc8e0473569462271a64c59fb

./configure --prefix=$HOME/ffmpeg_build --enable-gpl --enable-version3 --disable-doc --disable-debug --enable-pic --enable-avisynth --enable-ffplay
and «ffplay» from that build works with troubled «mpv-avisynth-ffms-not-ok.avs» (that load ffms plugin that i built using system ffmpeg), but I did not use that ffmpeg to build FFMS2.
belonesox is offline   Reply With Quote
Old 25th September 2023, 20:06   #139  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
So it's *just* your built mpv that has the problem? Did you install all of its dependencies before trying to build it?
Code:
sudo dnf builddep mpv
I could only get SDL2 output to work inside the VM, and that requires explicitly passing -Dsdl2=enabled to meson when you're configuring mpv. Getting any of the other VOs requires grabbing those dependencies, or just grabbing all of the ones flagged in the .rpm by using the builddep command above. Most of them automatically enable themselves if possible, SDL2 is just an outlier.
qyot27 is offline   Reply With Quote
Old 26th September 2023, 16:30   #140  |  Link
belonesox
Registered User
 
Join Date: May 2010
Location: Moscow, Russia
Posts: 47
Quote:
Originally Posted by qyot27 View Post
So it's *just* your built mpv that has the problem?
May be.

But «my MPV» works OK with «mpv-avisynth-colorbars-ok.sh»
and somehow failed with «mpv-avisynth-ffms-not-ok.sh».

Looks like my mpv understand AVISynth, but definitely not calling «FFVideoSource» (because .ffindex not generated).
But I have not idea how to effectively troubleshoot it without errors in MPV log.


Quote:
Originally Posted by qyot27 View Post
Did you install all of its dependencies before trying to build it?
Code:
sudo dnf builddep mpv
Yes (so no problem with SDL2), but I build MPV not from fedora specs, I use «https://github.com/mpv-player/mpv-build.git»

Code:
use-libplacebo-custom v4.208.0
use-mpv-custom v0.35.1  
    (commit 140ec21c89d671d392877a7f3b91d67e7d7b9239 )
use-ffmpeg-master (commit fa20f5cd9e131f22da06ef57bf5aedd87ff51a90)
Can you confirm that your build of MPV works ok with my example
«mpv-avisynth-ffms-not-ok.sh»?

If so, tell me please what version/commit of MPV, and how you built it (version of ffmpeg, avisynth to link with).

Last edited by belonesox; 26th September 2023 at 16:37.
belonesox is offline   Reply With Quote
Reply


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 02:20.


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