AviSynth / AviSynthPlus

AviSynth with improvements
http://avs-plus.net
935 stars 73 forks source link

Missing plugins in Linux build/install #162

Open sylvainhalle opened 4 years ago

sylvainhalle commented 4 years ago

Steps to reproduce

  1. Follow the build instructions for Ubuntu 18.04; build and install

  2. Follow the build instructions for ffmpeg with AviSynth support on the same page

  3. Write this script (test.avs):

ImageSource("any-file.jpg")

Try to open it with ffplay:

ffplay -i test.avs

Output:

ffplay version git-2020-05-10-fc99a24 Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-11ubuntu0~18.04.1)
  configuration: --prefix=/home/sylvain/ffavx_build --enable-gpl --enable-version3 --disable-doc --disable-debug --enable-pic --enable-avisynth
  libavutil      56. 44.100 / 56. 44.100
  libavcodec     58. 83.100 / 58. 83.100
  libavformat    58. 43.100 / 58. 43.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 80.100 /  7. 80.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[avisynth @ 0x7f92a0000b80] Script error: There is no function named 'ImageSource'.
(/media/Silo/MontageP1/test.avs, line 1)
/media/Silo/MontageP1/test.avs: Unknown error occurred

Looking into the directory where AviSynth is installed (/usr/local/lib), the plugin directory (avisynth) contains a single file: libconvertstacked.so. However, the plugins directory in the sources contains several other plugins, but only this one seems to be built and installed.

qyot27 commented 4 years ago

ConvertStacked is currently the only plugin in the AviSynth+ sources that's been fixed up for non-Windows OSes and enabled in the master branch. TimeStretch is also easily able to be built, but is trickier due to its reliance on embedded SoundTouch sources (the plug branch on my personal repo is where I've been experimenting with migrating TimeStretch to detecting the system SoundTouch install by using pkg-config, but that branch ran into some other issues with trying to stress-test the detection and so I put it to the side while other things took priority).

Several of the other plugins are Windows-only by virtue of being written for explicitly Win32 featuresets (DirectShowSource, VDubFilter, VFAPIFilter, even though that last one is even disabled for Windows builds).

Similarly, Shibatch and ImageSeq, while the external libraries they depend on are available (in some form¹) on *nixen, the plugin code itself as written is highly Windows-centric and will need a deep overhaul in order to run on anything other than Windows.

¹the sources that Shibatch depends on actually seems like it's not the upstream SSRC library itself, but a derivative of a ca. 2003 plugin for foobar2000 that used the SSRC sources.

As far as opening images goes, though, FFMS2 provides an FFImageSource function that should be able to open any of the formats the FFmpeg build it was linked against does. It may not behave the same way regarding frame count or duration, though.

jwsmite commented 3 years ago

Actually ImageSeq seems to build just fine if you install libdevil-dev with apt-get and rebuild now my imageSource() calls are working. I confirmed this using a docker setup based of Ubuntu 20 run through docker on Mac

sylvainhalle commented 3 years ago

I'll leave this for someone else to check; it's been almost a year and since then I decided to use the Windows version.

qyot27 commented 3 years ago

That's because pinterf fixed up Shibatch, TimeStretch, and ImageSeq before 3.7.0 was released (on the 6th, 7th, and 8th of January; 3.7.0 was released on the 11th). TimeStretch is still using the embedded SoundTouch sources, but Shibatch was able to get pared way down in size because - IIRC - most of the external code it had shipped with it wasn't even being used.

There's also a thread over on Doom9 that I set up to track plugins that have been ported over to Linux (et al.) and at the very least have the option to switch off the Intel intrinsics so they can be built on other CPU architectures (albeit however slowly they might end up being without the benefit of native SIMD): https://forum.doom9.org/showthread.php?t=182032