View Full Version : AvxSynth: a Linux port of AviSynth


videophool
9th March 2012, 22:45
We are happy to announce AvxSynth, a native port of AviSynth 2.5.8 running on Ubuntu 32/64. Details can be found here: www.avxsynth.org.

TheFluff
9th March 2012, 23:05
Interesting. I see you've made a slightly modified FFMS2 source plugin; if you want to have your own branch of FFMS2 on the official repository for that, feel free to contact me. Or is the plan to make the plugin interfaces compatible?

Guest
9th March 2012, 23:05
Very nice work, videophool! I have been able to play video via an Avisynth script in a VirtualBox Ubuntu 64. Sweet!

This will make a lot of people very happy.

DG tools for Linux now becomes a real possibility.

videophool
9th March 2012, 23:07
Interesting. I see you've made a slightly modified FFMS2 source plugin; if you want to have your own branch of FFMS2 on the official repository for that, feel free to contact me. Or is the plan to make the plugin interfaces compatible?

Definitely interested in a branch on the official FFMS2 repository.

mastrboy
9th March 2012, 23:26
now this is interesting, but i'm guessing regular .dll plugins won't work and have to be recompiled to a ELF binary?

videophool
9th March 2012, 23:47
now this is interesting, but i'm guessing regular .dll plugins won't work and have to be recompiled to a ELF binary?

You cannot use the Windows dll plugins. However, most of the ones that we have looked at can be ported (at least the C-code implementations).

LaTo
10th March 2012, 11:26
Very nice work!!! I will try next week!

Yellow_
10th March 2012, 12:10
Will it be possible or is it already possible to patch ffmpeg / libav with .avs file support for Linux like the avisynth support compile option on Windows.

Just thinking about Linux ffmpeg based NLE's like kdenlive and media toolkits like MLT to be able to handle .avs files as if movie, audio or image files.

Although I happily use Avisynth + AVSPmod via wine on Linux this is really excellent news.

Selur
10th March 2012, 20:23
Nice!

ajk
10th March 2012, 21:04
This is excellent news! Will have to have a look at the code at some point. Is there any intention to support multithreading right from the ground up? Did not see a mention on the site at a glance, but will keep reading.

SEt
10th March 2012, 21:26
What I don't understand is why everyone starts with 2.5.8. First x64 port, then this. 2.6 may be called 'alpha' but works actually better than 2.5.8 and still a bit alive.

videophool
10th March 2012, 21:34
We started with the stable 2.5.8 branch. Our objective was to get 2.5.8 functionality in Linux quickly and with minimal risk.

SEt
10th March 2012, 21:48
As I said, it's only called 'stable'. Development of 2.6 is just stalled in the middle, so it's 'alpha' feature-wise, not stability-wise.

hajj_3
10th March 2012, 22:26
very nice indeed, are you guys a company or something as it says you are hiring an avisynth guy, if so did you port this so that your company software can work on linux using avxsynth or something?

great job, i'm sure more video software will become available on linux over the coming months and years as a result of this.

videophool
10th March 2012, 22:27
Since our work was a business decision we worked from the stable 2.5.8 branch, the same branch that we use for production encodes. However, we have established a porting model for AviSynth, and it would take a few committed developers about 2 months to port 2.6, if they were so motivated. That is left as an exercise for the reader.

videophool
10th March 2012, 22:33
Will it be possible or is it already possible to patch ffmpeg / libav with .avs file support for Linux like the avisynth support compile option on Windows.

Just thinking about Linux ffmpeg based NLE's like kdenlive and media toolkits like MLT to be able to handle .avs files as if movie, audio or image files.

Although I happily use Avisynth + AVSPmod via wine on Linux this is really excellent news.

It would certainly be possible to get avxsynth support into ffmpeg. Something we'd like to see.

Yellow_
11th March 2012, 10:04
Cheers, ooooh I'm up and running, the last step 'Build Test' instructions threw me a bit not knowing KDev but by that time the executables we're built in the folder anyway. Going to play. :-) Thanks again.

**EDIT**

Ok, error trying to replicate your Youtube Demo but FFVideoSource not found, looking in my /home/.AVXSynth/plugins folder all plugins except ffms2avs are there, going back to the KDev project and trying to build the ffms2avs gives me this error:

compiling avsutils.cpp (g++)
compiling ffswscale.cpp (g++)
compiling avssources.cpp (g++)
compiling ffpp.cpp (g++)
In file included from src/ffpp.cpp:21:0:
src/ffpp.h:33:37: fatal error: libpostproc/postprocess.h: No such file or directory
compilation terminated.
make[1]: *** [src/ffpp.o] Error 1

So I assume libpostproc in libav doesn't build by default, so added it to the ./configure line for libav, --enable-postproc, rebuilt libav, back into KDev project and built the ffms2avs plugin and we're away, WOOT! :-)

**EDIT**EDIT**

Ok first test something simple opened a flagged full range luma, h264AVC MOV off a DSLR, using FFVideoSource and histogram=classic, output is scaling luma 16 - 235 in the waveform, played back in MPlayer.

If this is ffms2 v2.16 rather than 2.15 or 2.17 then that'll be the reason, known to be buggy and fixed in later revisions.

I did download 2.17-src and it made a 2.16-1_amd64 deb package?

Apart from that the script works, plays the file and segfaults at the end of playback. :-(

ALERT : Module=appInterface,Address=src/avxSynthAppInterface.cpp:453,Type=Alert,Message=Reached end of stream at frame #475
Segmentation fault

I'm aware this is WIP and extremely impressed non the less. Netflix eh?

tin3tin
11th March 2012, 15:37
Wow, this is just the best Avisynth news in a long time. Just one question - why do you create your own IDE(AvxEdit), can't the wxPython (http://www.wxpython.org/download.php) of AvsP(mod) used in Linux?

videophool
11th March 2012, 17:27
Just one question - why do you create your own IDE(AvxEdit), can't the wxPython (http://www.wxpython.org/download.php) of AvsP(mod) used in Linux?

We needed a tool to help demo our work. Did not spend a lot of time working on AvxEdit, and prefer a more full-featured tool. Hope that someone will take on this project, as we are focused on stability, and completing the migration of our processes to Linux.

videophool
11th March 2012, 22:57
If this is ffms2 v2.16 rather than 2.15 or 2.17 then that'll be the reason, known to be buggy and fixed in later revisions.

...

Apart from that the script works, plays the file and segfaults at the end of playback. :-(

ALERT : Module=appInterface,Address=src/avxSynthAppInterface.cpp:453,Type=Alert,Message=Reached end of stream at frame #475
Segmentation fault



There was a typo in the setup instructions. It referred to 2.17, but the install instruction had pkgversion="2.16".

I am not seeing the segfault. can you give some repro steps?

Guest
12th March 2012, 00:16
I see a hang at the end of stream, not a segfault. Let a stream play to the end. Then the Mplayer window cannot be closed with its X button. But it can if the video is still playing.

Yellow_
12th March 2012, 00:54
It segfaults for me with DV, HDV & h264 AVC, with a simple one line script just using FFVideoSource("path to file") played to the end as here, a 475 frame stream, preparing to fetch frame 475, Reached end of stream at frame #475.

INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:444,Type=Info,Message=Preparing to fetch frame #475 (475 frame of the stream)
INFO : Module=core::main,Address=src/core/main.cpp:921,Type=Info,Message=0x2ba6c70->CAVIStreamSynth::Read(1 samples at 475)
INFO : Module=core::main,Address=src/core/main.cpp:922,Type=Info,Message= buffer: 3551232 bytes at 0x7f52b20cf010
ALERT : Module=appInterface,Address=src/avxSynthAppInterface.cpp:453,Type=Alert,Message=Reached end of stream at frame #475
Segmentation fault


Other info from the console:

INFO : Module=avssources,Address=src/avssources.cpp:39,Type=Info,Message=Creating AvisynthVideoSource

INFO : Module=avssources,Address=src/avssources.cpp:186,Type=Info,Message=AvisynthVideoSource creation successful

INFO : Module=core::expression,Address=src/core/parser/expression.cpp:551,Type=Info,Message=Call: histogram
INFO : Module=core::cache,Address=src/core/cache.cpp:717,Type=Info,Message=Cache:19fde80: Setting cache hints (hints:2, range:999 )
INFO : Module=core::main,Address=src/core/main.cpp:634,Type=Info,Message=0x1c12ba0->CAVIStreamSynth(video)
INFO : Module=core::main,Address=src/core/main.cpp:1037,Type=Info,Message=0x1c12ba0->CAVIStreamSynth::ReadFormat() (video)
INFO : Module=core::main,Address=src/core/main.cpp:1037,Type=Info,Message=0x1c12ba0->CAVIStreamSynth::ReadFormat() (video)
INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:92,Type=Info,Message=Retrieved video info
INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:93,Type=Info,Message========================
INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:94,Type=Info,Message=Video width = 2176
INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:95,Type=Info,Message=Video height = 1088
INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:119,Type=Info,Message=Color format = YV12
INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:122,Type=Info,Message=Bits per pixel = 12
INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:123,Type=Info,Message=Image bytes = 3551232
INFO : Module=appInterface,Address=src/avxSynthAppInterface.cpp:444,Type=Info,Message=Preparing to fetch frame #0 (0 frame of the stream)
INFO : Module=core::main,Address=src/core/main.cpp:921,Type=Info,Message=0x1c12ba0->CAVIStreamSynth::Read(1 samples at 0)
INFO : Module=core::main,Address=src/core/main.cpp:922,Type=Info,Message= buffer: 3551232 bytes at 0x7f9e64c17010
INFO : Module=core::cache,Address=src/core/cache.cpp:411,Type=Info,Message=Cache:19fde80: generating frame 0, cache from 475 to -1
INFO : Module=core::avxsynth,Address=src/core/avxsynth.cpp:1838,Type=Info,Message=Frame buffer memory used: 3551296
INFO : Module=core::cache,Address=src/core/cache.cpp:411,Type=Info,Message=Cache:1c138a0: generating frame 0, cache from 475 to -1
INFO : Module=core::avxsynth,Address=src/core/avxsynth.cpp:1838,Type=Info,Message=Frame buffer memory used: 6684800
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.


And Mplayer version is 'MPlayer SVN-r34338-4.5.2 (C) 2000-2011 MPlayer Team'

Playing any of the test videos above via a CLI Mplayer ends cleanly with Exiting... (End of file) and back to command prompt, no segfault so don't think MPlayer is the problem. But also assume this is using my system ffmpeg install not libav built for AVXSynth.

Mplayer console output:

==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 1920x1088 => 1920x1088 Planar YV12
A: 3.3 V: 2.3 A-V: 0.998 ct: 0.030 0/ 0 119% 19% 1.6% 50 0



There was a typo in the setup instructions. It referred to 2.17, but the install instruction had pkgversion="2.16".

Ok, so what to do here? Luma is scaling. :-(

pbristow
12th March 2012, 01:17
Excellent timing, guys! The more I read about Windows 8, the more I think "Well, that's the end of serious computing on the Windows platform..." =:o\ Now I know that at least AVIsynth still has a future. (Phew!)

mandarinka
12th March 2012, 03:20
Well... it also relies on the treasure of plugins, and thus you could say that its future is its past - and until you are able to load (or perhaps port) dll plugins and use masktools/mvtools (I guess that qtgmc will be the ultimate test, heh), that means our dear Windows (8 is not going to be that bad).

videophool
12th March 2012, 19:06
It segfaults for me with DV, HDV & h264 AVC, with a simple one line script just using FFVideoSource("path to file") played to the end as here, a 475 frame stream, preparing to fetch frame 475, Reached end of stream at frame #475.


We believe that the segfault is resolved. We will update the source shortly.

http://code.google.com/p/avxsynth/issues/detail?id=1&thanks=1&ts=1331575727

videophool
12th March 2012, 19:14
I see a hang at the end of stream, not a segfault. Let a stream play to the end. Then the Mplayer window cannot be closed with its X button. But it can if the video is still playing.

AvxEdit does not hang but there is no way to close the MPlayer window. It is annoying. http://code.google.com/p/avxsynth/issues/detail?id=2&thanks=2&ts=1331576013

Wilbert
12th March 2012, 21:35
@videophool,

Great stuff!!! Guess i will need to install Ubuntu again. This link (http://avisynth.org/mediawiki/Known_Issues) contains a list of bugs in v2.58 (most of them are fixed in v2.60/CVS), perhaps you can backport these fixes into your builds.
Also which filters don't have a C++ version?

videophool
13th March 2012, 00:57
@videophool,
Great stuff!!! Guess i will need to install Ubuntu again. This link (http://avisynth.org/mediawiki/Known_Issues) contains a list of bugs in v2.58 (most of them are fixed in v2.60/CVS), perhaps you can backport these fixes into your builds.

We will check the bug list, and start working on the critical issues. Hoping that the AviSynth community will join in the effort to move this project forward, as we are a small team, and will be focused mostly on issues that block our deployment.


Also which filters don't have a C++ version?
You can check the wiki for the list of ported built-in functions (many are untested). Third-party will need to be ported. We looked at a few, and most were developed with inline assembly, and thus porting was not trivial. We are hoping that the authors of many of the third-party plugins will be motivated to port their work. http://code.google.com/p/avxsynth/wiki/BuiltinFunctions

videophool
13th March 2012, 01:45
did you port this so that your company software can work on linux using avxsynth or something?


As mentioned on the site, our motivation is getting our video encoding process off of Windows systems, primarily as a cost-savings, but also for efficiency and ease-of-use (most of our cloud systems are running Linux, and it is preferred to have a single OS).

it says you are hiring an avisynth guy,

We are looking for help with QA.

videophool
13th March 2012, 03:08
We have checked in fix for the segfault.

videophool
13th March 2012, 04:04
AvxSynth adds a new error handling model designed specifically for automated encoding processes. Rather than generating error video frames, the error is logged, and an exception is thrown to the application. This model is discussed here (http://code.google.com/p/avxsynth/wiki/ErrorHandling)

videophool
14th March 2012, 00:38
I see a hang at the end of stream, not a segfault. Let a stream play to the end. Then the Mplayer window cannot be closed with its X button. But it can if the video is still playing.

The fix for this issue was checked in today.

Guest
14th March 2012, 04:09
Oh cool, thanks for that.

I'm playing with porting fiters. The VC++ GUI has it all over Kdev, but that's just an annoyance.

Have you looked at performance yet? I imagine you miss some important ASM code. The decode rate seems to be less than under Windows.

videophool
14th March 2012, 04:16
Oh cool, thanks for that.
Have you looked at performance yet? I imagine you miss some important ASM code. The decode rate seems to be less than under Windows.

Since we are using ffmpeg for decoding and scaling I expect that these have similar performance as in Windows. The other functions such as color format conversion, text overlay, etc., are not as efficient, because these are all in C code. The ASM is commented out. We are hoping that other contributors will join the project, and help us to get this ported.

kypec
14th March 2012, 06:27
I can imagine that Linux needs some other arrangement of input/output data passed through the stack/pointers than Windows does but the body of native ASM functions could stay the same for any OS running on identical CPU architecture, or not?

videophool
14th March 2012, 07:39
I can imagine that Linux needs some other arrangement of input/output data passed through the stack/pointers than Windows does but the body of native ASM functions could stay the same for any OS running on identical CPU architecture, or not?

The problem is that most of the asm code in AviSynth and the plugins that we looked at has been written as inline assembly, which is not usable with Win64 (not sure about gcc 64). We are definitely interested in help porting this code.

videophool
14th March 2012, 07:44
Included in the AvxSynth toolkit is a frame server application that delivers the decoded frames to stdout. The output from the frame server can be piped to X264. See the Wiki here (http://code.google.com/p/avxsynth/wiki/AvxSynthFrameServer) for instructions on using AvxSynth with x264.

Wilbert
14th March 2012, 19:13
The ASM is commented out. We are hoping that other contributors will join the project, and help us to get this ported.
videophool is offline Report Post IP
SEt converted all the .asm stuff to yasm a while ago: http://forum.doom9.org/showthread.php?p=1312666#post1312666 (see one of the older versions). I guess you can use that (although it's based on v2.60)???

smok3
14th March 2012, 19:26
So there is a possibility to have this ported to ffmpeg with the use of all the cool external filters? and a nice mplayerish preview window as well? And it will run on OSX? :)

:thanks:

videophool
14th March 2012, 21:34
So there is a possibility to have this ported to ffmpeg with the use of all the cool external filters? and a nice mplayerish preview window as well? And it will run on OSX? :)

:thanks:

Anything is possible, limited only by the interest and enthusiasm of the larger Linux community.

videophool
15th March 2012, 01:36
We have a new help-wanted wiki for interested developers here. (http://code.google.com/p/avxsynth/wiki/HelpWanted?ts=1331771465&updated=HelpWanted) Specifically:


Developers to port the optimized assembly for the various video and audio functions (all porting must be Win32/64 and Linux32/64 compatible). In particular, we would like to port key functions such as color space conversion.

Developer(s) to write a more full-featured AVXEdit application with syntax highlighting, and parameter help (like AvsEdit?).

Testers skilled in AviSynth?, Windows, and Linux, to help complete the test matrix for the set of ported functions.

Autoconf and cmake expert to build Linux installable package.

Guest
15th March 2012, 03:38
I hope we can discuss here the requirements for your item 2. For example, AVXEdit needs a numbered timeline with arbitrary navigation, like VirtualDub.

Yellow_
15th March 2012, 06:48
With regard to item2, Its probably expanding the brief too far but if a tool like Virtualdub was to be discussed then what about considering extending an actively developed and mature Linux based media toolkit called MLT. It uses ffmpeg, Frei0r etc and is also a playout server for broadcast.

http://www.mltframework.org/twiki/bin/view/MLT/

MLT is xml based and forms the base of a number of Linux NLEs including Kdenlive which is without doubt the most usable NLE on Linux at the current time.

www.kdenlive.org

Any extension of MLT can then be made accessible in kdenlive seperately by kdenlives active devs if need be.

Or would a nodal based approach rather than Non Linear be more suitable.

IanB
15th March 2012, 07:09
Interesting development. Pity you chose 2.58 as a base instead of 2.6 ....... sigh

For exception handling there is already a catchable implementation through the IAvisynthClipInfo class, see Virtualdubs source for how to uses it. The painting of the error text is only a fallback in the VFW export stub (which almost everything else currently uses). Any app that uses the C or C++ API has to explicitly handle script and runtime errors, there is no text painting there.

For ASM support the chosen solution is to use the Avisynth modified Softwire by Sh0dan. The Softwire in 2.6 has been adapted for 64bit, but it hasn't had much (any?) of a workout. It is hoped all future core development will use this instead if inline MSVC Asm. A thought to aid 64bit porting was to declare inbuilt register aliases like PAX, PBX, ... which would be EAX, EBX, ... in 32 bit and RAX, RBX, ... in 64 bit, this was envisioned to be a bit like the INTPTR type in C/C++ and would allow memory pointer arithmetic parts of the code to be 32/64 bit agnostic. The assumption being the 1st 64 bit cut would just be the 32 bit algorithm recut as 64bit. Enhanced versions in the future could take advantage of the extra registers and instructions to have faster versions, much like we have C++, MMX, iSSE and SSE2 versions of code now.

Also on the 64 bit vapourware list is to have the Script AVSValue int and float types to be 64bit integers and doubles, as the 2 pointer types, clip and string, have to become 64 bit anyway.

There was also some vague idea about borrowing some code from Wine to load windows .dll plugins in a Linux version. 90% of Avisynth plugins are pure algorithm code with no system calls, these would be a doddle to host in a Linux address space.

videophool
15th March 2012, 17:45
Interesting development. Pity you chose 2.58 as a base instead of 2.6 ....... sigh

We are very committed to this project so we will look at 2.6 features and bug fixes that should be merged to avxsynth. Also we invite 2.6 contributors to join the AvxSynth project, and help us with this effort.


For ASM support the chosen solution is to use the Avisynth modified Softwire by Sh0dan. The Softwire in 2.6 has been adapted for 64bit, but it hasn't had much (any?) of a workout. It is hoped all future core development will use this instead if inline MSVC Asm.
A version of Softwire that is win/GCC 32/64 compatible would be very cool, and a good way to optimize the filters.


//A thought to aid 64bit porting was to declare inbuilt register aliases like PAX, PBX, ... which would be EAX, EBX, ... in 32 bit and RAX, RBX, ... in 64 bit, this was envisioned to be a bit like the INTPTR type in C/C++ and would allow memory pointer arithmetic parts of the code to be 32/64 bit agnostic. The assumption being the 1st 64 bit cut would just be the 32 bit algorithm recut as 64bit. Enhanced versions in the future could take advantage of the extra registers and instructions to have faster versions, much like we have C++, MMX, iSSE and SSE2 versions of code now.


Is anybody working on this effort?


There was also some vague idea about borrowing some code from Wine to load windows .dll plugins in a Linux version. 90% of Avisynth plugins are pure algorithm code with no system calls, these would be a doddle to host in a Linux address space.

A Win32 to Linux64 thunking layer? How cool would that be!

Robert Martens
15th March 2012, 20:19
This is wonderful news, great work on the port! I'm not much when it comes to Linux, but after installing a pair of Ubuntu VMs (32/64 bit) and banging my head against KDev and CMake for a couple of days, I've gotten one of my plugins to compile and run, all with much less effort than I'd expected. I'm sure to have loads of capital-f Fun setting up a new build process that can properly handle both versions, but for the time being I have a few questions:

First, am I the only one having trouble when linking against ffms2 2.17? I downloaded the source from the googlecode project, and configured/built/installed it successfully, but when running AVXEdit and attempting to load a clip with FFVideoSource (or even just using ColorBars().KillAudio().PointResize(320,240)) I get an undefined symbol error with regard to GetSwsContext. Uninstalling 2.17 with Synaptic and replacing it with 2.16 (as delivered in the AvxSynth checkout), everything works as expected. This is hardly a proper bug report, but I don't want to be any more obnoxious than necessary, so I'm leaving out the details in case this is a known issue. Or if I've just missed something obvious. Which would be shocking.

Next up is what I suppose is more a general freshman developer question than anything. I'd like to keep one set of source files for both versions of a plugin if possible; would it be incredibly stupid to #ifdef a "using namespace avxsynth" directive, or at least a set of "using avxsynth::SuchAndSuch" declarations in my source files? I understand those are dangerously poor form if they can be avoided, but they seem to be the cleanest way to handle cross platform concerns in this case. Is there a more intelligent way to handle the avxsynth namespace that I simply haven't learned of yet?

My final concern is about source distribution. On Windows we all redistribute the copy of avisynth.h that we used to build our library; do we distribute avxplugin.h (and everything else in the avx_root/include/ directory) for Linux, or is it assumed everyone using the software has the source code installed? I know the Linux community is much more comfortable with downloading and building from source than most in the Windows world, but if I'm not mistaken it's possible and increasingly common to have binary releases even there. Am I correct in thinking that the avx_root/include/ directory (minus the .svn repository) is all I need to package along with my source?

That's an annoying number of question marks for one post, and I know I'm revealing an embarrassing lack of experience in the *nix world here, but I'm supremely excited at the prospect of making my trivial toy plugins available to an even larger group of people who couldn't care less, so I'd like to clear up as many details as I can.

videophool
15th March 2012, 21:58
banging my head against KDev and CMake for a couple of days, I've gotten one of my plugins to compile and run, all with much less effort than I'd expected.


Yes, KDev can be frustrating. So much in VC that we all take for granted.


would it be incredibly stupid to #ifdef a "using namespace avxsynth" directive


We chose to namespace avxsynth due to ffmpeg collisions, and our desire to see avxsynth well supported in ffmpeg. the #ifdef using namespace solution seems to be reasonable.


My final concern is about source distribution ...


We would like to have a real install package so that you do not have to walk through these manual steps. Any volunteers out there?

Wilbert
15th March 2012, 22:25
A version of Softwire that is win/GCC 32/64 compatible would be very cool, and a good way to optimize the filters.
As I understand it, it is GCC 32/64 compatible. From the readme: "Jude Venn: helped porting SoftWire to UNIX/Linux by providing alternative functions for the Microsoft specific code (File.hpp, String.hpp, CharType.hpp). He also wrote Makefile.gcc to easily compile SoftWire with GCC.". Or isn't the porting finished?

videophool
15th March 2012, 23:39
As I understand it, it is GCC 32/64 compatible. From the readme: "Jude Venn: helped porting SoftWire to UNIX/Linux by providing alternative functions for the Microsoft specific code (File.hpp, String.hpp, CharType.hpp). He also wrote Makefile.gcc to easily compile SoftWire with GCC.". Or isn't the porting finished?

We will look at integrating the revised SoftWire. Our current version of AvxSynth has the built-in resize routines stubbed out and set to call into ffmpeg (they use SoftWire). This will be our first SoftWire test.

active1
17th March 2012, 19:08
hi
im having a problem when i try to play the script
when i open AVXEdit and write a simple script, like this:

ffvideosource("/path/to/my/file.mkv")

then, AVXEdit disapear and don't open mplayer like when i type version()

:thanks:

Yellow_
18th March 2012, 00:07
active1, do you have the ffms2avs plugin built in /home/.AVXSynth/plugins folder?

This may or may not help.

http://forum.doom9.org/showthread.php?p=1564447#post1564447

videophool
18th March 2012, 00:22
active1, do you have the ffms2avs plugin built in /home/.AVXSynth/plugins folder?


If it is not installed, then I would have expected to see an error, not to have the app die.

videophool
18th March 2012, 00:26
hi
im having a problem when i try to play the script
when i open AVXEdit and write a simple script, like this:

ffvideosource("/path/to/my/file.mkv")

then, AVXEdit disapear and don't open mplayer like when i type version()

:thanks:

We would like a repro. If you have a reasonable repro case, please open an issue here (http://code.google.com/p/avxsynth/issues/list)

avxanne
18th March 2012, 05:47
Ok first test something simple opened a flagged full range luma, h264AVC MOV off a DSLR, using FFVideoSource and histogram=classic, output is scaling luma 16 - 235 in the waveform, played back in MPlayer.


I tried reproducing the luma scaling problem with h264 video inside m2ts using a clip from my camera, and I don't see the scaling (I displayed the histogram as well as dumped out the yuv and saw values > 235). Could you post your clip so I can test it on my machine? Maybe it's a difference in library versions.

Yellow_
18th March 2012, 07:43
http://www.yellowspace.webspace.virginmedia.com/Gold.aMOV

I mentioned earlier in the thread that the luma scaling was specific to ffms2 2.16 and fixed by The Fluff quite a while ago, maybe recent commits by the AVXSynth devs have bumped version to 2.17 and resolved the problem. I haven't built it again since the initial release to test but it was scaling, used ffms2 long enough to know. :-)

active1
19th March 2012, 04:51
active1, do you have the ffms2avs plugin built in /home/.AVXSynth/plugins folder?

This may or may not help.

http://forum.doom9.org/showthread.php?p=1564447#post1564447

i have that folder in this directory
/home/lab/AVXSynth/plugins/ffms2avs
and it is contain : ffms2avs.kdev4 , libffms2avs.so , Makefile
and two other folders : Prerequisites & src

NOTE: i skipped three steps because i didn't know how to do them :rolleyes:

Create a .gdbinit in your home directory containing this text: (for 64-bit Ubuntu)
set env LD_PRELOAD /lib/x86_64-linux-gnu/libpthread.so.0 (for 32-bit Ubuntu)
set env LD_PRELOAD /lib/i386-linux-gnu/libpthread.so.0 This is a fix for the debugger hanging on dlopen)

We would like a repro. If you have a reasonable repro case, please open an issue here (http://code.google.com/p/avxsynth/issues/list)

sorry, i don't know what 'repro' means :stupid:

videophool
19th March 2012, 06:48
sorry, i don't know what 'repro' means :stupid:

If you have a set of steps to reproduce the error.

avxsynth
20th March 2012, 00:55
Hello to everyone on the forum from one of the committers (avxsynth@gmail.com)

Latest news:

The support for audio functions is checked in.

The following functions are supported:
- Tone
- FFAudioSource (***has been there already, can be used as audio source alongside with Tone function)
- DelayAudio
- AmplifydB
- Amplify
- AssumeSampleRate
- Normalize
- MixAudio
- ResampleAudio
- ConvertToMono
- EnsureVBRMP3Sync (*** not tested)
- MergeChannels
- MonoToStereo
- GetLeftChannel
- GetRightChannel
- GetChannel
- GetChannels
- KillVideo
- KillAudio
- ConvertAudioTo16bit
- ConvertAudioTo8bit
- ConvertAudioTo24bit
- ConvertAudioTo32bit
- ConvertAudioToFloat
- ConvertAudio

Remarks, comments, questions, suggestions...are more than welcome.

avxsynth
20th March 2012, 01:05
Script1: Using tone:
----------------------------------------------------------------
#ErrorHandlingExternal
clip0 = FFAudioSource(source="<path_to_your_media_file>")

f1 = 2*261.6
f2 = 2*329.6
f3 = 2*392.0
f4 = 2*f1

clip1 = Tone(frequency=f1, samplerate=44100)
clip2 = DelayAudio(Tone(frequency=f2, samplerate=44100), 1.0)
clip3 = MixAudio(clip1, clip2)
clip4 = DelayAudio(Tone(frequency=f3, samplerate=44100), 2.0)
clip5 = MixAudio(clip3, clip4)
clip6 = DelayAudio(Tone(frequency=f4, samplerate=44100), 3.0)
clip7 = MixAudio(clip5, clip6)

clip8 = MixAudio(clip0, clip7)
#
# use the line below to play sound at different sampling rates
#AssumeSampleRate(clip8, 64000)

----------------------------------------------------------------

Script2: Another set of functions tested:
----------------------------------------------------------------

#ErrorHandlingExternal
f1 = 2*261.6
f2 = 2*329.6
f3 = 2*392.0
f4 = 2*f1

clip1 = Tone(frequency=f1)
clip2 = DelayAudio(Tone(frequency=f2), 1.0)
clip3 = MergeChannels(clip1, clip2)
clip4 = DelayAudio(Tone(frequency=f3), 2.0)
clip5 = MergeChannels(clip3, clip4)
clip6 = DelayAudio(Tone(frequency=f4), 3.0)
clip7 = MergeChannels(clip5, clip6)

clip8 = ConvertToMono(clip7)

#
# the result of the two functions below should be
# unchanged audio volume
#
clip9 = AmplifydB(clip8, -30.0)
Amplify(clip9, 31.62)

-----------------------------------------------------------------

Script3: Illustrating proper downsampling (i.e. antialiasing)
----------------------------------------------------------------
#ErrorHandlingExternal

clip0 = Tone(frequency=440)
#clip0L = GetLeftChannel(clip0)
clip0L = GetChannels(clip0, 1)

clip1 = Tone(frequency=17000)
#clip1R = GetRightChannel(clip1)
clip1R = GetChannels(clip1, 2)

clip2 = MergeChannels(clip0L, clip1R)
clip3 = clip2 #ConvertAudioToFloat(clip2)
clip4 = ResampleAudio(clip3, 32000)
ConvertAudioTo16Bit(clip4)

videophool
21st March 2012, 21:13
hi
im having a problem when i try to play the script
when i open AVXEdit and write a simple script, like this:

ffvideosource("/path/to/my/file.mkv")

then, AVXEdit disapear and don't open mplayer like when i type version()

:thanks:

We have found a problem where AvxSynth is causing a segfault when there is a script error. We are working to identify and resolve the segfault. In the mean time, try this:


src=ffvideosource("/path/to/my/file.mkv")
ShowSMPTE(src)

videophool
21st March 2012, 21:36
We have found a problem where AvxSynth is causing a segfault when there is a script error.

Root cause has been identified, and fix is in progress.
http://code.google.com/p/avxsynth/issues/detail?id=6

sl1pkn07
22nd March 2012, 13:36
i make pkgbuild for ArchLinux

http://aur.archlinux.org/packages.php?ID=57829

have patches for fix panths and other "fix"

greetings

videophool
24th March 2012, 00:37
i make pkgbuild for ArchLinux

http://aur.archlinux.org/packages.php?ID=57829

have patches for fix panths and other "fix"

greetings

Thanks for the contribution.

qyot27
24th March 2012, 23:35
If the user normally compiles mplayer themselves (and leaves the prefix alone, resulting in it installing the binary to /usr/local/bin), it results in a broken pipe due to AVXEdit and avxSynthFrameServer looking in /usr/bin rather than simply querying the $PATH. After I copied mplayer from /usr/local/bin to /usr/bin it worked fine.

qyot27
25th March 2012, 02:52
Also, I'm not sure of what the issue is, but it's not wanting to load FFMS2, resulting in the 'There is no function called FFVideoSource' error. The plugin is in ~/.AVXSynth/plugins. Things I'm unsure of here:

*Is all the building the prerequisites as shared necessary, or was that done simply out of Debian conventions? I tried building FFMS2 as static and as shared to link to ffms2avs, and neither one produced a working plugin. It takes too long to build FFmpeg on here, so I was only able to test with a static build of it. Not sure if that matters, as I'd think the only part that needs to be a shared object is the final plugin built by ffms2avs' Makefile, but that's only basing it on how the Windows plugins work.

*I also was using git master and SVN trunk versions rather than the point releases. Maybe that has something to do with it?




EDIT 2012-03-25: Yeah, I'm pretty sure it was because I didn't build FFmpeg as shared. I tested it again today with a shared FFmpeg, shared FFMS2, and then remade ffms2avs (+ the patch posted from the AUR) and it seemed to work fine opening a file and then resizing it.

Due to how messy this could potentially get with existing installs of those libraries (either from the distro repos or user-compiled), I'd strongly favor being able to use non-system copies of FFmpeg and FFMS2 to link against, as well as being able to use a static version of FFmpeg (if that truly is at the root of that issue I noted above). Of course if this was already planned, then just ignore me.

videophool
26th March 2012, 23:54
f course if this was already planned, then just ignore me.

The project could use an install expert to sort these things out. The current team is all SW developers, and our focus has been mainly on getting the framework ported and running.

sl1pkn07
27th March 2012, 00:52
hello. is possible add suport to compile with GCC 4.7.0?

greetings

videophool
27th March 2012, 05:45
hello. is possible add suport to compile with GCC 4.7.0?

greetings

Haven't tried yet. Are you seeing problems?

sl1pkn07
27th March 2012, 11:40
yes:

http://paste.kde.org/447110
http://paste.kde.org/447116

and not GCC 4.7.0 related:

http://paste.kde.org/447122

and:

make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.

greetings

videophool
30th March 2012, 20:36
We will look at integrating the revised SoftWire. Our current version of AvxSynth has the built-in resize routines stubbed out and set to call into ffmpeg (they use SoftWire). This will be our first SoftWire test.

Our SoftWire investigation is not going well. We cannot even get the SoftWire test code to run on gcc 64.

Mr VacBob
2nd April 2012, 08:41
Is SoftWire a JIT library? In that case you might be having problems with the ABI difference between Win64 and ELF/amd64. Basically some xmm registers need to be saved outside of calls into the Win64 system.

I took a quick look through the source and noticed some uses of things like 'unsigned', 'long', 'InterlockedIncrement' which probably indicate portability problems or 32/64bit bugs. 'unsigned' on loop counters can lead to overflow bugs and inhibits compiler optimization, while 'long' never has the size you want it to have, and use of atomic counters is bad unless you're very sure it makes the code thread-safe.

That said, if you inherited that code from AVISynth maybe it's best not to change it downstream.

As for all the non-JITted assembly I see commented out, it'd be best to port it to use x264's yasm library, which will also be good for AVISynth Win64.

Then you're only left with the portability problem of getting all the external plugins to work…

videophool
2nd April 2012, 17:38
Is SoftWire a JIT library? In that case you might be having problems with the ABI difference between Win64 and ELF/amd64. Basically some xmm registers need to be saved outside of calls into the Win64 system.

I took a quick look through the source and noticed some uses of things like 'unsigned', 'long', 'InterlockedIncrement' which probably indicate portability problems or 32/64bit bugs. 'unsigned' on loop counters can lead to overflow bugs and inhibits compiler optimization, while 'long' never has the size you want it to have, and use of atomic counters is bad unless you're very sure it makes the code thread-safe.

That said, if you inherited that code from AVISynth maybe it's best not to change it downstream.

As for all the non-JITted assembly I see commented out, it'd be best to port it to use x264's yasm library, which will also be good for AVISynth Win64.

Then you're only left with the portability problem of getting all the external plugins to work…

Some posters on this thread had suggested that AviSynth 2.6 included SoftWire that had been successfully ported to gcc and Win64. Since AvxSynth still needs a good cross-platform optimization model, we decided to investigate to see if we could get SoftWire running with AvxSynth. The initial results are not encouraging.

sh0dan
4th April 2012, 21:40
Since softwire is abandoned by the original developer, and I think all 64 bit is mostly untested, you might want to look at asmjit, which is very similar, and enable you to do JIT code that is 32/64 and Windows/Linux compatible, you might want to use that instead -it looks very similar and nice.

http://code.google.com/p/asmjit/

videophool
4th April 2012, 22:06
Since softwire is abandoned by the original developer, and I think all 64 bit is mostly untested, you might want to look at asmjit, which is very similar, and enable you to do JIT code that is 32/64 and Windows/Linux compatible, you might want to use that instead -it looks very similar and nice.

http://code.google.com/p/asmjit/

Thanks. We will take a look.

verydoomed
5th April 2012, 08:59
I went to the website and compared to installing Regular windows avisynth this is SOOOO complicated that I am not even going to try.Even the first line of the instruction was a real put off "Install ubuntu-11.10" No thanks I much prefer my Mint 10.10 and am not willing to move to 11.10 I'll just have to stick with Avisynth under wine. I watched the youtube video also but I am not clear, will you be able to save your script and open it in some video editor on linux? or a simple equivalent to virtual dub?

videophool
5th April 2012, 15:52
I went to the website and compared to installing Regular windows avisynth this is SOOOO complicated that I am not even going to try.Even the first line of the instruction was a real put off "Install ubuntu-11.10" No thanks I much prefer my Mint 10.10 and am not willing to move to 11.10 ... I watched the youtube video also but I am not clear, will you be able to save your script and open it in some video editor on linux? or a simple equivalent to virtual dub?

We are a small team of sw devs without adequate resources to test on many platforms, or develop a good installer. You can probably install on other Linux platforms, and if someone provides the instructions, we will post them on the wiki.

Once AvxSynth is proven stable, we will work on an ffmpeg component so that any app that supports ffmpeg will be able to open .avs scripts. As for a Virtual-Dub like app, it would be great if an industrious developer decided to make such a contribution. In the mean time, we have a very simple editor, AvxEdit, and the frame server that we use ti pipe to X264.

I'll just have to stick with Avisynth under wine.
We find avisynth/wine to be very unstable, and it is subject to licensing problems with MSFT libraries. With a small committed community, avxsynth could quickly achieve the stability and support needed to replace the avs/wine hack.

Yellow_
5th April 2012, 17:49
Once AvxSynth is proven stable, we will work on an ffmpeg component so that any app that supports ffmpeg will be able to open .avs scripts. As for a Virtual-Dub like app, it would be great if an industrious developer decided to make such a contribution.

Sounds great.

There are a number of NLE type ffmpeg based applications available for Linux that'll offer more than Virtualdub functionality as is.

Blender has a video editor of sorts, but also a nodal based compositor and tracker/stabilizer, compositor soon to be OpenCL, code well on the way just not in trunk yet.

Kdenlive NLE with underlying MLT (Media Lovin Toolkit) is ffmpeg based. http://www.mltframework.org/twiki/bin/view/MLT/

avxanne
7th April 2012, 00:13
We have updated the the ffmpegsource plugin and renamed it to avxffms2. This updated code (check out recent code at www.avxsynth.org) should fix the issue some people were experiencing where the system could not find FFVideoSource(). Please delete the old libffms2avx.so from the ~/.AVXSynth/plugins/ directory so that avxsynth will pick up FFVideoSource from libavxffms2.so. This version was tested with the ffms 2.17 and libav 0.7.4

The source code of the plugin can also be found in the avxsynth_plugin branch of the ffmpegsource project svn tree.
http://code.google.com/p/ffmpegsource/source/browse/

sl1pkn07
7th April 2012, 04:13
please fix compile with gcc 4.7.0 (now in core in archlinux). or...

Note: I'M NOT PROGRAMMER. i asked a chat friend programmer

avxSynthFrameServer part:

g++ -Wl,-R/usr/lib/avxsynth/plugins -Wl,-R/usr/lib/avxsynth -Wl,-R/usr/lib/ -Wl -L../../../avxcommon -lavxcommon
-L../frameserverlib -lavxframeserver -lpthread -lm -ldl ./src/main.o -Wl -L../../../avxcommon -lavxcommon -L../frameserverlib -lavxframeserver -lpthread -lm -ldl -o avxSynthFrameServer
g++: error: unrecognized command line option '-Wl'
g++: error: unrecognized command line option '-Wl'
make[2]: *** [avxSynthFrameServer] Error 1

change this:

LIBS = -Wl $(AVXCOMMON_LIB) $(FRAMESERVER_LIB) $(SYSLIBRARIES)

to this:

LIBS = -Wl,$(AVXCOMMON_LIB) -Wl,$(FRAMESERVER_LIB) -Wl,$(SYSLIBRARIES)

i'm not sure if it is the correct, but compile without error


avsynth builtinfuntions part:


src/filters/focus.cpp: In function 'void avxsynth::AFH_YUY2_C(unsigned char*, int, int, int, int)':
src/filters/focus.cpp:522:6: error: redeclaration of 'unsigned char y'
src/filters/focus.cpp:507:11: error: 'int y' previously declared here
make: *** [src/filters/focus.o] Error 1

with this fix the issue?

uc y_ = ScaledPixelClip(p[x*2+0] * center_weight + (yy + p[x*2+2]) * outer_weight);
yy = p[x*2+0];
p[x*2+0] = y_;

with this compile. but make other warnings:

/common/include/source -c src/audio/audio.cpp -o src/audio/audio.o
src/audio/audio.cpp: In member function 'virtual void avxsynth::ResampleAudio::GetAudio(void*, avxsynth::__int64, avxsynth::__int64, avxsynth::IScriptEnvironment*)':
src/audio/audio.cpp:1403:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
src/audio/audio.cpp:1448:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

and http://paste.kde.org/453290


ffms plugin part

http://paste.kde.org/453296

i dont know is related by avaxanne update or gcc 4.7

i test with ffmpeg distro package and libav 0.8.1 (same issue)

what is the diference between LibAV 0.7.4 and libav 0.8.1? (libav 0.7.4 don't compile with gcc 4.7)

greetings

qyot27
7th April 2012, 16:12
It seems that a different problem with FFMS2 has crept up. Now it complains about av_pix_fmt_descriptors being undeclared, resulting in a load failure and therefore FFVideoSource once again not being found. FFmpeg-git from early this morning, FFMS2-r670, AvxSynth r124.

Of course, I was also playing with trying to get it to load an FFMS2 that had the FFmpeg libs statically linked into it when this happened, but this doesn't seem like it'd be related to that.

avxanne
8th April 2012, 06:17
FFmpeg-git from early this morning, FFMS2-r670, AvxSynth r124.


As mentioned above, we tested with ffms 2.17 and libav 0.7.4 so there may be api incompatibilities. We will upgrade to more recent versions of these libraries in the near future.

videophool
17th April 2012, 20:52
We have moved the AvxSynth project to GitHub. We will take down the Google Code site shortly. www.avxsynth.org is already setup to redirect to GitHub.

zacharias
27th April 2012, 12:18
ok, now this seems veeeeeeerrrrrryyyyyyy promising. a lot really.
i will try this evening or even tomorrow morning to see if it works on debian stable/crunchbang. in wich version of ubuntu was it tested?
hopefully, specially resing filter/resample will work and specially the deinterlace itvc ones, if possible. thats my main issue. whenever i get interlaced source i have to use w1nd0w2.
i'll see and read the documentation.
one thing: does one need to compile mPlayer to make it work properly? afai can tell, it's not needed.
kudos

zacharias
29th April 2012, 22:17
on your how to page: https://github.com/avxsynth/avxsynth/wiki/System-Setup please consider changing the following on the point "AvxSynth Build"
from 1Get AvxSynth source code from github

git clone git@github.com:avxsynth/avxsynth.git
to
git clone http://github.com/avxsynth/avxsynth.git
i got an error whilst following ur tutorial, and this step solved it.
error:
Cloning into avxsynth...
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

using debian squeeze, btw ;)
kudos

zacharias
29th April 2012, 22:36
btw, failed to lauch the app. this is the content of my folder after instalation
http://17.imagebam.com/download/EQcMLDTZcyGQ1uVwZqOwjQ/18757/187569074/Screenshot%20-%2004292012%20-%2010%3A34%3A06%20PM.png
any thoughts?
kudos

zacharias
30th April 2012, 13:09
another update:
after installing FFMPEGSource, it destroyerd my previous ffmpeg compilation. i've done following this link:https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
afaik, if one compile like the wiki of ffmpeg, your step is unnecessary, am i ritght?
please do provide some input on the previous threads as well, mate ;)
kudos

videophool
1st May 2012, 03:57
btw, failed to lauch the app. this is the content of my folder after instalation
any thoughts?
kudos

What is in $HOME$/.AVXSynth?

avxanne
1st May 2012, 17:57
on your how to page: https://github.com/avxsynth/avxsynth/wiki/System-Setup please consider changing the following on the point "AvxSynth Build"
from
to



Thank you for pointing that out. I've updated the wiki. The original instruction on the wiki worked if ssh was set-up.

avxanne
1st May 2012, 18:27
one thing: does one need to compile mPlayer to make it work properly? afai can tell, it's not needed.
kudos

You do not need mplayer if you just want to dump the frames to stdout. We currently have two applications:
1) AVXEdit - Launches mplayer when you click the "Mplayer" button and plays your AvxSynth script.

2) AvxSynthFrameServer -
Check-out https://github.com/avxsynth/avxsynth/wiki/AvxSynth-Frame-Server
With the default commandine parameter, it would launch mplayer so that the user can view the frames. If you specify it not to launch mplayer, the frames would be dumped to stdout. For example
./avxSynthFrameServer testavxsynthscript.avs false
You can pipe the output to an encoder, for example, to x264:
./avxSynthFrameServer testavxsynthscript.avs false | x264 --profile main --level 3.1 --bitrate 3600 --vbv-bufsize 7200 --vbv-maxrate 5400 --thread-input --fps 24 --keyint 48 --min-keyint 48 --no-scenecut --rc-lookahead 48 --deblock 0:0 --bframes 2 --b-adapt 2 --b-pyramid none --b-bias 0 --ref 3 --weightp 2 --qpmin 6 --qpmax 51 --qpstep 4 --ipratio 1.4 --pbratio 1.3 --vbv-init 0.9 --ratetol 1.0 --qcomp 0.5 --cplxblur 20 --qblur 0.5 --aq-mode 1 --aq-strength 1.0 --merange 16 --me umh --direct auto --subme 6 --partitions p8x8,b8x8,i4x4 --trellis 2 --psy-rd 1.00:0 --no-fast-pskip --aud --nal-hrd vbr --sar 1:1 --output elephantTrim_3600.264 --input-res 1280x720 -


Also, for our testing we did not compile mplayer and only did apt-get install mplayer.

avxanne
1st May 2012, 18:34
another update:
after installing FFMPEGSource, it destroyerd my previous ffmpeg compilation. i've done following this link:https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
afaik, if one compile like the wiki of ffmpeg, your step is unnecessary, am i ritght?
please do provide some input on the previous threads as well, mate ;)
kudos

You could use whatever compilation of ffmpeg, but we've mostly tested with libav 0.7 and 0.8. Please do let us know if you see any issues between ffmpegsource and the more recent versions of ffmpeg.

avxanne
1st May 2012, 19:08
btw, failed to lauch the app. this is the content of my folder after instalation


That folder should have the AVXEdit executable after make.

What were the compile errors?

zacharias
8th May 2012, 19:29
That folder should have the AVXEdit executable after make.

What were the compile errors?

i got, none, afaik as i recall. im very exited to see this, dat to my knowlege, and the way i see it, (correct me if im wrong) kinda acts like a mix between avysinth+avsp for linux. wich is nice. i cant feed u back on the above questions mate. i've just instaled a brand new version of #!. so i wont be doing anything that might mess up mu ffmpeg + x264 compililing like i've said earlier... sorry on that. i just cant afford it having to reinstall *nix from scratch, because im noob (still)
but i will provide somefeeback on my experiments on how to make it work. i'l read some more documentation better and try to find ways to make this work.
since like i've said, i compile ffmpeg and x264 like the wiki i've mentioned, it wont be a bad idea for u uys take a look at that compilation since its used by thousands of *nix users, and somehow make AVXSynth work based on those. at least for debian/ubuntu and such distros based uppon dat.
kudos

zacharias
8th May 2012, 20:06
http://thumbnails66.imagebam.com/18918/5612f0189175172.jpg (http://www.imagebam.com/image/5612f0189175172)
here it is a sucssefull instalation. no bugs during install nothing! ;)
steps i took
1) compiled ffmpeg and x264 like this wiki: http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
2) installed QT like so (dont know if its the best way to do it but it worked with me)
a)
$ sudo apt-get install libqxt-*
b)
sudo apt-get -y install libqt4-dev libqt4-designer libqt4-gui
3) installed the rest of the dependencies (exept for th "Build tools" cause it was already installed by he compilation of ffmpeg+x264 and mplayer cause i already had it installed) like the info by doing:
$ sudo apt-get install liblog4cpp5-dev liblog4cpp5 libcairo2-dev libpango1.0-dev libpango1.0-dev
4) skipped to the "AvxSynth Build" part and proceeded like the wiki
Success! :)
so far.

fyi: since it runs using QT, on just can simply double click "AVXEdit" and voilá.
FIY: im using testing #!waldorf based on debian wheezy.
kudos

zacharias
8th May 2012, 21:44
i coundt even preview a video. this error shows up:
http://thumbnails7.imagebam.com/18920/27b335189192610.jpg (http://www.imagebam.com/image/27b335189192610)
so i decided to compile and install FFMS-2.17
so after i run
./configure --enable-shared
i got the following error
configure: error: in `/home/zacharias/.local/share/Trash/files/ffms-2.17-src':
configure: error: cannot link with FFmpeg
See `config.log' for more details
any thoughts?
kudos

EDIT: plus i found this on the debian repo's
http://packages.debian.org/search?searchon=names&keywords=FFMS

sl1pkn07
8th May 2012, 23:16
See `config.log' for more details

zacharias
8th May 2012, 23:23
See `config.log' for more details

here is, mate
http://pastie.org/3881418

sl1pkn07
9th May 2012, 00:15
configure:15913: gcc -o conftest -O3 -I/usr/local/include -D__STDC_CONSTANT_MACROS -shared -fPIC -DPIC conftest.c -pthread -L/usr/local/lib -lavformat -lavcodec -ldl -lva -lXfixes -lXext -lX11 -ljack -lSDL -lx264 -lvpx -lvorbisenc -lvorbis -ltheoraenc -ltheoradec -logg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lz -lrt -lswscale -lavutil -lm >&5
/usr/bin/ld: /usr/local/lib/libx264.a(common.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libx264.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

you fail build x264, or the ffmpeg package need other version of x264

zacharias
9th May 2012, 00:24
the fpic is the problem. already tryed to compile with --enable-pic
still nothing
kudos

JEEB
9th May 2012, 00:33
the fpic is the problem. already tryed to compile with --enable-pic
still nothing
kudos
It's because libraries you built ffmpeg with (that are linked into ffmpeg, and thus will be linked into the ffms you were building) are not built with fPIC.

Also, I already helped you build a working ffms with current ffmpeg for this on #ffmpeg, why continue for eff's sake? I've already told you what you have been doing wrong, and decided that it's just easier for one like you to just cut off all other libraries so that you don't need to rebuild them all just to get a working ffms (because ffms doesn't even use these libraries).

herp le derp

zacharias
9th May 2012, 00:49
@Jeeb
ive done the compilinv like uve suggested.still got the same error whilst trying to open video on avx.ffms voes well but error still there.that paste bin is the one ive showed u before i follow ur light.to wich im thankfull (:

osgZach
12th May 2012, 21:09
Just wanted to say I hope this project does not die. I would love to see it continue and be successful.
I don't have any meaningful talents to donate to the cause, but I just wanted to show my support for the project.
I completely understand what it is like to have something you believe in, while suffering from a lack of contributors / others who could help.

I would love to fire up a Linux distro one day and use it, when it is in a well-polished "For public consumption" state.

rogerdpack
15th May 2012, 05:53
Maybe it would be nice to make AvxSynth "cross platform" instead of just "linux only" so that devs from both sides could help out, etc.

Or at least wish that AviSynth would move to github :P
-roger-

ps auxw
15th May 2012, 15:16
There was also some vague idea about borrowing some code from Wine to load windows .dll plugins in a Linux version. 90% of Avisynth plugins are pure algorithm code with no system calls, these would be a doddle to host in a Linux address space.
From what I remember, the DLL loading code in mplayer (see the loader/ directory) looked somewhat reusable. It doesn't have a solution for 32/64bit mismatch though.

videophool
22nd May 2012, 16:48
Just wanted to say I hope this project does not die. I would love to see it continue and be successful.
I don't have any meaningful talents to donate to the cause, but I just wanted to show my support for the project.
I completely understand what it is like to have something you believe in, while suffering from a lack of contributors / others who could help.

I would love to fire up a Linux distro one day and use it, when it is in a well-polished "For public consumption" state.

We are still working on it. The current focus is a clean build and install, and fixing the worst bugs. Meanwhile, we would like to see more devs join the project.

digitall.h
28th May 2012, 22:46
Hello everybody, my first post in Doom9's Forum.
I began editing video 10 years ago, and learnt a lot about avisynth and video edition at Kvcd.net as member, and in Doom9 as visitor.
And I switched to a linux environment 6 years ago. I just keep visiting Windows to use natively avisynth.
That's the reason I find it so (:thanks:) interesting the avxsynth project.
I don't have programming skills, I cannot help as a dev. But once you find it ready to test, I will be very pleased to help in testing and improving avxsynth.

I wish you success.

batraxos
29th May 2012, 15:22
Hello everyone...
Awesome job on this project, it was indeed needed.
On my Windows box I ve got Avisynth passing video onto mencoder so I can batch transcode some videos.
My problem when I try the same with Avxsynth on my linux box, is that I only get Video and not Audio.
For some reason, AVXsynthserver only drops video frames on the stdin of mencoder.

Trying to troubleshoot the issue, I realised that axvframeserver , only passes video and not audio on Mplayer also.
My AVS script is a simple

FFVideoSource(pathtomyfile.avi)

If I use FFAudioSource I get only audio and no video.

Any ideas are much apreciated...

qyot27
29th May 2012, 22:11
Hello everyone...
Awesome job on this project, it was indeed needed.
On my Windows box I ve got Avisynth passing video onto mencoder so I can batch transcode some videos.
My problem when I try the same with Avxsynth on my linux box, is that I only get Video and not Audio.
For some reason, AVXsynthserver only drops video frames on the stdin of mencoder.

Trying to troubleshoot the issue, I realised that axvframeserver , only passes video and not audio on Mplayer also.
My AVS script is a simple

FFVideoSource(pathtomyfile.avi)

If I use FFAudioSource I get only audio and no video.

Any ideas are much apreciated...
A) That's how FFMS2 works, regardless of being used under AviSynth 2.5/2.6 or AvxSynth. The video and audio functions are totally separate. The solution is either to use AudioDub to combine them manually or (if AvxSynth doesn't have issues with .avsi files), to use the FFmpegSource2 wrapping function with the atrack= parameter.

B) There was a point where AvxSynth had issues with using AudioDub. I'm not sure if that's been fixed yet.





How easily could avxFrameServer be modified to also output yuv4mpeg streams? That would allow resolution and framerate (and colorspace?) to be preserved when piping to x264 and co. At least for the time being until AvxSynth-specific import is added and piping is no longer needed.

videophool
31st May 2012, 01:37
Hello everyone...
My problem when I try the same with Avxsynth on my linux box, is that I only get Video and not Audio.


Currently, the frame server will deliver audio or video, not both. Video gets priority.

raido
6th June 2012, 02:39
I followed the instructions here (http://code.google.com/p/avxsynth/wiki/SystemSetup) and everything works fine. However, I skipped the kdev setup steps. Were the kdev setup instructions included for debugging/development purposes?

videophool
7th June 2012, 18:52
I followed the instructions here (http://code.google.com/p/avxsynth/wiki/SystemSetup) and everything works fine. However, I skipped the kdev setup steps. Were the kdev setup instructions included for debugging/development purposes?

kdev is necessary if you want to build ant run avxedit, which provides a simple avsedit-like tool to develop and test scripts.

sl1pkn07
7th June 2012, 19:18
not at all. only need Qt libraries. the master configure/make build avxedit without install kdev

videophool
8th June 2012, 17:18
not at all. only need Qt libraries. the master configure/make build avxedit without install kdev

Yes you are right. I was thinking about QT, but the question was about kdev.

sl1pkn07
9th June 2012, 00:34
kdev is painfull and rapefathers/killmothers deprecated method XD

https://github.com/avxsynth/avxsynth/wiki/System-Setup update instrucctions xd

edit: only need libqt4-dev. libqt4-designer and libqt4-gui installed by libqt4-dev dependencies

http://packages.ubuntu.com/precise/libqt4-dev

v___v
11th June 2012, 22:29
hihihi, an acquaintance ported over (albeit more like "hacked over") fft3dfilter and successfully has it working with AvxSynth. Feel free to try it out and report any bugs.

Please note that this has been relatively untested. So your mileage may very.

Said acquaintance would have posted himself—but he just registered and is waiting for the 5 days to pass in order to post.

https://github.com/fundies/fft3dfilter-linux

ParadoxHeart
16th June 2012, 21:00
I knocked up a quick port to AVXSynth of Donald Graft's Decomb package. Includes 64-bit patches from squid_80. Builds on 64-bit linux with both GCC 4.6 and Clang 3.0, and includes assembler optimisations. It hasn't been made ready for building on 32-bit yet, so expect it to do bad things if you try it.

You need cmake and yasm in order to build it, and cmake must be passed the flag "-DCMAKE_ASM_NASM_COMPILER=yasm" in order for it to use yasm to build the assembler files.

Beyond integrating squid_80's patches, the changes largely revolve around the following (and was otherwise pretty painless to port):

1. Ensuring the correct headers are imported.
2. Ensuring the case in header import statements matches the file name.
3. Differences in what MCSV++ and g++ consider acceptable C++.

I've tested it with a YV12 source, but not with a YUY2 source yet.

http://mujintou.org.uk/projects/decomb.zip

sl1pkn07
16th June 2012, 22:00
paradox: this is normal?

[ 12%] Building ASM_NASM object CMakeFiles/decomb.dir/src/asmfuncsYUY2.asm.o
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:31: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:112: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:202: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:231: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:260: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:320: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:371: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:419: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:475: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:523: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:567: warning: (pad:1) trailing garbage after macro name ignored
/home/sl1pkn07/aplicaciones/avxplugins/decomb/src/asmfuncsYUY2.asm:610: warning: (pad:1) trailing garbage after macro name ignored

greetings

ParadoxHeart
17th June 2012, 01:01
Yes, squid_80 has an explanation of what that is about in this post: http://forum.doom9.org/showthread.php?p=728502#post728502

It doesn't appear to stop anything from working.

sl1pkn07
17th June 2012, 23:13
oks. thanks

Stephen R. Savage
18th June 2012, 20:11
Distribution packagers and end-users may be interested to know that AvxSynth now has a proper build procedure using GNU autotools. See https://github.com/avxsynth/avxsynth/wiki/System-Setup for instructions.

Additionally, it is excellent to see that plugins for original AviSynth can be ported and remain functional. Those curious may wish to investigate the modified versions of several popular plugins associated with the now-defunct 64-bit port of AviSynth (if JoshyD ever did upload the source -- perhaps he forgot): http://forum.doom9.org/showthread.php?t=152800

sl1pkn07
25th June 2012, 19:08
is possible run avxsynth in silent mode? without all error/warnings/info messages (of course. without pipe to /dev/null XD)

greetings

qyot27
26th June 2012, 22:07
On the System Setup page on Github, both FFmpeg and FFMS2 have full checkinstall commands. And while the instructions there are geared toward the release tarballs and therefore have simple version numbers to parse, AvxSynth itself is left with a plain sudo make install.

The below is the checkinstall line I've been using for AvxSynth:
sudo checkinstall --pkgname=avxsynth --pkgversion="1:$(grep "Version" avxsynth.pc | \
cut -f2 -d " ")+$(git rev-list HEAD | wc -l)-$(git rev-list HEAD -n 1 | cut -c 1-7)-$(date +%Y%m%d)" \
--backup=no --deldoc=yes --fstrans=no --default
which results in:
$ sudo apt-cache show avxsynth
Package: avxsynth
Status: install ok installed
Priority: extra
Section: checkinstall
Installed-Size: 11356
Architecture: i386
Version: 1:4.0+137-b2eb3c3-20120625-1
Provides: avxsynth
Description: Package created with checkinstall 1.6.2

Adub
26th June 2012, 22:38
Hmm, that's a useful command you got there qyot27. I'll probably steal it once I get my new i7 Ubuntu rig up.

sl1pkn07
26th June 2012, 23:00
@qyot27: ubuntu?

to build package in ubuntu/debian: "dpkg-buildpackage -b" in avxsynt folder.. avxsynth have all to build package without checkinstall

qyot27
27th June 2012, 12:01
I know about the buildpackage support, but I can't be bothered to use it. The only users who should really care about making repository-safe packages are those maintaining a repo, not the casual user that just wants it logged in the package manager.

It still doesn't change the fact that if it were so important to use the 'Debian way' to build the package (which it really isn't, aside from repo maintainers), then it still doesn't explain why it's not given as the final step on the installation page, with make install used instead. And considering said installation page assumes the use of an Ubuntu system (as that's the distro AvxSynth development is targeted to anyway), either packaging method would be valid and superior to a plain make install.

sl1pkn07
27th June 2012, 14:31
is it more difficult:

dpkg-buildpackage
cd ..
sudo dpkg -i libavxsynth* avxedit*

instead of:

autoreconf -i
./configure
make
sudo checkinstall --pkgname=avxsynth --pkgversion="1:$(grep "Version" avxsynth.pc | \
cut -f2 -d " ")+$(git rev-list HEAD | wc -l)-$(git rev-list HEAD -n 1 | cut -c 1-7)-$(date +%Y%m%d)" \
--backup=no --deldoc=yes --fstrans=no --default ?

Use checkinstall instead of make install, because if you use make install, when deleting sources you may need to uninstall 2 method:

Rebuild sources and make uninstall (in the same prefix) or delete files installed one by one.

Using checkinstall (and dpkg-buildpackage) is easier than removing/updating the build using the system package updater. (apt-get, dpkg, packagekit,synaptic, etc)

StainlessS
28th June 2012, 01:33
I like the IDEA of LINUX, and the demise of MS, but really, not gonna happen any time soon.
If only Linux could differentiate between eg a word processor program and some other.
Under Windows, you might have a program called eg Office stuff, under Linux
it will almost certainly be called giraffe or duck billed or whatever..

I hate Windows, and Linux, but not in equal measure.

sl1pkn07
28th June 2012, 01:37
openoffice, libreoffice calligra.....

StainlessS
28th June 2012, 01:46
Can you suggest a solution for those unfortunate giraffe fixated users amongst us.

Guest
28th June 2012, 01:51
Let's stay on topic, guys.

sl1pkn07
28th June 2012, 01:51
oh. sorry (the offtopic). giraffe is a circuit simulator?

ktechlab?

sl1pkn07
28th June 2012, 01:54
okidoki :)

StainlessS
28th June 2012, 02:10
sl1pkn07, Open source?
Maybe like Spice. Nice Spice simulator would be well good.

e1897876
26th July 2012, 16:37
Hello,

Does someone know if it is somehow possible to get the following AviSynth script working with AvxSynth (or which lines will work at least)? The functions (.avsi) used here are attached. I think, the video source could be modified as ffdshow tryouts doesn't exist under Linux.

setmtmode(5,0)
SetMemoryMax(512)
video=ffdshow_source().changefps(ffdshow_source(), linear=true)
A=video
setmtmode(2)
SetMemoryMax(712)
B=a.SPresso_JD()
C=a.SeeSaw_JD(B).LimitedSharpenFaster_JD(strength = 11)
return C
GetMTMode(false) > 0 ? distributor() : last

The other way round would be OK, too: will
- RemoveGrain-1.0
- masktools-v2.0a35
- mvtools-v2.5.11.3
- VariableBlur040
- warpsharppackage_25_dll_20031103
somehow be available with AvxSynth? That would be great!

If that should be a dead end, has someone an idea which combination of ported filters (Built-in-Functions (https://github.com/avxsynth/avxsynth/wiki/Built-in-Functions)) would offer similar functionality?

Thanks for helping and regards.

e1897876
2nd August 2012, 15:32
Really guys, no ideas?

sl1pkn07
2nd August 2012, 15:54
The other way round would be OK, too: will
- RemoveGrain-1.0
- masktools-v2.0a35
- mvtools-v2.5.11.3
- VariableBlur040
- warpsharppackage_25_dll_20031103
somehow be available with AvxSynth? That would be great!


only exist port for Removegrain and masktools, but don't work

to load video use ffmpegsource instead ffdshow (only windows)

all "set" modes don't exist in avxsynth

e1897876
2nd August 2012, 19:30
OK for now, thanks for those hints.

btb
14th October 2012, 08:30
AvxSynth working on OSX, for anyone interested

https://github.com/avxsynth/avxsynth/issues/83

videophool
17th October 2012, 15:43
AvxSynth working on OSX, for anyone interested

https://github.com/avxsynth/avxsynth/issues/83

Excellent contribution. Thanks.

Adub
6th November 2012, 22:59
Hmm, I'm currently doing some research on the innards of AvxSynth, specifically the Cache and InternalCache mechanisms. Is there any documentation anywhere about their internal use for the built in functions? Is the Cache used by default throughout the full filter chain, or is it a more pick and choose situation per filter?

For context, I'm going to start work on porting some of the built in functions to CUDA (specifically the ones with disabled MMX and SSE) for some academic research, and if I can modify the internal cache in such a way so that I can keep the frame data on the GPU as long as possible, the greatest performance gains will be achieved. Otherwise if we are sending the frames back and forth across the bus, we lose a lot of speed due to the extra transmission overhead.

mandarinka
7th November 2012, 02:09
If you care about unix environments, Vapoursynth is probably much more viable project to contribute to: http://forum.doom9.org/showthread.php?t=165771

TheFluff
7th November 2012, 14:08
What mandarinka said. The Avisynth internal caching is an incredible mess.

george84
10th November 2012, 18:36
I have ubuntu 12.04 with all the newest updates up to today.

I followed the instructions in https://github.com/avxsynth/avxsynth/wiki/System-Setup but encountered an error.

In ffmpeg
sudo checkinstall....

I get an error (last lines)

dpkg: warning: downgrading ffmpeg from 4:0.8.3-0ubuntu0.12.04.1 to 0.11.1-1.
(Reading database ... 244393 files and directories currently installed.)
Preparing to replace ffmpeg 4:0.8.3-0ubuntu0.12.04.1 (using .../ffmpeg_0.11.1-1_i386.deb) ...
Unpacking replacement ffmpeg ...
dpkg: dependency problems prevent configuration of ffmpeg:
libav-tools (4:0.8.3-0ubuntu0.12.04.1) breaks ffmpeg (<< 4:0.8~) and is installed.
Version of ffmpeg to be configured is 0.11.1-1.
dpkg: error processing ffmpeg (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
ffmpeg
~
~
~
~
~
~
~
~

This seems to be a version conflict.

Another minor docu problem:

In AVXSynth Build step 2, one should mention that directory has to be changed before this step.

Still I was able to successfully execute the final version test.

qyot27
10th November 2012, 22:32
It's just the Debian epoch in the checkinstall step. Add a 5: (or 7: for Quantal users, but you could just go with 7: for Precise, the only thing that matters is that the number is higher than the one used for the stuff in the official repositories) to the beginning of it so it won't conflict with the system packages. This is also required of using ffmpeg from git.

So instead of:
sudo checkinstall --pkgname=ffmpeg --pkgversion="0.11.1" --backup=no --deldoc=yes --fstrans=no --default
it needs to be
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:0.11.1" --backup=no --deldoc=yes --fstrans=no --default

george84
12th November 2012, 13:13
Thank you. That worked.

@xi@g@me
27th January 2013, 20:23
Hi guys,

thank you for porting AviSynth to linux !!!

I downloaded and installed it using the wiki, but it seems I can't use the FFVideoSource() function.

If I run Version() with AVXEdit, it works perfect. But if I run

FFVideoSource(source="video.avi")

(video.avi exists in the current folder), it says "unable to run script", with no additional info.

Is there something I missed ?

Thanks :)

qyot27
27th January 2013, 21:39
That error looks like either you're trying to run the script as a shell script (you don't do that, it wasn't designed that way) or you don't have FFMS2 installed correctly...or at all.

@xi@g@me
27th January 2013, 21:55
Hi qyot27,

I run the script using EVXEdit, not from the shell (in the other case I would have used avxFrameServer).

I also think the error come from ffms2. How can I check it is correctly installed ?

my ubuntu is the 64 bits version. Perhaps I have an incompability with the ffms2 plugin ? (64 vs. 32)

qyot27
28th January 2013, 00:35
The output of:
sudo apt-cache show libffms2-dev

plesken666
28th January 2013, 11:36
Hi

I've just compiled avxsynth on mandriva 2010.2:

1. ffmpeg (0.11 version) as static libraries

./configure --prefix=/root/avxsynth/ffmpeg
make
make install

2. ffms as static libraries

./configure --prefix=/root/avxsynth/ffms PKG_CONFIG_PATH=/root/avxsynth/ffmpeg/lib/pkgconfig
make
make install

3. AVXSynth

./configure --prefix=/usr ffms2_CFLAGS="-I/root/avxsynth/ffms/include" ffms2_LIBS="-L/root/avxsynth/ffms/lib -lffms2" libav_CFLAGS="-I/root/avxsynth/ffmpeg/include" libav_LIBS="-L/root/avxsynth/ffmpeg/lib -lavformat -lavcodec -lavdevice -lavfilter -lavutil -lswresample -lswscale -ldl -lva -ljack -lasound -lSDL -lm -pthread -lbz2 -lz -lrt" CXXFLAGS="-march=i686"
make
checkinstall --type=rpm make install
rpm -ivh /root/rpmbuild/RPMS/i586/avxsynth-4.0-1.i586.rpm

I've run a AVXEdit, and paste:

#src = Version()
src=FFVideoSource(source="/home/plesken/Wideo/DivX/Rezerwat.2007.PL.DVDrip.XviD.avi")
#ShowSMPTE(src)
ConvertToYV12


I've got an error message "Failed processing script from AVXSynth Editor".
What have I been doing wrong?
Is any option for debug?

Plesken

qyot27
28th January 2013, 15:23
You didn't load any video. The documentation on the AvxSynth Github Wiki isn't really clear about this (and gives a bad example because it doesn't flesh this out at all), but AviSynth syntax has an implicit last. You're assigning the video to a variable, rather than letting the implicit last deal with it, but then you don't call the variable, resulting in a script that won't work at all. You either need to:

A) Get rid of the src= assignment entirely, as it's redundant in this case (as is the source=).
B) Call the src variable before calling ConvertToYV12(), which should be unnecessary anyway if you're dealing with MPEG-4 ASP.

src=FFVideoSource("source.ext")
src.ConvertToYV12()
or
src=FFVideoSource("source.ext")
src
ConvertToYV12()
would both work. As would:
FFVideoSource("source.ext")
ConvertToYV12()
or in this case,
FFVideoSource("source.ext")

plesken666
28th January 2013, 16:45
If I put only:


FFVideoSource("/home/plesken/Wideo/DivX/Rezerwat.2007.PL.DVDrip.XviD.avi")


It still didn't work with the same error...
Any ideas?

Guest
28th January 2013, 16:48
FFVideoSource("/home/plesken/Wideo/DivX/Rezerwat.2007.PL.DVDrip.XviD.avi")
Discussion of downloaded material is not allowed at Doom9 per forum rule 6.

@all

No further help is to be given on this issue. Thank you.

@xi@g@me
28th January 2013, 18:56
@ qyot27 :

here are the outputs :

sudo apt-cache show libffms2-dev :

Package: libffms2-dev
Priority: optional
Section: universe/libdevel
Installed-Size: 163
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Architecture: amd64
Source: ffms2
Version: 2.17-1
Depends: libffms2-2 (= 2.17-1), libavformat-dev, libavcodec-dev, libswscale-dev, libpostproc-dev, libavutil-dev, zlib1g-dev
Recommends: ffmsindex
Filename: pool/universe/f/ffms2/libffms2-dev_2.17-1_amd64.deb
Size: 38170
MD5sum: bef398a6a81103c8e567aab58fafecbd
SHA1: e2b12b1bca361a5365c06266ebe1bee84bed7d4b
SHA256: aa918b245699552e50aeb564327ca1382508cb58e650d70852c7ced53edc3f8a
Description-en: Development files for libffms2
A cross platform ffmpeg wrapper library, and some additional content for
things ffmpeg doesn't handle well. A more friendly API and an easy way to
say "open and decompress this, I don't care how".
.
This package contain headers and other files needed to compile and link
against libffms2.
Homepage: http://code.google.com/p/ffmpegsource/
Description-md5: 44f41716b4c49809a59c24b888b4d800
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu





sudo apt-cache show ffms2 :

Package: ffms2
Status: install ok installed
Priority: extra
Section: checkinstall
Installed-Size: 976
Maintainer: root@axiagame-linux
Architecture: amd64
Version: 2.17-1
Provides: ffms2
Description: Package created with checkinstall 1.6.2



I have seen the posts above, so I would like to add that "video.avi" is a video I captured with DxTory on a video game. I wish to create a whole process of encoding in command line so I can relay this task to my seconday PC equiped with linux.

I need to use avxSynth as the captured video has a VFR (FFVideoSource with fps parameter set), and I also need to do the encoding on a x64 machine since the source video file is very heavy and 2GB of RAM is not enough for x264 encoder.

I had a new look and the exact error message is :
"Failed processing script from AVXSynth Editor" as it was for plesken666

thank you :)

qyot27
28th January 2013, 19:26
Are you sure that libavxffms2.so was built when you built AvxSynth itself? Do you see it in the result of
ls -R /usr/local/lib/avxsynth

If it didn't build libavxffms2, then that's the source of the issue. Also, I'd recommend trimming it down to only one copy of FFMS2: either the one from the repos, or the one you compiled yourself (preferably the latter, since it makes ffmsindex available without having to worry about installing it separately). There also might be an off-chance of needing to use 'sudo ldconfig', which would come after installing AvxSynth or anything else that uses shared libraries.

Concerning the 64-bit situation, the only thing you need to be aware of is that 64-bit compiles need --enable-pic (or equivalent) to be specified where possible so that everyone compiles cleanly. For FFmpeg, it's --enable-pic, for FFMS2 and AvxSynth, it's --with-pic (although since they both use autotools, it might be used by default on 64-bit).

@xi@g@me
28th January 2013, 20:30
here is what I got :

axiagame@axiagame-linux:~$ ls -R /usr/local/lib/avxsynth/
/usr/local/lib/avxsynth/:
libautocrop.so libavxffms2.so libavxframecapture.so libavxsubtitle.so

the plug-in seems to be present.

I did a file on each of the 4 DLLs, they are all 64 bit ELF binaries

sl1pkn07
28th January 2013, 21:29
working for me

ffmpeg 1.0.1 form repository https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/ffmpeg
ffmpegsource 2.17 https://aur.archlinux.org/packages/ff/ffmpegsource/PKGBUILD
avxsynth git https://aur.archlinux.org/packages/av/avxsynth-git/PKGBUILD

http://wstaw.org/m/2013/01/28/plasma-desktopjt3071.png

greetings

qyot27
29th January 2013, 00:02
I was really just thinking about this part:
I have seen the posts above, so I would like to add that "video.avi" is a video I captured with DxTory on a video game. I wish to create a whole process of encoding in command line so I can relay this task to my seconday PC equiped with linux.
Does opening the file with FFVideoSource under AviSynth on Windows or Wine work? I'm starting to think it's a libavcodec issue, especially depending on which release of Ubuntu you're using (as in, 12.04, 12.10, etc.) and if you just installed the 'ffmpeg' from the repositories instead of compiling it yourself.

I can almost bet that the 'ffmpeg' from the repositories doesn't support Dxtory-captured content, because it's really the fork, and the commit that specifically says it adds support for Dxtory only exists in mainline FFmpeg (where it was added in December 2011).


The solution, in any case, is very likely to be to compile FFmpeg, then recompile FFMS2, then finally recompile AvxSynth, and try again.

@xi@g@me
30th January 2013, 20:24
OK, here is the point :

I tried to open with virtual dub on windows (using an avs script with the same contents). It lags for a long time (indexing ?) then tell me : "insanity detected : empty frame returned"

I tried to directly index the video file using ffmsindex.exe (still from windows), and it tells me the index file has been correctly created, but the files is only 486 octets length... If I try to repoen with virtual dub, I still get the same problem after the same time.

(with avxsynth, the error is immediate when I try to open the file)

I removed ffms2, ffmpeg, libffms2-dev and avxsynth to try to recompile everything (and the avxsynth lib directory), but it seems that the git repository of ffmpeg provided by sl1pkn07 does nor work (git tells me the server shall call get update-server-cache because some file is missing).

I'll wait a bit, hoping the git issue will not last and try to recompile everything after that.

sl1pkn07
30th January 2013, 20:31
no need make git pull in ffmpeg tarball. if need ffmpeg from git use git://source.ffmpeg.org/ffmpeg.git. but i don't know if working with ffms2 2.17 (avx don't build with ffms2 svn)

@xi@g@me
30th January 2013, 21:00
OK, I thought there were git repositories, but if I go on the links I find some sort of script.

I'm not an expert of linux, how do I run those scripts ? I bet they are the scripts needed to build & install each package ?

sl1pkn07
30th January 2013, 21:17
my scripst is for install packages in archlinux. but the "core" ( code into "build()" and "package()" ) working in all linux (only need change $srcdir and $pkgdir by your own directory)

qyot27
30th January 2013, 23:56
As already noted, those repositories/scripts are for Arch, not Ubuntu. Don't expect 1:1 compatibility.

FFmpeg git and FFMS2 svn do work with AvxSynth, if AvxSynth is patched to not look for libpostproc at all. That's the only issue, and to that end, I have both the ignore libpostproc patch and one from 0x09's branch that corrects the header search path in a repo on my Github: https://github.com/qyot27/mpv-dep-patches

Basically, the routine is like this:
FFmpeg:
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --prefix=$HOME/ffavx_build --enable-gpl --enable-version3 --enable-avresample \
--enable-pic --disable-encoders --disable-muxers --disable-debug --disable-network \
--disable-hwaccels --disable-indevs --disable-outdevs
make
make install

FFMS2:
git clone git://github.com/tgoyne/ffms2.git
cd ffms2
git checkout master
PKG_CONFIG_PATH=$HOME/ffavx_build/lib/pkgconfig ./configure --enable-shared --enable-static --with-pic
make
sudo checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-svn" --backup=no \
--deldoc=yes --fstrans=no --default
sudo ldconfig
(see JEEB's post here (http://forum.doom9.org/showthread.php?p=1610157#post1610157) for why I'm recommending this particular repo and not the svn; the unpatched svn version can't yet handle the planar audio tactics that libavcodec has switched to; with this, you can once again get audio from scripts...eventually it should get into the svn, but it just hasn't happened yet)

AvxSynth:
git clone git://github.com/qyot27/mpv-dep-patches.git
git clone git://github.com/avxsynth/avxsynth.git
cd avxsynth
git am ../mpv-dep-patches/Avx*patch
autoreconf -fiv
PKG_CONFIG_PATH=$HOME/ffavx_build/lib/pkgconfig ./configure --enable-silent-rules
make
sudo checkinstall --pkgname=avxsynth --pkgversion="1:$(grep "Version" avxsynth.pc \
| cut -f2 -d " ")+$(git rev-list HEAD | wc -l)-$(git rev-list HEAD -n 1 \
| cut -c 1-7)-$(date +%Y%m%d)" --backup=no --deldoc=yes --fstrans=no --default



And whether it really matters or not, I also have branches of x264_L-SMASH and mpv on Github that I've included AvxSynth input patches in, which makes things simpler for testing and encoding.

@xi@g@me
31st January 2013, 00:06
tested sl1pkn07 repositories, still not working.

I'll try yours tomorrow qyot27 (it's late here in France) and I tell you how it goes.

Btw thank both for your help, I hop we'll get it !

sl1pkn07
31st January 2013, 00:07
thanks for the ffms2-git qyot27

@xi@g@me
31st January 2013, 19:56
I'm about to try qyot27's solution, but...

I wonder if it can be an access right issue ?

I mean that my video file is on an NTFS partition (I can't change that, I also need the disk on windows), perhaps avxsynth does not have the rights to open the video file ? (which would explain an immediate failure)

How can I check that ?

sl1pkn07
31st January 2013, 20:04
avxsynth run in user mode, if your linux user can read/write these file in ntfs partition, avxsynth can read these files

greetings

@xi@g@me
31st January 2013, 21:16
OK. I just tested that, I am the owner of the file and I can open it with a simple media player in gdm. I have R&W permissions (only for the owner)

@xi@g@me
31st January 2013, 22:45
Still get an immediate error with your version, qyot27...

I tried to copy the video file from the NTFS partition to the / partition, but nothing better

qyot27
1st February 2013, 06:11
Then I'd start to think that maybe it's a problem with AVXEdit. I don't use specialized editors for writing scripts, just plain Notepad or Leafpad (or Gedit, but using Leafpad has gotten a bit instinctual at this point), and then test the script in a media player, VirtualDub, or encoding program directly.

If it is actually a problem with AVXEdit (I can't say; I'm not at liberty to fully test with a 64-bit system at the moment, but AvxSynth was working the last time I tried; remember, I don't use AVXEdit so I can't speak to whether it works), then you could test with the x264_L-SMASH or mpv branches I mentioned earlier. The fact it says it can't load the script is what makes it suspicious, and points more to an issue that AvxSynth isn't getting loaded or handled right - which if something is wrong with AVXEdit, it's possible (and you may not see the problem in another program). If it was a problem with FFMS2, it'd likely say either 'There is no function named FFVideoSource' or something specifically about the video file not being valid, found, or something along those lines.

sl1pkn07
1st February 2013, 06:52
@xi@g@me

is possible upload a sample?, for test in my system

qyot27
2nd February 2013, 00:17
Now that I've had time to test it, I can confirm it is an issue with AVXEdit. Not AvxSynth. So don't use AVXEdit. Like I mentioned before, the patches for x264_L-SMASH and mpv allow them to work with scripts directly, which allows you to test.

x264 (you may need to update yasm, as described on the FFmpeg wiki (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide))
git clone git://github.com/qyot27/x264_L-SMASH.git
cd x264_L-SMASH
git checkout extra-avx (if you don't need audio from the scripts, you can checkout the master_extra branch instead)
PKG_CONFIG_PATH=$HOME/ffavx_build/lib/pkgconfig ./configure --enable-strip --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
--fstrans=no --default
And test the script the way you'd run it on Windows.

For mpv, follow the MPlayer-centric instructions on the Ubuntu Community wiki (https://help.ubuntu.com/community/Compiling%20MPlayer#Dev_files...) to get the necessary dependencies, then build a non-stripped-down version of FFmpeg from git (if you want all of those external libs like libmp3lame or so on, you can enable them) and install it to the system. Then,
git clone git://github.com/qyot27/mpv.git
cd mpv
git checkout extra-new
./configure --disable-debug
make
sudo checkinstall --pkgname=mpv-player --pkgversion="3:$(./mpv | head -1 \
| sed 's/ /\t/g' | cut -f2 | cut -c2-)" --backup=no --deldoc=yes --fstrans=no --default
And then you can test the script in it (and seek back and forth like any normal video file). mpv also has encoding capabilities, if you'd rather encode with something other than H.264 (although if you used --enable-libx264 when building FFmpeg, mpv can use that, too).

@xi@g@me
2nd February 2013, 09:31
OK.
I also did some test on my side :

I first tried to run the command


avxFrameServer video.avs


as I read in the documentation that avxFrameServer would launch mplayer by default. It took some time, created an (very small, 596B) index file, and finished without launching anything. It took all my memory (16GB !) for the "operation"...

After that, I directly tried


mplayer video.avs


and I got this :


MPlayer svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing video.avs.
libavformat version 53.21.1 (external)
Mismatching header version 53.19.0


Exiting... (End of file)


Version problem ?


I'll now try qyot27's solution, but there are a few things I do not understand :

Do I have to install both x264 and mpv ? Or just x264 is OK ?
Do I have to remove all dependencies and reinstall them like said in the FFmpeg wiki ? (libavcodec, .... and of course x264)
> "And test the script the way you'd run it on Windows."
You mean, like

avxFrameServer video.avs false | x264 blah blah blah -

?

Thanks for your help :)

@xi@g@me
2nd February 2013, 10:23
@xi@g@me

is possible upload a sample?, for test in my system

I'm sorry, but the video file is 10GB size, I can't upload this ! Or perhaps if you have your own FTP server, I can initiate the copy this night

qyot27
2nd February 2013, 10:33
A short sample would suffice, something like
ffmpeg -i input.avi -vcodec copy -t 00:00:30 output.avi
(which will save the first 30sec to a new file)


But anyway, no, you don't have to install both x264 and mpv, but it can be helpful (mpv will let you watch the script instead of having to encode it to an output file first). They're only *both* necessary if you want to use mpv's encoding feature and use libx264 as the encoder (libx264 goes into FFmpeg, which goes into mpv).

You probably don't *have* to remove all the dependencies for FFmpeg first, but it's probably a good idea.

When I said 'like on Windows', I meant (obviously, change the preset and crf to suit your encoding preferences):
x264 --preset ultrafast --crf 18 -o test.mkv test.avs
or
mpv test.avs

@xi@g@me
3rd February 2013, 12:44
tried x264 (with crf 19, but I do not think it matters) and here's what I get :


blahblah@ablahblah:/media/Data_1/video$ x264 --preset ultrafast --crf 19 -o video.mkv video.avs
avx [error]: FFVideoSource: Insanity detected: decoder returned an empty frame
(video.avs, line 1)
x264 [error]: could not open input file `video.avs'


EDIT : same error as virtualdub gave me. Is there something I can use to repair the video file of this first missing frame ?

qyot27
3rd February 2013, 18:25
The insanity error is coming from the way libavcodec is being accessed - it used to happen with H.264 MP4 files when multithreading, although that was fixed ~r690. Try using threads=1 with FFVideoSource:
FFVideoSource("input.avi",threads=1)

It could simply be an issue with the AVI container. If you put the stream into MKV (ffmpeg or mkvmerge can do this), it might go away.

Since the PackBit codec (I'm assuming that's the one being used here, it's what the Dxtory website links to) is lossless, you could transcode it to a different lossless format before giving it to AvxSynth. If ffmpeg can directly handle the stream, you can convert it to FFV1, Ut Video, or (depending on what colorspace is being used) ffvhuff. Not sure if doing it this way defeats the purpose you were trying to use AvxSynth for, though.

@xi@g@me
3rd February 2013, 20:28
I still get the insanity issue using the avx script you provided. I'll have a look tomorrow at ffmpeg documentation to move the video stream to an mkv container and try again.

qyot27
4th February 2013, 04:02
ffmpeg -i input.avi -vcodec copy -acodec copy output.mkv
or if you prefer some other lossless format that's more easily handled, use that for the value of -vcodec instead of 'copy'.

@xi@g@me
4th February 2013, 22:09
I tried your command, still get the insanity error...

qyot27
4th February 2013, 23:54
Then it's probably due to the format itself. Using a different lossless format is probably the only option left.

qyot27
5th February 2013, 01:25
I decided to go ahead and install the trial version of Dxtory and do direct testing with it myself. The issue is due to the Dxtory Video Codec itself - FFmpeg, while it can recognize the streams, doesn't seem to be fully able to manipulate them yet, and gave me a bunch of parsing errors when I tried converting it to another format. FFMS2's insanity issues with it likely stem from this.

The only solution that's really an option is to convert the capture to another lossless format with VirtualDub - open the .avi file directly in VirtualDub, not by trying to use the video through a script. Depending on the kind of content being captured, you can save additional space this way as well (if it's a lot of static frames of your desktop, Lagarith (http://lags.leetcode.net/codec.html) can compress it absurdly well due to its Null Frames option). FFV1 can be used if you've got ffdshow (http://sourceforge.net/projects/ffdshow-tryout/files/SVN%20builds%20by%20clsid/generic%20builds/) (and made sure to enable the VfW/Video for Windows interface when you installed it); FFV1 is native to FFmpeg and has far less risk of weird decoding but doesn't have the ability to write null frames automatically and will therefore output a larger file. If you need raw speed when converting, you can use either Ut Video (http://umezawa.dyndns.info/wordpress/?cat=28) or ffvhuff (again, through ffdshow - where it's called HuffYUV (FFmpeg variant)) - remember to use Median prediction and the Adaptive Huffman tables options. Regular HuffYUV can be used if you aren't dealing with YV12.

In VirtualDub, make sure that it is set on Fast recompress mode and select the codec to convert with. Then use the new .avi file in AviSynth and/or AvxSynth and it should be okay.

I did note, though, that Dxtory seems to be fully capable of capturing to any of the codecs in the VfW listing, so if you've got Lagarith, HuffYUV, Ut Video, or ffdshow (for FFV1 or ffvhuff), then you can skip all of this converting after-the-fact by telling Dxtory to use one of these codecs from the start.

@xi@g@me
5th February 2013, 20:11
Wow you went very far !

Yes dxtory can used provided codecs instead of it's own. The problem is it takes resources to compress the video while recording, and it becomes a great loss of performance (as I try to record at 60 FPS, on a game like UT3 I drop to 45 when I try to compress the stream at recordè time)

I'll have a try. The other problem is, virtual dub does not have a linux version, I will have to use windows for this first step :S

@xi@g@me
5th February 2013, 21:00
OK it works perfect with Lagarith, I even managed to keep my VFR and so the sound sync. I also managed to compress the video correctly using x264 (ultrafast, crf 23)

My video file size is now 87MB against 10GB :D

I now have to extract the sound trackS (yes there are multiple tracks) from the original avi and put them back in the compressed mkv.

qyot27
6th February 2013, 09:44
Wow you went very far !

Yes dxtory can used provided codecs instead of it's own. The problem is it takes resources to compress the video while recording, and it becomes a great loss of performance (as I try to record at 60 FPS, on a game like UT3 I drop to 45 when I try to compress the stream at recordè time)

I'll have a try. The other problem is, virtual dub does not have a linux version, I will have to use windows for this first step :S
VirtualDub actually works well under Wine (although you should/need to tell it not to use DirectX for display panes - that's in Options->Preferences->Display). So I would guess that as long as you've also got Dxtory installed under Wine, VirtualDub can access the Dxtory decoder as well.

mkvmerge can handle the remuxing (and it is cross-platform; project repository (http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#ubuntu), although older versions are in the Ubuntu repos). With the GUI you can deselect the AVI file's video stream so that only the audio tracks get copied over to the new MKV.

@xi@g@me
6th February 2013, 21:29
I tried to install virtual dub on ubuntu using wine, and also the codecs. virtual dub fails to open the video as it requires a vfw based codec to decompress video streams.

On the other side, I found another codec which is "packbit" and provided by DxTory. With this one I can capture a lossless video with quite the same size as Lagarith. But this codec is completely unknown by ffmpeg
(I wanted to directly use x264 with avxsynth by using the packbit codec instead of the Dxtory one).

However, an interesting thing is that with the packbit codec I can directly reencode the video using VirtualDub without avisynth (I mean on windows) to the x264 format without having problems with the VFR of the input video.

verisokin
17th April 2013, 16:15
i coundt even preview a video. this error shows up:
http://thumbnails7.imagebam.com/18920/27b335189192610.jpg (http://www.imagebam.com/image/27b335189192610)
so i decided to compile and install FFMS-2.17
so after i run
./configure --enable-shared
i got the following error

any thoughts?
kudos

EDIT: plus i found this on the debian repo's
http://packages.debian.org/search?searchon=names&keywords=FFMS
FFMS-2.17
Open "configure" in a text editor and replace all occurrences of "avcodec_init();" with "avcodec_register_all();"

AdmiralJonB
18th April 2013, 15:34
I'm trying to get avxsynth working on my kubuntu 12.04 machine, but I've been having real trouble getting it the FFVideoSource to work. I've installed avxsynth and ffms2 according to the github wiki. I've since then tried following what qyot27 mentioned in an earlier post for ffmpeg and ffms2 downloading from their repo.

After looking through this thread, I've suspicious that I have other problems as well based on what others have said, so sorry if this post becomes a bit long.

The version() command works fine and in various forms, from AVXEdit to the avxFrameServer. It loads up mplayer fine and displays the version information. But when I use the following:

FFVideoSouce("video.mp4")

AVXEdit comes up with a "Failed processing script from AVXSynth Editor.", and the frameserver does, well, nothing as far as I can tell: no output, no temporary files (as far as I can tell), nothing. I've tried it in various other forms as well to no avail. I can open up the video fine in mplayer normally:

Playing video.mp4.
libavformat file format detected.
[lavf] stream 0: video (mpeg4), -vid 0
VIDEO: [MP4V] 800x600 24bpp 25.000 fps 2053.2 kbps (250.6 kbyte/s)
Clip info:
major_brand: isom
minor_version: 512
compatible_brands: isomiso2mp41
encoder: Lavf54.15.104

ffms2 has detected ffmpeg fine:

checking for LIBAV... yes
checking whether linking with FFmpeg or Libav... FFmpeg
checking whether FFmpeg works... yes


And avxsynth has detected ffms2 and libav fine:


ffms2:
CFLAGS: -I/usr/local/include
LIBS: -L/usr/local/lib -lffms2
libav:
CFLAGS: -I/usr/local/include
LIBS: -pthread -L/usr/local/lib -lavformat -lavcodec -ldl -lasound -lSDL -lbz2 -lz -lrt -lswscale -lpostproc -lavutil -lm

...

Enabled optional components:
autocrop: yes
avxframecapture: yes
avxsubtitle: yes
avxffms2: yes
AVXEdit: yes


One thing I have noticed is that I can't directly run mplayer (or mpv) with the avs files, as someone mentioned before that they were able to do. This makes me think that something hasn't quite installed right, but I can't figure out anything more. Does anyone have any ideas that could help me out?

qyot27
19th April 2013, 04:23
AVXEdit is broken as far as its preview function goes, as you've noticed. That issue was mentioned earlier in the thread. You're really better off going with leafpad, Kate, nano or whatnot to write the script and then testing it directly with mplayer2 or mpv.

There's a few things to keep in mind:
A) The build instructions on the AvxSynth Github wiki really need updating. FFmpeg 0.11.1 and FFMS2 2.17 are nearly or over a year old, and that version of FFmpeg doesn't have the rewritten AviSynth demuxer that step D needs to access AvxSynth. The postproc thing isn't relevant anymore either if you get the latest git clone of AvxSynth. Using AvxSynth with x264 by piping from avxFrameServer is also not needed anymore, because both x264's AviSynth module was extended to support AvxSynth in February, and FFmpeg's AviSynth demuxer was rewritten so that both AviSynth itself (on Windows) and AvxSynth (on Linux and OSX) could be loaded dynamically. The FFmpeg commit happened a little less than a month ago, although there have been some bug fixes applied since then (so just go with current git; the most recent of the bugfixes is from 7 days ago).

B) Get FFmpeg and FFMS2 from their official git (git clone git://source.ffmpeg.org/ffmpeg.git) and svn (svn checkout http://ffmpegsource.googlecode.com/svn/trunk ffms2) repositories, respectively; no augmenting it with devel branches or anything. When building FFmpeg, you must pass --enable-avisynth and --enable-avresample to ./configure. --enable-avisynth isn't necessary for AvxSynth itself, but it is necessary for step D to go smoothly. --enable-avresample is necessary for FFMS2 to correctly deal with audio.

C) Build AvxSynth.

D) Build mplayer2 or mpv from their official git repos. Since the FFmpeg from step B had AviSynth support enabled, you'll be able to watch the scripts directly.

AdmiralJonB
19th April 2013, 14:28
Well, the --enable-avisynth and the svn repo for ffms2 saved the day for opening the avs file. Got everything working with mpv now!

As for the other problem... well... seems I misspelt FFVideoSource (as you can see in my previous post). That was a severe :mad: moment.

Thanks for the help!

karasu
8th September 2013, 00:09
Hi,
I'm trying to compile Avxsynth on my Ubuntu 13.04 64 box. I followed the instructions here : https://github.com/avxsynth/avxsynth/wiki/System-Setup
And I have some trouble while compiling avxsynth :
http://pastebin.com/egZDP3b3

Can you help me? (is a .deb package available somwehere ? )
Thank you

qyot27
8th September 2013, 00:34
Hi,
I'm trying to compile Avxsynth on my Ubuntu 13.04 64 box. I followed the instructions here : https://github.com/avxsynth/avxsynth/wiki/System-Setup
And I have some trouble while compiling avxsynth :
http://pastebin.com/egZDP3b3

Can you help me? (is a .deb package available somwehere ? )
Thank you
Use FFmpeg and FFMS2 from git. FFmpeg 0.11.1 and FFMS2 2.17 are outdated and those instructions haven't been updated.

karasu
8th September 2013, 18:05
Thank you qyot27,
after failing to compile ffmpeg, I installed the last version from Jon severinsson's ppa (https://launchpad.net/~jon-severinsson/+archive/ffmpeg)
The compilation of FFMS2 returned me tons of warning but I think it's now installed.

Unfortunately I still can't compile Avxsynth : http://pastebin.com/viUUQAzF

Do I need to use special parameters when configuring ffms2 or Avxsynth ?

qyot27
8th September 2013, 22:08
Those errors are because there's an API mismatch somewhere in there, due to one or a couple parts being outdated.

AvxSynth expects FFMS2 2.18. And FFMS2 2.18 very likely expects a recent FFmpeg.

Prerequisites:
sudo apt-get update

sudo apt-get -y install autoconf automake build-essential git libass-dev libgpac-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev \
libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev checkinstall yasm \
liblog4cpp5-dev liblog4cpp5 libcairo2-dev libpango1.0-dev libjpeg-dev

Compiling FFmpeg (the external libraries - libx264, libvorbis, libopus, etc. - are optional; enable them as desired, as long as you have the -dev packages for them):
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-avresample --enable-pic --enable-avisynth
make
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

FFMS2:
git clone git://github.com/FFMS/ffms2.git
cd ffms2
./configure --enable-shared --with-pic
make
sudo checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-git" --backup=no \
--deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes \
--fstrans=no --default

AvxSynth:
git clone git://github.com/avxsynth/avxsynth.git
cd avxsynth
autoreconf -fiv
./configure --disable-avxedit --enable-silent-rules --with-pic
make
sudo checkinstall --pkgname=avxsynth --pkgversion="1:$(grep "Version" avxsynth.pc | \
cut -f2 -d " ")+$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)-$(date +%Y%m%d)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes \
--addso=yes --fstrans=no --default

karasu
14th September 2013, 20:42
Thanks a lot, everything went well.

karasu
14th September 2013, 22:14
Hi again,

I want to save the output of my avs script. I tried the frameserver piped to x264 :
avxFrameServer test-mblur.avs false | x264 --preset slow --crf 16 -o out.264
x264 [error]: No input file. Run x264 --help for a list of options.


With AVXEdit I also tried "ImageWriter()" but I get an error when trying to execute the script.


Edit : It's ok, I compiled the latest x264 and used the script directly as input.

manma
12th October 2013, 07:58
So how exactly would one deal with a DVD source in avxsynth? I know in Windows you use dgindex to create a d2v, but I'm completely lost when it comes to doing this in Linux. I'm guessing wine isn't the answer and that there's probably a preferred native method. Any input?

qyot27
12th October 2013, 19:42
The problem is that DGMPGDec (DGIndex and DGDecode) never got ported to Linux and made to work with AvxSynth. In fact, the only source filter available for AvxSynth is FFMS2, because neither AVISource nor DirectShowSource can work under Linux, and the others never got ported (I tried to get LSMASHSource working, but it wasn't exporting its functions correctly so it could be detected as a plugin). So you'll have to rely on FFMS2, which should have gotten built when you built AvxSynth (although if not, you can also build the AvxSynth plugin from FFMS2's c_plugin branch).

However, there is a port of Decomb (http://mujintou.org.uk/avxsynth), so if there's any IVTC work needed, you can use Telecide/Decimate.

Indexing is simple, though. You can just write the script and let the indexing happen when you open the script in the target program*, or you can use ffmsindex first (add -t -1 to ffmsindex's command if you want audio):
ffmsindex input.vob
and then the script itself:
FFVideoSource("input.vob")
If audio was enabled you'll have to load the video and audio in separate variables and use AudioDub(), since FFMS2.avsi doesn't work with AvxSynth for some reason (or at least it never has for me).

*you don't have to use avxFrameServer because x264, FFmpeg, and mplayer2 or mpv can open .avs scripts through AvxSynth directly; x264 (after February 2013) automatically enables the support, FFmpeg (from git after March 2013, or 2.0 or higher) requires using --enable-avisynth during ./configure, and mplayer2 and mpv both use libavformat's support for it if they were built against an FFmpeg that has it enabled.

sl1pkn07
12th October 2013, 22:05
The problem is that DGMPGDec (DGIndex and DGDecode) never got ported to Linux

not exactly:
http://fraps.servegame.com/movie/dgindex-modoki-20100428.tar.bz2

qyot27
12th October 2013, 22:54
not exactly:
http://fraps.servegame.com/movie/dgindex-modoki-20100428.tar.bz2
I didn't mention that one because of the two responses here:
http://forum.doom9.org/showthread.php?p=1599422#post1599422

Also, because looking at the source code, that seems to be *just* DGIndex, sans DGDecode. An indexing program does no good without a plugin to read its output. Between that and possibly the various mods by maki-rxrz (https://github.com/maki-rxrz/DGMPGDec), it might provide a base to ease porting it correctly, but that's just an idea floating around in the ether.

It probably would be less of a hassle to try adding an AvxSynth plugin interface to d2vsource (or wait for AviSynth+ to jump to cross-platform and then add an interface for that) than try to port DGDecode, although it still is problematic in regard to generating the indices. But wine exists for that part.

manma
14th October 2013, 18:21
Don't take this the wrong way, but between this, Vapoursynth, and using magic to get the Windows version of Avisynth working on Linux, what's the best method to do simple anime or live action encodes? I'm all for sticking with avxsynth if nothing else is THAT much better.

TheFluff
14th October 2013, 18:25
avisynth on windows in a virtual machine

I'm not joking

manma
14th October 2013, 18:35
avisynth on windows in a virtual machine

I'm not joking

Glad you showed up. Will x264 perform well enough in a VM? Would I have to use something like kvm or xen for decent performance? Also, I don't mean to be a skeptic, but with a set of IVTC filters (I'm assuming that's what decomb is) working in avxsynth, do I -really- need anything else for dealing with a simple transport stream or DVD?

jackoneill
14th October 2013, 19:58
FFVideoSource("input.vob")


You should know that if you have several vobs that go together (as DVDs do), ffms2 is not all that good. It will lose and/or duplicate a frame or a few at the points where one vob ends and the next one begins. You can probably work around this problem by concatenating the vobs (a simple "cat" command) and feeding the result to ffms2.

qyot27
14th October 2013, 20:13
If you want to do special filtering (smoothing, masking, etc.), then you're better off just using AviSynth through Wine, and giving it to Windows builds of x264 and FFmpeg, also under Wine. It works fine, and only a couple of things that get too Windows-specific won't work that way (like DirectShowSource). Wine's really not that magical. I use it fairly often to do encodes with HCenc on our iMac, and have used x264 on occasion on there for some anime encoding - it works without issues.

The only tricky part is setting up ffdshow's VFW interface correctly, which you have to do through Wine's version of Regedit by exporting your settings under Windows and then importing them under Wine after you've installed ffdshow (you may also need it to add stuff to Wine's PATH, but there are GUI utilities that can do that, or you could just throw everything in ~/.wine/drive_c/windows).

If all there is is opening a file, performing IVTC, and resizing or similar things that are included in the core itself, then AvxSynth is fine.

You should know that if you have several vobs that go together (as DVDs do), ffms2 is not all that good. It will lose and/or duplicate a frame or a few at the points where one vob ends and the next one begins. You can probably work around this problem by concatenating the vobs (a simple "cat" command) and feeding the result to ffms2.
True. I overlooked that because I never use FFMS2 to process MPEG-1/2 files, and because I've also always ripped titles to their own files instead of preserving the DVD structure as-is.

manma
14th October 2013, 21:06
If all there is is opening a file, performing IVTC, and resizing or similar things that are included in the core itself, then AvxSynth is fine.

I'll probably stick with AvxSynth then. If I'm just dealing with a DVD or transport stream its probably best if I didn't do anything but IVTC it and encode. If someone wants motion sickness inducing interpolation and added banding from sharpening filters they can do it themselves during playback.

esby
16th December 2013, 13:08
Hello, I did some testing playing with the instruction left by qyot27.

I got two questions.

* I compiled mplayer with fffmpeg support, avxframeserver works with a test file and starts mplayer correctly, now when i try to open it directly with mplayer, it fails while it works if i use ffmpeg to encode directly..

avxFrameServer version.avs # works
mplayer version.avs # does not works, open nothing.
ffmpeg -i version.avs version.avi (...) # works and encode correctly

Is it supposed to work like this?

* When the avisynth script has a wrong syntax or an error in it, the test will not work, but it will not display any error. Anyway to have the "error back"?

sl1pkn07
16th December 2013, 20:43
any update or new plugins for avx?

qyot27
18th December 2013, 00:21
Hello, I did some testing playing with the instruction left by qyot27.

I got two questions.

* I compiled mplayer with fffmpeg support, avxframeserver works with a test file and starts mplayer correctly, now when i try to open it directly with mplayer, it fails while it works if i use ffmpeg to encode directly..

avxFrameServer version.avs # works
mplayer version.avs # does not works, open nothing.
ffmpeg -i version.avs version.avi (...) # works and encode correctly

Is it supposed to work like this?

* When the avisynth script has a wrong syntax or an error in it, the test will not work, but it will not display any error. Anyway to have the "error back"?
I have no idea what it's like for mplayer-svn. Namely because there used to be a discrete AviSynth demuxer in mplayer; this demuxer will not work with AvxSynth, because it specifically assumes AviSynth (and Windows). You could try giving it -demuxer lavf and see if that does anything.

mpv (and mplayer2) removed this discrete demuxer and rely only on libavformat's AviSynth capability. It should work in mpv just as it does in ffmpeg (or ffplay). Just don't try to seek in your script unless you're using FFmpeg 2.1.1.

esby
20th December 2013, 11:16
@qyot27: thx for the answer, the feature seems unsupported for mplayer, even with -demuxer lavf. Since I can open it with avxFrameServer it's not a big issue.

I also discovered that commenting out LOG_PATH=... in ~/.avxsynth/avxsynthlog.conf
displayed the information on the error in the script on stderr. Maybe this should be worth putting somewhere in the documentation...

esby
18th April 2014, 17:21
I am bumping the thread, but because I got two questions to ask:

* trying to use avxsynth again, the video will not load using mplayer and avxFrameServer.

(under debian 7 - 64 bits)


$ avxFrameServer version.avs
No valid avxsynth log path found in <snip>
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1332,Type=Info,Message=Loading core built-in plugins
INFO : Module=builtinfuncs::entryPoint,Address=builtinfunctions/src/AllBuiltInPluginsEntryPoint.cpp:649,Type=Info,Message=AddAviSynthBuiltInFunctions
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:783,Type=Info,Message=StringDump: Allocating new stringblock.
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1219,Type=Info,Message=Plugins Dir: /opt/ffmpeg/lib/avxsynth/
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1219,Type=Info,Message=Plugins Dir: /opt/ffmpeg/lib/avxsynth/
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1219,Type=Info,Message=Plugins Dir: /opt/ffmpeg/lib/avxsynth/
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1491,Type=Info,Message=Examining plugin /opt/ffmpeg/lib/avxsynth//libavxframecapture.so
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:341,Type=Info,Message=Prescanning plugin: /opt/ffmpeg/lib/avxsynth//libavxframecapture.so
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1491,Type=Info,Message=Examining plugin /opt/ffmpeg/lib/avxsynth//libavxsubtitle.so
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:341,Type=Info,Message=Prescanning plugin: /opt/ffmpeg/lib/avxsynth//libavxsubtitle.so
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1491,Type=Info,Message=Examining plugin /opt/ffmpeg/lib/avxsynth//libautocrop.so
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:341,Type=Info,Message=Prescanning plugin: /opt/ffmpeg/lib/avxsynth//libautocrop.so
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1491,Type=Info,Message=Examining plugin /opt/ffmpeg/lib/avxsynth//libavxffms2.so
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:341,Type=Info,Message=Prescanning plugin: /opt/ffmpeg/lib/avxsynth//libavxffms2.so
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:1219,Type=Info,Message=Plugins Dir: /opt/ffmpeg/lib/avxsynth/
INFO : Module=core::expression,Address=core/src/core/parser/expression.cpp:551,Type=Info,Message=Call: version
INFO : Module=core::text-overlay,Address=core/src/filters/text-overlay.cpp:1206,Type=Info,Message=ApplyMessage::ApplyMessage
INFO : Module=appInterface,Address=frameserverlib/src/avxSynthAppInterface.cpp:193,Type=Info,Message=MPlayer command line: mplayer -flip -demuxer rawvideo -rawvideo w=896:h=176:format=bgr24 - 1> /dev/null
No stream found.
ERROR : Module=appInterface,Address=frameserverlib/src/avxSynthAppInterface.cpp:213,Type=Error,Message=mplayer process exited
INFO : Module=core::avxsynth,Address=core/src/core/avxsynth.cpp:769,Type=Info,Message=StringDump: DeAllocating all stringblocks.

Now ffmpeg works and encodes correctly the version.avs file.
Any explanation of what is happening? I compiled again *everything*, no success here... (I have more or less the same configuration at home and it works fine ~~)
Edit: I updated mplayer (was using svn version) and it is working again.


* I am lacking a correct deinterlacer, I am trying to handle rushs coming from my Panasonic GH2 camera, (avchd) which are interlaced, I'd use yadiff under ffmpeg or avisynth to treat these, but I can't with avxsynth, as far I know.

How hard would it be to create an avxsynth external plugin for that purpose? Is there any documentation on this? Any alternate options (eg: using ffmpeg to deinterlace or coding something that relay on ffmpeg like ffmpegsource)?

Thanks in advance.

qyot27
19th April 2014, 07:39
One of the few plugins that was ported to AvxSynth was Decomb (http://mujintou.org.uk/avxsynth), so you could try to do field matching before or in lieu of giving it to FFmpeg's yadif filter.


avxFrameServer has been pretty much irrelevant for a little over a year, simply because the support in x264 and FFmpeg have eclipsed it. If you need to pipe the script around (which is all avxFrameServer does), use FFmpeg with -f yuv4mpegpipe to do it.

ffmpeg -i version.avs -f yuv4mpegpipe - | mplayer -


I'll also reiterate that mpv (http://mpv.io/) will work fine for playing back the scripts (with audio, too) if you build it against the working copy of FFmpeg.

esby
21st April 2014, 02:51
Assuming FieldDeinterlace must be used in this case, but it is just crashing (SIGSEV) when I try to use it.
I guess I'll have to transcode and deinterlace the videos using ffmpeg (since I want to do transitions...) prior loading them with avxsynth...

videopolis
30th April 2014, 17:52
OK, dumb question, but is it possible to use any of Tritical's filters (specifically looking for TIVTC package) in avxsynth? Based on previous posts, it sounds like only Decomb has been ported, but not sure if that's current info.

I've always found tfm + tdecimate to be superior to telecide + decimate in avisynth, so wondering if I can harness that power in Linux.

magnatique
12th May 2014, 17:23
Thanks for the info, helped getting things setup and almost working perfect ;)

my goal is simply to encode an avs from ffmpeg .

Right now, this works OK I am able to load a video + audio, audiodub them and feed it to ffmpeg.

However, whenever I try to trim something that starts 15 frames after the beginning, it seems to be redoing the index (or at least, it takes a long while before the encode starts).

if on the other hand I use trim(0,100) for example, the encode starts right away.

Eventually the encode does work, but it's either reading the full video / redoing the index each time.

Maybe when doing a trim from 0 to 14 frames it doesn't use the index and starts fast, but anything after that will use the index?

When building the ffms2 package from Git, I am getting the following error though ... could be the cause :


ffms2 # make
CXXLD src/index/ffmsindex
libtool: link: warning: `-version-info' is ignored for programs
src/core/.libs/libffms2.so: undefined reference to `av_frame_free'
src/core/.libs/libffms2.so: undefined reference to `av_frame_unref'
src/core/.libs/libffms2.so: undefined reference to `av_frame_alloc'
collect2: ld returned 1 exit status
make: *** [src/index/ffmsindex] Error 1


any help is appreciated :)

EDIT1 : I just launched another test with normal length files (10-20 mins files) being joined as such :
fadeio(out1,10).trim(100,200)++fadeio(out2,10).trim(100,200)++fadeio(out3,10).trim(100,200)++fadeio(out4,10).trim(100,200)++fadeio(out5,10).trim(100,200)


the actual index seems all to have been generated within 3-5 mins total for the 5 files, so it doesn't seem to be a prob with generating the index but moreso the trim that might be loading all of the video beforehand?

it took about 24mins to start encoding, compared to instant if I take off the trims.


When doing a test with a <60s file, it goes through with the encode eventually, but taking a while.

with a 19 seconds sample, it took 13s to start encoding.
with a 73s sample, it took 54.6s to start encoding

I tried with audio joined through audiodub on the 73s sample, it took 55s so negligible difference.

EDIT 2 :
Actually, none of these encode anything after a more thorough review.,,

then end with an unknown error occurred.

I did some more tests, for instance using a trim(0,100) everywhere and this works 100%.

However, if I use trim(0,100) then a trim(100,200) then a trim(0,100) again, it will start encoding instantly on the first portion, but then stops at the second one AND fail with error : FFAudioSource: ReadPacket unexpectedly failed to read a packet


If I remove the audio part, there's no error in ffmpeg but it doesn't process the frames with the trim starting at 100

qyot27
17th May 2014, 02:12
Thanks for the info, helped getting things setup and almost working perfect ;)

my goal is simply to encode an avs from ffmpeg .

Right now, this works OK I am able to load a video + audio, audiodub them and feed it to ffmpeg.

However, whenever I try to trim something that starts 15 frames after the beginning, it seems to be redoing the index (or at least, it takes a long while before the encode starts).

if on the other hand I use trim(0,100) for example, the encode starts right away.

Eventually the encode does work, but it's either reading the full video / redoing the index each time.

Maybe when doing a trim from 0 to 14 frames it doesn't use the index and starts fast, but anything after that will use the index?

When building the ffms2 package from Git, I am getting the following error though ... could be the cause :


ffms2 # make
CXXLD src/index/ffmsindex
libtool: link: warning: `-version-info' is ignored for programs
src/core/.libs/libffms2.so: undefined reference to `av_frame_free'
src/core/.libs/libffms2.so: undefined reference to `av_frame_unref'
src/core/.libs/libffms2.so: undefined reference to `av_frame_alloc'
collect2: ld returned 1 exit status
make: *** [src/index/ffmsindex] Error 1


any help is appreciated :)

EDIT1 : I just launched another test with normal length files (10-20 mins files) being joined as such :
fadeio(out1,10).trim(100,200)++fadeio(out2,10).trim(100,200)++fadeio(out3,10).trim(100,200)++fadeio(out4,10).trim(100,200)++fadeio(out5,10).trim(100,200)


the actual index seems all to have been generated within 3-5 mins total for the 5 files, so it doesn't seem to be a prob with generating the index but moreso the trim that might be loading all of the video beforehand?

it took about 24mins to start encoding, compared to instant if I take off the trims.


When doing a test with a <60s file, it goes through with the encode eventually, but taking a while.

with a 19 seconds sample, it took 13s to start encoding.
with a 73s sample, it took 54.6s to start encoding

I tried with audio joined through audiodub on the 73s sample, it took 55s so negligible difference.

EDIT 2 :
Actually, none of these encode anything after a more thorough review.,,

then end with an unknown error occurred.

I did some more tests, for instance using a trim(0,100) everywhere and this works 100%.

However, if I use trim(0,100) then a trim(100,200) then a trim(0,100) again, it will start encoding instantly on the first portion, but then stops at the second one AND fail with error : FFAudioSource: ReadPacket unexpectedly failed to read a packet


If I remove the audio part, there's no error in ffmpeg but it doesn't process the frames with the trim starting at 100
As per the issue on Github (https://github.com/FFMS/ffms2/issues/151), the FFMS2 compilation issue is most likely due to a library/header mismatch.

But you're not providing other necessary information: FFmpeg/Libav version, which distro, the full script. Whether or not you rebuilt avxffms2 after building FFMS2 from Git...

Remember, it's far less of a hassle to just use ffmsindex -t -1 inputfile.ext before trying to load the script anywhere than letting it generate when the script loads.

Sm3n
13th August 2014, 20:15
Hi folks,

I would like some details about TIVTC-Linux: https://github.com/fundies/TIVTC-linux

Do you have any idea if it's compatible with the last avxsynth and how to use it? Someone already asked on the git, but still no answer.
If not, what are you using to perform IVTC? manma wrote about decomb I know. (I'm using a dedicated server without graphic interface, debian weezy)

cheers

Myrsloik
13th August 2014, 21:21
Hi folks,

I would like some details about TIVTC-Linux: https://github.com/fundies/TIVTC-linux

Do you have any idea if it's compatible with the last avxsynth and how to use it? Someone already asked on the git, but still no answer.
If not, what are you using to perform IVTC? manma wrote about decomb I know. (I'm using a dedicated server without graphic interface, debian weezy)

cheers

1. That repository is just the windows version created by someone without the skills and/or motivation to follow through with a port.
2. If you want a TIVTC like filter on linux there's VIVTC (TIVTC lite) available as an integrated filter in FFmpeg and also included with VapourSynth.
3. Just let AvxSynth rest in peace, FFmpeg can do just about everything on AvxSynth can on its own...

Sm3n
13th August 2014, 23:24
First of, FFMpeg has some issues for decoding .mpv (MPEG2 HDTV) with glitch and broken frames.

[mpeg2video @ 0x2484f20] ac-tex damaged at 14 6700:23:53.84 bitrate=1036.2kbits/s dup=1 drop=0
[mpeg2video @ 0x2484f20] Warning MVs not available
[mpeg2video @ 0x2484f20] concealing 240 DC, 240 AC, 240 MV errors in B frame

It results that the encode ends prematurely. :/

Secondly, I'm aware that ffmpeg can deal with that but here is a thing. I want to encode using the tMod version of x264 through .avs.
You see know why I need to IVTC in .avs. Because I can't compile ffmpeg with tMod support. I must to patch ffmpeg first (like that: https://astrataro.wordpress.com/2014/03/17/x264-rev2409-tmod/#comment-783) but it's out of date and some parametres are missing.

VapourSynth ins't available for Linux. Am I right?

TheFluff
14th August 2014, 01:09
VapourSynth ins't available for Linux. Am I right?

you're wrong

macromizer
14th August 2014, 15:11
First of, FFMpeg has some issues for decoding .mpv (MPEG2 HDTV) with glitch and broken frames.



It results that the encode ends prematurely. :/

AFAIK, Avxsynth is using ffmpeg for decoding. Other than ffmpeg/libav what else could it possible be using for decoding?

VapourSynth ins't available for Linux. Am I right?

No, you're not.

videoh
14th August 2014, 15:43
AFAIK, Avxsynth is using ffmpeg for decoding. Other than ffmpeg/libav what else could it possible be using for decoding? That is determined by the source filter, not by the Avxsynth core. There is nothing to stop a GPU-enabled source filter such as DGSource() from being implemented for Avxsynth. The makers of Avxsynth, however, were cloud focused and needed distributed processing, and so avoided hardware-dependent source filters.

macromizer
14th August 2014, 17:13
That is determined by the source filter, not by the Avxsynth core.

There's only one source filter for Avxsynth that I've ever seen which is FFMS2. Which is as the name implies an ffmpeg/libav source filter.

There is nothing to stop a GPU-enabled source filter such as DGSource() from being implemented for Avxsynth.

Sure in theory, but one doesn't seem to exist which as I said means it could only be using ffmpeg/libav. My question was relating to the actual current state of Avxsynth not some hypothetical state of having some GPU-decoding source filter.

videoh
14th August 2014, 18:41
Point taken, but still an arguably wrong thing was implied (that Avxsynth itself determines the used decoder) and precision is important.

Sm3n
14th August 2014, 19:18
AFAIK, Avxsynth is using ffmpeg for decoding. Other than ffmpeg/libav what else could it possible be using for decoding?

I know but to deal with this issue, the only thing I can do (and it worked, I did the entire encode without issue) is using FFVideoSource() in .avs. If I do the encode through ffmpeg, it fails everytime.

No, you're not.
you're wrong

I don't see anything regarding linux on the official website. Do I need to use wine to use it?

SamKook
14th August 2014, 19:31
I don't see anything regarding linux on the official website. Do I need to use wine to use it?

If you look at the Installation Instructions on the website, it says the following:
"If you’re not on Windows you have to compile VapourSynth yourself. Check out the source and follow the instructions in the INSTALL file."

macromizer
14th August 2014, 19:36
I don't see anything regarding linux on the official website.

The Vapoursynth discussion thread mentions it a lot.

Do I need to use wine to use it?

No. You need to either compile it yourself or find someone who has created a package for your distro.

Sm3n
14th August 2014, 19:50
Yep thank you guys, I found it. Here is the step by step: https://forum.doom9.org/showpost.php?p=1643069&postcount=947 (thx qyot27)

Cheers

jammupatu
9th December 2014, 20:18
Hi,

got avxsynth, ffmpeg and ffms2 compiled ok (all Git versions) on Debian Jessie but when running a simple script:


V=FFVideoSource("video.ts")
A=FFAudioSource("video.ts")
AudioDub(V,A)


I get the error:

avs [error]: FFAudioSource: No audio track found


If I demux the TS stream and input the tracks separately, it works. The above script does work on Windows OK.

Any ideas of hope on how to proceed?

EDIT: noticed that the TS-stream has multiple tracks, trying to figure out how to extract the correct one. Here are the streams:


Stream #0:0[0x124]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x125](fin): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 256 kb/s
Stream #0:2[0x129](dut): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s
Stream #0:3[0x12b](swe): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 256 kb/s
Stream #0:4[0x127](fin): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:5[0x128](dut): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)


BR,

-J-

qyot27
10th December 2014, 00:55
How are you creating the script and index?

Create the index first, with ffmsindex:
ffmsindex -t -1 video.ts

Then create the script (or at least, create the index with ffmsindex before you attempt to run the script in anything). I'd suggest using mpv (or ffplay) to test whether the script is actually outputting the audio.

By default, FFAudioSource outputs the first audio track found. But when you created the index, it indexed all the audio tracks (that's what the -t -1 controls), and you can use track= to select the right one to use:

v=FFVideoSource("video.ts")
a=FFAudioSource("video.ts",track=2) # would select the Dutch track
AudioDub(v,a)



My guess as to why it's doing this is that it's related to user permissions, and the order that FFVideoSource and FFAudioSource are called. It's fairly well-known that if you're letting the script generate the index on open, FFAudioSource should be first to avoid having to re-generate it after FFVideoSource has generated an audio-less index. User permissions may factor into this because the index generated by FFVideoSource may be getting locked (either by the filesystem's rwx flags or by x264), preventing the audio pass from running and causing the error, whereas on Windows this either doesn't normally happen or you've probably previewed the script already with a media player or other tool and so the index knows the audio is there (however inefficiently it got there). Generating the index first with ffmsindex avoids this scenario, so it doesn't matter what order FFVideoSource or FFAudioSource are in.

jammupatu
10th December 2014, 10:50
Hi,

yes, on Windows I've always just used Virtualdub to index it, not ffindex - lazy. Now I ran, on Linux that is, the indexing manually and it gives me grief on two MPEG-TS sources:


$ ffmsindex -t -1 video.ts
Indexing, please wait... 100%
Indexing error: Audio decoding error


The sources are passthrough recordings through Tvheadhend.

Before I read your post I tried

a=FFAudioSource("video.ts",track=1)

with indexing through Virtualdub and it worked on Windows, not on Linux. I now understand that this is to be expected. I also changed the script so that audio gets loaded first and it doesn't work on Linux but, as expected, works on Windows.

Currently reading up more on FFIndex since that seems to be the culprit since it is erroring out.

EDIT: tested indexing (same sources) on 32b ICL compiled version of FFMS2 2.20 on Windows and the indexing went through fine with "ffmsindex.exe -t -1 video.ts". I've got Haali Media Splitter on my Windows.

BR,

-J

qyot27
10th December 2014, 20:30
On Windows, test creating the index with ffmsindex -t -1 -m lavf video.ts and see if it also causes the problem (or try the C-plugin; see the latest posts on the FFmpegSource thread). If it still does, then the issue may not be FFMS2 at all, but libavformat's TS demuxer.

There's a reason that the advice for dealing with TS files is often to just remux them into Matroska with mkvmerge and then use the MKV file with FFMS2.

jammupatu
10th December 2014, 21:03
Hi, ran that quick test on Windows and it errors out with "ffmsindex.exe -f -t -1 -m lavf video.ts".

I did manage to get a readable lafv index and avs combo with playing around with "-s 3" parameter and stream 2. However it currently isn't a proper way to go since all test encodes went out of sync even with AlignedSplice.

I am currently trying to wrap my head around this issue and one of the things I'm currently focused is working on MKV-files instead of TS-files. I switched to MKV recording in Tvheadend for the time being as well.

The main goal I'm trying to accomplish is the elusive Comskip automatic commercial skipping and a post processing script with as best as possible scenario of a ad-free encode in x264.

I'll post here if I have more questions or I actually found out a way to utilise avxsynth and Comskip. Currently, after hours of tinkering I am quite tired and I need a break to be able to form solid tests and concepts.

Coming out of familiar Windows-based Avisynth process with VirtualDub to ffmpeg / mencoder / avxsynth cli on Linux isn't a task one can accomplish in few hours. =)

Thank you for your advice this far.

BR,

-J

qyot27
11th December 2014, 00:21
Just one thing: ditch mencoder if you can. mpv's encoding capabilities should be fine, as the encoding module isn't hamstrung like mencoder was. The few things that mencoder could do that mpv still can't - mainly, direct stream copy - are better done through ffmpeg itself anyway.

jammupatu
11th December 2014, 13:22
Just one thing: ditch mencoder if you can. mpv's encoding capabilities should be fine, as the encoding module isn't hamstrung like mencoder was. The few things that mencoder could do that mpv still can't - mainly, direct stream copy - are better done through ffmpeg itself anyway.

Hi,

thanks for the advice. I'm currently using it for EDL-lists from Comskip. Mencoder does the cutting. I'll check out mpv and its EDL support / other cutting capabilities. First idea was not to use EDL at all and do all the things via Avxsynth on Linux since Comskip produces a useable .avs file.

Yesterday I did manage to produce a cut copy using lossless intermediate files and finally compressing the final copy w/o commercials.

Anyhow, I'm blabbering now. Over and out.

EDIT: Have to add a bit more blabber. Just got mpv running and rolling. Man, this help system is already making a really good impression. Really thought out.

BR,

-J

jammupatu
4th January 2015, 14:23
Hi,

since earlier in this thread there is a linux port for decomb, I'd figure try my luck: anyone got a non-crashing build of the library (64b)? For me, CMake and make goes through fine but the library is a lottery; it seg faults like every second time or so. Running Debian 8 testing, Jessie.

BR,

-J

nel-son
11th April 2015, 16:36
i've installed avxsynth for the first time to find an alternative to avisynth on linux. the install worked fine. as i could read here https://github.com/avxsynth/avxsynth/wiki/AvxSynth-Frame-Server i can run a video with mplayer with this command

./avxSynthFrameServer testavxsynthscript.avs

but there is no file called 'avxSynthFrameServer'. i've tried the file avxFrameServer in "~/avxsynth/apps/avxframeserver/" with the following command

./avxSynthFrameServer "/media/path/to/avs file.avs"

but it doesn't work. nothing happens (no error).

in windows i opened avs files with the programs directly. this doesn't work with avxsynth on linux?

edit
it works with avxedit.

qyot27
11th April 2015, 21:30
Use an FFmpeg (or Libav) that was configured with --enable-avisynth, or x264. Or an mpv linked against aforementioned FFmpeg/Libav if you want to watch the scripts. avxFrameServer and AVXEdit are useless and/or broken and were superseded long ago. If you need an editor with AviSynth highlighting support (which AVXEdit doesn't do, I might add), use Atom and install the AviSynth module.

nel-son
22nd April 2015, 18:34
but with atom i can't see the results of my changes like with avspmod? the is no preview function in atom?

qyot27
22nd April 2015, 23:30
You preview by playing the script in mpv like you would play any other media file. If you have a terminal open and have played it at least once, the action is as simple as pressing the Up arrow then hitting Enter.

nel-son
23rd April 2015, 16:32
i can't open the avs with mpv. there is the error

Failed to recognize file format.

qyot27
24th April 2015, 04:54
Then rebuild it, like I said before:
Use an FFmpeg (or Libav) that was configured with --enable-avisynth, or x264. Or an mpv linked against aforementioned FFmpeg/Libav if you want to watch the scripts.

FredMSloniker
27th August 2015, 21:36
I'm having an issue compiling AVXSynth for Kubuntu. As far as I can tell, this is the relevant part of the output of 'make':

/bin/sed: can't read Code/avxsynth/avxutils/libavxutils.la: No such file or directory
libtool: link: `Code/avxsynth/avxutils/libavxutils.la' is not a valid libtool archive
Makefile:826: recipe for target 'libavxsynth.la' failed
make[1]: *** [libavxsynth.la] Error 1
make[1]: Leaving directory '/home/bubblegum/Source Code/avxsynth/avxsynth'
Makefile:490: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

The file does exist, so I don't know what the issue is. Help?

E: I just figured it out. Make doesn't like 'Source Code' as a folder name. I'll change it and try again.

Sm3n
29th August 2015, 12:35
Hi there :)

I looked for it for long time now but is it possible to add a watermark using overlay for instance or using a source option?
I believe the first option is nope because not built in.

Any confirmation and/or advice is well welcome. :)

cheers

nel-son
3rd October 2015, 10:24
hi,

i've read in an other thread that there is a install howto for avxsynth in the thread here (the howto on githib seems to be outdated).

what means "build mpv against ffmpeg"? so that mpv used this ffmpeg version at very start? how can i do this? is there any howto for that? (normally i install my software with apt-get and don't build it from source).

qyot27
5th October 2015, 00:35
The FFmpeg package recently added back to Debian and Ubuntu are configured with --enable-avisynth, as last I was aware. So pulling the -dev packages for it in and building mpv against them should enable it. If there's an mpv package that explicitly uses the FFmpeg -dev packages, that'd work too. It looks like Debian unstable (and Ubuntu 15.10 by extension) has mpv using the -ffmpeg packages by default, so it may start being there automatically pretty soon. At that point you'd only have to handle installing AvxSynth itself, unless you grab it from a PPA or something.

nel-son
23rd October 2015, 15:56
now i've installed avxsynth, ffmpeg with option --enable-avisynth and mpv build against ffmpeg. but i can't play an avs file. i've tried a mp4 file and the example from avxsynth homepage with "Version()" in avs file. both doesn't work. maybe the mp4 doesn't because of missing ffms2. should "directshowsource()" work on linux?

is there any way to check whether mpv and ffmpeg are working as they should to use avxsynth?

i also tried avxedit, but also mplayer can't play the video and the little example. but mplayer was installed in ubuntu 14.04 and maybe it's build against libav?

qyot27
23rd October 2015, 18:27
The *only* source filter that exists for AvxSynth is FFMS2. But since Version supposedly doesn't work, did you run sudo ldconfig after installing AvxSynth?

nel-son
25th October 2015, 14:26
i could play a avs file with avisynth installed with wine. but thats not a good solution because i can't open files with "open with".

did you run sudo ldconfig after installing AvxSynth

no.

But since Version supposedly doesn't work

i've tried to install ffms2 like you has explained here http://forum.doom9.org/showpost.php?p=1643184&postcount=193, but there is a problem with make:

CXX src/core/audiosource.lo
CXX src/core/ffms.lo
CXX src/core/filehandle.lo
CXX src/core/indexing.lo
CXX src/core/lavfaudio.lo
CXX src/core/lavfindexer.lo
CXX src/core/lavfvideo.lo
CXX src/core/track.lo
src/core/track.cpp: In function ‘FrameInfo {anonymous}::ReadFrame(ZipFile&, const FrameInfo&, FFMS_TrackType)’:
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::PTS’ [-Wmissing-field-initializers]
FrameInfo f{};
^
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::FilePos’ [-Wmissing-field-initializers]
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::SampleStart’ [-Wmissing-field-initializers]
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::SampleCount’ [-Wmissing-field-initializers]
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::OriginalPos’ [-Wmissing-field-initializers]
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::FrameType’ [-Wmissing-field-initializers]
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::RepeatPict’ [-Wmissing-field-initializers]
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::KeyFrame’ [-Wmissing-field-initializers]
src/core/track.cpp:33:14: warning: missing initializer for member ‘FrameInfo::Hidden’ [-Wmissing-field-initializers]
src/core/track.cpp: In constructor ‘FFMS_Track::FFMS_Track(ZipFile&)’:
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::PTS’ [-Wmissing-field-initializers]
FrameInfo temp{};
^
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::FilePos’ [-Wmissing-field-initializers]
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::SampleStart’ [-Wmissing-field-initializers]
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::SampleCount’ [-Wmissing-field-initializers]
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::OriginalPos’ [-Wmissing-field-initializers]
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::FrameType’ [-Wmissing-field-initializers]
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::RepeatPict’ [-Wmissing-field-initializers]
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::KeyFrame’ [-Wmissing-field-initializers]
src/core/track.cpp:85:17: warning: missing initializer for member ‘FrameInfo::Hidden’ [-Wmissing-field-initializers]
src/core/track.cpp: In member function ‘void FFMS_Track::Write(ZipFile&) const’:
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::PTS’ [-Wmissing-field-initializers]
FrameInfo temp{};
^
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::FilePos’ [-Wmissing-field-initializers]
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::SampleStart’ [-Wmissing-field-initializers]
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::SampleCount’ [-Wmissing-field-initializers]
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::OriginalPos’ [-Wmissing-field-initializers]
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::FrameType’ [-Wmissing-field-initializers]
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::RepeatPict’ [-Wmissing-field-initializers]
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::KeyFrame’ [-Wmissing-field-initializers]
src/core/track.cpp:105:17: warning: missing initializer for member ‘FrameInfo::Hidden’ [-Wmissing-field-initializers]
src/core/track.cpp: In lambda function:
src/core/track.cpp:243:34: error: ‘av_rescale’ was not declared in this scope
return av_rescale(Dur, Num, Den);
^
src/core/track.cpp: In member function ‘void FFMS_Track::FillAudioGaps()’:
src/core/track.cpp:247:73: error: ‘const void ExpectedSamples’ has incomplete type
const auto ExpectedSamples = DurationToSamples(back().PTS - front().PTS);
^
src/core/track.cpp:269:74: error: ‘const void ExpectedStartSample’ has incomplete type
const auto ExpectedStartSample = DurationToSamples(Frame.PTS - FirstPTS);
^
make: *** [src/core/track.lo] Fehler 1

qyot27
25th October 2015, 19:12
You have to run sudo ldconfig after installing any shared libraries (or have checkinstall do it at install time with the --addso=yes option), otherwise nothing will work.

nel-son
27th October 2015, 15:21
the problem isn't avxsynth, the problem is ffms2. make doesn't work. i've installed avxsynth new and made 'sudo ldconfig" after installing avxsynth. but i have the same problem with ffms2 again.

at the moment i have installed mpv and ffmpeg and both working with avisynth+wine and i've installed avxsynth, but i can't test it because of missing ffms2.

qyot27
27th October 2015, 18:31
What version of GCC? ffmpeg-git and ffms2-git? Because the errors you're getting look an awful lot like general compiler issues or not being pointed at the correct ffmpeg headers.

For that matter, the only reason FFMS2 comes before the AvxSynth step in that build guide is because AvxSynth wraps an already-installed build of FFMS2 to generate avxffms2, but this is not actually necessary (and actually will not work anymore with ffms2-git and avxsynth-git). Clone ffms2 from the master repo and check out the c_plugin branch, and build FFMS2 that way:
git clone git://github.com/FFMS/ffms2.git
cd ffms2
git checkout c_plugin
./configure --enable-avxsynth --enable-vapoursynth --enable-shared
make
sudo checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-git" --backup=no \
--deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes \
--fstrans=no --default

nel-son
27th October 2015, 19:55
What version of GCC?

dpkg -l gcc
ii gcc 4:4.8.2-1ubuntu6 amd64 GNU C compiler

ffmpeg-git and ffms2-git?

sorry, i don't understand the question?

i have the same problem with make as before.

nel-son
30th October 2015, 10:40
i've tried it with a fresh installed kubuntu 14.04.3 (in virtualbox) and did step by step what you've posted here http://forum.doom9.org/showpost.php?p=1643184&postcount=193. build and installing ffmpeg works without any problem, but i have the same problem with building ffms2 as before on my other system (also with kubuntu 14.04.3).

can this be a problem with the cloned version of ffms2? you've written your howto in 2013. how can i clone an older version of ffms2? 1 yaer (or so) ago i'be built and installed ffmpeg and ffms2 on my notebook with lubuntu 14.04, so it should work.

LoRd_MuldeR
31st October 2015, 17:07
can this be a problem with the cloned version of ffms2? you've written your howto in 2013. how can i clone an older version of ffms2? 1 yaer (or so) ago i'be built and installed ffmpeg and ffms2 on my notebook with lubuntu 14.04, so it should work.

You don't "clone" any particular version. You always clone the entire repository, containing every version that has ever existed.

By default, the "newest" commit (aka MASTER) will be checked out in your working tree. But you can check out any older commit (or tag) that you like. That is a completely "local" operation. Just use git checkout (https://www.atlassian.com/git/tutorials/undoing-changes/git-checkout) command.

jammupatu
3rd November 2015, 18:46
What version of GCC? ffmpeg-git and ffms2-git? Because the errors you're getting look an awful lot like general compiler issues or not being pointed at the correct ffmpeg headers.

For that matter, the only reason FFMS2 comes before the AvxSynth step in that build guide is because AvxSynth wraps an already-installed build of FFMS2 to generate avxffms2, but this is not actually necessary (and actually will not work anymore with ffms2-git and avxsynth-git). Clone ffms2 from the master repo and check out the c_plugin branch, and build FFMS2 that way:
git clone git://github.com/FFMS/ffms2.git
cd ffms2
git checkout c_plugin
./configure --enable-avxsynth --enable-vapoursynth --enable-shared
make
sudo checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-git" --backup=no \
--deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes \
--fstrans=no --default

Hi,

I'm having a hard time compiling Avxsynth-git and FFMS2-git on Debian Jessie (gcc 4.9) and Wheezy (gcc 4.7). As to be expected is that the "normal" way of compiling them FFMS2 first and Avxsynth second so it can generate the wrapper avxffms2 fails. However, I can't seem to be able to generate the c_plugin either:


After cloning:

$ git checkout c_plugin
Branch c_plugin set up to track remote branch c_plugin from origin.
Switched to a new branch 'c_plugin'

$ ./configure --enable-shared --enable-avxsynth --enable-vapoursynth
checking whether linking with FFmpeg or Libav...
avisynth: no
avxsynth: yes
vapoursynth:yes
debug: no
gprof: no
PIC: no
shared: yes
optlevel: 2

You can run 'make' now.

$ make
CXX src/core/ffms.o
In file included from src/core/ffms.cpp:25:0:
src/core/videosource.h:42:2: error: ‘PixelFormat’ does not name a type
src/core/videosource.h:46:14: error: ‘PixelFormat’ was not declared in this scope
src/core/videosource.h:46:25: error: template argument 1 is invalid
src/core/videosource.h:46:25: error: template argument 2 is invalid
src/core/videosource.h:49:2: error: ‘PixelFormat’ does not name a type
src/core/videosource.h:54:2: error: ‘PixelFormat’ does not name a type
src/core/videosource.h:92:29: error: ‘PixelFormat’ does not name a type
src/core/videosource.h:92:42: error: ISO C++ forbids declaration of ‘TargetFormats’ with no type [-fpermissive]
src/core/videosource.h:94:54: error: ‘PixelFormat’ has not been declared
In file included from src/core/ffms.cpp:26:0:
src/core/videoutils.h:38:47: error: ‘PixelFormat’ has not been declared
In file included from src/core/ffms.cpp:26:0:
src/core/videoutils.h:38:128: error: ‘PixelFormat’ has not been declared
src/core/videoutils.h:46:1: error: ‘PixelFormat’ does not name a type
src/core/ffms.cpp: In function ‘int FFMS_SetOutputFormatV2(FFMS_VideoSource*, const int*, int, int, int, FFMS_ErrorInfo*)’:
src/core/ffms.cpp:187:45: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
src/core/ffms.cpp:187:45: error: expected ‘>’ before ‘PixelFormat’
src/core/ffms.cpp:187:45: error: expected ‘(’ before ‘PixelFormat’
src/core/ffms.cpp:187:45: error: ‘PixelFormat’ was not declared in this scope
src/core/ffms.cpp:187:58: error: expected primary-expression before ‘>’ token
src/core/ffms.cpp: In function ‘int FFMS_SetInputFormatV(FFMS_VideoSource*, int, int, int, FFMS_ErrorInfo*)’:
src/core/ffms.cpp:201:57: error: expected type-specifier before ‘PixelFormat’
src/core/ffms.cpp:201:57: error: expected ‘>’ before ‘PixelFormat’
src/core/ffms.cpp:201:57: error: expected ‘(’ before ‘PixelFormat’
src/core/ffms.cpp:201:57: error: ‘PixelFormat’ was not declared in this scope
make: *** [src/core/ffms.o] Error 1


Errors revolve around scopes and type namings. My C / C++ abilities fall short here. Could anyone here help me, please? Has anyone been able to compile them lately?

FFMPEG-git builds fine and I can link other software to it. I can also build Avxsynth fine without FFMS2. Version() AVS function works fine in a file and for example mplayer can render it.

BR,

-J

qyot27
3rd November 2015, 21:17
In that case, you can clone my personal FFMS2 repo and checkout the 'patches' branch:

git clone git://github.com/qyot27/ffms2.git
cd ffms2
git checkout patches
and then continue from the previous instructions for the c_plugin branch.

The 'cplugin_master' and 'patches' branches are the usual staging area for the pull requests I periodically make so that the C-plugin gets updated (patches sits on top of cplugin_master, so if both branches exist, patches is newer). As such, always do a fresh clone, since I do rebase them from time to time or delete them outright when there's nothing to change.

jammupatu
4th November 2015, 10:07
In that case, you can clone my personal FFMS2 repo and checkout the 'patches' branch:

git clone git://github.com/qyot27/ffms2.git
cd ffms2
git checkout patches
and then continue from the previous instructions for the c_plugin branch.

The 'cplugin_master' and 'patches' branches are the usual staging area for the pull requests I periodically make so that the C-plugin gets updated (patches sits on top of cplugin_master, so if both branches exist, patches is newer). As such, always do a fresh clone, since I do rebase them from time to time or delete them outright when there's nothing to change.

Hi,

thanks for the alternate repo. I tried the 'patches' branch and it fails to similar errors. Both operating systems are 64-bit, by the way.

Jessie:

$ make
CXX src/core/audiosource.o
In file included from src/core/audiosource.h:24:0,
from src/core/audiosource.cpp:21:
src/core/utils.h:130:22: error: ‘FFMS_ResampleContext’ was not declared in this scope
typedef unknown_size<FFMS_ResampleContext, ffms_resample_alloc_context, ffms_resample_free> FFResampleContext;
^
src/core/utils.h:130:44: error: ‘ffms_resample_alloc_context’ was not declared in this scope
typedef unknown_size<FFMS_ResampleContext, ffms_resample_alloc_context, ffms_resample_free> FFResampleContext;
^
src/core/utils.h:130:73: error: ‘ffms_resample_free’ was not declared in this scope
typedef unknown_size<FFMS_ResampleContext, ffms_resample_alloc_context, ffms_resample_free> FFResampleContext;
^
src/core/utils.h:130:91: error: template argument 1 is invalid
typedef unknown_size<FFMS_ResampleContext, ffms_resample_alloc_context, ffms_resample_free> FFResampleContext;
^
src/core/utils.h:130:91: error: template argument 2 is invalid
src/core/utils.h:130:91: error: template argument 3 is invalid
src/core/utils.h:130:110: error: invalid type in declaration before ‘;’ token
typedef unknown_size<FFMS_ResampleContext, ffms_resample_alloc_context, ffms_resample_free> FFResampleContext;
^
src/core/audiosource.cpp: In member function ‘void FFMS_AudioSource::SetOutputFormat(const FFMS_ResampleOptions&)’:
src/core/audiosource.cpp:201:46: error: no matching function for call to ‘SetOptions(const FFMS_ResampleOptions&, FFResampleContext&, OptionMapper<FFMS_ResampleOptions> [17])’
SetOptions(opt, newContext, resample_options);
^
src/core/audiosource.cpp:201:46: note: candidate is:
In file included from src/core/audiosource.h:24:0,
from src/core/audiosource.cpp:21:
src/core/utils.h:206:6: note: template<class T, int N> void SetOptions(const T&, void*, OptionMapper<T> (&)[N])
void SetOptions(T const& src, void *opt, OptionMapper<T> (&options)[N]) {
^
src/core/utils.h:206:6: note: template argument deduction/substitution failed:
src/core/audiosource.cpp:201:46: note: cannot convert ‘newContext’ (type ‘FFResampleContext {aka int}’) to type ‘void*’
SetOptions(opt, newContext, resample_options);
^
src/core/audiosource.cpp:202:63: error: invalid conversion from ‘FFResampleContext {aka int}’ to ‘void*’ [-fpermissive]
av_opt_set_int(newContext, "in_sample_rate", AP.SampleRate, 0);
^
In file included from src/core/utils.h:28:0,
from src/core/audiosource.h:24,
from src/core/audiosource.cpp:21:
/opt/customlibs/include/libavutil/opt.h:722:5: note: initializing argument 1 of ‘int av_opt_set_int(void*, const char*, int64_t, int)’
int av_opt_set_int (void *obj, const char *name, int64_t val, int search_flags);
^
src/core/audiosource.cpp:203:73: error: invalid conversion from ‘FFResampleContext {aka int}’ to ‘void*’ [-fpermissive]
av_opt_set_int(newContext, "in_sample_fmt", CodecContext->sample_fmt, 0);
^
In file included from src/core/utils.h:28:0,
from src/core/audiosource.h:24,
from src/core/audiosource.cpp:21:
/opt/customlibs/include/libavutil/opt.h:722:5: note: initializing argument 1 of ‘int av_opt_set_int(void*, const char*, int64_t, int)’
int av_opt_set_int (void *obj, const char *name, int64_t val, int search_flags);
^
src/core/audiosource.cpp:204:69: error: invalid conversion from ‘FFResampleContext {aka int}’ to ‘void*’ [-fpermissive]
av_opt_set_int(newContext, "in_channel_layout", AP.ChannelLayout, 0);
^
In file included from src/core/utils.h:28:0,
from src/core/audiosource.h:24,
from src/core/audiosource.cpp:21:
/opt/customlibs/include/libavutil/opt.h:722:5: note: initializing argument 1 of ‘int av_opt_set_int(void*, const char*, int64_t, int)’
int av_opt_set_int (void *obj, const char *name, int64_t val, int search_flags);
^
src/core/audiosource.cpp:206:65: error: invalid conversion from ‘FFResampleContext {aka int}’ to ‘void*’ [-fpermissive]
av_opt_set_int(newContext, "out_sample_rate", opt.SampleRate, 0);
^
In file included from src/core/utils.h:28:0,
from src/core/audiosource.h:24,
from src/core/audiosource.cpp:21:
/opt/customlibs/include/libavutil/opt.h:722:5: note: initializing argument 1 of ‘int av_opt_set_int(void*, const char*, int64_t, int)’
int av_opt_set_int (void *obj, const char *name, int64_t val, int search_flags);
^
src/core/audiosource.cpp:209:82: error: invalid conversion from ‘FFResampleContext {aka int}’ to ‘void*’ [-fpermissive]
av_opt_set_channel_layout(newContext, "out_channel_layout", opt.ChannelLayout, 0);
^
In file included from src/core/utils.h:28:0,
from src/core/audiosource.h:24,
from src/core/audiosource.cpp:21:
/opt/customlibs/include/libavutil/opt.h:730:5: note: initializing argument 1 of ‘int av_opt_set_channel_layout(void*, const char*, int64_t, int)’
int av_opt_set_channel_layout(void *obj, const char *name, int64_t ch_layout, int search_flags);
^
src/core/audiosource.cpp:210:89: error: invalid conversion from ‘FFResampleContext {aka int}’ to ‘void*’ [-fpermissive]
av_opt_set_sample_fmt(newContext, "out_sample_fmt", (AVSampleFormat)opt.SampleFormat, 0);
^
In file included from src/core/utils.h:28:0,
from src/core/audiosource.h:24,
from src/core/audiosource.cpp:21:
/opt/customlibs/include/libavutil/opt.h:728:5: note: initializing argument 1 of ‘int av_opt_set_sample_fmt(void*, const char*, AVSampleFormat, int)’
int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags);
^
src/core/audiosource.cpp:213:36: error: ‘ffms_open_resampler’ was not declared in this scope
if (ffms_open_resampler(newContext))
^
src/core/audiosource.cpp:216:13: error: request for member ‘swap’ in ‘newContext’, which is of non-class type ‘FFResampleContext {aka int}’
newContext.swap(ResampleContext);
^
src/core/audiosource.cpp: In member function ‘std::unique_ptr<FFMS_ResampleOptions> FFMS_AudioSource::CreateResampleOptions() const’:
src/core/audiosource.cpp:220:58: error: no matching function for call to ‘ReadOptions(const FFResampleContext&, OptionMapper<FFMS_ResampleOptions> [17])’
auto ret = ReadOptions(ResampleContext, resample_options);
^
src/core/audiosource.cpp:220:58: note: candidate is:
In file included from src/core/audiosource.h:24:0,
from src/core/audiosource.cpp:21:
src/core/utils.h:198:20: note: template<class T, int N> std::unique_ptr<T> ReadOptions(void*, OptionMapper<T> (&)[N])
std::unique_ptr<T> ReadOptions(void *opt, OptionMapper<T> (&options)[N]) {
^
src/core/utils.h:198:20: note: template argument deduction/substitution failed:
src/core/audiosource.cpp:220:58: note: cannot convert ‘((const FFMS_AudioSource*)this)->FFMS_AudioSource::ResampleContext’ (type ‘const FFResampleContext {aka const int}’) to type ‘void*’
auto ret = ReadOptions(ResampleContext, resample_options);
^
src/core/audiosource.cpp: In member function ‘void FFMS_AudioSource::ResampleAndCache(FFMS_AudioSource::CacheIterator)’:
src/core/audiosource.cpp:236:130: error: ‘ffms_convert’ was not declared in this scope
DecodeFrame->extended_data, DecodeFrame->nb_samples, av_get_bytes_per_sample(CodecContext->sample_fmt), DecodeFrame->nb_samples);
^
src/core/audiosource.cpp: In member function ‘std::unique_ptr<FFMS_ResampleOptions> FFMS_AudioSource::CreateResampleOptions() const’:
src/core/audiosource.cpp:225:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
<builtin>: recipe for target 'src/core/audiosource.o' failed
make: *** [src/core/audiosource.o] Error 1


Wheezy compiles a bit further, but eventually errors out here:

CXX src/avxsynth/avisynth.o
In file included from src/avxsynth/avisynth.cpp:25:0:
src/avxsynth/avsutils.h:31:1: error: ‘PixelFormat’ does not name a type
src/avxsynth/avisynth.cpp: In function ‘avxsynth::AVSValue CreateFFIndex(avxsynth::AVSValue, void*, avxsynth::IScriptEnvironment*)’:
src/avxsynth/avisynth.cpp:75:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
make: *** [src/avxsynth/avisynth.o] Error 1


Strange? I'm not running any special CFLAGS etc, just doublechecked it. GCC and all tools are Debian official ones.

BR,

-J

jammupatu
5th November 2015, 18:55
Installed a fresh Jessie 64-bit as a virtual machine and the same problem occurred.

BR,

-J

jammupatu
9th November 2015, 18:01
Installed a fresh Jessie 64-bit as a virtual machine and the same problem occurred.

BR,

-J

Fixed by deploying another Jessie 64-bit virtual machine and making a build environment from scratch. The important thing was that I paid attention on what packages to install. In my case Libav / FFMPEG ones were a big no-no as I am compiling a lot of custom stuff which links to my FFMPEG.

Also, I couldn't / can't accomplish the build process with the official repo. Here is how I compiled it (includes source):


git clone git://github.com/qyot27/ffms2.git
cd ffms2
git checkout patches
./configure --enable-avxsynth --enable-shared --enable-pic
make
make install or checkinstall <params>


-J

perforator
21st January 2016, 19:51
Hi,
I just wonder if one can run all scripts made for Avisynth in Avxsynth ? Or is it perhaps more depending on different plugins?

More precisely these made by "videoFred" http://forum.doom9.org/showthread.php?t=144271


I havn't been able to build a working setup on my Linux Mint installation, else I would have tried on my own. :(

:helpful:

qyot27
21st January 2016, 20:36
Hi,
I just wonder if one can run all scripts made for Avisynth in Avxsynth ? Or is it perhaps more depending on different plugins?
No, it cannot. Only *maybe* five plugins were ever ported to AvxSynth. Only the core functions mostly work (although a couple are disabled).

More precisely these made by "videoFred" http://forum.doom9.org/showthread.php?t=144271
And I don't think any of those plugins were the ones that did get ports.


You're best off installing AviSynth and plugins under Wine and then either encoding with Windows builds of FFmpeg, x264, etc. or piping to native Linux builds of those tools with avs2pipemod or a Windows build of FFmpeg. Or trying to replicate those scripts in Python with VapourSynth and its plugins (which are available natively).

foxyshadis
21st January 2016, 20:56
This project is as dead as it gets; VapourSynth is a Linux-compatible replacement. The scripts aren't Avisynth compatible, but yours likely can easily be reworked into VS scripts, most of the common plugins have been ported. As a side benefit, it's a lot faster than Avisynth.